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:
2026-09-10 22:30:07 +08:00
parent 48355cee8e
commit 9d4d4aaa6d
59 changed files with 2261 additions and 265 deletions
@@ -3,20 +3,24 @@
<p class="eyebrow animate-in">模块 4 · 未接线</p>
<h1 class="module-title animate-in">菜单有 ≠ API 已接<br>Chat 还有 B 方案三端点</h1>
<p class="module-lead animate-in">
前端 P0 主链路已真接,但和后端课对照,仍有<strong>页面占位、风控/平台按钮缺失、SSE 行为</strong>等缝。
改 URL 进别人工作台,前端藏菜单<strong>拦不住</strong>,后端才是闸。
前端 P0 主链路已真接(含风控三页 · 问数标签 · Dashboard hooks),但仍有<strong>分析对话占位、看板无钻取</strong>等缝。
开发态若 Dashboard「先闪错再正常」,多半是 StrictMode 双请求——已用 <code>useAsyncSequence</code> 丢弃过期响应。
</p>
<div class="screen animate-in">
<h2>前端未全接清单(2026-09)</h2>
<h2>仍开放 / 已修清单(2026-09-10)</h2>
<div class="pattern-cards">
<div class="pattern-card">
<h3>风控</h3>
<p>AML scan · 适当性校验按钮 · 台账高级筛选 — 部分 API 有,UI 简版或未接。</p>
<h3>风控 UI</h3>
<p>台账筛选 · 适当性校验 · AML 扫描页已接 REST;高级运营能力仍简版。</p>
</div>
<div class="pattern-card">
<h3>问数</h3>
<p><code>AnalystChatShell</code> 占位 · 真问数在 <code>AnalystQueryPage</code> + dashboard/assets。</p>
<p><code>AnalystChatShell</code> 占位 · 真问数在 <code>AnalystQueryPage</code>(模板/缓存标签 + dashboard/assets)。</p>
</div>
<div class="pattern-card">
<h3>竞态修复</h3>
<p><code>useAsyncSequence</code> 用于 Dashboard hooks、ChatPanel、风控/客户列表页等。</p>
</div>
<div class="pattern-card">
<h3>游客</h3>