* Persist the Zoo Code session token to every active provider instance. * * The profile settings write (handleZooCodeCallback) must run on any active * instance — not just the visible one — so the zoo-gateway zooSessionToken is * persisted even when the sidebar/panel is hidden at callback time.
(token: string)
| 19 | * the race. |
| 20 | */ |
| 21 | async function propagateZooGatewayCallback(token: string): Promise<void> { |
| 22 | const allInstances = ClineProvider.getAllInstances() |
| 23 | for (const instance of allInstances) { |
| 24 | try { |
| 25 | await instance.handleZooCodeCallback(token) |
| 26 | } catch (error) { |
| 27 | console.error( |
| 28 | "Failed to persist Zoo Gateway token for a provider instance:", |
| 29 | error instanceof Error ? error.message : error, |
| 30 | ) |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | export const handleUri = async (uri: vscode.Uri) => { |
| 36 | const path = uri.path |
no test coverage detected