Preserve conversation excerpts and deduplicate case evidence

This commit is contained in:
2026-10-17 19:35:52 -04:00
parent 83f1c91877
commit ef96a2c308
13 changed files with 1222 additions and 50 deletions
+9 -3
View File
@@ -123,9 +123,15 @@ export function serverChatTimeline(server: ServerRow, tail: TailResult): Context
export function matchChatTimeline(matchId: number): ContextualChatEntry[] {
return (
db()
.prepare('SELECT entry FROM match_chat WHERE match_id = ? ORDER BY rowid')
.all(matchId) as { entry: string }[]
).map((row) => JSON.parse(row.entry));
.prepare(
'SELECT message_key,occurrence,entry FROM match_chat WHERE match_id = ? ORDER BY rowid'
)
.all(matchId) as { message_key: string; occurrence: number; entry: string }[]
).map((row) => ({
...JSON.parse(row.entry),
matchId,
messageId: `${matchId}:${row.message_key}:${row.occurrence}`
}));
}
/** Save before filtering the live view so completed matches retain their messages. */