feat(chat): conversations persistantes + mémoire multi-tour (v0.36.0)

Store SQLite conversations/messages (propriété par actor, fenêtre 20),
historique rejoué au LLM (runAgentTurn history), ChatService persiste et
renvoie conversationId. API GET/DELETE /conversations + chat avec
conversationId. UI Chat: sidebar conversations (drawer mobile), nouvelle,
reprise, suppression. docs/conversations.md. 83 tests verts, build web vert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016w5jRe87MGdd6AMvXQcHNi
This commit is contained in:
Kantin-Petit
2026-06-23 23:25:42 +02:00
parent 4f3c85901e
commit 0da5e2aba1
11 changed files with 660 additions and 89 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ const auth: AuthConfig = {
// ChatService stub : pas de vrai LLM.
const chatStub = {
handle: async (_actor: string, text: string) => `echo:${text}`,
handle: async (_actor: string, text: string) => ({ reply: `echo:${text}`, conversationId: null }),
} as unknown as ChatService;
let app: FastifyInstance;
@@ -29,7 +29,7 @@ beforeEach(async () => {
repo = new AssetRepository(":memory:");
const review = new ReviewService(repo, log);
app = Fastify();
await registerApi(app, { auth, chat: chatStub, review, state: () => ({ phase: "2-write-review", tools: 3 }) });
await registerApi(app, { auth, chat: chatStub, review, conversations: null, state: () => ({ phase: "2-write-review", tools: 3 }) });
await app.ready();
});
afterEach(async () => {