Allow message retries for "pending" status, refactor message context handling, remove workspace import/export routes, and add SQLite-backed rate limiting.
CI / check (22) (push) Failing after 16m26s
CI / check (24) (push) Failing after 15m49s
CI / check (22) (pull_request) Failing after 16m26s
CI / check (24) (pull_request) Failing after 15m50s

This commit is contained in:
2026-10-09 19:28:43 +02:00
parent 8666e09049
commit f67d918d09
13 changed files with 313 additions and 193 deletions
+4 -1
View File
@@ -235,9 +235,12 @@ test("conversation memory exposes context estimates and supports validated summa
const repo = server.app.locals.repositories;
const chat = repo.createChat("memory-editor", "Memory");
repo.createChatMemory("memory-editor", chat, "Prefers concise answers.");
repo.updateChatContextSummary(chat.id, "memory-editor", "Old summary", 0);
const userMessage = repo.insertChatMessage(chat.id, "user", "I prefer short answers.");
const assistantMessage = repo.insertChatMessage(chat.id, "bot", "I will keep them concise.", null, null, "complete", null, Number(userMessage.lastInsertRowid));
repo.updateChatContextSummary(chat.id, "memory-editor", "Old summary", Number(assistantMessage.lastInsertRowid));
const loaded = (await request(server.baseUrl, `/chats/${chat.id}/memories`, {jar})).json;
assert.equal(loaded.summary, "Old summary"); assert.ok(loaded.context.estimatedTokens > 0);
assert.deepEqual(loaded.summarySources.map(message => message.content), ["I prefer short answers.", "I will keep them concise."]);
const update = body => request(server.baseUrl, `/chats/${chat.id}/summary`, {method: "PUT", jar, body});
assert.equal((await update({summary: "Corrected summary", previousSummary: "Old summary"})).status, 200);
assert.equal(repo.getChat(chat.id, "memory-editor").context_summary, "Corrected summary");