Stop prompting users to select and configure an agent during berget code init when they choose Pi. The Pi init flow should only install the provider and set defaultProvider = 'berget'.
Pi uses a single system prompt (SYSTEM.md), so the init wizard currently asks:
- "Set up an agent for Pi?"
- Choose an agent from a list
- Write/replace
SYSTEM.md
This adds friction. Pi users can configure agents manually; the init command should focus on auth + provider setup only.
OpenCode will keep its multi-agent selection flow (agents are stored as separate .md files).
- Remove
initPiAgentfrom the import from./pi.js - In
configureTool(), remove theawait initPiAgent({ cwd, files, homeDir, prompter, scope })call
- Delete the entire
initPiAgentfunction - Remove unused imports:
getAllAgents,toPiPrompt getPiAgentDiris still used for auth/settings paths → keep
- Remove the
toPiPromptexport (only used byinitPiAgent)
Update Pi-related tests to no longer include agent-selection prompts or assert SYSTEM.md creation.
| Action | Test(s) |
|---|---|
| Remove agent prompts | sets up pi project with fresh install, preserves existing Pi settings when setting defaultProvider, creates api key for pi when no seat, login failure shows manual auth instructions |
| Delete | skips agent selection for pi project (rename or repurpose), sets up agent for pi project, sets up agent for pi globally, overwrites pi SYSTEM.md when content differs, throws CancelledError when user cancels at agent write confirmation (pi) |
-
npm run test:runpasses -
npm run typecheckpasses -
npm run lintpasses