Skip to content

fix(tui): reduce default transcript window to keep long sessions responsive#1265

Merged
liruifengv merged 2 commits into
mainfrom
fix/tui-transcript-window-defaults
Jul 1, 2026
Merged

fix(tui): reduce default transcript window to keep long sessions responsive#1265
liruifengv merged 2 commits into
mainfrom
fix/tui-transcript-window-defaults

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No prior issue — this is a small tuning change to the TUI sliding window.

Problem

In long sessions the TUI keeps up to 50 transcript turns, and only trims once the count passes 60 with the default hysteresis. That accumulates a large number of rendered components and hurts responsiveness. Trimming only touches the TUI display layer, so the agent's underlying conversation context is unaffected.

What changed

Lower the sliding-window defaults so fewer transcript turns are retained on screen:

  • KIMI_CODE_TUI_MAX_TURNS: 50 -> 15
  • KIMI_CODE_TUI_HYSTERESIS: 10 -> 5

Both can still be overridden via their environment variables. Existing tests already cover the trimming logic, so this default-value change adds no new test.

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.

…onsive

Lower KIMI_CODE_TUI_MAX_TURNS default from 50 to 15 and KIMI_CODE_TUI_HYSTERESIS from 10 to 5 so the TUI keeps fewer transcript turns in long sessions.
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e904ada

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@e904ada
npx https://pkg.pr.new/@moonshot-ai/kimi-code@e904ada

commit: e904ada

@liruifengv liruifengv merged commit 8cfb165 into main Jul 1, 2026
9 checks passed
@liruifengv liruifengv deleted the fix/tui-transcript-window-defaults branch July 1, 2026 10:41
@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