pi-timestamp
v2.0.0
Published
Pi extension — inject timestamp via system prompt + custom message
Maintainers
Readme
pi-timestamp
Pi extension — injects a timestamp into the conversation via system prompt + custom message.
Features
- LLM knows the time via system prompt injection
- Clean user messages — no timestamp pollution in message history
- Visual time label — displayed as a custom message tag (
⏱ [05/30 22:15 Asia/Shanghai]) - Cache-friendly — user message history stays stable for prefix cache hits
- Interval mode — configurable time gap to save tokens (default 15 min)
Install
pi install npm:pi-timestampConfiguration
# Interval between timestamps (minutes, default: 15, 0 = every message)
export TIMESTAMP_INTERVAL_MINUTES=15How it works
Uses before_agent_start to inject:
- A system prompt append with current time (LLM sees it)
- A custom message for TUI display (you see it as a tag)
This avoids modifying user input, keeping message history clean.
License
MIT
