# pi-timestamps

Timestamps extension for the [pi coding agent](https://github.com/badlogic/pi-mono).

## Features

- **Timing widget** — shows prompt time (↑), response time (↓), and duration (⏱) above the editor
- **Live elapsed timer** — footer status shows `⏱ 12.3s` while the agent is streaming
- **`/timestamps` command** — interactive timeline browser with search and message preview

## Use Cases

- Estimate elapsed time when running long processes — compiles, test suites, model training, deployments
- Spot slow prompts or unexpectedly long agent responses at a glance
- Review session timing after the fact with the `/timestamps` timeline browser

## Install

```bash
pi install npm:pi-timestamps
```

Or try without installing:

```bash
pi -e npm:pi-timestamps
```

## Configuration

Optionally set a timezone by creating `~/.pi/agent/timestamps.json`:

```json
{
  "timeZone": "America/Los_Angeles"
}
```

Any [IANA timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) works (e.g. `America/New_York`, `Europe/London`, `Asia/Tokyo`). Omit the file to use your system default.

## Usage

The widget and timer work automatically. Use `/timestamps` to browse the full message timeline:

- **↑↓** — navigate messages
- **Type** — search/filter
- **Backspace** — clear search
- **Escape** — close

## License

MIT
