mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-29 02:24:02 +02:00
Refactor Composio integration handling and improve UI components
- Updated composio-handler.ts to invalidate the copilot instructions cache upon connection and disconnection. - Removed unused functions related to tool management in composio-handler.ts. - Enhanced IPC handlers in ipc.ts to streamline Composio connection processes. - Introduced ComposioConnectCard in the renderer to display connection status and handle events. - Refactored tool rendering in App.tsx and chat-sidebar.tsx to utilize new tabbed content for parameters and results. - Improved Composio tools prompt generation in instructions.ts to clarify integration usage and discovery flow. - Cleaned up unused code and improved overall structure for better maintainability.
This commit is contained in:
parent
abf6901cc9
commit
7f8d2e64af
18 changed files with 864 additions and 812 deletions
32
apps/x/packages/shared/src/composio.ts
Normal file
32
apps/x/packages/shared/src/composio.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* Composio display-name map: toolkit slug → human-readable name.
|
||||
* Single source of truth — used by both core and renderer.
|
||||
*/
|
||||
export const COMPOSIO_DISPLAY_NAMES: Record<string, string> = {
|
||||
gmail: 'Gmail',
|
||||
slack: 'Slack',
|
||||
microsoft_outlook: 'Microsoft Outlook',
|
||||
microsoft_teams: 'Microsoft Teams',
|
||||
googlecalendar: 'Google Calendar',
|
||||
googledocs: 'Google Docs',
|
||||
googlesheets: 'Google Sheets',
|
||||
notion: 'Notion',
|
||||
airtable: 'Airtable',
|
||||
calendly: 'Calendly',
|
||||
cal: 'Cal.com',
|
||||
googledrive: 'Google Drive',
|
||||
dropbox: 'Dropbox',
|
||||
onedrive: 'OneDrive',
|
||||
github: 'GitHub',
|
||||
linear: 'Linear',
|
||||
jira: 'Jira',
|
||||
asana: 'Asana',
|
||||
trello: 'Trello',
|
||||
hubspot: 'HubSpot',
|
||||
salesforce: 'Salesforce',
|
||||
linkedin: 'LinkedIn',
|
||||
twitter: 'X',
|
||||
reddit: 'Reddit',
|
||||
intercom: 'Intercom',
|
||||
zendesk: 'Zendesk',
|
||||
};
|
||||
|
|
@ -377,18 +377,6 @@ const ipcSchemas = {
|
|||
toolkits: z.array(z.string()),
|
||||
}),
|
||||
},
|
||||
'composio:execute-action': {
|
||||
req: z.object({
|
||||
actionSlug: z.string(),
|
||||
toolkitSlug: z.string(),
|
||||
input: z.record(z.string(), z.unknown()),
|
||||
}),
|
||||
res: z.object({
|
||||
data: z.unknown(),
|
||||
successful: z.boolean(),
|
||||
error: z.string().nullable(),
|
||||
}),
|
||||
},
|
||||
'composio:use-composio-for-google': {
|
||||
req: z.null(),
|
||||
res: z.object({
|
||||
|
|
@ -432,58 +420,6 @@ const ipcSchemas = {
|
|||
totalItems: z.number(),
|
||||
}),
|
||||
},
|
||||
'composio:list-toolkit-tools': {
|
||||
req: z.object({
|
||||
toolkitSlug: z.string(),
|
||||
search: z.string().optional(),
|
||||
}),
|
||||
res: z.object({
|
||||
items: z.array(z.object({
|
||||
slug: z.string(),
|
||||
name: z.string(),
|
||||
description: z.string(),
|
||||
toolkitSlug: z.string(),
|
||||
inputParameters: z.object({
|
||||
type: z.string().optional(),
|
||||
properties: z.record(z.string(), z.unknown()).optional(),
|
||||
required: z.array(z.string()).optional(),
|
||||
}).optional(),
|
||||
})),
|
||||
}),
|
||||
},
|
||||
'composio:get-enabled-tools': {
|
||||
req: z.null(),
|
||||
res: z.object({
|
||||
tools: z.record(z.string(), z.object({
|
||||
slug: z.string(),
|
||||
name: z.string(),
|
||||
description: z.string(),
|
||||
toolkitSlug: z.string(),
|
||||
})),
|
||||
}),
|
||||
},
|
||||
'composio:enable-tools': {
|
||||
req: z.object({
|
||||
tools: z.array(z.object({
|
||||
slug: z.string(),
|
||||
name: z.string(),
|
||||
description: z.string(),
|
||||
toolkitSlug: z.string(),
|
||||
inputParameters: z.object({
|
||||
type: z.string().optional(),
|
||||
properties: z.record(z.string(), z.unknown()).optional(),
|
||||
required: z.array(z.string()).optional(),
|
||||
}).optional(),
|
||||
})),
|
||||
}),
|
||||
res: z.object({ success: z.boolean() }),
|
||||
},
|
||||
'composio:disable-tools': {
|
||||
req: z.object({
|
||||
toolSlugs: z.array(z.string()),
|
||||
}),
|
||||
res: z.object({ success: z.boolean() }),
|
||||
},
|
||||
// Agent schedule channels
|
||||
'agent-schedule:getConfig': {
|
||||
req: z.null(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue