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

next
ts 19 lines 707 Bytes
Raw
1 import type { AuthConfigCreateResponse } from 'src/models/auth-configs';
2 import { bold } from 'src/ui/colors';
3 import { redact } from 'src/ui/redact';
4
5 /**
6 * Format a create auth config response for interactive display.
7 */
8 export function formatAuthConfigCreated(result: AuthConfigCreateResponse): string {
9 const lines: string[] = [];
10
11 lines.push(`${bold('Id:')} ${redact({ value: result.auth_config.id, prefix: 'ac_' })}`);
12 lines.push(`${bold('Auth Scheme:')} ${result.auth_config.auth_scheme}`);
13 lines.push(`${bold('Toolkit:')} ${result.toolkit.slug}`);
14 lines.push(
15 `${bold('Composio Managed:')} ${result.auth_config.is_composio_managed ? 'Yes' : 'No'}`
16 );
17
18 return lines.join('\n');
19 }