Moteur code façon Claude Code : Aider intégré avec routage automatique

- coder.py : enveloppe Aider (version figée 0.86.2), commits git auto dans le
  workspace, verrou d'exécution, dégradation propre si absent
- router.py : classification automatique de chaque message (heuristique
  lexicale + micro-classification LLM sur les cas ambigus) — invisible pour
  l'utilisateur
- routes/chat.py : routage code/agent, chemin code avec keepalive SSE,
  cartes fichier + commit dans le fil, meta.engine persisté
- agent.py : outil code_task exécuté en thread — l'agent peut coder lui-même
- tools/agent_config : code_task enregistré (actif par défaut), invite système
  mise à jour
- main.py : workspace auto-initialisé en dépôt git au démarrage
- Dockerfile : git ; requirements : aider-chat==0.86.2
- UI : glyphe code_task, description outil, aperçu d'instruction

Tests : heuristiques 7/7, routage HTTP code+agent de bout en bout (SSE,
meta persistée), agent appelant code_task, build front.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVay7z3y7q2gEe54ByAE6N
This commit is contained in:
Claude committed 2026-07-02 05:27:58 +00:00
1 parent ecadf55743
commit ac801aa71b
12 files changed
+356 -15

No files matched your search

+8 -1
View File
@@ -10,7 +10,8 @@ export function ToolCard({ call }: { call: ToolCall }) {
const mainArg =
(call.args?.path as string) ??
(call.args?.query as string) ??
(call.args?.command as string);
(call.args?.command as string) ??
(call.args?.instruction as string);
const argPreview =
typeof mainArg === "string"
? `("${mainArg.length > 48 ? mainArg.slice(0, 48) + "…" : mainArg}")`
@@ -82,6 +83,12 @@ function ToolGlyph({ name }: { name: string }) {
<path d="M4 7h6l2 2h8v9H4z" />
</svg>
);
if (name === "code_task")
return (
<svg {...common}>
<path d="m8 6-5 6 5 6M16 6l5 6-5 6" />
</svg>
);
if (name === "web_search")
return (
<svg {...common}>
+1
View File
@@ -8,6 +8,7 @@ const TOOL_DESC: Record<string, string> = {
read_file: "Lire un fichier du projet",
write_file: "Créer / modifier un fichier",
list_dir: "Lister un répertoire",
code_task: "Moteur code (multi-fichiers, git)",
web_search: "Recherche web",
run_shell: "Exécuter une commande",
};