Skip to content

bug(tui): 混合自然语言输入中的 Workflow/Subagent 缺少预期能力高亮反馈(待核实) #655

Open

Description

@tt-a1i

用户观察

在当前 Pi/OpenPI TUI 输入:

然后上面提到的这些问题,我觉得你都可以去修复一下,workflow

输入框中的 workflow 没有彩色高亮(用户截图确认)。用户记得此前 workflow / subagent 会以彩色提示,让人知道正在选择 OpenPI 能力。

环境观察:Pi 1.0.2、本地 OpenPI package 0.8.1。当前 runtime checkout 存在 capability-intent 与 UI 测试的未提交改动,且未证明磁盘改动已 reload;因此不能直接把截图归因为正式发布版回归。

排查线索,不作为定论

  • extensions/capabilities/index.ts 仍注册 capability-intent-highlight editor layer。
  • 本地 tests/extensions/capabilities/ui.test.ts 当前按“shared intent authorizes them”才高亮:整条仅能力名称或显式执行请求,与自然句子中裸露名称的行为不同。
  • extensions/shared/capability-intent.ts 当前包含显式执行短语和 standalone-name 匹配;上述混合中文句尾裸 workflow 可能不被识别。
  • 还需要排查高亮层是否实际加载、主题对比度、编辑器层组合、reload 与源码来源。

这可能是识别规则/展示契约不一致,也可能是本地运行版本问题;不要在没有固定来源与真实 TUI 验证前认定根因。

用户期望

当输入明确选择 Workflow/Subagent 等能力时,编辑器提供明显彩色反馈。必须说明反馈代表“识别为能力选择、提交后将加载”,而不是已经执行或已经成功加载。

若只允许某些措辞触发,应让用户清楚了解,而不是必须猜中关键词组合。不要为了恢复颜色,未经决策就让所有讨论、否定或条件句都授权昂贵任务。

验收/调查清单

  • 固定 package 来源、HEAD、dirty 状态、加载/reload 身份,区分本地修改与发行行为。
  • 在真实 TUI 验证:workflow、subagent、截图原句、用 workflow 编排、用 subagent 检查。
  • 对讨论、否定、条件、大小写、多行、光标移动与 suggestion ghost text 做回归检查。
  • 保证高亮解释与真正 capability discovery 一致,不能亮了却不加载,也不能声称已启动。
  • 检查深浅主题及多个 editor layer 组合后颜色仍可见、不改变原始输入。
  • 明确最终语义:裸能力名称出现在普通句中是否属于主动选择;如需扩大权限语义,先单独评估兼容与消费影响。

关联与范围

用户明确要求本 Issue 先记录、暂不实施。它不属于正在推进的 #651–#654 修复批次。

Activity

  1. tt-a1i commented on Oct 4, 2026

    @tt-a1i
    CollaboratorAuthor

    当前 main d36b58b6 的共享能力识别 seam 只读实测:整条 workflow→workflow;整条 subagent→delegate;用 workflow 编排 / 用 subagent 检查→相应能力;原混合中文句尾裸 workflow→无选择;否定/条件句→无选择。

    因此原句不高亮符合当前共享识别合同,但不满足用户希望该句也表达主动选择的体验。尚未验证真实编辑器层/主题像素,不能把源码探针等同 live TUI。若要扩大混合句语义,需要先决定它是否应触发能力加载,不能只涂色而与实际选择漂移。保留此前先记录暂不实施的范围,没有恢复本地旧改动或修改配置。

  2. tt-a1i commented on Oct 4, 2026

    @tt-a1i
    CollaboratorAuthor

    用户于本轮明确采用能力名称发现:只要有独立能力字眼即可着色并加载对应工具/说明,讨论、否定和条件的实际意图由模型判断,不自动启动任务。此前暂不实施范围已被这个明确选择更新。实现及accepted Decision0004见 PR #675;其他能力规则、child权限交集不变。独立审阅发现并修复了soft-wrap文件边界漂移,最终定向17/17与SDK0.99.1/1.0.2兼容六例通过。初版完整Node2266/UI1158通过,最终check通过,exact-head跨平台CI待完成。真实用户TUI pixels/reload仍未验证,安装未修改;不以源码测试直接宣称完整视觉验收。

  3. tt-a1i commented on Oct 4, 2026

    @tt-a1i
    CollaboratorAuthor

    PR #675 merged to main as a2e0a5c6ee92d635379e6b91f94dbe966b75700f, after independent review and all 18 final-head GitHub checks passed at b87f8f7c7f846a243a4300aa8b8207e849817b4b.

    Accepted behavior: independent workflow/subagent names (including Chinese names and English plurals) color and discover existing tools/guidance in ordinary sentences, discussions, negations and conditions. The active model judges whether/how to use them; discovery never automatically executes tools or starts child sessions. Identifier/path fragments remain inert. Decision: 0004.

    Final correction removed a SDK component subpath import after actual native-loader CI exposed its alias incompatibility. Public root APIs and bounded exact source-to-render-row alignment preserve input boundaries across wrapping; unknown geometry skips coloring. Final focused tests including the actual Pi extension loader: 18/18. Isolated native Web startup passed in 2.15s, authenticated snapshot valid, zero model calls. Final bun run check and cross-platform CI passed; the initial candidate full local suite passed 2,266 Node tests (9 skipped) and 1,158 UI tests.

    Keeping this issue open for real terminal pixel acceptance. The user's installed package and running Session were not updated; source/loader/CI success does not establish their current UI behavior.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions