feat(coding-agent): Add sessionDir support in settings.json (#2598)

Users can now set sessionDir in global or project settings.json instead
of passing --session-dir on every invocation. CLI flag takes precedence,
then settings.json, then extension hooks.

Closes #2429

Co-authored-by: Sam Collins <81678+smcllns@users.noreply.github.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
This commit is contained in:
Sam
2026-03-25 16:03:36 -07:00
committed by GitHub
parent d38ad0cd6b
commit 2b1fc90cd7
4 changed files with 47 additions and 7 deletions

View File

@@ -127,6 +127,18 @@ When a provider requests a retry delay longer than `maxDelayMs` (e.g., Google's
`npmCommand` is used for all npm package-manager operations, including `npm root -g`, installs, uninstalls, and `npm install` inside git packages. Use argv-style entries exactly as the process should be launched.
### Sessions
| Setting | Type | Default | Description |
|---------|------|---------|-------------|
| `sessionDir` | string | - | Directory where session files are stored. Accepts absolute or relative paths. |
```json
{ "sessionDir": ".pi/sessions" }
```
When multiple sources specify a session directory, `--session-dir` CLI flag takes precedence, then `sessionDir` in settings.json, then extension hooks.
### Model Cycling
| Setting | Type | Default | Description |