Skip to content

fix(tui): support expanding bash command while running#1004

Merged
liruifengv merged 4 commits into
mainfrom
expland-using
Jun 23, 2026
Merged

fix(tui): support expanding bash command while running#1004
liruifengv merged 4 commits into
mainfrom
expland-using

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue; see Problem below.

Problem

Long-running Bash tool calls render an empty card body while they are still in the "Using" state (arguments finalized, no result yet). The Ctrl+O toggle that expands tool output for finished cards has no visible effect in this state, so the full command cannot be inspected until the result arrives — which is exactly when a long command is most likely to need reviewing.

What changed

  • Render the command in the in-flight Bash card body, capped at the standard command preview line count.
  • Honor the existing Ctrl+O expand toggle in this state, so the full multi-line command is revealed while the command is still running.
  • Hand command rendering back to the result renderer once the result lands, so the command is not rendered twice when expanded.
  • Added coverage for the collapsed/expanded in-flight states and the handoff to the result view.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Render the command in the in-flight Bash card body so it is visible while the command runs, and let Ctrl+O expand the full command before the result arrives.
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b18cd0e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@b18cd0e
npx https://pkg.pr.new/@moonshot-ai/kimi-code@b18cd0e

commit: b18cd0e

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9eb61eece5

ℹ️ 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".

Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
@liruifengv liruifengv merged commit d70c3a8 into main Jun 23, 2026
8 checks passed
@liruifengv liruifengv deleted the expland-using branch June 23, 2026 07:28
@github-actions github-actions Bot mentioned this pull request Jun 23, 2026
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.

1 participant