| 196 | } |
| 197 | |
| 198 | function getToolPreview(block: { name: string; input: Record<string, unknown> }): string { |
| 199 | const input = block.input; |
| 200 | switch (block.name) { |
| 201 | case 'Write': |
| 202 | case 'Edit': |
| 203 | return `file=${input.file_path || input.path || ''}`; |
| 204 | case 'Read': |
| 205 | return `file=${input.file_path || ''}`; |
| 206 | case 'Bash': |
| 207 | return `cmd=${String(input.command || '').slice(0, 80)}`; |
| 208 | case 'Glob': |
| 209 | case 'Grep': |
| 210 | return `pattern=${input.pattern || ''}`; |
| 211 | default: |
| 212 | return JSON.stringify(input).slice(0, 80); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | interface AppGeneratorOptions { |
| 217 | llmConfigFile: string; |