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.

cli: traverse descriptors for value tips

jkomyno4a2409a283a6
diff --git a/ts/packages/cli/src/bin.ts b/ts/packages/cli/src/bin.ts
index f246d7042..4d5ef8bb5 100644
--- a/ts/packages/cli/src/bin.ts
+++ b/ts/packages/cli/src/bin.ts
@@ -1,7 +1,7 @@
import process from 'node:process';
import { Cause, Console, Effect, Exit, HashMap, Layer, Logger, Option } from 'effect';
import { captureErrors, prettyPrintFromCapturedErrors } from 'effect-errors/index';
-import { CliConfig, Command, HelpDoc, Usage, ValidationError } from '@effect/cli';
+import { CliConfig, CommandDescriptor, HelpDoc, Usage, ValidationError } from '@effect/cli';
import { FetchHttpClient } from '@effect/platform';
import { BunContext, BunRuntime, BunFileSystem } from '@effect/platform-bun';
import type { Teardown } from '@effect/platform/Runtime';
@@ -125,13 +125,13 @@ const collectValueOptionNamesFromUsage = (usage: Usage.Usage, acc: Set<string>)
const valueOptionNames = (() => {
const names = new Set<string>();
- const visit = (command: Command.Command<unknown>) => {
- collectValueOptionNamesFromUsage(Command.getUsage(command), names);
- for (const [, subcommand] of HashMap.toEntries(Command.getSubcommands(command))) {
+ const visit = (command: CommandDescriptor.Command<unknown>) => {
+ collectValueOptionNamesFromUsage(CommandDescriptor.getUsage(command), names);
+ for (const [, subcommand] of HashMap.toEntries(CommandDescriptor.getSubcommands(command))) {
visit(subcommand);
}
};
- visit(rootCommand);
+ visit(rootCommand.descriptor);
return names;
})();