(content: ContentBlock[])
| 147 | } |
| 148 | |
| 149 | function extractText(content: ContentBlock[]): string { |
| 150 | return content |
| 151 | .filter((b): b is Extract<ContentBlock, { type: 'text' }> => b.type === 'text') |
| 152 | .map(b => b.text) |
| 153 | .join(''); |
| 154 | } |
| 155 | |
| 156 | export default defineCommand({ |
| 157 | name: 'text chat', |