Skip to content

Port Pi extension UI, commands, and model settings to the RPC bridge - #2447

Open
SawyerHood wants to merge 1 commit into
bb/garden-6-provider-extension-plumbingfrom
bb/garden-7-pi-extension-ui
Open

Port Pi extension UI, commands, and model settings to the RPC bridge#2447
SawyerHood wants to merge 1 commit into
bb/garden-6-provider-extension-plumbingfrom
bb/garden-7-pi-extension-ui

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Pi extensions' ctx.ui calls (select/confirm/input/editor dialogs, notify, setStatus, setWidget, setTitle, setEditorText), extension-registered slash commands, and pi's enabledModels scope were invisible from bb after the bridge moved to pi --mode rpc.

What changed

  • Bridge (plugins/provider-pi/src/bridge): extension_ui_request lines become thread-scoped bb questions (answered back as extension_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/list from pi's get_commands; a /name input that is an extension command answers turn/start at 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 behind turn/start).
  • Model scope: a port of pi's resolveModelScopeFromModels (globs, partial names, thinking suffixes), a locked, symlink-aware writer for ~/.pi/agent/settings.json, a settings-page editor, and bb pi models list|set|enable-all. docs/model-preferences-policy.md describes the policy.
  • App bundle (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.
  • The fake pi (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).

AGENT GENERATED

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