(str: string)
| 1326 | |
| 1327 | // Count tokens approximation (very rough estimate) |
| 1328 | const estimateTokens = (str: string) => { |
| 1329 | // Rough approximation: ~4 characters per token |
| 1330 | return Math.ceil(str.length / 4); |
| 1331 | }; |
| 1332 | |
| 1333 | const inputTokens = hasInput ? estimateTokens(inputString) : 0; |
| 1334 |