MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / markWebviewReady

Method markWebviewReady

apps/cli/src/agent/extension-host.ts:443–456  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

441 public unregisterWebviewProvider(_viewId: string): void {}
442
443 public markWebviewReady(): void {
444 this.isReady = true
445
446 // Apply CLI settings to the runtime config and context proxy BEFORE
447 // sending webviewDidLaunch. This prevents a race condition where the
448 // webviewDidLaunch handler's first-time init sync reads default state
449 // (apiProvider: "anthropic") instead of the CLI-provided settings.
450 setRuntimeConfigValues("zoo-code", this.initialSettings as Record<string, unknown>)
451 this.sendToExtension({ type: "updateSettings", updatedSettings: this.initialSettings })
452
453 // Now trigger extension initialization. The context proxy should already
454 // have CLI-provided values when the webviewDidLaunch handler runs.
455 this.sendToExtension({ type: "webviewDidLaunch" })
456 }
457
458 public isInInitialSetup(): boolean {
459 return !this.isReady

Callers

nothing calls this directly

Calls 2

sendToExtensionMethod · 0.95
setRuntimeConfigValuesFunction · 0.90

Tested by

no test coverage detected