Repository navigation
feat(tui): use primary bullet for NotifyUser updates in fullscreen mode - #4814
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🦋 Changeset detectedLatest commit: 194b99d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
There was a problem hiding this comment.
🟡 Changes recommended
The release note omits the notify_user requirement and the normal scrolling mode’s retained Update badge, leaving users unclear about applicability and how to preserve the old display.
1 open issue
What changed in this PR
本 PR 调整 TUI 消息流中 NotifyUser 进度更新的视觉呈现:全屏模式使用主题主色圆点,普通滚屏模式保留 Update 徽标。
Changes:
- 统一生成标题前缀,并在展开态复用,保持折行缩进一致。
- 增加全屏模式折叠、展开及长标题折行测试,保留普通模式徽标验证。
- 添加 CLI patch changeset,记录显示变化。
| File | Description |
|---|---|
apps/kimi-code/test/tui/components/messages/tool-call.test.ts |
增加模式参数及圆点、徽标和折行渲染验证。 |
apps/kimi-code/src/tui/components/messages/tool-call.ts |
根据 TUI 模式选择前缀,并在展开态复用。 |
.changeset/fullscreen-update-bullet.md |
记录全屏进度更新前缀的用户可见变化。 |
Review effort: Balanced
…mode Port upstream MoonshotAI#4814. NotifyUser cards show a primary-colored bullet in fullscreen mode and keep the Update badge in regular mode. The header stores its prefix from the content head so the expanded view reuses it.

Requirement or Bug
全屏模式启用工具调用自动折叠后,消息流里的思考和工具调用会合并为单行灰字摘要,原有的蓝底白字
Update徽标在其中过于抢眼。普通滚屏模式下工具卡片默认展开、信息较密,仍需要该徽标辅助定位。本 PR 在全屏模式下将消息流中的NotifyUser进度更新前缀改为主题主色(primary)的小圆点●,普通滚屏模式保持蓝底Update徽标不变。Bug Reproduction Steps
N/A
Root Cause
N/A
Code Changes
ToolCallComponent已持有this.ui实例,可通过this.ui?.mode === 'fullscreen'区分全屏模式与普通滚屏模式。notifyUserPrefix(fullscreen)统一生成进度更新卡片的标题前缀,NotifyUserHeader在展开态直接复用content.head,保证首行与续行缩进和普通助手消息对齐。function notifyUserPrefix(fullscreen: boolean): string { + if (fullscreen) return currentTheme.fg('primary', STATUS_BULLET); return `${currentTheme.bg( 'primary', chalk.hex(NOTIFY_USER_MARK_FOREGROUND)(NOTIFY_USER_MARK), )} `; } class NotifyUserHeader extends TruncatedHeaderLine { override setText(content: HeaderContent): void { if (isNotifyUserHeaderContent(content)) { + this.prefix = content.head; this.title = content.notifyUserTitle; } } override render(width: number): string[] { - const firstPrefix = `${notifyUserBadge()} `; + const firstPrefix = this.prefix; ... } }Screenshots / Recordings
全屏模式下的
NotifyUser进度更新前后对比(终端宽度 76 列,由TranscriptContainer真实渲染):Behavior Changes and Affected Users
NotifyUser进度更新卡片的标题前缀(开启实验开关notify_user时)Update徽标primary主题色的●小圆点notify_user实验开关且使用全屏模式(tui_mode = "fullscreen"或KIMI_CODE_TUI_FULL_SCREEN=1)的 TUI 用户tui_mode = "regular"或KIMI_CODE_TUI_FULL_SCREEN=0)仍保留蓝底Update徽标apps/kimi-code/src/tui/components/messages/tool-call.tsapps/kimi-code/test/tui/components/messages/tool-call.test.ts覆盖了普通滚屏模式下的蓝底白字Update徽标,以及全屏模式下折叠态、展开态和长标题折行时的primary色●圆点渲染。验证详情
pnpm --filter @moonshot-ai/kimi-code exec vitest run test/tui/components/messages/tool-call.test.ts test/tui/components/messages/transcript-container.test.ts test/tui/chalk-named-color-guard.test.ts(295 项测试全部通过)pnpm --filter @moonshot-ai/kimi-code run typecheck(通过)pnpm run lint(0 error)Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.