Fix provider snapshot session hydration and agent scoping
This commit is contained in:
@@ -70,7 +70,6 @@ import {
|
||||
workspaceTabTargetsEqual,
|
||||
} from "@/utils/workspace-tab-identity";
|
||||
import { useHostRuntimeClient, useHostRuntimeIsConnected } from "@/runtime/host-runtime";
|
||||
import { prefetchProvidersSnapshot } from "@/hooks/use-providers-snapshot";
|
||||
import { useWorkspaceTerminalSessionRetention } from "@/terminal/hooks/use-workspace-terminal-session-retention";
|
||||
import {
|
||||
checkoutStatusQueryKey,
|
||||
@@ -609,16 +608,6 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
||||
const client = useHostRuntimeClient(normalizedServerId);
|
||||
const isConnected = useHostRuntimeIsConnected(normalizedServerId);
|
||||
|
||||
useEffect(() => {
|
||||
if (!client || !isConnected || !normalizedServerId) {
|
||||
return;
|
||||
}
|
||||
const session = useSessionStore.getState().sessions[normalizedServerId];
|
||||
if (session?.serverInfo?.features?.providersSnapshot) {
|
||||
prefetchProvidersSnapshot(normalizedServerId, client);
|
||||
}
|
||||
}, [client, isConnected, normalizedServerId]);
|
||||
|
||||
const workspaceAgentVisibility = useStoreWithEqualityFn(
|
||||
useSessionStore,
|
||||
(state) =>
|
||||
|
||||
Reference in New Issue
Block a user