feat: auto-delete old conversations, and stop a tool call that repeats (#15)

This commit was merged in pull request #15.
This commit is contained in:
2026-10-05 09:05:15 +00:00
parent 576c5946f7
commit 05fd9ff13b
25 changed files with 2372 additions and 59 deletions
+21
View File
@@ -90,6 +90,14 @@ export interface ToolCallRecord {
arguments: Record<string, unknown>;
result: string;
isError: boolean;
/**
* Set when the call was refused because the turn had already made it twice.
*
* Stored rather than inferred from the message text, so the transcript can say
* what happened in its own words, and so a repeat that ended a turn stays
* visible even when the user has hidden tool calls from the transcript.
*/
repeated?: boolean;
}
/** One question and its answer. The unit the transcript is rendered from. */
@@ -125,6 +133,19 @@ export interface SessionSummary {
updatedAt: number;
turnCount: number;
preview: string;
/**
* Every image path any turn in this conversation refers to.
*
* Kept here rather than derived from the turns for one reason: the orphan
* sweep needs to know which snips are still spoken for, and loading every
* transcript to find out would mean a hundred JSON parses on every turn.
*
* Absent on entries written before this field existed, which is deliberately
* not the same as an empty array: an absent value means "unknown", and the
* sweep resolves it by reading that one transcript rather than by assuming the
* conversation has no screenshots and deleting them.
*/
attachmentPaths?: string[];
}
/** A model as reported by `GET /api/tags`. */