(handover: AgentHandover)
| 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. */ |
| 65 | export 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. */ |
| 73 | export function peekAgent(modelId: string): AgentHandover | undefined { |
no test coverage detected