feat: 对话列表显示总数,SOUL 编辑区高度自适应收敛

- 新增 POST /threads/count:与 /threads/search 同一套过滤(标题搜索、
  系统会话排除),仅返回 {total};ThreadMetaStore 增加 count 方法
  (SQL 走 COUNT(*),JSON 过滤分批扫描计数)
- 对话页面搜索框下常驻显示「共 N 条对话」,分页条显示 当前页/总页数
  (useThreadsCount,仅随筛选条件变化,翻页不重复请求)
- 智能体右侧 SOUL 预览改为 40vh 上限自适应展开(不再全部展开);
  详情面板/卡片编辑/创建页的 SOUL 输入框统一为适中高度 + 可拖拽

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
吉鑫升andClaude Fable 5 committed 2026-06-11 20:26:44 +08:00
1 parent f107ebc46d
commit 3d6f35391e
10 files changed
+204 -8

No files matched your search

@@ -921,7 +921,7 @@ export function AgentCard({ agent, layout = "card", onPublisherClick }: AgentCar
? "正在加载 SOUL.md..."
: "输入 SOUL.md 内容"
}
className="min-h-[40vh] resize-y font-mono text-xs"
className="max-h-[45vh] min-h-48 resize-y font-mono text-xs"
/>
</div>
<div className="space-y-2">
@@ -577,13 +577,13 @@ export function AgentDetailPanel({
setDraft({ ...draft, soul: e.currentTarget.value })
}
placeholder="输入 SOUL.md 内容"
className="min-h-[45vh] resize-y font-mono text-xs"
className="max-h-[45vh] min-h-48 resize-y font-mono text-xs"
/>
) : (
// No inner max-height: the SOUL text flows at full length and the
// panel body scrolls as a whole, instead of a small nested scroll
// box on an otherwise empty screen.
<p className="text-muted-foreground whitespace-pre-wrap text-sm leading-relaxed">
// Viewport-relative cap: the SOUL preview expands with the screen
// (taller than the old fixed 240px box) but never swallows the
// whole panel — long content still scrolls inside.
<p className="text-muted-foreground max-h-[40vh] overflow-y-auto whitespace-pre-wrap text-sm leading-relaxed">
{soulPreview}
</p>
)}