# pi-context-control

Small pi package with a `/context` TUI for session-local context pruning.

## What it does

- toggles loaded skills out of the system prompt for the current session branch
- toggles extension/custom tools with `pi.setActiveTools()`
- persists choices in the session tree, so forks can carry different context profiles
- shows `/context-status` and a footer marker when anything is disabled

Command-only extensions are listed as loaded, but not toggled: pi cannot safely unload an already-loaded extension handler session-only. Use `pi config` when you need full resource filtering and reload.

## Install

```bash
pi install https://github.com/lukaspanni/pi-context-control
```

Local development:

```bash
pi -e ./extensions/context-control.ts
```

## Commands

- `/context` opens the TUI
- `/context-status` prints disabled skills and extension tools

## Validate

```bash
npm install
npm run validate
```
