feat(chat): Enhance session management with new API endpoints and filtering options
- Added `status` query parameter to `list_sessions_api` for filtering sessions by their status (active/closed). - Introduced `close_all_sessions_api` endpoint to allow users to close all active sessions for the current actor. - Updated `SessionRepository` to support status filtering in session listing and implemented logic for closing active sessions. - Improved Redis connection settings for better performance and reliability. This update enhances the chat functionality by providing more control over session management, improving user experience and system efficiency.
This commit is contained in:
@@ -13,9 +13,10 @@
|
||||
|
||||
<div class="flow-animation" data-steps='[
|
||||
{"highlight":"flow-actor-1","label":"① 消歧:口径字典命中多义指标 → 返回 suggestions 让用户选"},
|
||||
{"highlight":"flow-actor-2","label":"② 生成 SQL:DeepSeek + SCHEMA_PROMPT + 权限域提示","packet":true,"from":"1","to":"2"},
|
||||
{"highlight":"flow-actor-2","label":"② 模板匹配:published 模板填参 → 可跳过 LLM","packet":true,"from":"1","to":"2"},
|
||||
{"highlight":"flow-actor-2","label":"②b 未命中 → DeepSeek + SCHEMA_PROMPT 生成 SQL","packet":true,"from":"1","to":"2"},
|
||||
{"highlight":"flow-actor-3","label":"③ SQL 安全校验(sql_guard.py)五层校验:只读 / 表白名单 / 行级归属…","packet":true,"from":"2","to":"3"},
|
||||
{"highlight":"flow-actor-4","label":"④ 执行:AnalyticsRepo 只读查询(Redis 缓存可命中)","packet":true,"from":"3","to":"4"},
|
||||
{"highlight":"flow-actor-4","label":"④ 执行:AnalyticsRepo + Redis 结果缓存(表世代键)","packet":true,"from":"3","to":"4"},
|
||||
{"highlight":"flow-actor-5","label":"⑤ guardrail:解读数字必须与表格一致,不过则降级","packet":true,"from":"4","to":"5"},
|
||||
{"highlight":"flow-actor-1","label":"⑥ 留痕:analytics_query_log 写入 SQL/耗时/护栏结果","packet":true,"from":"5","to":"1"}
|
||||
]'>
|
||||
|
||||
Reference in New Issue
Block a user