diff --git a/apps/macos/Sources/Clawdis/Resources/WebChat/ChatPanel.js b/apps/macos/Sources/Clawdis/Resources/WebChat/ChatPanel.js index 03f1fd95f..2aec93b12 100644 --- a/apps/macos/Sources/Clawdis/Resources/WebChat/ChatPanel.js +++ b/apps/macos/Sources/Clawdis/Resources/WebChat/ChatPanel.js @@ -57,6 +57,8 @@ let ChatPanel = class ChatPanel extends LitElement { this.agentInterface.enableModelSelector = false; this.agentInterface.enableThinkingSelector = true; this.agentInterface.showThemeToggle = false; + // In embedded mode, bypass API key prompts; native transport handles auth. + this.agentInterface.onApiKeyRequired = async () => true; this.agentInterface.onApiKeyRequired = config?.onApiKeyRequired; this.agentInterface.onBeforeSend = config?.onBeforeSend; this.agentInterface.onCostClick = config?.onCostClick; diff --git a/apps/macos/Sources/Clawdis/Resources/WebChat/bootstrap.js b/apps/macos/Sources/Clawdis/Resources/WebChat/bootstrap.js index 84de07a55..d2d59a5ea 100644 --- a/apps/macos/Sources/Clawdis/Resources/WebChat/bootstrap.js +++ b/apps/macos/Sources/Clawdis/Resources/WebChat/bootstrap.js @@ -109,6 +109,14 @@ const startChat = async () => { ); setAppStorage(storage); + // Prepopulate a dummy API key so the UI does not block sends in embedded mode. + const defaultProvider = "anthropic"; + try { + await providerKeysStore.set(defaultProvider, "embedded"); + } catch (err) { + logStatus(`storage warn: could not seed provider key: ${err}`); + } + const agent = new Agent({ initialState: { systemPrompt: "You are Clawd (primary session).", diff --git a/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js b/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js index 57d52c1e6..ee27c396e 100644 --- a/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js +++ b/apps/macos/Sources/Clawdis/Resources/WebChat/webchat.bundle.js @@ -195306,6 +195306,7 @@ var init_ChatPanel = __esmMin((() => { this.agentInterface.enableModelSelector = false; this.agentInterface.enableThinkingSelector = true; this.agentInterface.showThemeToggle = false; + this.agentInterface.onApiKeyRequired = async () => true; this.agentInterface.onApiKeyRequired = config?.onApiKeyRequired; this.agentInterface.onBeforeSend = config?.onBeforeSend; this.agentInterface.onCostClick = config?.onCostClick; @@ -195921,6 +195922,12 @@ const startChat = async () => { } const storage = new AppStorage$1(settingsStore, providerKeysStore, sessionsStore, customProvidersStore, backend); setAppStorage$1(storage); + const defaultProvider = "anthropic"; + try { + await providerKeysStore.set(defaultProvider, "embedded"); + } catch (err) { + logStatus(`storage warn: could not seed provider key: ${err}`); + } const agent = new Agent$1({ initialState: { systemPrompt: "You are Clawd (primary session).",