(line: string, threshold: string)
| 848 | } |
| 849 | |
| 850 | export function shouldSkipLine(line: string, threshold: string): boolean { |
| 851 | const head = line.length > RAW_HEAD_BYTES ? line.slice(0, RAW_HEAD_BYTES) : line |
| 852 | const type = getTopLevelRawJsonStringField(head, 'type') |
| 853 | if (type !== 'user' && type !== 'assistant') return false |
| 854 | const ts = getTopLevelRawJsonStringField(head, 'timestamp') |
| 855 | if (!ts || ts.length < 10) return false |
| 856 | return ts < threshold |
| 857 | } |
| 858 | |
| 859 | const USER_TEXT_CAP = 2000 |
| 860 | const BASH_COMMAND_CAP = 2000 |
no test coverage detected