(chunk: string)
| 879 | ` |
| 880 | |
| 881 | async function summarizeTranscriptChunk(chunk: string): Promise<string> { |
| 882 | try { |
| 883 | const result = await queryWithModel({ |
| 884 | systemPrompt: asSystemPrompt([]), |
| 885 | userPrompt: SUMMARIZE_CHUNK_PROMPT + chunk, |
| 886 | signal: new AbortController().signal, |
| 887 | options: { |
| 888 | model: getAnalysisModel(), |
| 889 | querySource: 'insights', |
| 890 | agents: [], |
| 891 | isNonInteractiveSession: true, |
| 892 | hasAppendSystemPrompt: false, |
| 893 | mcpTools: [], |
| 894 | maxOutputTokensOverride: 500, |
| 895 | }, |
| 896 | }) |
| 897 | |
| 898 | const text = extractTextContent(result.message.content) |
| 899 | return text || chunk.slice(0, 2000) |
| 900 | } catch { |
| 901 | // On error, just return truncated chunk |
| 902 | return chunk.slice(0, 2000) |
| 903 | } |
| 904 | } |
| 905 | |
| 906 | async function formatTranscriptWithSummarization( |
| 907 | log: LogOption, |
nothing calls this directly
no test coverage detected