Skip to content

fix(background-panel): output自适应终端高度 + Ctrl+B显示已运行时间#110

Merged
cc-claws merged 1 commit into
mainfrom
fix/background-output-elapsed-time
Jul 2, 2026
Merged

fix(background-panel): output自适应终端高度 + Ctrl+B显示已运行时间#110
cc-claws merged 1 commit into
mainfrom
fix/background-output-elapsed-time

Conversation

@cc-claws

@cc-claws cc-claws commented Jul 2, 2026

Copy link
Copy Markdown
Owner

改动

  • BackgroundTasksPanel Detail视图 output 行数改为根据终端高度动态计算(原硬编码10行)
  • Ctrl+B 提示新增已运行时间显示,running bash 每 200ms 刷新
  • 新增 3 个 headless 测试

修改文件

  • background_tasks_panel.rs 删除 DETAIL_OUTPUT_MAX_LINES,动态计算
  • background_tasks_panel_test.rs 新增测试
  • message_render.rs ShellCommand/ToolBlock 两处新增时间行
  • render_thread.rs 持续重建更新时间

BackgroundTasksPanel Detail视图的output区域原硬编码最大10行,改为根据终端实际可用高度动态计算。Ctrl+B提示新增已运行时间显示,running bash每200ms刷新。

修改内容:

- background_tasks_panel.rs 删除DETAIL_OUTPUT_MAX_LINES常量,output_inner.height.saturating_sub(2)动态计算

- background_tasks_panel_test.rs 新增3个测试:大终端全部显示/小终端截断/空输出

- message_render.rs ShellCommand和ToolBlock两处Ctrl+B提示上方新增(Xm Xs)已运行时间行

- render_thread.rs running_bash_needs_control_b_hint_rebuild改为running bash超2秒每200ms重建

特性/影响:

- Output面板行数自适应终端高度,不再硬编码10行

- Ctrl+B提示带已运行时间,用户能直观判断脚本执行时长

Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@cc-code>
@cc-claws cc-claws merged commit 93ce390 into main Jul 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant