The Suggestions page: the support agent's draft replies (~/aimsight-support), read-only from Supabase Conversations (table and bucket suggestions): status, reason, the reply to copy and its figures to download; SUPABASE_CONVERSATIONS_* from the app's .env (the service's EnvironmentFile); nothing is sent from the app

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-25 11:21:27 +01:00
1 parent 54bcce1281
commit f0470295fa
6 files changed
+170 -4

No files matched your search

+15 -1
View File
@@ -17,10 +17,11 @@ from pathlib import Path
import uvicorn
from fastapi import FastAPI, Query, Request
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, Response
import analysis
import conversations
import suggestions
import station
import support
import validity
@@ -259,6 +260,19 @@ def conversation_file(reference: str, path: str):
else FileResponse(f, filename=f.name, headers=headers)
# --- the Suggestions page (suggestions.py): the support agent's draft replies, read-only from Supabase Conversations
@app.get("/api/suggestions")
def suggestions_list():
return suggestions.list_suggestions()
@app.get("/api/suggestions/figure/{path:path}")
def suggestion_figure(path: str):
return Response(suggestions.figure(path), media_type="image/png",
headers={"X-Content-Type-Options": "nosniff", "Content-Security-Policy": CSP})
if PAGE.is_dir():
app.mount("/", StaticFiles(directory=PAGE, html=True), name="page")
else: