fix(tui): cap session-title length at 32 chars (#158)

Resolve #128
This commit is contained in:
caiji 2026-05-28 17:57:25 +07:00 committed by GitHub
parent 56053f4ff5
commit d1f9a83d7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---
Shorten the session title written to the terminal window/tab from 80 to 32 characters so long first messages and pasted content no longer stretch the tab bar past readable width.

View file

@ -33,7 +33,7 @@ export const OSC11_RESPONSE_PREFIX_NO_ESC = "]11;rgb:";
// Keep notification/title payloads bounded so terminal tabs and desktop
// notifications stay readable.
export const MAX_TERMINAL_NOTIFICATION_MESSAGE_LENGTH = 240;
export const MAX_PROCESS_TITLE_LENGTH = 80;
export const MAX_PROCESS_TITLE_LENGTH = 32;
// OSC 11 probing must be short because unsupported terminals do not reply.
export const TERMINAL_THEME_DETECT_TIMEOUT_MS = 250;