Skip to content

feat: added agent modes, download button#21

Merged
0xHexE merged 5 commits into
mainfrom
feat/pi-modes-support
Mar 28, 2026
Merged

feat: added agent modes, download button#21
0xHexE merged 5 commits into
mainfrom
feat/pi-modes-support

Conversation

@0xHexE

@0xHexE 0xHexE commented Mar 28, 2026

Copy link
Copy Markdown
Member

No description provided.

0xHexE added 5 commits March 27, 2026 20:14
- 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.
@0xHexE
0xHexE merged commit 129c6a7 into main Mar 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant