Optimize streaming updates and clear optimistic parts
This commit is contained in:
@@ -2,7 +2,7 @@ import { createSignal } from "solid-js"
|
||||
import type { Instance, LogEntry } from "../types/instance"
|
||||
import { sdkManager } from "../lib/sdk-manager"
|
||||
import { sseManager } from "../lib/sse-manager"
|
||||
import { fetchSessions, fetchAgents, fetchProviders } from "./sessions"
|
||||
import { fetchSessions, fetchAgents, fetchProviders, removeSessionIndexes } from "./sessions"
|
||||
import { preferences, updateLastUsedBinary } from "./preferences"
|
||||
|
||||
const [instances, setInstances] = createSignal<Map<string, Instance>>(new Map())
|
||||
@@ -39,6 +39,9 @@ function removeInstance(id: string) {
|
||||
if (activeInstanceId() === id) {
|
||||
setActiveInstanceId(null)
|
||||
}
|
||||
|
||||
// Clean up session indexes for removed instance
|
||||
removeSessionIndexes(id)
|
||||
}
|
||||
|
||||
async function createInstance(folder: string, binaryPath?: string): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user