feat: Windows 环境优先使用 PowerShell 工具替代 bash

This commit is contained in:
Rick Ye
2026-09-10 14:18:47 +08:00
parent cafb6f34de
commit 0bae7cdc22
2 changed files with 30 additions and 2 deletions
@@ -105,7 +105,7 @@ function extractResultText(result: unknown): string {
function toolMeta(name: string): { icon: keyof typeof STEP_ICONS; label: string } {
if (/^read|get|list|查|读|搜/i.test(name)) return { icon: 'read', label: '读取' }
if (/^write|^edit|^multiedit|写|改|删|建|核/i.test(name)) return { icon: 'write', label: '编辑' }
if (/^bash|^shell|^terminal|终端/i.test(name)) return { icon: 'run', label: '终端' }
if (/^bash|^shell|^terminal|^powershell|终端/i.test(name)) return { icon: 'run', label: '终端' }
if (/read|get|search|query|fetch|list|查|读|搜/i.test(name)) return { icon: 'read', label: '读取' }
if (/write|edit|update|create|delete|patch|save|写|改|删|建|核/i.test(name)) return { icon: 'write', label: '编辑' }
return { icon: 'run', label: name }