@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, 04:45 UTC

next
ts 9 lines 361 Bytes
Raw
1 /** Locate the root command after shared options, leaving the original argv intact. */
2 export const rootCommandIndex = (args: ReadonlyArray<string>): number => {
3 let index = 0;
4 while (index < args.length && args[index].startsWith('-')) {
5 if (args[index] === '--') return index;
6 index += args[index] === '--log-level' ? 2 : 1;
7 }
8 return index;
9 };