MoonshotAI / MoonshotAI/kimi-code

feat(tui): show message timestamps and response duration

Open
#2,705 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

What feature would you like to see?

Show message timestamps and assistant response duration in the Kimi Code CLI TUI without reducing the usable transcript width, including correct behavior when reopening historical sessions.

Motivation

The current timestamp layout and data flow have several limitations:

  1. Indented timestamps leave unused horizontal space under message bullets, which is especially noticeable for code blocks and Markdown tables.
  2. Assistant messages do not show how long the complete response took, including streaming and tool execution.
  3. Timestamp visibility cannot be reloaded at runtime.
  4. Reopened sessions need to distinguish records with persisted timing from legacy records that contain no timing information.

Expected behavior

  • Render timestamps on a single header line above the message body:
    • User: ✨ 14:23:45 for today, or ✨ 2026-08-05 14:23:45 for an earlier date.
    • Assistant: ● 14:23:57 (took 3s).
  • Keep message content unindented so it can use the full terminal width.
  • Measure assistant duration from the persisted response start and completion times.
  • Add show_timestamp to ~/.kimi-code/tui.toml, defaulting to true.
  • Apply show_timestamp changes through /reload-tui without restarting the CLI.
  • When reopening a session:
    • Show timestamps and duration when the journal contains the required timing records.
    • Hide timing when legacy records do not contain it.
    • Never substitute the current wall-clock time for missing historical timing.

Compatibility requirements

  • Treat timing as replay/display metadata rather than model-facing conversation content.
  • Keep existing session journals readable.
  • Do not change the Web transcript or message API behavior as part of this CLI-only feature.

Acceptance criteria

  • Live user and assistant messages render the configured timestamp layout.
  • Assistant duration updates after the response finishes.
  • Historical sessions restore persisted timing accurately.
  • Legacy sessions without timing render without timestamps or duration.
  • Toggling show_timestamp and running /reload-tui updates the current transcript.
  • Unit and replay tests cover live formatting, persisted timing, and legacy missing-time behavior.
Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TUI message rendering, session journal replay, and configuration flow, using /reload-tui as the runtime entry point. Trace how live and historical records reach the transcript, then use the requested unit and replay tests to verify formatting, persisted timing, legacy records, and runtime visibility changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.