# pi-signal

A [Pi](https://pi.dev) extension that adds a simplified cockpit-style TUI for agent work.

`pi-signal` now carries the Pi Mode cockpit functionality. The old `/pimode` command is deprecated; use `/signal` instead.

## Features

- `/signal` command opens the cockpit UI.
- `/signal off` restores the native Pi UI pieces changed by the extension.
- Compact custom header, status panel, footer, and editor.
- Tracked AI transcript panel below the editor.
- Transcript keeps all captured AI responses for the current session instead of replacing earlier responses.
- Response panel dynamically resizes toward 60% of terminal height while leaving room for the rest of the cockpit.
- `ctrl+x` transcript scroll mode with keyboard navigation.
- Input box with side padding and rounded outer edges.
- Hidden built-in working row and compact tool expansion while the cockpit is active.
- Uses the public Pi extension API; it does not monkey-patch Pi internals.

## Install

From this directory during development:

```bash
pi -e ./extensions/signal.ts
```

As an npm Pi package:

```bash
pi install npm:pi-signal
```

Or install directly from GitHub:

```bash
pi install git:github.com/accolver/pi-signal
```

Then restart Pi or run:

```text
/reload
```

## Usage

Enable Pi Signal:

```text
/signal
```

Disable it:

```text
/signal off
```

Toggle it:

```text
/signal toggle
```

## Keys

When Pi Signal is enabled:

- `ctrl+x` enters transcript scroll mode.
- In scroll mode: `j`/`k` line down/up, `d`/`u` page down/up, `g` top, `G` bottom.
- `esc`, `i`, or `ctrl+x` exits scroll mode.

## Package metadata

```json
{
  "keywords": ["pi-package", "pi-extension"],
  "pi": {
    "extensions": ["./extensions/signal.ts"]
  }
}
```

## License

MIT
