feat(ui): 优化 Chat 页面 Header 布局

- 移除左上角 "Chat" 标题
- Token 使用情况移至左侧
- 压缩按钮添加文字标签,更直观
- 工具栏按钮保持在右侧
This commit is contained in:
2025-12-17 17:59:40 +08:00
parent ddbd56a0ac
commit c892069ea1
2 changed files with 51 additions and 46 deletions
+10 -4
View File
@@ -158,19 +158,25 @@ export function ContextUsage({
variant="ghost"
size="sm"
className={cn(
'h-5 px-1.5 text-xs',
'h-5 px-1.5 text-xs gap-1',
shouldCompress
? 'text-amber-500 hover:text-amber-400 hover:bg-amber-500/10'
: 'text-fg-muted hover:text-fg-secondary hover:bg-surface-muted'
)}
onClick={handleCompress}
disabled={compressing}
title="压缩对话上下文"
title="压缩对话上下文以释放 token 空间"
>
{compressing ? (
<RefreshCw size={12} className="animate-spin" />
<>
<RefreshCw size={12} className="animate-spin" />
<span></span>
</>
) : (
<Zap size={12} />
<>
<Zap size={12} />
<span></span>
</>
)}
</Button>
)}