code-yeongyu / code-yeongyu/senpi
feat(tui): add optional assistant message timestamps
- Dominant language
- TypeScript
- Stars
- 429
- Forks
- 98
- Avg merge
- 5h 3m
- Merged PRs (30d)
- 526
Description
## What do you want to change?
Add a default-off `Message timestamps` setting that prefixes each assistant message's first non-empty content line with local `HH:MM:SS` time.
The timestamp should be captured when the first content update arrives and remain stable across later streaming updates, cache invalidation, and terminal resizes. Narrow renders must continue to honor the requested width.
I have a focused implementation ready and intend to submit it as a PR.
## Why?
In long interactive sessions, assistant turns are difficult to correlate with terminal activity and external logs. A small opt-in arrival marker makes that correlation immediate without changing the default TUI or persisted transcript schema.
## How? (optional)
- Persist a `showMessageTimestamps` boolean through `SettingsManager` and expose it in `/settings`.
- Stamp `AssistantMessageComponent` once on its first `updateContent()` call, not during `render()`.
- Reserve the visible prefix width before Markdown rendering and prefix only the first non-empty line.
- Propagate the setting to restored, streaming, and segmented assistant components, including settings reload.
- Add regression coverage for default-off behavior, first-line placement, bounded width, and first-arrival stability across two updates.
This needs the interactive runtime/component path rather than an extension: the public extension API cannot alter construction and rendering of every built-in assistant message component or add a native `/settings` row.
Contributor guide
Research direction
Start by tracing SettingsManager, the /settings entry point, and AssistantMessageComponent through the interactive runtime/component path. Check how updateContent(), restored and streaming components, settings reload, Markdown rendering, and terminal width handling interact. Done means default-off persistence, first-arrival-stable local timestamps on the first non-empty line, bounded narrow renders, propagation across component variants, and regression coverage for the listed cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100