( adapter: SessionRuntimeAdapter, sessionId: string, segmentId: number, serviceDeps: SummaryServiceDeps, options?: SummaryOptions )
| 59 | } |
| 60 | |
| 61 | export async function generateSummary( |
| 62 | adapter: SessionRuntimeAdapter, |
| 63 | sessionId: string, |
| 64 | segmentId: number, |
| 65 | serviceDeps: SummaryServiceDeps, |
| 66 | options?: SummaryOptions |
| 67 | ) { |
| 68 | const llmConfig = serviceDeps.getLlmConfig() |
| 69 | if (!llmConfig) { |
| 70 | return { success: false as const, error: 'No LLM configuration available' } |
| 71 | } |
| 72 | |
| 73 | const db = adapter.ensureWritable(sessionId) |
| 74 | const deps = buildSummaryDeps(db, llmConfig, serviceDeps) |
| 75 | return generateSessionSummary(deps, segmentId, options) |
| 76 | } |
| 77 | |
| 78 | export async function generateAllSummaries( |
| 79 | adapter: SessionRuntimeAdapter, |
nothing calls this directly
no test coverage detected