Skip to content

feat(tui): Tab 切换思考模式时输入框也应变色,而不仅是底部状态栏提示 #221

Description

@minorcell

场景

切换到思考模式(thinking mode)时,目前 UI 反馈很弱,只有在底部 Footer 状态栏上显示 thinking: on/off。在拥挤/多行输入或注意力集中在内层输入框时,用户很难察觉模式已切换。

希望能让输入框本身也变色作为视觉反馈,而不只是状态栏文字。

现状

  • Tab 切换:packages/tui/src/features/composer/Composer.tsx:745-747,空输入时按 Tab 触发 onToggleThinking()
  • 状态提升:thinkingOn 存放在 packages/tui/src/app/App.tsx:127,经 props 传给 Footer 展示;
  • 输入框颜色:Composer.tsx:915composerColor 目前只区分 disabled / idle / running(gray / cyan / yellow),与 thinking 模式无关;边框与光标颜色都取自它(Composer.tsx:926, 936, 940)。

期望行为

  • 思考模式开启时,输入框(边框/提示符/光标)使用与 idle 时不同的醒目颜色(例如黄色/琥珀色),关闭时恢复原色;
  • 状态栏文字保留,作为辅助信息;
  • 思考模式与运行态同时生效时的颜色优先级需要明确(例如 thinking 开启时优先用思考色,运行中改用 yellow 或叠加)。

建议实现方向

  • thinkingOn 传入 Composer(目前仅 Footer 接收),纳入 composerColor 的计算逻辑;
  • 补充 input 框在 thinking on/off 下的快照/单元测试。

复现环境

Version 0.8.62 · macOS 26.5.2 · Node 22.14.0 · pnpm 10.6.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tuiTerminal UI and interaction layerenhancementNew feature or requestneeds-triageIssue needs initial triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions