# Changelog

All notable changes to this project will be documented in this file.

## [0.3.0] - 2026-08-20

### Added
- **`/shimmer --global` (alias `-g`) writes config to the global settings file**
  (`~/.pi/agent/settings.json`) instead of the current project. The flag can be
  placed anywhere in the command (`/shimmer --global gold`, `/shimmer speed 150 -g`).
  Without it, config is saved to the current project's `.pi/settings.json` as before.
- `/shimmer` (no args) now also reports the source (`project` vs `global`) the
  current config takes effect from.

### Fixed
- **`/shimmer` silently failed when the project had no `.pi/` directory.** Writing
  `<cwd>/.pi/settings.json` threw `ENOENT` because the parent directory didn't
  exist; the error was swallowed and the change was lost. Writing now creates the
  `.pi/` dir first (matching pi's `SettingsManager` and other extensions like
  `pi-tasks`/`pi-cache-optimizer`).
- **Config writes are now atomic** (temp file + rename) so a crash mid-write can't
  corrupt the whole `settings.json`, and failures surface an error notification
  instead of pretending the change was saved.
- **`/shimmer` is a no-op in non-interactive modes** (`-p`/print/json). The command
  guard now returns early when `ctx.hasUI` is false, so it no longer overwrites a
  saved preset with a default config (previously `readConfig` was skipped when
  `session_start` ran without UI, and `speed`/`band` wrote back a full default
  config).

## [0.2.1] - 2026-08-11

### Fixed
- **Animation froze while streaming thinking/text deltas.** pi-zero updates the
  working message very frequently during streaming (every `thinking_delta` /
  `text_delta`). The previous patch restarted the interval and reset the frame
  counter on *every* `setWorkingMessage` call, so each update cleared the timer
  before it ever ticked — the highlight band stayed locked at frame 0 and the
  animation appeared paused while thinking was being output.
- The patched `setWorkingMessage` now starts the interval only once and repaints
  new text in place: fresh text is pushed to the display immediately without
  advancing the frame counter (no visible delay on token counts), while the
  interval keeps driving motion smoothly. The frame resets to 0 only when text
  transitions from empty → set (a new turn), not on mid-stream updates.

## [0.2.0] - 2026-08-07

### Added
- **New `rainbow` preset (rolling neon marquee)** — each character
  cycles through the seven classic rainbow hues (red → orange → yellow →
  green → cyan → blue → violet), shifting one step every frame. The result is
  a neon light trail flowing across the working message.
- New `rainbowSweep()` renderer, plus autocomplete, `/shimmer` usage text, and
  README/docs updated for the new preset.

## [0.1.1] - 2026-08-07

### Fixed
- **Global config was never read** — `readConfig` only checked the project-local
  `.pi/settings.json`, so settings in the global `~/.pi/agent/settings.json`
  (and the previously-documented `~/.pi/settings.json`) were ignored, causing
  the animation to always fall back to the `auto` preset.
- Config is now resolved with pi's merge semantics: **defaults < global
  (`~/.pi/agent/settings.json`) < project (`.pi/settings.json`)**, merged
  field-by-field (so a project can override just one field, e.g. `preset`,
  while keeping the global `speed`/`bandWidth`).

### Changed
- Documented that global config lives in pi's standard location
  `~/.pi/agent/settings.json` (respecting `PI_CODING_AGENT_DIR`), not
  `~/.pi/settings.json`.

## [0.1.0] - 2026-08-06

### Added
- Initial release: gentle per-character color sweep for pi's working message.
- Transparent monkey-patch of `ctx.ui.setWorkingMessage`.
- 5 built-in presets + `auto` (follows theme accent) + `off`.
- Idle-aware animation; `/shimmer` command for presets, speed, and band width.
