Commit Graph
1628 Commits
Author SHA1 Message Date
Anton Kuzmenko 15109297d6 fix: update zai model API and baseUrl in generate-models script 2025-12-28 13:29:36 -08:00
Mario ZechnerandGitHub bfeae42139 Merge pull request #332 from mrexodia/fix-models-sorting
Make model generation deterministic by sorting providers and models
2025-12-27 18:36:24 +01:00
Mario ZechnerandGitHub 87cb964508 Merge pull request #331 from mrexodia/enabled-models
Add `enabledModels` to `settings.json`
2025-12-27 18:35:11 +01:00
Duncan Ogilvie 3db013e30a Make model generation deterministic by sorting providers and models 2025-12-27 13:58:51 +01:00
Duncan Ogilvie c826183dfa Add enabledModels to settings.json 2025-12-27 13:53:21 +01:00
Mario ZechnerandGitHub 109792f5c3 Merge pull request #328 from dnouri/fix/use-bash-on-unix
fix: Use bash instead of sh on Unix systems
2025-12-27 01:03:58 +01:00
Daniel Nouri 66309f4949 fix: Use bash instead of sh on Unix systems
The bash tool is named "bash" and described as executing bash commands,
but was using sh on Unix. On many distros (Ubuntu, Debian, Alpine, etc.),
/bin/sh is a POSIX-only shell that doesn't support bash syntax like [[ ]],
arrays, or here-strings. This caused the LLM to write bash syntax that
failed, wasting tokens on rewrites.

