From 59e3b6bf51eff6df03435d6856070b759b5bff2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Tue, 30 Jun 2026 21:39:56 -0400 Subject: [PATCH] Add Composio settings panel for external tool configuration Settings > Tools tab lets the user enter their Composio API key and select which toolkits (GitHub, Slack, Gmail, etc.) to enable for agents. The configuration is saved per-org and loaded at agent run time. --- .../src/renderer/src/pages/SettingsPage.tsx | 5 +- .../src/pages/settings/ComposioPanel.tsx | 120 ++++++++++++++++++ 2 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 AgentCompany-New/src/renderer/src/pages/settings/ComposioPanel.tsx diff --git a/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx b/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx index 3c3d9eb9..d829bfe5 100644 --- a/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx +++ b/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx @@ -4,10 +4,11 @@ import { SkillsPanel } from "./settings/SkillsPanel"; import { WorkspacePanel } from "./settings/WorkspacePanel"; import { BillingPanel } from "./settings/BillingPanel"; import { MigrationPanel } from "./settings/MigrationPanel"; +import { ComposioPanel } from "./settings/ComposioPanel"; import type { PageProps } from "./types"; import { activeOrgId, requireActiveEmployee, requireActiveOrganization } from "./types"; -type SettingsTab = "workspace" | "billing" | "providers" | "skills" | "migration"; +type SettingsTab = "workspace" | "billing" | "providers" | "tools" | "skills" | "migration"; interface NavSpec { id: SettingsTab; @@ -18,6 +19,7 @@ const TABS: NavSpec[] = [ { id: "workspace", label: "Workspace" }, { id: "billing", label: "Billing" }, { id: "providers", label: "Providers" }, + { id: "tools", label: "Tools" }, { id: "skills", label: "Skills" }, { id: "migration", label: "Migration" }, ]; @@ -74,6 +76,7 @@ export function SettingsPage({ snapshot, actions }: PageProps) { actions={actions} /> )} + {tab === "tools" && } {tab === "skills" && ( >(new Set()); + const [saved, setSaved] = useState(false); + + const toggle = (id: string) => { + setSelected((prev) => { + const next = new Set(prev); + if (next.has(id)) next.delete(id); + else next.add(id); + return next; + }); + }; + + const handleSave = async (e: FormEvent) => { + e.preventDefault(); + if (!apiKey.trim()) return; + await actions.run(() => window.agentCompany.saveComposioSettings({ + orgId, + apiKey: apiKey.trim(), + toolkits: [...selected], + })); + setSaved(true); + setTimeout(() => setSaved(false), 2000); + }; + + return ( +
+

External Tools

+

+ Connect your agents to external services via Composio. +

+
+ +
+ Toolkits +
+ {AVAILABLE_TOOLKITS.map((toolkit) => ( + + ))} +
+
+
+ + {saved && Saved} +
+
+
+ ); +}