Skip to content

docs: update docs 0312#1423

Merged
RealKai42 merged 9 commits intomainfrom
kaiyi/fix-steer-ctrl-c-echo
Mar 12, 2026
Merged

docs: update docs 0312#1423
RealKai42 merged 9 commits intomainfrom
kaiyi/fix-steer-ctrl-c-echo

Conversation

@RealKai42
Copy link
Collaborator

@RealKai42 RealKai42 commented Mar 12, 2026

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

- Implemented serialization tests for SteerInput messages in `test_wire_message.py`.
- Created new test suite `test_wire_server_steer.py` to validate server behavior with steer messages.
- Enhanced `test_export_import.py` to ensure system reminders are excluded from turns and exports.
- Added tests in `test_prompt_tips.py` to verify prompt behavior with steer inputs and mode changes.
- Introduced `test_replay.py` to validate replay functionality with steer inputs and history.
- Developed `test_shell_prompt_echo.py` to ensure correct echoing of user inputs in the shell.
- Created `test_visualize_running_prompt.py` to test the visualization of running prompts and steer inputs.
Copilot AI review requested due to automatic review settings March 12, 2026 14:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces “steer” follow-up inputs during an in-progress agent turn, including a new SteerInput Wire event, inline running-prompt rendering in the shell, and filtering of internal system-reminder messages from replay/export. It also updates changelogs and expands test coverage across core, shell UI, replay, and e2e flows.

Changes:

  • Add SteerInput Wire event and switch steer injection from synthetic tool calls to standard user messages.
  • Implement inline running prompt + steer input UX in the shell (prompt/visualize), plus improved replay and user-input echo.
  • Filter internal <system-reminder> user messages from replay/export and add extensive tests for the new behaviors.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests_e2e/test_wire_sessions.py Update session context assertions to include persisted system prompt and rotated context handling.
tests/ui_and_conv/test_visualize_running_prompt.py Add unit tests for _PromptLiveView running prompt behavior, key handling, and steer echo suppression.
tests/ui_and_conv/test_shell_prompt_echo.py Add tests for echoing agent input and ensuring literal rendering of brackets/media placeholders.
tests/ui_and_conv/test_replay.py Add tests ensuring replay logic treats steers as user turns and filters system reminders.
tests/ui_and_conv/test_prompt_tips.py Add tests for prompt layout, running prompt toolbar consistency, and steer prompting state restoration.
tests/ui_and_conv/test_export_import.py Add tests ensuring system reminders are excluded from turn grouping/export/topic and steers remain as turns.
tests/e2e/test_media_e2e.py Tighten typing around JSON-RPC event parsing in e2e media tests.
tests/e2e/test_basic_e2e.py Tighten typing around JSON-RPC event parsing in basic e2e tests.
tests/core/test_write_file_plan_mode.py Adjust mocks/typing to assert approval calls correctly in plan mode tests.
tests/core/test_wire_server_steer.py Add tests for wire server steer endpoint behavior (invalid state vs queued steer).
tests/core/test_wire_message.py Add serde tests for the new SteerInput wire message.
tests/core/test_kimisoul_steer.py Add comprehensive tests for steer injection, wire emission, turn continuity, and reminder merging.
src/kimi_cli/wire/types.py Introduce SteerInput event and export it as part of the Wire message unions.
src/kimi_cli/web/app.py Make optional netifaces import safer via importlib.import_module.
src/kimi_cli/utils/export.py Filter system-reminder internal user messages from turn grouping, overview topic, and stringify output.
src/kimi_cli/ui/shell/visualize.py Add prompt-session-aware live view (_PromptLiveView), render running prompt inline, and display SteerInput echoes.
src/kimi_cli/ui/shell/replay.py Replay steers as user turns, prefer wire when matching history, and filter system reminders.
src/kimi_cli/ui/shell/prompt.py Add running prompt delegate protocol + key routing, refresh intervals, toast expiry timestamps, and steer prompting mode.
src/kimi_cli/ui/shell/echo.py Add a helper to render user echo output as literal transcript text.
src/kimi_cli/ui/shell/console.py Export NEUTRAL_MARKDOWN_THEME and keep backward-compatible aliasing.
src/kimi_cli/ui/shell/init.py Echo agent user inputs, plumb prompt session into visualize, and pass steer callback for inline steer UX.
src/kimi_cli/soul/message.py Add <system-reminder> helpers and detection for internal reminder messages.
src/kimi_cli/soul/kimisoul.py Change steer injection to append user messages + emit SteerInput; use system_reminder for dynamic injections.
src/kimi_cli/acp/session.py Accept/ignore SteerInput in ACP streaming loop.
docs/zh/release-notes/changelog.md Document new shell inline prompt/steer, steer injection change, and SteerInput event (ZH).
docs/en/release-notes/changelog.md Document new shell inline prompt/steer, steer injection change, and SteerInput event (EN).
CHANGELOG.md Add user-facing release notes for the new steer/inline prompt features.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

RealKai42 and others added 2 commits March 12, 2026 22:33
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: Kai <me@kaiyi.cool>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: Kai <me@kaiyi.cool>
@RealKai42 RealKai42 merged commit 5e6d2e7 into main Mar 12, 2026
14 checks passed
@RealKai42 RealKai42 deleted the kaiyi/fix-steer-ctrl-c-echo branch March 12, 2026 14:33
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Web UI claims Wire 1.5 but does not handle the new SteerInput event

The Web client now advertises protocol_version: "1.5" during initialization (web/src/hooks/useSessionStream.ts:1840), and the new SteerInputEvent type is correctly defined and added to the WireEvent union in web/src/hooks/wireTypes.ts:228-254. However, the processEvent switch statement in useSessionStream.ts (line 985–1814) has no case "SteerInput": handler. The event silently falls through to default: break;. In contrast, the Shell UI properly handles SteerInput in src/kimi_cli/ui/shell/visualize.py:1023, where it renders the steer content as a user message. This means steer messages will be missing from the Web UI conversation transcript during session replays (sessions that had steer inputs from the Shell), producing an incomplete and potentially confusing conversation history.

(Refers to lines 1813-1814)

Prompt for agents
In web/src/hooks/useSessionStream.ts, add a case "SteerInput" handler in the processEvent switch statement (before the default case around line 1813). The handler should behave similarly to the Shell UI's handling in src/kimi_cli/ui/shell/visualize.py:1023-1034: parse the user_input from the event payload and add a user message to the message list (using setMessages/getNextMessageId), so that steer inputs appear in the Web UI conversation transcript during both live sessions and replays. Refer to the TurnBegin handler (around line 986) for the pattern of adding a user message, but note that SteerInput should not reset step state or increment the turn counter.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants