customizable-statusline
Problem
DeepSeek TUI 的状态栏目前是硬编码的单行 ratatui 组件,只能显示 5 个固定字段(模式、模型、推理强度、上下文用量、缓存命中率)。无法自定义布局、颜色、或添加自定义 widget。
相比之下,Claude Code 的 ccstatusline 插件支持完全自定义的多行状态栏——每个 widget 可独立配置类型、颜色、顺序。用户(包括我)已经习惯了这种高信息密度的状态栏,迁移到 DeepSeek TUI 后感到信息缺失。
Proposed solution
新增 [statusline] 配置段,支持类似 ccstatusline 的 widget 布局系统:
配置示例
[statusline]
enabled = true
compact_threshold = 90 # 上下文用量达 90% 时自动压缩
[[statusline.lines]]
# 行 0: 模型信息
widgets = [
{ type = "model", color = "yellow" },
{ type = "separator" },
{ type = "reasoning-effort", color = "brightBlue" },
{ type = "separator" },
{ type = "context-bar", color = "brightYellow" },
]
[[statusline.lines]]
# 行 1: Git + 系统信息
widgets = [
{ type = "git-branch", color = "yellow" },
{ type = "separator" },
{ type = "git-changes", color = "brightBlue" },
{ type = "separator" },
{ type = "tokens-total", color = "brightYellow" },
]
[[statusline.lines]]
# 行 2: 会话成本 + 技能 + 自定义脚本
widgets = [
{ type = "session-cost", color = "yellow" },
{ type = "separator" },
{ type = "session-clock", color = "brightBlue" },
{ type = "separator" },
{ type = "skills", color = "brightCyan", list_limit = 5 },
{ type = "separator" },
{ type = "custom-command", command = "powershell -File C:/Users/ASUS/.claude/caveman-statusline.ps1", preserve_colors = true, timeout_ms = 5000 },
]
支持的 widget 类型
- model, reasoning-effort, context-bar, context-percent, mode
- git-branch, git-changes, git-remote
- tokens-total, tokens-cached, tokens-prompt, tokens-completion
- session-cost, session-clock, session-turns
- skills (list, limit:N)
- total-speed (tokens/s), free-memory, cpu-usage
- custom-command (运行外部脚本,读取 stdout 作为 widget 文本)
- separator, spacer
颜色
支持 ANSI 16 色名(black/red/green/yellow/blue/magenta/cyan/white + bright* 变体)和 256 色调色板("color256": 221)。
Use case
我是一个重度终端用户,同时使用 Claude Code(配 ccstatusline)和 DeepSeek TUI。在 Claude Code 中,3 行状态栏让我一眼看到:
- 当前模型和推理强度
- Git 分支/改动/远端
- 会话耗时和成本
- 已加载的技能列表
- 自定义 CAVEMAN 脚本的状态
切换到 DeepSeek TUI 后,这些信息全部消失,我只能看到简化的单行。这降低了工作流的连贯性。
Alternatives considered
- 在终端模拟器层加独立状态栏 — 无法反映 TUI 内部状态
- 用 tmux 状态栏 — 需要额外脚本轮询,且不同步
- 修改 DeepSeek TUI 源码自行编译 — 维护成本高
以上都不是理想方案。原生支持是最干净的路径。
Impact
- 每次使用 DeepSeek TUI 都会受益
- 吸引从 Claude Code/ccstatusline 生态迁移的用户
- 不破坏现有行为:默认关闭或使用当前单行布局作为 fallback
- 参考实现:Claude Code 的 ccstatusline 插件(https://github.com/1zilc/ccstatusline)已有成熟的 widget 系统和配置格式
Additional context
当前环境:
- DeepSeek TUI v0.8.39
- Windows 11
- 已有 ccstatusline 配置:
C:\Users\ASUS\.config\ccstatusline\settings.json
Status for v0.8.50 triage: a docs-only statusline slice from #2547 has been harvested into #2504 as 9bd08c2f1, with local docs correction ae2000b59.
This documents the current built-in footer chip selection surface: /statusline toggles visible chips, while [tui].status_items controls selection and order in config. It does not implement the broader multi-line/custom-color/custom-widget statusline requested here, so this issue should stay open.
Thanks @donglovejava for the detailed feature request and @cyq1017 for the docs slice.
Closing as shipped — the /statusline configurable footer picker exists (crates/tui/src/commands/config.rs). If something specific is missing from it, please open a focused issue.