Skip to content

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

fix(cli): improve toolkits info visual output

jkomyno8388a4208896
diff --git a/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts b/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
index e97162ec9..4d10baf85 100644
--- a/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
+++ b/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
@@ -26,9 +26,15 @@ function formatFields(fields: ReadonlyArray<AuthConfigDetail['fields']['auth_con
if (allFields.length === 0) {
lines.push(' (none)');
} else {
+ const nameWidth = Math.max(...allFields.map(f => f.name.length));
+ const labelWidth = Math.max(...allFields.map(f => f.label.length));
+ const typeWidth = Math.max(...allFields.map(f => f.type.length));
+
for (const field of allFields) {
const desc = field.description ? ` ${gray(`"${field.description}"`)}` : '';
- lines.push(` ${field.name.padEnd(16)} ${field.label.padEnd(10)} ${field.type}${desc}`);
+ lines.push(
+ ` ${field.name.padEnd(nameWidth)} ${field.label.padEnd(labelWidth)} ${field.type.padEnd(typeWidth)}${desc}`
+ );
}
}
}
diff --git a/ts/packages/cli/src/services/terminal-ui.ts b/ts/packages/cli/src/services/terminal-ui.ts
index a996ef1d5..b4824acc1 100644
--- a/ts/packages/cli/src/services/terminal-ui.ts
+++ b/ts/packages/cli/src/services/terminal-ui.ts
@@ -157,7 +157,9 @@ const makeLive: TerminalUI = {
},
note: (message, title) =>
- Effect.sync(() => decorate(() => p.note(message, title ?? '', { output: process.stderr }))),
+ Effect.sync(() =>
+ decorate(() => p.note(message, title ?? '', { format: line => line, output: process.stderr }))
+ ),
withSpinner: (message, effect, options) =>
isInteractive