Skip to content

feat(tui): show full text for long bash commands and AskUserQuestion content - #150

Merged
liruifengv merged 2 commits into
mainfrom
add-visble-for-tool
May 28, 2026
Merged

feat(tui): show full text for long bash commands and AskUserQuestion content#150
liruifengv merged 2 commits into
mainfrom
add-visble-for-tool

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Summary

  • Bash · ctrl+o expand: Long Bash commands are truncated to 60 chars in the header and the result renderer never echoed the command body, so the full command was unreachable in the UI. Pressing ctrl+o on a Bash card now also reveals the complete multi-line command above the output. Header stays single-line.
  • AskUserQuestion · wrap instead of truncate: The question prompt, body description, option label, option description, and submit-tab review entries used to be cut off with at terminal width. They now soft-wrap with a hanging indent so the full text is readable on narrow terminals.

Each change ships its own patch-level changeset.

Test plan

  • vitest run test/tui/components/messages/shell-execution.test.ts — 5/5 (collapsed hides the command; expanded reveals the full multi-line command).
  • vitest run test/tui/components/dialogs/question-dialog.test.ts — 23/23 (4 new wrap cases cover question / body / option label+description / submit review).
  • vitest run test/tui — 674/674.
  • oxlint --type-aware on changed files — clean.
  • Manual smoke: run a long bash command and confirm ctrl+o shows the whole command; trigger AskUserQuestion with a long question/body/option on an 80-col terminal and confirm wrap.

The Bash tool header truncates long commands at 60 chars and the
result renderer never showed the command body, so the full command
was nowhere to be found in the UI. When the user expands the card
with ctrl+o, render the complete multi-line command above the
output.
…ting

Replace single-line truncation with hanging-indent word wrap for the
question prompt, body description, option label, option description,
and submit-tab review entries. Long content now flows onto multiple
rows instead of being cut off with an ellipsis.
@changeset-bot

changeset-bot Bot commented May 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8faa144

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 May 28, 2026

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

commit: 8faa144

@liruifengv
liruifengv merged commit 8b5a251 into main May 28, 2026
7 checks passed
@liruifengv
liruifengv deleted the add-visble-for-tool branch May 28, 2026 07:54
@github-actions github-actions Bot mentioned this pull request May 28, 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