Add the assistant: a chat that drives the MCP tools in-process

A provider set under Settings (OpenAI-compatible; key encrypted in
flow-data/ai.json) turns on an Assistant panel in the sidebar. Each turn runs
the FastMCP tools in-process as the person chatting, streams the rounds over
SSE and keeps one transcript per user. The panel floats on any screen and
shares the editor's lane: a settings panel keeps the top half, the chat the
bottom. The MCP client is now built once, for the endpoint and the chat.
This commit is contained in:
2026-09-16 23:28:23 +02:00
parent af18d134a4
commit 7240b7b823
25 changed files with 1957 additions and 43 deletions
+4
View File
@@ -1,6 +1,7 @@
from fastapi import APIRouter
from fluksio.api.routes import (
ai,
alerts,
artifacts,
cloud,
@@ -51,3 +52,6 @@ api_router.include_router(oauth.router)
# Always mounted like oauth, so the generated SDK keeps its shape; the
# endpoints refuse to work unless the private API is explicitly enabled.
api_router.include_router(private.router)
# The assistant. Always mounted for the same reason; without a provider
# configured the status says so and the chat answers 404.
api_router.include_router(ai.router)