# @ifpi/session-files

Track and review every file the AI has edited or created in the current pi session.

## Commands

| Command | Description |
|---------|-------------|
| `/codedot` | Open the current pi working directory in VS Code (`code .`) |
| `/session-files` | Browse files edited by AI — grouped by directory, with diff stats |

## TUI

```
 Session Files (3 files, 8 edits)
 utils                       (2 files matched)
 ──────────────────────────────────
 ▶ 📁 src/utils/ (2 files)
 ▼ 📁 src/components/ (3 files)
    ▶ Button.tsx         +32   -5     2 edits   ● new
      Modal.tsx           +12   -3     1 edit
 ──────────────────────────────────
 ↑↓ PgUp/Dn navigate  ←→ fold  Enter/Space=toggle  Ctrl+O=folder  Ctrl+T=term  Esc
```

- **Folders collapsed by default** — `Enter`/`Space` toggles expand, `←`/`→` fold/unfold
- **Type to filter** — just start typing, matches directory and file names. `Backspace` deletes, `Ctrl+U` clears, `Esc` clears then closes
- **`Tab` toggles filter mode**: `[file]` = only matching files shown; `[folder]` = matching dir shows all its files
- `+N` (green) = lines added, `-N` (red) = lines removed
- `● new` = file created by AI (write tool)
- `Enter` on file opens in VS Code
- `Ctrl+O` opens the containing folder in VS Code
- `Ctrl+T` opens terminal in the selected directory
- `Esc` clears filter; press again to close
