(list)
| 763 | } |
| 764 | |
| 765 | function nativeToolConfigSwitches(list) { |
| 766 | const names = new Set((Array.isArray(list) ? list : []) |
| 767 | .map(v => String(v || '').trim()) |
| 768 | .filter(Boolean)); |
| 769 | const has = (...aliases) => aliases.some(name => names.has(name)); |
| 770 | return { |
| 771 | runCommand: has('run_command', 'shell_command', 'shell', 'Bash'), |
| 772 | viewFile: has('view_file', 'read_file', 'Read'), |
| 773 | listDir: has('list_dir', 'list_directory'), |
| 774 | grepV2: has('grep_v2', 'grep_search_v2', 'grep_search', 'Grep'), |
| 775 | find: has('find', 'Glob'), |
| 776 | searchWeb: has('search_web', 'web_search', 'WebSearch', 'ToolSearch'), |
| 777 | readUrlContent: has('read_url_content', 'WebFetch'), |
| 778 | }; |
| 779 | } |
| 780 | |
| 781 | /** |
| 782 | * Build GetCascadeTrajectoryStepsRequest. |
no test coverage detected