# pi-glow-ui

A removable Pi extension that adds an animated truecolor rainbow glow to Pi's working UI without modifying Pi core.

## Features

- Flowing rainbow animation on the editor's top and bottom borders while the agent is working.
- Pi's default Braille spinner characters rendered in animated rainbow colors.
- Animated rainbow `Working...` text.
- Native editor behavior remains available, including follow-up and steering input.
- Idle and disabled states restore Pi's default working UI.
- No runtime dependencies.

## Requirements

- Pi coding agent 0.82 or newer is recommended.
- A terminal with ANSI 24-bit truecolor support, such as iTerm2, Ghostty, Kitty, or WezTerm.

## Install

Once published to npm:

```bash
pi install npm:pi-glow-ui
```

Then restart Pi or run:

```text
/reload
```

### Install from a local checkout

```bash
pi install /absolute/path/to/pi-glow-ui
```

### Try without installing permanently

```bash
pi -e /absolute/path/to/pi-glow-ui
```

## Commands

```text
/glow on       Enable the effect
/glow off      Disable the effect
/glow status   Show the current state
```

`/glow` without an argument is equivalent to `/glow status`.

## Behavior

The animation starts on `agent_start` and stops on `agent_settled` or `agent_end`. The extension uses Pi's public extension APIs and a `CustomEditor`; it does not patch Pi's installed source files.

## Known limitation: side borders

Only the editor's top and bottom border lines are recolored. Pi's middle editor lines contain hidden cursor and IME control markers (including the internal `_pi:c` marker). Rewriting those lines can expose control data as visible garbage or interfere with input, so this extension deliberately leaves them untouched.

## Performance

The animation redraws every 80 ms. `/glow off` stops its timer and restores the default working indicator and message.

## Development

```bash
npm install
npm run typecheck
npm run pack:check
```

For local Pi testing:

```bash
pi -e .
```

## Security

Pi extensions execute with the same system access as Pi. Review extension source before installing any third-party Pi package.

## License

MIT
