MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / keepAgent

Function keepAgent

graph-ui/src/browser-ai/agent-handover.ts:65–70  ·  view source on GitHub ↗
(handover: AgentHandover)

Source from the content-addressed store, hash-verified

63/** An unmounting dock during a switch keeps its model for the next one instead of unloading
64 * it; this is also how React's development double effect gives the model back. */
65export function keepAgent(handover: AgentHandover): boolean {
66 if (!switching) return false;
67 if (handed && handed.runtime !== handover.runtime) handed.runtime.dispose();
68 handed = handover;
69 return true;
70}
71
72/** What the next dock is about to take, for its first render. */
73export function peekAgent(modelId: string): AgentHandover | undefined {

Callers 2

BrowserChatDockFunction · 0.90

Calls 1

disposeMethod · 0.65

Tested by

no test coverage detected