Skip to content

[Grok/dsh 18] Prompt 编辑、历史与补全 #150

Description

@Blackman99

Parent

#132

Ticket: 18

Status: ready-for-agent

User Stories: 11, 12, 14(见父规格)

What to build

用户以官方键位完成多行编辑、撤销恢复、历史搜索、Vim 操作、粘贴、命令补全和外部编辑器往返,再将正确内容交给 dsh。

Acceptance criteria

  • 优先保留官方编辑器实现;逐项固定输入序列,不创建另一套输入状态模型。
  • 中文/组合字符、大段粘贴、空编辑器保存、光标与终端大小变化不丢字、不误提交。
  • 两种模式的快捷键、补全取消、历史选择和实际提交内容与参考一致。
  • 真实键盘/PTY、实际 dsh 收到的内容和终端恢复均有证据;必要辅助程序随分发策略管理。

Blocked by

Delivery contract

用户于2026-09-20批准当前测试与任务拆分。按父规格的已安装产物/真实终端和公开协议测试验收;实际实现须带适用的文档、Changeset及必要检查。ready-for-agent表示任务已定义,不表示前置任务已完成,也不授权自动开始本轮实施、购买付费资源或发布软件版本。

Activity

  1. self-assigned this
    on Sep 21, 2026
  2. Blackman99 commented on Sep 21, 2026

    @Blackman99
    OwnerAuthor

    按用户2026-09-20的实施授权领取 Ticket18 / #150;本次只记录领取,未启动实施工作者,也不表示已实现。已重新读取 #132 及全部80票正文/评论和实际 blocked-by(native 177 边)。#141/#149/#160 已在 rewrite/grok-dsh-20260920 集成并关闭;当前独立就绪票为 #142、#150、#152、#153、#154、#165、#189、#193。本波并行领取前四张,未领取任何被阻塞后继(含 #151/#156/#158/#163)。

    实施必须从独立集成树精确基线 2232130e9ce287aa85bc3270bb3383ab079e4efd 开始。前置 #149 已关闭,同一提交已保留在 rewrite/grok-dsh-20260920;集成证据见 #149 (comment) 。#160/#141/#161/#140/#139/#138/#137/#136/#135/#134/#133 仍为已集成关闭基线 #160 (comment) 、#141 (comment) 、#161 (comment) 、#140 (comment) 、#139 (comment) 、#138 (comment) 、#137 (comment) 、#136 (comment) 、#135 (comment) 、#134 (comment) 与 #133 (comment) 。

    范围按原验收:Prompt 编辑、历史与补全与冻结参考一致;多行、撤销/重做、Vim 模式、粘贴与外部编辑器路径在真实 PTY 验证;fullscreen/minimal 切换后草稿与编辑状态保留。后续实施/审查子代理使用 My CPA - Grok 4.6(grk-4.6)。仅在实施、独立审查和集成验收通过后关闭。main、现有未跟踪文件及其他工作树不改动;不授权付费资源,#212仍须新的明确最终发布/默认切换批准。

  3. Blackman99 commented on Sep 22, 2026

    @Blackman99
    OwnerAuthor

    Ticket 18 / #150 不能集成。两位独立 grk-4.6 审查员均拒绝 worker HEAD d55a1bdaf6e277182b69d528b17496df3a9f5f1f(基线 2232130e9ce287aa85bc3270bb3383ab079e4efd 是祖先;范围 d13426e → d6ba7f0 → d55a1bd)。fix-150 因 resume transcript ~478830 tokens 超过 425000/500000 上限失败,不能从该 transcript 续跑。未 cherry-pick、未推送、未关闭。隔离集成 HEAD 仍为 2232130e9ce287aa85bc3270bb3383ab079e4efd。main 仍为 43b5da1。

    集成控制器独立核对源码与 packed PTY 脚本:

    • rust/src/main.rs 每轮 composer.on_turn_finished(None);无 x.ai/suggestPrompt / 过期生成 / kill-switch 已安装产物证据。Help 仍写 “Ghost text after a turn is accepted with Tab/Right when GROK_PROMPT_SUGGESTIONS is on.”
    • GROK_SUGGESTIONS_AI 不是独立 AI 门控(docs 已承认)
    • scripts/rust-prompt-pty-test.py 的 prompt-mode-switch 与 scripts/rust-screen-pty-test.py 的 send_slash 在 /minimal//fullscreen 前 Ctrl+C 清草稿再重打,不能证明“切换后草稿与编辑状态保留”
    • rust/src/prompt_edit.rs chips 恒为 false;Ctrl+G chip 拒绝路径未触发

    修复要求:在同一 worker 工作树 /Users/zhaodongsheng/.grok/worktrees/my-projects-codsh/subagent-01a0c27f-1e3c-7cb2-ac33-7234e7ff5648 用新的 grk-4.6 fixer(不要 resume 超限 transcript):help/docs 与未接线 ghost 一致;用未清空草稿的 in-place 模式切换断言原文仍在;chips 接真实附件或删掉死字段直至附件票。PARITY-150-suggestions / AI shell-suggest 无 recording fixture 时保持 unverified,不要当完成。然后独立再审。不要在集成分支上手合。#132 spec 与 #212 不关闭。

  4. Blackman99 commented on Sep 23, 2026

    @Blackman99
    OwnerAuthor

    Integrated on rewrite/grok-dsh-20260920 at f2e2c5d.

    Cherry-picked 0e8e8b0..e0032935185330224f0110434739275e77dd9760 (2f6aa46, d5df633, 59fe5d1, f5a4902, e003293). The integrated tree matches the reviewed worker tree.

    Combined-tree checks:

    • pnpm run typecheck: pass
    • TMPDIR=/tmp pnpm test: 81 files, 2284 tests passed
    • cargo fmt --check, cargo clippy --locked --workspace --all-targets --offline -D warnings: pass
    • TMPDIR=/tmp cargo test --locked --workspace --offline: 241 + 61 + 2 + 379 passed
    • python3 scripts/rust-pty-test.py --output /tmp/codsh-150-pty-integration-f2e2c5d: PASS

    The narrow 32-column screen still shows both "draft survives resize" and "Execution unavailable" after a refused first-run submit. Non-force push 0e8e8b0..f2e2c5d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions