Repository navigation
feat(modes): let users edit builtin modes; drop the Goal budget setting - #2380
Merged
Merged
Conversation
Modes are now defined by Markdown files, so a separate settings value for the Goal default budget duplicated what the Goal definition already declares. Builtin modes were read-only, which left the setting as the only way to change that budget. A document in a builtin's own folder (~/.pi/modes/<id>/mode.md) now overrides that builtin. Settings -> Modes edits it in place and Restore default deletes the file. An override must keep the shape the id-keyed behavior relies on; an invalid one is reported and the shipped definition stays in effect. A stored goalBudget value is ignored from now on.
Deploying pi-desktop with
|
| Latest commit: |
76c8c8b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0bf5fb91.pi-desktop.pages.dev |
| Branch Preview URL: | https://refactor-remove-goal-budget.pi-desktop.pages.dev |
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.
Why
Modes are defined by Markdown files, so the separate Goal budget setting duplicated the Goal definition's
budget. Builtins were read-only, which left the setting as the only way to change it.What changes
~/.pi/modes/<agent|plan|goal>/mode.mdoverrides that builtin. Settings → Modes edits builtins in place; Restore default deletes the file.agent/contract; Goal staged,returnTo: agent). An invalid override is reported and the shipped definition stays in effect.AppSettings.goalBudget, its settings row, Host validation and copy are removed. A stored value is ignored; new Goal runs take the definition budget.ModeCatalogEntry.customizedis added (additive).Validation
cargo fmt --check: passedscripts/e2e-goal-layout.mjs: 8 cases, 1456 checks, 0 failuresorigin/main(not touched here): host-coreplugins::tests::a_valid_id_cannot_take_over_a_legacy_plugin_stored_under_its_sanitized_name,rpc::review_rpc_tests::review_rpc_records_workspace_scratch_and_approved_external_write_edit; desktopextension row actions stay visible and labelled.Compatibility
Users who set a Goal budget in settings return to 20 turns until they edit the Goal mode file.