Commit Graph
100 Commits
Author SHA1 Message Date
Mario Zechner ea93e2f3da fix(coding-agent): add force exclude pattern and fix config toggle persistence
- Add `-path` force-exclude pattern (exact path match, highest precedence)
- Change `+path` force-include to exact path match (no glob)
- Manifest-excluded resources are now hidden from config (not toggleable)
- Config toggle uses `+` to enable and `-` to disable
- Settings paths resolve relative to settings.json location:
  - Global: relative to ~/.pi/agent
  - Project: relative to .pi
- Add baseDir to PathMetadata for proper relative path computation
- Update tests for new base directory and pattern behavior

fixes #951
2026-01-26 12:47:07 +01:00
Mario Zechner 7a0b435923 docs(coding-agent): add security warnings for third-party packages
- README.md: Pi Packages section
- packages.md: Install and Manage section
- extensions.md: Extension Locations section
- skills.md: Locations section
2026-01-26 12:38:04 +01:00
Mario Zechner a8d04a1dbf docs(coding-agent): add comprehensive cross-links in extensions.md
- context event → session.md (message types)
- setModel → models.md (custom models)
- session_before_tree → tree.md (tree navigation)
- Mode Behavior table → rpc.md, json.md (add JSON mode row)
- Fix table to distinguish RPC vs JSON modes
2026-01-26 11:54:56 +01:00
Mario Zechner c3b8685467 docs(coding-agent): link to session.md for message types in context event 2026-01-26 11:52:29 +01:00
Mario Zechner b078141c24 docs(coding-agent): add cross-links to themes.md and session.md 2026-01-26 11:51:11 +01:00
Mario Zechner 530826ba07 docs(coding-agent): link to tool-execution.ts in Custom Rendering section 2026-01-26 11:47:31 +01:00
Mario Zechner d726c81faf docs(coding-agent): remove duplicate packages content from extensions.md
Replace 130 lines of duplicate content with link to packages.md
2026-01-26 11:44:56 +01:00
Mario Zechner 930207130b docs(coding-agent): improve extensions.md, add missing examples
- Add cross-links to session.md, keybindings.md, themes.md
- Document truncateLine, highlightCode, getLanguageFromPath utilities
- Add examples for previously undocumented APIs:
  - message-renderer.ts: registerMessageRenderer with Box styling
  - session-name.ts: setSessionName/getSessionName
  - event-bus.ts: pi.events for inter-extension communication
  - bookmark.ts: setLabel for entry bookmarking
