feat: added agent modes, download button#21
Merged
Conversation
- Add global agent modes with hybrid config (model, thinking level, extensions, skills, extra CLI args) - Versioned SQLite migrations (PRAGMA user_version) for agent_modes and session_modes tables - Backend CRUD routes at /api/modes with utoipa OpenAPI annotations - Session creation (agent + chat) accepts optional mode_id, converts mode config to pi CLI args, records session-mode association - Regenerated pi-client SDK from OpenAPI spec - Added ApiClient methods, useAgentModes hook, AgentMode type export - Mode management UI in settings page with tag-based multi-select for extensions and skills - Mode picker dialog on new session screens (workspace + chat) with Default (no mode) option and starred default mode support - No modes configured = sessions start directly (zero friction)
- Remove dead_code allow on get_session_mode DB method - Add get_session_mode route returning full AgentMode for a session - Register route, OpenAPI path and SessionModeResponse schema - Add getSessionMode to pi-client ApiClient
- Fix modeResolved using useRef instead of useState — ref changes don't trigger re-renders, so ensureSession effect never fired after mode resolution. Converted to useState in both workspace and chat screens. - Add download tool call renderer with download button that uses the existing fsDownload API. Registered in tool call dispatch and shared label maps. - Add filePath/fileName to ParsedToolArguments for download tool parsing. - Add configurable default extensions in config.toml (agent.extensions), defaults to ['npm:@anthaathi/pi-companion-extensions']. Prepended to extra_args for all session types.
This was referenced Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.