Port Pi extension UI, commands, and model settings to the RPC bridge - #2447
Open
SawyerHood wants to merge 1 commit into
Open
Port Pi extension UI, commands, and model settings to the RPC bridge#2447SawyerHood wants to merge 1 commit into
SawyerHood wants to merge 1 commit into
Conversation
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.
Human comments
What was wrong
Pi extensions'
ctx.uicalls (select/confirm/input/editor dialogs, notify, setStatus, setWidget, setTitle, setEditorText), extension-registered slash commands, and pi'senabledModelsscope were invisible from bb after the bridge moved topi --mode rpc.What changed
plugins/provider-pi/src/bridge):extension_ui_requestlines become thread-scoped bb questions (answered back asextension_ui_response) or a bounded extension-state snapshot (statuses, widgets, title, editor text, notifications, 60 KiB cap); dialogs queue until the session is announced and are cancelled on stop; oversized editor prefills are refused;command/listfrom pi'sget_commands; a/nameinput that is an extension command answersturn/startat once and ends the turn on pi's ack or the run the handler started (pi runs the handler before it answers the prompt, and the daemon's thread lane would otherwise deadlock the dialog answer behindturn/start).resolveModelScopeFromModels(globs, partial names, thinking suffixes), a locked, symlink-aware writer for~/.pi/agent/settings.json, a settings-page editor, andbb pi models list|set|enable-all.docs/model-preferences-policy.mddescribes the policy.app.tsx): renders the state kinds beside the composer, applies editor text once per revision, and toasts notifications once per session with a dismiss X.fake-pi-rpc.mjs) gained/ui,/ask,/ext [json]knobs; 24 test files / 141 tests in the plugin.No wire change beyond the layer below. Prerequisite: #2446.
How you verified
turbo run typecheck;turbo run test --filter=bb-plugin-provider-pi; live QA of/ui-demo(every dialog kind + notifications) in the dev app, which found and fixed the extension-command deadlock.Fixes: none (upstream stack split).