diff --git a/SPRINTS.md b/SPRINTS.md index 61caa02..8200703 100644 --- a/SPRINTS.md +++ b/SPRINTS.md @@ -45,7 +45,7 @@ ### Цель Перейти от одиночного `/query` к полноценному диалогу: агент помнит историю, оператор ведёт разговор из 5+ реплик. Текущую страницу отладки (одиночный вопрос) оставляем без изменений, добавляем **вторую отладочную страницу** — «Песочница» со списком всех сохранённых диалогов. -### Статус: ⏳ Запланирован +### Статус: ✅ Закрыт ### Задачи diff --git a/routers/chat.py b/routers/chat.py index 5e228e1..2715c07 100644 --- a/routers/chat.py +++ b/routers/chat.py @@ -35,7 +35,7 @@ async def chat(req: ChatRequest, session: AsyncSession = Depends(get_session)): raise HTTPException(status_code=404, detail=str(e)) except Exception as e: logger.exception("Chat failed") - raise HTTPException(status_code=500, detail=f"Chat error: {e}") + raise HTTPException(status_code=500, detail=f"Chat error [{type(e).__name__}]: {e}") return ChatResponse( thread_id=result["thread_id"], diff --git a/static/index.html b/static/index.html index 6d5d7d8..98326cc 100644 --- a/static/index.html +++ b/static/index.html @@ -62,6 +62,20 @@ .dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.err { background: var(--err); } + .nav { + display: flex; + gap: 4px; + } + .nav-link { + text-decoration: none; + color: var(--muted); + padding: 6px 12px; + border-radius: 6px; + font-size: 13px; + font-weight: 500; + } + .nav-link:hover { background: var(--chip-bg); color: var(--fg); } + .nav-link.active { background: var(--accent); color: #fff; } .stats { margin-left: auto; font-size: 13px; @@ -324,7 +338,11 @@
-

Chat Agent for Patients — Debug

+

Chat Agent for Patients

+ проверяю…
diff --git a/static/sandbox.html b/static/sandbox.html new file mode 100644 index 0000000..4902621 --- /dev/null +++ b/static/sandbox.html @@ -0,0 +1,628 @@ + + + + + +Chat Agent for Patients — Песочница + + + + +
+

Chat Agent for Patients

+ + проверяю… +
+ +
+ + + +
+
+
— выберите диалог слева или начните новый —
+
+
+
Здесь появятся сообщения диалога.
Напишите что-нибудь снизу, чтобы начать.
+
+
+ + +
+
+ + + +
+ +
+ + + + +