Conversation
🦋 Changeset detectedLatest commit: e39bc8e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2afb567877
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes an externally-consumed SDK/contract surface and reworks an intricate TUI submission/steering state machine with user-facing behavior changes, warranting human verification despite thorough tests.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
This PR unifies how the TUI submits skill invocations so that a leading /skill:<name> args command follows the same path as inline skill tokens: instead of a standalone activateSkill call (which never displayed the original input), the raw user message plus skill activations are submitted together via promptWithSkills, and the original message is shown in the transcript. It also makes queued/draft skill messages steerable with Ctrl-S by threading a new opt-in steerIfActive option through the SDK (Session.promptWithSkills), the RPC layer, the klient contract schema, and the agent-core-v2 skill service (which routes it to the loop's existing steer-into-active-turn support).
Changes:
- Add an opt-in
steerIfActiveoption topromptWithSkillsacross node-sdk (overloaded to returnPromptWithSkillsResult), the RPC interface, the klient schema, and the engine skill service (returningturn_id/state: 'running'when steered). - Rewrite the TUI dispatch/resolve/Ctrl-S paths so leading and inline skills share one submission entry point, with a mixed steer batch that preserves queue order, single-skill argument parsing, telemetry, and failure recovery of draft/queued input and media.
- Add extensive TUI and engine tests plus a
patchchangeset.
| File | Description |
|---|---|
packages/node-sdk/src/session.ts |
Overloads promptWithSkills to optionally return the launch result when steerIfActive is set. |
packages/node-sdk/src/sdk-rpc-client-v2.ts |
Forwards steerIfActive and returns the engine result instead of dropping it. |
packages/node-sdk/src/rpc.ts |
Adds steerIfActive to the RPC input and changes the abstract return type to PromptWithSkillsResult. |
packages/klient/src/contract/agent/schemas.ts |
Adds optional steerIfActive to the wire payload schema. |
packages/agent-core-v2/src/features/skill/skill.ts |
Adds steerIfActive to PromptWithSkillsInput. |
packages/agent-core-v2/src/features/skill/skillService.ts |
Passes steerIfActive to loop.submit and returns turn_id/running when steered. |
packages/agent-core-v2/test/features/skill/activateSkill.test.ts |
Adds a test that a bundled skill message steers into a running turn with its args. |
apps/kimi-code/src/tui/commands/dispatch.ts |
Routes leading skills through sendInlineSkillUserInput; removes dispatchInlineSkillCombo and sendSkillActivation from the host. |
apps/kimi-code/src/tui/commands/resolve.ts |
Adds resolveSkillMessageActivations shared by dispatch and Ctrl-S. |
apps/kimi-code/src/tui/controllers/editor-keyboard.ts |
Rewrites Ctrl-S into an ordered steer batch of text/skill/bundle runs with failure recovery. |
apps/kimi-code/src/tui/kimi-tui.ts |
Adds skill-steer batch flags, steerSkillMessage, recoverRejectedSkillInput, and media/turn binding in runInlineSkillActivations. |
apps/kimi-code/src/tui/types.ts |
Drops the stale comment restricting InlineSkillActivation.args usage. |
apps/kimi-code/test/tui/*.test.ts |
Broad new coverage for submission, media, queueing, steer ordering, and failure recovery. |
.changeset/tui-skill-message-steer.md |
Adds a patch changeset for the user-facing display change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| else if (run.kind === 'skill') { | ||
| success = await host.steerSkillActivation( | ||
| session, | ||
| run.item.skillName!, | ||
| run.item.skillArgs ?? '', | ||
| ); | ||
| } else success = await host.steerSkillMessage(session, run.item); |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cfe0d1664
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5511498e0b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |

Requirement or Bug
TUI 行首技能曾走独立激活路径,行内技能消息无法 steer;消息式技能调用还会额外显示
Activated skill,而旧会话只有这张卡片、没有用户消息。Bug Reproduction Steps
/skill:review 检查这段代码:旧路径不显示原输入;新路径同时显示技能激活卡片和原输入。请用 /skill:review 检查这段代码,再按 Ctrl-S:旧路径无法 steer。Root Cause
行首技能原先调用独立的
activateSkill,行内技能则调用promptWithSkills。TUI 还把每个skill.activated实时事件和回放的技能元数据都渲染为卡片;新版消息自身又渲染一次原始用户输入。本改动统一技能消息提交入口,并在回放时按落盘消息的origin区分旧版独立调用与新版消息式调用。Code Changes
TUI 保留内置命令和插件命令的优先级、行首单技能的参数与命令遥测,以及失败时的输入和媒体恢复。行首技能等待进行中的视频上传;混合 Ctrl-S 批次中,技能成功而后续普通消息失败时,普通消息、媒体和队列顺序会恢复;技能提交失败后,idle 状态的新输入也会排在恢复的旧请求之后。SDK 原有两参数
promptWithSkills调用及导出的 RPC 基类Promise<void>签名保持不变;steerIfActive的结果走单独方法。web/desktop 的 steer 链路没有修改。Behavior Changes and Affected Users
/skill:name args的 TUI 用户Activated skill卡片steerIfActive;外部 RPC 子类覆盖Promise<void>旧路径的能力对应到新路径:命令优先级在 TUI resolver;单技能参数、遥测和多技能无参数规则在 dispatch/resolver;忙时排队、模型与媒体校验、失败恢复在 TUI 消息提交与 Ctrl-S 批次中。激活事件仍向其他客户端发送;本次只改变 TUI 呈现。
覆盖:TUI message-flow 测试验证原消息、参数、媒体、排队、steer 顺序、失败恢复及旧会话回放后的
/undo;message-replay 测试验证新旧格式各只显示一条用户消息,并隐藏模型注入的技能正文;editor-keyboard 和 agent-core-v2 技能测试覆盖 Ctrl-S 与当前轮次提交。本次更新后的相关 TUI 测试 396 个、SDK 技能测试 11 个通过,TUI 与 SDK 类型检查、仓库 lint 通过。此前分支全量 Vitest 运行有 4 个非本改动失败:2 个缺少zstd,另 2 个分别为超时和文件监听EMFILE。gen-docs曾运行,但其前置文件docs/scripts/sync-changelog.mjs不在仓库中,故按技能要求停止文档流程;本 PR 未扩展到文档改动。Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.