Now prefers /bin/bash on Unix, falling back to sh only if bash isn't found.
2025-12-26 23:12:57 +01:00
Mario Zechner 58ee7a784e Update extension-loading.md with install/remove/update commands
- pi install <type> <source> (global default, -p for project)
- pi remove <type> <name>
- pi update [types...]
- Install adds to settings.json + installs to disk
- Global is default, -p/--project for project-local
2025-12-26 20:51:15 +01:00
Mario Zechner 2a18463010 Add extension loading design doc
Unified system for loading hooks, tools, skills, and themes from:
- Local files and directories
- npm packages (npm:pkg@version)
- Git repositories (git:url@tag or git:url#branch)

Includes filtering, atomic installation, and settings hierarchy.
2025-12-26 20:35:04 +01:00
Mario Zechner 539aeece2c Add empty Unreleased section 2025-12-26 03:26:49 +01:00
Mario Zechner 44b1aac304 Release v0.30.2 2025-12-26 03:25:55 +01:00
Mario Zechner 1c82a15c0b Add automatic session migration for v0.30.0 bug
- Create migrations.ts with consolidated migrations
- Move auth migration from AuthStorage.migrateLegacy() to migrations.ts
- Add migrateSessionsFromAgentRoot() to fix misplaced sessions
- Sessions in ~/.pi/agent/*.jsonl are auto-migrated on startup

fixes #320
2025-12-26 03:24:49 +01:00
Mario Zechner 31f461eb95 Add session migration script for #320 2025-12-26 03:15:46 +01:00
Mario Zechner 81506531f9 Add empty Unreleased section to changelog 2025-12-26 03:14:27 +01:00
Mario Zechner a37aff3761 Release v0.30.1
fixes #320
2025-12-26 03:13:37 +01:00
Mario Zechner 63a4d9dede Fix custom system prompts missing context, skills, date/time, cwd
fixes #321
2025-12-26 03:06:10 +01:00
Mario ZechnerandGitHub 877f7f8963 Merge pull request #319 from kaofelix/main
Use consistent model comparison including provider everywhere
2025-12-26 02:58:26 +01:00
Mario Zechner b0e311b71c Add session version field and migrate-on-load strategy 2025-12-25 22:52:04 +01:00
Mario Zechner 836025aa05 Clarify compaction in tree format: marker in chain, not a branch 2025-12-25 22:49:26 +01:00
Kao Félix 1148beed4c fix: use consistent model comparison including provider 2025-12-25 22:10:08 +01:00
Mario Zechner 2765cd69c2 Update session tree design to use UUIDs instead of indices 2025-12-25 21:19:02 +01:00
Mario Zechner 8b7b986be4 Add session tree format design doc 2025-12-25 21:06:44 +01:00
Mario Zechner b17b1f61e0 Release v0.30.0 2025-12-25 20:35:14 +01:00
Mario Zechner eb38a36eee docs: Add changelog entry for reverse model cycling and Ctrl+L selector 2025-12-25 20:30:57 +01:00
Mario Zechnerandscutifer b3b78ac97a feat(coding-agent): Add --session-dir flag for custom session directory
- Add --session-dir CLI flag to specify custom session directory
- SessionManager API: second param of create(), continueRecent(), list(), open()
  changed from agentDir to sessionDir (direct directory, no cwd encoding)
- When omitted, uses default (~/.pi/agent/sessions/<encoded-cwd>/)
- --session now derives sessionDir from file's parent if --session-dir not provided
- list() validates session header before processing files
- Closes #313

Co-authored-by: scutifer <scutifer@users.noreply.github.com>
2025-12-25 20:27:41 +01:00
Mario ZechnerandGitHub 671e7375fa Merge pull request #315 from mitsuhiko/model-switcher
Reverse model switching and binding for dialog
2025-12-25 18:33:42 +01:00
Mario Zechner 3595ac0900 docs: add Shift+Ctrl+P and Ctrl+L keyboard shortcuts to README
Follow-up to #315
2025-12-25 18:32:45 +01:00
Mario Zechner 73a771a0ee Release v0.29.1 2025-12-25 18:10:11 +01:00
Mario Zechner c7bbeda1af Merge branch 'fix-311' 2025-12-25 18:08:59 +01:00
Mario Zechner 83512fbf71 Fix jiti alias for typebox subpath imports in custom tools/hooks
fixes #311
2025-12-25 18:07:42 +01:00
Armin Ronacher 0911a426ad Reverse model switching and binding for dialog 2025-12-25 18:07:36 +01:00
Mario Zechner 90832f945b Auto-load SYSTEM.md as custom system prompt
Closes #309
2025-12-25 18:04:22 +01:00
Mario Zechner b36b72899e Add /settings to CHANGELOG 2025-12-25 15:41:52 +01:00
Mario ZechnerandGitHub ea45015750 Add /settings command with unified settings menu (#312)
* Add /settings command with unified settings menu

- Add SettingsList component to tui package with support for:
  - Inline value cycling (Enter/Space toggles)
  - Submenus for complex selections
  - Selection preservation when returning from submenu

- Add /settings slash command consolidating:
  - Auto-compact (toggle)
  - Show images (toggle)
  - Queue mode (cycle)
  - Hide thinking (toggle)
  - Collapse changelog (toggle)
  - Thinking level (submenu)
  - Theme (submenu with preview)

- Update AGENTS.md to clarify no inline imports rule

Fixes #310

* Add /settings to README slash commands table

* Remove old settings slash commands, consolidate into /settings

- Remove /thinking, /queue, /theme, /autocompact, /show-images commands
- Remove unused selector methods and imports
- Update README references to use /settings
2025-12-25 15:39:42 +01:00
Mario Zechner 55da234db5 Add /settings command with unified settings menu
- Add SettingsList component to tui package with support for:
  - Inline value cycling (Enter/Space toggles)
  - Submenus for complex selections
  - Selection preservation when returning from submenu

- Add /settings slash command consolidating:
  - Auto-compact (toggle)
  - Show images (toggle)
  - Queue mode (cycle)
  - Hide thinking (toggle)
  - Collapse changelog (toggle)
  - Thinking level (submenu)
  - Theme (submenu with preview)

- Update AGENTS.md to clarify no inline imports rule

Fixes #310
2025-12-25 15:35:06 +01:00
Mario Zechner a237fa63e8 Add [Unreleased] section to changelogs 2025-12-25 04:17:41 +01:00
Mario Zechner 15968ae025 Release v0.29.0 2025-12-25 04:16:42 +01:00
Mario Zechner 504d0253f6 Rename /clear to /new, update hook events to before_new/new
Closes #305 - took direct rename approach instead of alias system

Thanks @mitsuhiko for the nudge!
2025-12-25 04:15:10 +01:00
Ahmed KamalandGitHub e79e674020 Fix Ctrl+W to use standard readline word deletion behavior (#306)
- Skip trailing whitespace before deleting word (readline behavior)
- Make word navigation grapheme-aware using Intl.Segmenter
- Add Ctrl+Left/Right and Alt+Left/Right word navigation to Input
- Accept full Unicode input while rejecting control characters (C0/C1/DEL)
- Extract shared utilities to utils.ts (getSegmenter, isWhitespaceChar, isPunctuationChar)
- Fix unsafe cast in Editor.forceFileAutocomplete with runtime type check
- Add comprehensive tests for word deletion and navigation
2025-12-25 04:09:47 +01:00
Armin RonacherandGitHub 9b2c75425b Add safety-space before pasting (#307)
* Add safety space when dropping in paths

* Add safety space when dropping in paths
2025-12-25 04:05:53 +01:00
Mario Zechner 8bd90c99fb Release v0.28.0 2025-12-25 03:57:41 +01:00
Mario Zechner c76d62be8e Add removeRuntimeApiKey to AuthStorage 2025-12-25 03:57:20 +01:00
Mario Zechner 436df4b822 Update changelogs for #296 2025-12-25 03:52:46 +01:00
Mario Zechner aa8f7029e1 Refactor OAuth/API key handling: AuthStorage and ModelRegistry
- Add AuthStorage class for credential storage (auth.json)
- Add ModelRegistry class for model management with API key resolution
- Add discoverAuthStorage() and discoverModels() discovery functions
- Add migration from legacy oauth.json and settings.json apiKeys to auth.json
- Remove configureOAuthStorage, defaultGetApiKey, findModel, discoverAvailableModels
- Remove apiKeys from Settings type and SettingsManager methods
- Rename getOAuthPath to getAuthPath
- Update SDK, examples, docs, tests, and mom package

Fixes #296
2025-12-25 03:48:36 +01:00
Mario Zechner 1d089cd803 getApiKeyFromEnv -> getEnvApiKey 2025-12-25 02:38:10 +01:00
Mario Zechner 6b72cdab81 WIP: Add auth-storage.ts for credential management
- AuthStorage class for reading/writing auth.json
- Supports both api_key and oauth credential types
- getApiKey() priority: auth.json api_key > auth.json oauth > env var
2025-12-25 01:23:45 +01:00
Mario Zechner d69c15f322 WIP: Rename model-config.ts to models-json.ts
- loadCustomModels now takes file path instead of agentDir
2025-12-25 01:15:17 +01:00
Mario Zechner 37d302cc6d WIP: Add CLI for OAuth login, update README
- Add src/cli.ts with login command for OAuth providers
- Add bin entry to package.json for 'npx @mariozechner/pi-ai'
- Update README: remove setApiKey docs, rewrite OAuth section
- OAuth storage is caller's responsibility, not library's
- Use getOAuthProviders() instead of duplicating provider list
2025-12-25 01:09:27 +01:00
Mario Zechner e7ad9738fc WIP: Remove global state from pi-ai OAuth/API key handling
- Remove setApiKey, resolveApiKey, and global apiKeys Map from stream.ts
- Rename getApiKey to getApiKeyFromEnv (only checks env vars)
- Remove OAuth storage layer (storage.ts deleted)
- OAuth login/refresh functions now return credentials instead of saving
- getOAuthApiKey/refreshOAuthToken now take credentials as params
- Add test/oauth.ts helper for ai package tests
- Simplify root npm run check (single biome + tsgo pass)
- Remove redundant check scripts from most packages
- Add web-ui and coding-agent examples to biome/tsgo includes

coding-agent still has compile errors - needs refactoring for new API
2025-12-25 01:01:03 +01:00
Mario Zechner 886859197f WIP: remove setApiKey, resolveApiKey 2025-12-24 23:34:23 +01:00