diff --git a/apps/x/apps/renderer/src/components/settings-dialog.tsx b/apps/x/apps/renderer/src/components/settings-dialog.tsx index 66765d14..143c6292 100644 --- a/apps/x/apps/renderer/src/components/settings-dialog.tsx +++ b/apps/x/apps/renderer/src/components/settings-dialog.tsx @@ -79,7 +79,7 @@ const tabs: TabConfig[] = [ id: "tools", label: "Tools Library", icon: Wrench, - description: "Browse and enable Composio toolkits", + description: "Browse and enable toolkits", }, { id: "note-tagging", @@ -724,7 +724,7 @@ interface ToolkitInfo { composio_managed_auth_schemes?: string[] } -function ToolsLibrarySettings({ dialogOpen }: { dialogOpen: boolean }) { +function ToolsLibrarySettings({ dialogOpen, rowboatConnected }: { dialogOpen: boolean; rowboatConnected: boolean }) { // API key state const [apiKeyConfigured, setApiKeyConfigured] = useState(false) const [apiKeyInput, setApiKeyInput] = useState("") @@ -869,65 +869,67 @@ function ToolsLibrarySettings({ dialogOpen }: { dialogOpen: boolean }) { return (
- {/* Section A: API Key */} -
- Composio API Key - {apiKeyConfigured && !showApiKeyInput ? ( -
-
- - API key configured + {/* Section A: API Key (only in BYOK mode) */} + {!rowboatConnected && ( +
+ Composio API Key + {apiKeyConfigured && !showApiKeyInput ? ( +
+
+ + API key configured +
+
- -
- ) : ( -
-

- Enter your Composio API key to browse and enable tool integrations. - Get your key from{" "} - - app.composio.dev/settings - -

-
- setApiKeyInput(e.target.value)} - placeholder="Paste your Composio API key" - onKeyDown={(e) => e.key === "Enter" && handleSaveApiKey()} - className="flex-1" - /> - - {apiKeyConfigured && ( - - )} + {apiKeyConfigured && ( + + )} +
-
- )} -
+ )} +
+ )} {/* Section B: Toolkit Browser (only when API key configured) */} {apiKeyConfigured && ( @@ -964,11 +966,11 @@ function ToolsLibrarySettings({ dialogOpen }: { dialogOpen: boolean }) { { (e.target as HTMLImageElement).style.display = 'none' }} /> ) : ( -
+
)} @@ -994,7 +996,7 @@ function ToolsLibrarySettings({ dialogOpen }: { dialogOpen: boolean }) { variant="outline" size="sm" onClick={() => handleDisconnect(toolkit.slug)} - className="text-xs h-7 flex-shrink-0" + className="text-xs h-7 shrink-0" > Disconnect @@ -1003,7 +1005,7 @@ function ToolsLibrarySettings({ dialogOpen }: { dialogOpen: boolean }) { size="sm" onClick={() => handleConnect(toolkit.slug)} disabled={isConnecting} - className="text-xs h-7 flex-shrink-0" + className="text-xs h-7 shrink-0" > {isConnecting ? ( <>Connecting... @@ -1649,7 +1651,7 @@ export function SettingsDialog({ children }: SettingsDialogProps) { ) : activeTab === "appearance" ? ( ) : activeTab === "tools" ? ( - + ) : loading ? (
Loading... diff --git a/apps/x/packages/core/src/application/assistant/instructions.ts b/apps/x/packages/core/src/application/assistant/instructions.ts index f647d821..3f923b38 100644 --- a/apps/x/packages/core/src/application/assistant/instructions.ts +++ b/apps/x/packages/core/src/application/assistant/instructions.ts @@ -11,7 +11,17 @@ const runtimeContextPrompt = getRuntimeContextPrompt(getRuntimeContext()); * Lists connected toolkits and explains the meta-tool discovery flow. */ async function getComposioToolsPrompt(): Promise { - if (!(await isComposioConfigured())) return ''; + if (!(await isComposioConfigured())) { + return ` +## Composio Integrations + +**Composio is not configured.** Composio enables integrations with third-party services like Google Sheets, GitHub, Slack, Jira, Notion, LinkedIn, and 20+ others. + +When the user asks to interact with any third-party service (e.g., "connect to Google Sheets", "create a GitHub issue"), do NOT attempt to write code, use shell commands, or load the composio-integration skill. Instead, let the user know that these integrations are available through Composio, and they can enable them by adding their Composio API key in **Settings > Tools Library**. They can get their key from https://app.composio.dev/settings. + +**Exception — Email and Calendar:** For email-related requests (reading emails, sending emails, drafting replies) or calendar-related requests (checking schedule, listing events), do NOT direct the user to Composio. Instead, tell them to connect their email and calendar in **Settings > Connected Accounts**. +`; + } const connectedToolkits = composioAccountsRepo.getConnectedToolkits(); const connectedSection = connectedToolkits.length > 0