diff --git a/.changeset/extension-dialogs.md b/.changeset/extension-dialogs.md new file mode 100644 index 0000000..42d3b10 --- /dev/null +++ b/.changeset/extension-dialogs.md @@ -0,0 +1,5 @@ +--- +"@jmfederico/pi-web": patch +--- + +Support Pi extension dialogs in the browser: `ctx.ui.confirm()`, `ctx.ui.select()`, and `ctx.ui.input()` now render as cards inline in the session transcript and resolve with the user's actual answer — including dialogs opened from `session_start` hooks while the session is still starting and from in-flight `tool_call` hooks, which previously resolved `false` immediately despite `hasUI === true`. Answers travel over a dedicated session-daemon channel rather than the prompt queue, so a dialog parked inside a `tool_call` hook cannot deadlock the run. Open dialogs survive browser reloads, the first answer wins across browser tabs, and unanswered dialogs settle safely on run abort, runtime replacement, or timeout. Adds the `extensionDialogsTimeoutMs` config key (default 5 minutes, `0` waits forever) as the unattended-dialog safety valve; dialog support is always on. Other `ExtensionUIContext` surfaces (widgets, status, editor, `custom`) remain unimplemented. diff --git a/docs/config.html b/docs/config.html index 1e3de64..47b2dfd 100644 --- a/docs/config.html +++ b/docs/config.html @@ -102,6 +102,7 @@ Pi extension providers Model catalog refresh Session tools + Extension dialogs Completion tools @@ -173,7 +174,7 @@