feat(ai): services partages A2 + SSE streaming B4 + confirmations UI B5 (#79)
CI / lint (push) Successful in 58s
CI / security (push) Successful in 40s
CI / test (push) Successful in 1m15s
CI / build (push) Successful in 37s
CI / e2e (push) Successful in 10m15s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Successful in 58s
CI / security (push) Successful in 40s
CI / test (push) Successful in 1m15s
CI / build (push) Successful in 37s
CI / e2e (push) Successful in 10m15s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
This commit is contained in:
@@ -28,6 +28,15 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
fallback automatique en chat simple si le provider rejette les tools. Tests : `tests/test_agent_loop.py`,
|
||||
`tests/test_ai_chat.py`, `tests/test_bookslm.py`.
|
||||
|
||||
- **#79 A2/B4/B5 — services partagés, SSE streaming & confirmations UI** — extraction de la logique
|
||||
lecture/recherche dans `backend/services/` (`errors.py`, `paths.py`, `vaults.py`, `files.py`,
|
||||
`search.py`) : routes REST et outils IA consomment la même source ; `ServiceError` mappée vers
|
||||
`HTTPException` (routes) et `ToolError` (outils). `/api/ai/bookslm/chat` **streame réellement** les
|
||||
tokens (`stream_completion`, OpenAI-compat + Gemini ; GZip ignoré pour les SSE BooksLM). Mode agent
|
||||
côté UI (toggle, événements `tool`/`confirmation`, carte Apply + aperçu diff LCS) et reprise
|
||||
`confirm`/`confirm_messages` de l'agent loop (confirmation one-shot). Tests : `tests/test_services.py`,
|
||||
`tests/test_ai_chat.py`, `tests/test_agent_loop.py`, `tests/test_bookslm.py`.
|
||||
|
||||
- **#79 G — Sélection fournisseur/modèle par défaut** — `ai_default_provider` + `ai_default_models`
|
||||
persistés dans `data/config.json`, rechargement à chaud dans `backend/ai.py`, sélecteurs
|
||||
« Fournisseur par défaut » / « Modèle par défaut » dans `#cfg-ai`, i18n FR/EN.
|
||||
@@ -46,6 +55,10 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
renderer bloc/inline complet ; l'en-tête expose un bouton « Historique des sessions » ; les badges
|
||||
de sources ouvrent désormais réellement le fichier (événement `obsigate:open-file`).
|
||||
|
||||
- **Assistant IA (`frontend/js/bookslm.js`)** — bouton « mode agent » dans l'en-tête (persisté en
|
||||
`localStorage`) : l'envoi bascule vers `/api/ai/bookslm/agent`, affiche la trace des appels d'outils
|
||||
et les cartes de confirmation (Apply + aperçu diff) ; `/chat` reste le défaut. i18n FR/EN.
|
||||
|
||||
### Corrigé
|
||||
|
||||
- **Typage backend (mypy) — 33 erreurs corrigées** (`backend/main.py`, `indexer.py`,
|
||||
|
||||
Reference in New Issue
Block a user