OpenCode plugin that shows when a message was sent or completed in the chat TUI — without putting those timestamps in the model context.
Local wall clock as ⏱ DD/MM HH:MM:SS. The model never sees the stamps.
| Where | Behavior |
|---|---|
| User message | ⏱ DD/MM HH:MM:SS as an ignored text part (visible in TUI, filtered from the LLM) |
| Assistant message | Same stamp appended when each text part completes (experimental.text.complete, sync only) |
| Model history | Stamps stripped via experimental.chat.messages.transform |
| Compaction / synthetic | Never stamped |
OpenCode installs plugins with Bun on startup.
{
"plugin": ["./path/to/opencode-message-times"]
}Or drop a copy under ~/.config/opencode/plugins/ / .opencode/plugins/.
Restart OpenCode after changing plugins.
- OpenCode with plugin support
- Peer:
@opencode-ai/plugin(provided by OpenCode)
chat.message
└─ real user text? → unshift ignored stamp part (needs id/sessionID/messageID)
experimental.text.complete
└─ not compaction? → append stamp (no network/client awaits)
experimental.chat.messages.transform
└─ drop ignored stamp parts + strip ⏱ from model view
Pure helpers live in src/stamp.ts and src/guards.ts.
bun install
bun test
bun run typecheckNative TUI timestamps: /timestamps or keybind session_toggle_timestamps (kv.timestamps = show | hide).
MIT © cartudev

