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
+18
View File
@@ -6,6 +6,24 @@ incompatibles. Chaque ligne renvoie à un commit dédié (un artefact = un commi
## [Unreleased]
## [0.36.0] — 2026-06-23 — conversations persistantes (mémoire multi-tour)
### Added
- **`conversations/store.ts`** : store SQLite (conversations + messages) avec
propriété par `actor`, fenêtre de contexte (`HISTORY_WINDOW=20`), titres auto.
- **Historique rejoué au LLM** : `runAgentTurn({ history })` ; `ChatService`
charge l'historique récent, persiste user+assistant, renvoie `conversationId`.
- API : `GET/DELETE /api/conversations`, `GET /api/conversations/:id` ;
`POST /api/chat` accepte `conversationId` et renvoie `{ reply, conversationId }`.
- **UI Chat** : barre latérale des conversations (drawer mobile / fixe md+),
Nouvelle, reprise, suppression.
- `docs/conversations.md`. Telegram : `conversationId` stable par utilisateur.
- Tests : store + mémoire multi-tour + isolation par acteur (83 tests verts).
### Changed
- `ChatService.handle` renvoie `{ reply, conversationId }` (était `string`) ;
appelants (API, Telegram) adaptés.
### Notes
- Mobile (Expo) : chat encore sans état (branchement conversations = suivi).
## [0.35.0] — 2026-06-23 — UI responsive (mobile)
### Fixed
- **Header** : `flex-wrap` + paddings/marges réduits sur petit écran, « · N outils »