Skip to content

feat(kimi-code): two-line collapsed tool cards with width-aware headers - #3539

Merged
RealKai42 merged 19 commits into
mainfrom
feat/compact-tool-cards
Sep 7, 2026
Merged

feat(kimi-code): two-line collapsed tool cards with width-aware headers#3539
RealKai42 merged 19 commits into
mainfrom
feat/compact-tool-cards

Conversation

@RealKai42

@RealKai42 RealKai42 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue; internal UX change, the problem is described below.

Problem

Finished tool calls dominate the transcript, and their collapsed bodies (three output lines, command previews, glance lines) are rarely what the user reads. Long Bash headers also wrap to several rows because the header was built as one string and cut only by the terminal. Scanning a turn, the user wants two things per call: what ran, and what came of it. And when output is collapsed, the user should be able to tell that something is hidden and how to reveal it.

What changed

Two-line collapsed cards. Line one identifies the call; below it, dim width-truncated outcome rows state what came of the call. Output of three lines or fewer is shown whole; longer output contributes one telling line and the rest waits for Ctrl+O. Cards may grow between streaming, running and done, but never shrink.

  • Bash: the header carries $ <command>; the outcome row is the command's last output line (marked with a leading when earlier lines are hidden), or the newest live line while it runs, and a · N more lines chip counts what is hidden. A failed command keeps its three-line preview and its own … (N more lines, ctrl+o to expand) trailer, so it carries no chip. Ctrl+O shows the full command and output.
  • Grep / Glob: the path-sample glance is the outcome row, with its , +N more count in the fixed tail so a width cut drops samples, never the count; unnumbered Grep content lists each file once (a Windows drive letter stays part of the path), and a paginated result counts the tool-reported totals rather than the current page (a paginated content search reports its match total and leaves the file count out, since only the page's files are known); when the tool reports an incomplete set (timeout, output cap), every count reads as a lower bound (12+ files), and a search that only has a notice to show — cut short before any row, or every match filtered as a sensitive file — shows that notice instead of an exact-looking empty result. The raw output appears after Ctrl+O. The Grep chip reads N files, N matches across K files, or the summed count according to output_mode, and the tools' pagination and empty-result notices no longer count as results.
  • Other tools and MCP tools (the truncated renderer): the first output line, marked with a trailing when more follows. Outcome rows drop terminal colour sequences, so a colour left open past the width cut cannot bleed into the row's ellipsis or tail. An oversized result arrives as agent-core's truncation envelope; cards render its first line ("Tool output exceeded … saved to a file") as the outcome row and carry no chip, instead of counting the envelope's metadata as results, and the per-line truncation pointer appended to a result that kept its shape stays out of counts and outcome rows.
  • Read groups: header only, the per-file list after Ctrl+O; a group created while the global expand toggle is on starts expanded, and its · N failed count is a fixed header tail that survives a narrow row.
  • Failed calls keep their three-line preview; Edit and Write previews are unchanged, and their one-line success acknowledgements (Replaced N occurrences in …, Wrote N bytes to …) no longer render in either state since the header and preview already say it; any other successful output shows as an outcome row in both states.
  • The subagent activity viewer shares these renderers and follows the same rules.

Width-aware headers. TruncatedHeaderLine renders a header as head / flexible / tail segments: the flexible part (a command, a path) is cut with an ellipsis to whatever width remains after the fixed parts, keeping the head of a command and the tail of a path, so a long command fills a wide terminal and the chip survives on a narrow one; when the row is too narrow even for the fixed parts, the middle is dropped first and the head is cut before the chip. The rendered array is cached while content and width are unchanged, so an unchanged header costs nothing per frame.

Footer ctrl+o hint. While the recent turns hold tool output that Ctrl+O would reveal, the footer's first line shows a fixed ctrl+o expand hint (it wins over the rotating tip when space runs out); once expanded it reads ctrl+o collapse, and it disappears when there is nothing to toggle. Width-dependent hiding counts too: an outcome row cut to the terminal width, or an error preview whose long line wraps past its row cap, keeps the hint on. A capped Edit or Write preview counts even when the call failed, and a user-run ! command card reports its running tail or capped result the same way. The hint lives in the footer because it knows the expand toggle and the turn window, so it is never shown for cards Ctrl+O can no longer reach. When a status_line.command owns line 1, the hint moves to the left of line 2 (transient and warning hints still take precedence there).

Docs and changesets. One patch changeset; no doc update needed, Ctrl+O behaves as documented.

Tests. Renderer tests for the outcome rows per tool family, the Grep output parsing per mode, the Bash chip, the Read group, and the header segments (wide and narrow, path tail, cache identity); card tests for the collapsed and live states and for hasHiddenContent; footer tests for the hint; an end-to-end test drives a Bash result through the event handler and watches the footer offer ctrl+o expand then ctrl+o collapse; the activity viewer test follows the collapsed rule. The CLI app suite, typecheck and lint pass.

The NotifyUser update panel (#3524) is stacked on this branch.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve). Internal change, no issue.
  • 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.

Collapsed cards now show the call on line one and a single dim outcome
row on line two: a Bash command's last output line (the live tail while
running) with a line-count chip, a Grep/Glob path sample, or a generic
tool's first output line. Read groups stay header-only and honor the
global expand state; failed calls keep their preview. Headers split into
head / flexible / tail segments so a long command fills the terminal
width before the chip.
@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d94c8f9

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T12:17:55.095387Z d94c8f9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 4, 2026

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

commit: d94c8f9

@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: b2d1ce8eb6

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/shell-execution.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/truncated-header-line.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/truncated-header-line.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/truncated-header-line.ts Outdated
Collapsed cards now show up to three output lines before falling back to
a single outcome row, the Grep chip counts files or matches according to
output_mode, and the tools' pagination and empty-result notices no longer
count as results. While the recent turns hold tool output that ctrl+o
would reveal or hide, the footer shows ctrl+o expand or ctrl+o collapse.

@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: b090435cd5

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Comment thread .changeset/compact-tool-cards.md Outdated
A collapsed Bash card's chip now counts the hidden lines (`N more
lines`), its last-line outcome row carries a leading ellipsis, a generic
tool's first-line row a trailing one, and the Grep glance keeps its
"+N more" count in the fixed tail so width cuts drop samples, never the
count. Background Bash results identify the task by their first
metadata line instead of trailing internal hints, and header truncation
now treats ANSI escapes as atomic zero-width units and stays bounded by
the terminal width for huge arguments.

@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: 6870f348bb

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/outcome.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Glob's timeout, truncation, and warning lines no longer inflate the
file count or pose as glance samples, and unnumbered Grep content with
context flags falls back to an exact file count instead of claiming
matches it cannot distinguish. The footer's ctrl+o hint now also
appears when an outcome row is cut by the terminal width — one to three
very long lines hide the remainder that ctrl+o reveals wrapped.
The Edit check now uses the same clustered diff render as the preview
(context rows and inter-hunk separators count toward the cap), and an
ExitPlanMode outcome card no longer reports hidden content — the plan
is fully rendered by the call preview and its result body is
expansion-independent. OUTCOME_MAX_LINES moves to the TUI constant
directory with the other shared rendering limits.

@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: 44d8107373

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/summary.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Comment thread apps/kimi-code/src/tui/components/messages/truncated-header-line.ts
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts
Outcome rows drop terminal control sequences before they are cut, a
failed Bash card leaves the hidden-line count to its preview trailer,
an unnumbered Grep glance lists each file once, a solo subagent card
never reports hidden content, and the glance sample cap joins the other
collapsed-card limits in the rendering constants.

@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: a332a8eef9

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
…s as hidden

The Grep chip and glance use the tool's count-mode summary and pagination
total instead of the current page, Windows drive letters stay inside
unnumbered content paths, Glob's ripgrep stderr continuation lines no
longer count as files, a background question follows the line-count rule,
and an error preview whose long line wraps past its row cap keeps the
footer's ctrl+o hint on.

@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: 987e4c3cb4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts
An oversized result reaches the TUI as agent-core's truncation envelope;
cards now render its first line as the outcome row and carry no chip
instead of counting its metadata as files or lines. The Grep chip keeps
the count-mode totals on an empty page, and the Bash chip counts rows
the way the outcome rows do, so whitespace-only rows never claim hidden
lines.

@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: 261f520666

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Comment thread apps/kimi-code/src/tui/kimi-tui.ts Outdated
…d ! cards

A paginated content search reports the tool's match total, a capped Edit
or Write preview counts as hidden even when the call failed, and a
user-run ! command card tells the footer about its running tail or
capped result.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: ac687568b9

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Comment thread apps/kimi-code/src/tui/components/messages/truncated-header-line.ts Outdated
…ut-off cards

Grep and Glob counts read as lower bounds (`12+ files`) when the tool
reports a timeout or output cap, a header too narrow for its fixed parts
drops the middle and cuts the head before the chip, and a call whose
arguments were cut off by max_tokens no longer claims hidden content.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 779b39d265

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/truncated-header-line.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/shell-run.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/truncated-header-line.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
…d paginated context

A pagination total only stands in for the match count when no context
flag is set, a ! command card that finished while expanded still counts
its rows past the preview cap, parsed goal snapshots and bodiless goal
updates report nothing to expand, header fitting measures graphemes
instead of trusting code-unit length, and the escape pattern and tail
window join the rendering constants.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 7f3a38f526

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
…ap exactly

A Grep call with -A/-B/-C set to zero produces no context rows, so its
matches stay countable; the Edit hidden-content check now renders the
preview capped and uncapped and compares them, so a body that fills the
cap exactly no longer counts as cut.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: c24562bbe7

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/kimi-tui.ts Outdated
… window

Toggling ctrl+o off collapses every expanded card, including one that
slid before the three-turn cutoff since it was expanded, so the footer
now keeps offering collapse while any expanded card hides content. Grep
context detection follows the backend's -C precedence, where a defined
-C makes -A and -B moot.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: b5c0edffab

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
…ates

Their one-line success acknowledgements repeat what the header, chip and
preview already show, so they render in neither state; any other
successful output shows as an outcome row in both. The footer's expand
hint therefore depends only on the capped preview for these cards.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 481944d5ec

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/kimi-tui.ts
Comment thread apps/kimi-code/src/tui/components/messages/read-group.ts
The finished header is three segments — label, line count, `· N failed`
tail — so a narrow row drops the line count before the failure count,
which is the only sign of partial failure while the per-file body is
collapsed.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 8c8a170a4f

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
Comment thread apps/kimi-code/src/tui/components/chrome/footer.ts
…a status command

A Grep or Glob the tool cut short before any row renders its notice
instead of an exact-looking empty result and carries no chip, a
ReadMediaFile result that is not a media envelope follows the line-count
rule, and the footer's ctrl+o hint moves to line 2 when a
status_line.command owns line 1.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 261a440848

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/grep-output.ts Outdated
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
…d stop hinting on notice-only searches

A Glob that skipped unreadable directories reports its file count as a
lower bound, and a search cut short before any row — which renders only
the tool's notice, the same way in both states — no longer makes the
footer offer ctrl+o.
@RealKai42

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 341ebbb3b5

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/chrome/footer.ts
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
…parsed WaitFor results as hidden

An inline tips slot gives way when the fixed hint would not fit beside
it, and a parsed WaitFor result — whose raw fields only render when
expanded — reports hidden content instead of falling to the line-count
rule.

@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: dfd76977d8

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/components/messages/tool-renderers/types.ts
Comment thread apps/kimi-code/src/tui/components/messages/tool-call.ts
… counts and honor streaming previews

The per-line truncation pointer agent-core appends to an oversized
result stays out of line and file counts, byte sizes and outcome rows; a
search whose only matches were filtered as sensitive files shows the
tool's notice instead of an exact-looking empty result; and while
arguments still stream, only a Bash card (whose partial command appears
once expanded) reports hidden content.

@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: d94c8f9fb4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +164 to +166
// Without context flags every paginated row is a match, so the tool's
// total is the exact match count; the files beyond the page stay unknown.
const paginatedTotal = hasContext ? undefined : PAGINATION_TOTAL.exec(output)?.[1];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve pagination as a lower-bound signal

When numbered content mode combines context rows with pagination, clearing paginatedTotal correctly avoids treating the backend's total row count as a match count, but it also leaves partial and filesPartial false. A page containing one match plus context can therefore render the exact-looking 1 match in 1 file even though the pagination notice proves later rows—and potentially additional matches and files—exist. Fresh evidence beyond the earlier context-total issue is that this final branch now discards the pagination signal entirely; retain it as a lower-bound/unknown-total state without promoting the row total to matches.

Useful? React with 👍 / 👎.

Comment on lines +91 to +95
// More physical lines than the collapsed cap is hidden for certain, even
// for a card that finished while already expanded; a wrapped overflow
// shows up once a collapsed render has recorded it.
return (
this.finalOutput.split('\n').length > SHELL_OUTPUT_PREVIEW_LINES ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Measure wrapped rows for initially expanded shell runs

When toolOutputExpanded is already true and a finished ! command has a single long line that wraps beyond the ten-row preview cap, this physical-line count is only one and the expanded TruncatedOutputComponent never records wasTruncated(). The footer consequently omits ctrl+o collapse even though pressing Ctrl+O rebuilds the collapsed component and hides the wrapped rows. Fresh evidence beyond the earlier initially-expanded report is that the fallback added here counts newline-delimited lines rather than the visual rows the preview actually caps.

Useful? React with 👍 / 👎.

@RealKai42
RealKai42 merged commit 34ad513 into main Sep 7, 2026
16 checks passed
@RealKai42
RealKai42 deleted the feat/compact-tool-cards branch September 7, 2026 12:36
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