Files
fusion/packages
Josemi Liebana 0ce1b62809 fix(chat): use per-project ChatManager for multi-project message routing
In multi-project mode the global chatManager was backed by ~/.fusion/fusion.db.
Secondary project chat sessions live in per-project DBs, so
chatManager.sendMessage() failed with 'Chat session not found' for any
project that is not the daemon's CWD.

Fix: add getOrCreateScopedChatManager to chat-project-services.ts (cached by
fusionDir, same pattern as the existing chatStore cache). POST /messages,
GET /stream, POST /cancel, and GET /sessions isGenerating enrichment all
resolve the per-project ChatManager when projectId is provided.

Fallback to global chatManager when no projectId (preserves single-project mode).

Tests: added multi-project chat routing describe block in chat-routes.test.ts.
2026-05-26 16:16:38 +02:00
..
2026-05-19 22:09:26 -07:00
2026-05-19 22:09:26 -07:00
2026-05-19 22:09:26 -07:00
2026-05-19 22:09:26 -07:00
2026-05-19 22:09:26 -07:00
2026-05-19 22:09:26 -07:00