Skip to content

perf(tui): reuse streaming markdown instances - #1069

Merged
liruifengv merged 2 commits into
mainfrom
perf/tui-reuse-streaming-markdown
Jun 24, 2026
Merged

perf(tui): reuse streaming markdown instances#1069
liruifengv merged 2 commits into
mainfrom
perf/tui-reuse-streaming-markdown

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

Resolve #990

Problem

See linked issue.

What changed

  • Reuse the assistant Markdown component during streaming updates instead of recreating it on every flush.
  • Add a transient Markdown theme mode that skips synchronous syntax highlighting while streaming, then render the final highlighted message once at stream end.
  • Pass the transient state from the streaming controller and update tests for the new call signature.

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.

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 83544f7

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 24, 2026

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

commit: 83544f7

@liruifengv
liruifengv merged commit d18aa16 into main Jun 24, 2026
8 checks passed
@liruifengv
liruifengv deleted the perf/tui-reuse-streaming-markdown branch June 24, 2026 08:08
@github-actions github-actions Bot mentioned this pull request Jun 24, 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.

TUI 流式文本在 Kimi 模型下显示卡顿 / 一跳一跳的

1 participant