(baseTools: string[])
| 650 | * Handles both preset names (default, none) and custom tool lists |
| 651 | */ |
| 652 | export function parseBaseToolsFromCLI(baseTools: string[]): string[] { |
| 653 | // Join all array elements and check if it's a single preset name |
| 654 | const joinedInput = baseTools.join(' ').trim() |
| 655 | const preset = parseToolPreset(joinedInput) |
| 656 | |
| 657 | if (preset) { |
| 658 | return getToolsForDefaultPreset() |
| 659 | } |
| 660 | |
| 661 | // Parse as a custom tool list using the same parsing logic as allowedTools/disallowedTools |
| 662 | const parsedTools = parseToolListFromCLI(baseTools) |
| 663 | |
| 664 | return parsedTools |
| 665 | } |
| 666 | |
| 667 | /** |
| 668 | * Check if processPwd is a symlink that resolves to originalCwd |
no test coverage detected