Skip to content

fix(tui): keep waiting spinner during encrypted reasoning streams#1256

Merged
liruifengv merged 2 commits into
mainfrom
fix/tui-waiting-spinner-encrypted-reasoning
Jul 1, 2026
Merged

fix(tui): keep waiting spinner during encrypted reasoning streams#1256
liruifengv merged 2 commits into
mainfrom
fix/tui-waiting-spinner-encrypted-reasoning

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — see the Problem section below.

Problem

When reasoning is encrypted/redacted (e.g. Kimi over the Anthropic-compatible protocol), the model streams thinking deltas whose visible text is empty — only an opaque signature rides along. The TUI switched into thinking pane mode on the first such delta, which stopped the waiting moon spinner even though no thinking component was ever created (a thinking component needs visible text). The result was a blank, spinner-less gap until the first real text/tool token arrived.

What changed

Ignore empty thinking deltas while no thinking draft exists, so the waiting moon spinner stays up until actual thinking text (or the next token) arrives. Added a regression test that streams empty (encrypted) thinking deltas and asserts the moon frame keeps rendering with no orphan thinking component.

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.

Empty (encrypted/redacted) thinking deltas no longer switch out of waiting mode, which previously stopped the moon spinner while no thinking component was ever created, leaving a blank spinner-less gap until the first real text/tool token.
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c1e5a89

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 Jul 1, 2026

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

commit: c1e5a89

@liruifengv liruifengv merged commit 0cc02ac into main Jul 1, 2026
9 checks passed
@liruifengv liruifengv deleted the fix/tui-waiting-spinner-encrypted-reasoning branch July 1, 2026 06:39
@github-actions github-actions Bot mentioned this pull request Jul 1, 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