| 38 | function iconFor(name) { return ICONS[name] || ICONS.Bash; } |
| 39 | |
| 40 | function toolDesc(name, input) { |
| 41 | if (!input) return ''; |
| 42 | switch (name) { |
| 43 | case 'Bash': return input.description || input.command || ''; |
| 44 | case 'Read': return input.file_path || ''; |
| 45 | case 'Write': return input.file_path || ''; |
| 46 | case 'Edit': return input.file_path || ''; |
| 47 | case 'Glob': return input.pattern || ''; |
| 48 | case 'Grep': return input.pattern || ''; |
| 49 | case 'WebFetch': return input.url || ''; |
| 50 | case 'WebSearch': return input.query || ''; |
| 51 | case 'Task': return input.description || input.prompt || ''; |
| 52 | case 'Skill': return input.name || input.skill || input.skill_name || 'skill'; |
| 53 | default: return JSON.stringify(input).substring(0, 80); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | function toolInputFull(name, input) { |
| 58 | if (!input) return ''; |