@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 06:00 UTC

next
ts 26 lines 1.02 KB
Raw
1 import type { AuthConfigItem } from 'src/models/auth-configs';
2 import { bold } from 'src/ui/colors';
3 import { redact } from 'src/ui/redact';
4
5 /**
6 * Format a single auth config for interactive display.
7 */
8 export function formatAuthConfigInfo(item: AuthConfigItem): string {
9 const lines: string[] = [];
10
11 lines.push(`${bold('Id:')} ${redact({ value: item.id, prefix: 'ac_' })}`);
12 lines.push(`${bold('Name:')} ${item.name}`);
13 lines.push(`${bold('Toolkit:')} ${item.toolkit.slug}`);
14 lines.push(`${bold('Auth Scheme:')} ${item.auth_scheme || '(none)'}`);
15 lines.push(`${bold('Type:')} ${item.type}`);
16 lines.push(`${bold('Status:')} ${item.status}`);
17 lines.push(`${bold('Composio Managed:')} ${item.is_composio_managed ? 'Yes' : 'No'}`);
18 lines.push(`${bold('Tool Router:')} ${item.is_enabled_for_tool_router ? 'Enabled' : 'Disabled'}`);
19 lines.push(`${bold('Connected Accounts:')} ${item.no_of_connections}`);
20
21 if (item.created_at) {
22 lines.push(`${bold('Created:')} ${item.created_at}`);
23 }
24
25 return lines.join('\n');
26 }