({
type,
content
}: Output)
| 140 | * Called per visible message on hover/scroll, so early-exit after finding the |
| 141 | * (MAX+1)th line instead of splitting the whole (possibly huge) content. */ |
| 142 | export function isResultTruncated({ |
| 143 | type, |
| 144 | content |
| 145 | }: Output): boolean { |
| 146 | if (type !== 'create') return false; |
| 147 | let pos = 0; |
| 148 | for (let i = 0; i < MAX_LINES_TO_RENDER; i++) { |
| 149 | pos = content.indexOf(EOL, pos); |
| 150 | if (pos === -1) return false; |
| 151 | pos++; |
| 152 | } |
| 153 | // countLines treats a trailing EOL as a terminator, not a new line |
| 154 | return pos < content.length; |
| 155 | } |
| 156 | export function getToolUseSummary(input: Partial<{ |
| 157 | file_path: string; |
| 158 | content: string; |
nothing calls this directly
no outgoing calls
no test coverage detected