feat(tui): plan 卡片 /continue 恢复 + 可滚动 4 行窗口 + Ctrl+S/Ctrl+C 修复#599
Merged
lsdefine merged 2 commits intoJun 11, 2026
Merged
Conversation
plan-card 恢复:plan 模式判定改用日志中结构化的 enter_plan_mode tool_use(continue_cmd.find_plan_entry),不再扫聊天文本——用户打字 伪造不出。is_active/resolve_path 新增 restored_path 信号,AgentSession 新增 restored_plan_path 字段,plan_scan_baseline 退化为仅供 current_step 的 📌 扫描用。 Ctrl+S restore 卡死:_stash_cleanup_restore 由 self.text= 改为 clear()+_insert_via_keyboard,走编辑管线避免长会话全屏 relayout,与 stash 清空路径对称。 Ctrl+C 弹回收紧:_cmd_stop 仅在该轮未被消费(agent 尚未产出回复)时 才把 user 文本弹回输入框,避免已答轮次污染输入框 / 重发导致历史重复。
planbar 拆为固定表头/步骤行(#planbar-head)+ 任务滚动区 (#planbar-tasks,max-height:4)。最多露 4 个 TODO,其余滚轮/PageUp 翻看,去掉旧的 5 行预算与 ⋮ +N more 截断;表头与当前步骤行固定不滚。 任务标记 ☐/✔ → [ ]/[x],与 plan.md 源文件写法对齐。
lsdefine
pushed a commit
that referenced
this pull request
Jul 23, 2026
* feat(tui): /continue 恢复 plan 卡片 + Ctrl+S/Ctrl+C 路由修复 plan-card 恢复:plan 模式判定改用日志中结构化的 enter_plan_mode tool_use(continue_cmd.find_plan_entry),不再扫聊天文本——用户打字 伪造不出。is_active/resolve_path 新增 restored_path 信号,AgentSession 新增 restored_plan_path 字段,plan_scan_baseline 退化为仅供 current_step 的 📌 扫描用。 Ctrl+S restore 卡死:_stash_cleanup_restore 由 self.text= 改为 clear()+_insert_via_keyboard,走编辑管线避免长会话全屏 relayout,与 stash 清空路径对称。 Ctrl+C 弹回收紧:_cmd_stop 仅在该轮未被消费(agent 尚未产出回复)时 才把 user 文本弹回输入框,避免已答轮次污染输入框 / 重发导致历史重复。 * feat(tui): plan 卡片可滚动(4 行任务窗口)+ TODO 渲染为 [ ]/[x] planbar 拆为固定表头/步骤行(#planbar-head)+ 任务滚动区 (#planbar-tasks,max-height:4)。最多露 4 个 TODO,其余滚轮/PageUp 翻看,去掉旧的 5 行预算与 ⋮ +N more 截断;表头与当前步骤行固定不滚。 任务标记 ☐/✔ → [ ]/[x],与 plan.md 源文件写法对齐。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
Plan 卡片
/continue恢复:plan 模式判定改用日志中结构化的enter_plan_modetool_use(continue_cmd.find_plan_entry),不再扫聊天文本——用户打字伪造不出。is_active/resolve_path新增restored_path信号,AgentSession新增restored_plan_path字段;plan_scan_baseline退化为仅供current_step的 📌 扫描用。#planbar-head)+ 任务滚动区(#planbar-tasks,max-height:4)。最多露 4 个 TODO,其余滚轮/PageUp 翻看;去掉旧的 5 行预算与⋮ +N more截断,表头与当前步骤行固定不滚。[ ]/[x],与 plan.md 源文件写法对齐。输入框按键
self.text=改为走编辑管线(clear()+ 键盘插入),避免长会话整屏 relayout 导致的数秒卡死,与 stash 清空路径对称。涉及文件
frontends/continue_cmd.py—find_plan_entryfrontends/plan_state.py—is_active/resolve_path加restored_pathfrontends/tuiapp_v2.py— restore 接线、planbar 重构、Ctrl+S/Ctrl+C 路由测试
max-height=4、初始隐藏。find_plan_entry→_resolve_stashed→extract→is_complete)Python 验证通过。