- Update examples table in extensions.md and README.md
2026-01-26 11:43:01 +01:00
Mario Zechner bf876fcd3b Revert "docs(coding-agent): restructure extensions.md, consolidate examples"
This reverts commit b85bf05461.
2026-01-26 02:44:16 +01:00
Mario Zechner b85bf05461 docs(coding-agent): restructure extensions.md, consolidate examples
- Reduce from 1840 to 817 lines (55% smaller)
- Move all scattered example references to Examples Reference table at end
- Add missing setHeader() API documentation
- Add all 50 examples organized by category (Tools, Commands, Events, UI, etc.)
- Fix tui.md hooks->extensions terminology
2026-01-26 02:40:46 +01:00
Mario Zechner efc598b6b0 docs(coding-agent): replace README.md with new structure
- Reorganized: Quick Start, Providers, Interactive Mode, Sessions, Settings, Context Files, Customization, Programmatic Usage, Philosophy, CLI Reference
- Added package discovery links (npmjs.com, Discord)
- More concise, better flow, reduced redundancy
2026-01-26 02:33:46 +01:00
Mario Zechner 5340862910 docs(coding-agent): update README-NEW.md, tui.md, add new docs
- README-NEW.md: add environment variables, philosophy extras (no built-in to-dos, no background bash), session ID support, pi config command, plain git URLs, version pinning
- tui.md: fix hooks->extensions terminology, update Component interface (invalidate required, add wantsKeyRelease)
- Add new docs: settings.md, development.md, json.md
- Add screenshots: tree-view.png, doom-extension.png
2026-01-26 02:27:19 +01:00
Mario Zechner 28ab25b07e docs(coding-agent): improve README structure and update session/compaction docs
- README-NEW.md: add Quick Start, Interactive Mode, Sessions sections
- session.md: add Message Types section, complete SessionManager API, fix source links to GitHub URLs
- compaction.md: rename hooks to extensions, fix source links to GitHub URLs
- keybindings.md: new file documenting all keyboard shortcuts
2026-01-26 01:25:15 +01:00
Mario Zechner 859a4e05b6 docs(coding-agent): rename Header to Startup header 2026-01-26 00:39:41 +01:00
Mario Zechner b16af6e554 docs(coding-agent): add commands intro with skills, templates, extensions 2026-01-26 00:38:51 +01:00
Mario Zechner 6275d46d10 docs(coding-agent): add Q&A tool example for custom UI 2026-01-26 00:36:43 +01:00
Mario Zechner de700f795f docs(coding-agent): note extensions can replace editor 2026-01-26 00:35:43 +01:00
Mario Zechner 13b9e1e394 docs(coding-agent): mention editor replacement UI 2026-01-26 00:35:12 +01:00
Mario Zechner 011c9ecda7 docs(coding-agent): describe all UI components 2026-01-26 00:33:54 +01:00
Mario Zechner 965ab51b16 docs(coding-agent): tighten interactive mode intro 2026-01-26 00:31:50 +01:00
Mario Zechner b25f047808 docs(coding-agent): describe startup UI elements 2026-01-26 00:31:17 +01:00
Mario Zechner b32c9a8814 docs(coding-agent): update screenshot and add interactive mode description 2026-01-26 00:29:46 +01:00
Mario Zechner a0e778cb8a docs(coding-agent): update interactive mode screenshot 2026-01-26 00:28:18 +01:00
Mario Zechner 3f28266ab0 docs(coding-agent): add interactive mode screenshot 2026-01-26 00:27:02 +01:00
Mario Zechner 6783271d75 docs(coding-agent): note that model list is updated with each release 2026-01-26 00:18:45 +01:00
Mario Zechner 591525a1ce docs(coding-agent): link to custom-provider.md for extension-based providers 2026-01-26 00:16:20 +01:00
Mario Zechner 98a1e7b86b docs(coding-agent): add models.md for custom providers and models 2026-01-26 00:11:10 +01:00
Mario Zechner fd1beb4941 docs(coding-agent): add Custom Providers section to providers.md 2026-01-26 00:10:07 +01:00
Mario Zechner b08ec08fd4 docs(coding-agent): rename authentication.md to providers.md 2026-01-26 00:08:29 +01:00
Mario Zechner 1544ab1794 fix: clarify startup hints for thinking level and expand thinking 2026-01-26 00:05:35 +01:00
Mario Zechner 07325c27e8 fix: use findInitialModel in SDK, default to opus-4-5 for anthropic 2026-01-25 23:59:11 +01:00
Mario Zechner 0423c2c2d5 fix: add /model instruction to no models warning 2026-01-25 23:55:40 +01:00
Mario Zechner 88f184f433 fix: point auth error messages to docs/authentication.md 2026-01-25 23:55:00 +01:00
Mario Zechner 9c0c09e1c5 fix: handle empty args array in pi-test.sh 2026-01-25 23:47:35 +01:00
Mario Zechner 579a77493a feat: add --no-env flag to pi-test.sh to clear API keys 2026-01-25 23:45:28 +01:00
Mario Zechner 82e3be9dc8 docs(coding-agent): add windows.md and shell-aliases.md 2026-01-25 22:12:03 +01:00
Mario Zechner 1b98d45c77 docs(coding-agent): simplify resolution order, remove troubleshooting 2026-01-25 21:45:50 +01:00
Mario Zechner 676353ab4f docs(coding-agent): clean up subscription provider list 2026-01-25 21:44:45 +01:00
Mario Zechner 7eae6603bb docs(coding-agent): simplify subscriptions list, remove cost column 2026-01-25 21:44:12 +01:00
Mario Zechner a2c6a32e9b docs(coding-agent): fix /login docs - it shows a picker, no args 2026-01-25 21:43:57 +01:00
Mario Zechner 8eae92cbb7 docs(coding-agent): tighten authentication section in README 2026-01-25 21:42:55 +01:00
Mario Zechner 726e0a4b5b docs(coding-agent): rewrite authentication.md with proper structure
- Subscriptions first (OAuth providers)
- Clear API keys table
- Auth file format
- Cloud providers section (Azure, Bedrock, Vertex)
- Resolution order
- Troubleshooting
2026-01-25 21:42:20 +01:00
Mario Zechner 8d11d1e2f3 docs(coding-agent): remove incorrect prompt cache note from OpenAI Codex 2026-01-25 21:40:45 +01:00
Mario Zechner d9e87d26c4 docs(coding-agent): reorder auth section - subscriptions first, then API keys 2026-01-25 21:39:41 +01:00
Mario Zechner 5946c8211c docs(coding-agent): rename API Keys to Authentication 2026-01-25 21:37:56 +01:00
Mario Zechner 1b705a92b8 docs(coding-agent): move OAuth details to docs/authentication.md, simplify README 2026-01-25 21:37:25 +01:00
Mario Zechner e112d2a917 docs(coding-agent): move terminal setup to docs/terminal-setup.md 2026-01-25 21:34:07 +01:00
Mario Zechner d7410fafc0 docs(coding-agent): show how to run pi after install 2026-01-25 21:32:34 +01:00
Mario Zechner 455d576d70 docs(coding-agent): move shell aliases to its own section (not Windows-specific) 2026-01-25 21:31:41 +01:00
Mario Zechner 10f530f605 docs(coding-agent): remove binary mentions from installation 2026-01-25 21:30:46 +01:00
Mario Zechner 1a8842e355 docs(coding-agent): simplify installation, link to releases for binaries 2026-01-25 21:29:31 +01:00
Mario Zechner 0be68c9b4b docs(coding-agent): clarify that missing description prevents skill loading 2026-01-25 20:58:02 +01:00
Mario Zechner 6cc370c446 docs(coding-agent): clarify how to toggle settings and invoke templates
- skills.md: mention /settings and settings.json for toggling skill commands
- prompt-templates.md: add Usage section with examples
2026-01-25 20:56:24 +01:00
Mario Zechner c12d18483d docs(coding-agent): clarify skill invocation is model behavior 2026-01-25 20:55:10 +01:00
Mario Zechner a4cb9ff02a docs(coding-agent): mention /skill:name as alternative to model invocation 2026-01-25 20:54:39 +01:00
Mario Zechner b29de1c73d docs(coding-agent): note that models often need prompting to use skills 2026-01-25 20:54:10 +01:00
Mario Zechner 77469e1599 docs(coding-agent): link to agentskills.io integration spec for XML format 2026-01-25 20:53:43 +01:00
Mario Zechner ff50d45c04 docs(coding-agent): add instructions for using skills from other harnesses 2026-01-25 20:52:42 +01:00
Mario Zechner dbbb658628 docs(coding-agent): clarify lenient Agent Skills standard compliance 2026-01-25 20:50:55 +01:00
Mario Zechner 3dca4979e4 docs(coding-agent): fix token count in themes.md, rewrite skills.md
- Fixed themes.md: 50 -> 51 color tokens
- Rewrote skills.md to match structure of other docs (TOC, concise sections)
- Removed redundant content from skills.md while keeping all essential info
2026-01-25 20:48:47 +01:00
Mario Zechner 728dc86d49 fix(coding-agent): correct theme schema URL path 2026-01-25 20:46:22 +01:00
Mario Zechner d79eb99cd2 docs(coding-agent): merge theme.md into themes.md, add hot reload info
- Merged theme.md content into themes.md
- Added hot reload documentation
- Updated all references from theme.md to themes.md
- Fixed outdated info (vars not defs, complete example with all 50 tokens)
- Removed dev-focused Implementation section
2026-01-25 20:39:49 +01:00
Mario Zechner 94952bd6c0 docs(coding-agent): update README intro, add packages/prompt-templates/themes docs
- Rewrote README intro to emphasize extensibility and pi packages
- Added Pi Packages section to README
- Created docs/packages.md covering install, sources, manifest, filtering
- Created docs/prompt-templates.md covering format and arguments
- Created docs/themes.md with overview linking to theme.md
2026-01-25 20:33:19 +01:00
Mario Zechner 4bb21b7f5f fix(coding-agent): change sort keybinding from Ctrl+N to Ctrl+S in /resume picker
Also add changelog entries for #863 session rename feature.
2026-01-25 19:43:16 +01:00
Mario Zechner 676de103e1 Update models/package-lock.json after adding deps 2026-01-25 19:29:02 +01:00
Mario Zechner b1211261be docs(coding-agent): add changelog entry for extension shortcut fix (#947) 2026-01-25 19:21:18 +01:00
Mario Zechner 62209c4a0f docs: add tmux testing instructions to AGENTS.md 2026-01-25 19:20:14 +01:00
Mario Zechner 0faba293e6 fix(coding-agent): truncate bash hint line to terminal width
Fixes TUI crash on narrow terminals (< 40 chars) when displaying
collapsed bash output with 'earlier lines' hint.

fixes #941
2026-01-25 19:19:41 +01:00
Mario Zechner b0c050582a fix(coding-agent): update test expectations for trailing period in read tool messages 2026-01-25 19:08:52 +01:00
Mario Zechner c94e8a122e Merge pull request #945 from Perlence/fix/editor-multiline-insert
fix(tui): handle multiline text in insertTextAtCursor()
2026-01-25 15:55:12 +01:00
Mario Zechner b9d8b99c76 Merge pull request #942 from haoqixu/http-proxy
feat(ai): Support HTTP proxy through environment variables
2026-01-25 15:52:14 +01:00
Mario Zechner 3635e45ffd feat(ai): add OpenRouter provider routing support (#859) 2026-01-25 03:34:52 +01:00
Mario Zechner a6d878e804 fix(ai): default tool call arguments to empty object for Google providers
When Google providers return tool calls without an args field (common for
no-argument tools), the arguments field was undefined. This breaks
subsequent API calls that require tool_use.input to be present.

Now defaults to {} when args is missing.

Related: clawdbot/clawdbot#1509
2026-01-25 03:18:02 +01:00
Mario Zechner d74fd82673 docs(coding-agent): add pi config to CLI Reference 2026-01-25 03:13:58 +01:00
Mario Zechner 150128fd2c feat(coding-agent): add pi config TUI to manage resources
Adds a new 'pi config' command with a TUI to list and toggle package
resources (extensions, skills, prompts, themes).

- Displays resources grouped by source (packages, user, project)
- Subgroups by resource type (Extensions, Skills, Prompts, Themes)
- Toggle enabled/disabled state with space
- Filter resources by typing
- Supports +pattern for force-include, !pattern for exclude
- Properly reads exclusion patterns from settings.json

fixes #938
2026-01-25 03:12:21 +01:00
Mario Zechner ef5149fdf6 Fixes #933 2026-01-25 02:51:05 +01:00
Mario Zechner 6b4188fa0b Fixes #933 2026-01-25 02:47:17 +01:00
Mario Zechner 349c6420c7 fix(coding-agent): setWorkingMessage() now works in agent_start handlers
Extensions calling setWorkingMessage() in agent_start handlers previously
had no effect because the loading animation didn't exist yet. Now the
message is queued and applied once the loader is created.

Fixes #935
2026-01-25 02:37:12 +01:00
Mario Zechner 3e8eb956b3 feat(coding-agent): resolve resources with enabled state 2026-01-25 02:13:24 +01:00
Mario Zechner 9dc2b9b163 docs(coding-agent): document pi-package keyword for npm discoverability 2026-01-25 01:40:26 +01:00
Mario Zechner 353ac792eb chore(gitlab-duo): use pi's own GitLab OAuth client ID 2026-01-25 01:12:50 +01:00
Mario Zechner 7b920f27d2 fix(coding-agent): check npm package version before using cached copy
For temporary npm extensions (-e npm:...):
- Unpinned packages: fetch latest version from registry and reinstall if newer
- Pinned packages: reinstall if cached version doesn't match
2026-01-25 00:57:58 +01:00
Mario Zechner 0d24ddbb03 fix(ai): use model.api instead of hardcoding api type in streaming functions
- anthropic.ts: use model.api instead of hardcoding 'anthropic-messages'
- openai-responses.ts: use model.api instead of hardcoding 'openai-responses'
- gitlab-duo: simplify to use actual model IDs, export MODELS array
2026-01-25 00:52:34 +01:00
Mario Zechner 7019fdb92b fix(gitlab-duo): use Responses API for all GPT models
Ensures consistent tool call ID format when switching between models.
2026-01-25 00:29:05 +01:00
Mario Zechner 758baa9fec refactor: rename custom provider examples
- custom-provider -> custom-provider-anthropic
- gitlab-duo -> custom-provider-gitlab-duo
- Update READMEs with custom provider section
2026-01-25 00:18:13 +01:00
Mario Zechner 7caa08999e fix: use template literal in test.ts 2026-01-25 00:13:44 +01:00
Mario Zechner 7a5cfdaed0 fix: apply extension provider registrations before model resolution
- Extensions register providers via pendingProviderRegistrations
- These were only applied in bindCore() during AgentSession creation
- But model resolution in main.ts happens before session creation
- Fix: apply pending registrations immediately after loading extensions
- Also fix gitlab-duo to pass Authorization header instead of apiKey
2026-01-25 00:13:20 +01:00
Mario Zechner dd01d83e64 fix: use opencode's OAuth client ID for localhost redirects 2026-01-24 23:53:56 +01:00
Mario Zechner 639d706156 fix: use correct GitLab OAuth redirect URI with port 8080 2026-01-24 23:52:04 +01:00
Mario Zechner 3e6d8dc72a feat: add GitLab Duo provider extension example
- Delegates to pi-ai's built-in Anthropic/OpenAI streaming
- OAuth support with GitLab's bundled client ID
- Direct access token caching (25 min TTL)
- Models: duo-chat-opus/sonnet/haiku-4-5, duo-chat-gpt-5-1/mini/codex
- No external dependencies beyond pi-ai
2026-01-24 23:51:17 +01:00
Mario Zechner 2c5d202778 chore: add custom-provider to workspaces for auto-install 2026-01-24 23:22:33 +01:00
Mario Zechner 6aad6e30ce refactor: convert custom-provider example to package with deps
- Move custom-provider.ts to custom-provider/index.ts
- Add package.json with @anthropic-ai/sdk dependency
- Extension now requires npm install before use
2026-01-24 23:21:19 +01:00
Mario Zechner d4bd1a956b docs: rewrite custom-provider.md with actual stream pattern
- Document stream.push/end pattern instead of yield
- Link to existing provider implementations on GitHub
- Add testing section with list of test files to run
- Include proper content block and tool call examples
2026-01-24 23:18:36 +01:00
Mario Zechner 177c694406 feat: custom provider support with streamSimple
- Add resetApiProviders() to clear and re-register built-in providers
- Add createAssistantMessageEventStream() factory for extensions
- Add streamSimple support in ProviderConfig for custom API implementations
- Call resetApiProviders() on /reload to clean up extension providers
- Add custom-provider.md documentation
- Add custom-provider.ts example with full Anthropic implementation
- Update extensions.md with streamSimple config option
2026-01-24 23:15:11 +01:00
Mario Zechner c06163bc59 docs(ai): document api registry 2026-01-24 23:15:11 +01:00
Mario Zechner c725135a76 refactor(ai): register api providers 2026-01-24 23:15:11 +01:00
Mario Zechner 3256d3c083 refactor(oauth): add provider registry 2026-01-24 23:15:11 +01:00
Mario Zechner 89636cfe6e fix(coding-agent): improve read tool description for full file reads 2026-01-24 23:15:11 +01:00
Mario Zechner 79ded84d46 Merge pull request #936 from Perlence/fix/extension-editor-padding-x
fix(coding-agent): propagate paddingX to custom editors
2026-01-24 20:48:41 +01:00
Mario Zechner 39b94ad7be Merge pull request #930 from Perlence/fix/document-missing-hotkeys
docs(coding-agent): document missing hotkeys in README and /hotkeys
2026-01-24 20:48:22 +01:00