From 5759201a399d14011d9d6f362c2e88cbd13bc876 Mon Sep 17 00:00:00 2001 From: Federico Jaramillo Martinez Date: Tue, 28 Jul 2026 10:53:35 +0200 Subject: [PATCH] docs: document Pi extension dialogs and extensionDialogsTimeoutMs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the close-out documentation for extension dialog support: - docs/config.md (+ synchronized config.html): extensionDialogsTimeoutMs in the config matrix, reload/restart guidance, the global config example, and a new Extension dialogs key-detail section covering the unattended-dialog safety valve (default 5 min, 0 = forever, effective deadline is the sooner of the extension's own timeout and this knob). - docs/plugins.md (+ synchronized plugins.html): new Pi extension dialogs in PI WEB behavior note for extension authors — confirm/select/ input render inline in the transcript and resolve with the real answer, answers use a dedicated daemon channel (never the prompt queue, so tool_call hooks park safely), session_start dialogs are reachable during create and open, reload rehydration, first-answer-wins across tabs, abort/runtime-replacement settlement, and the reload-mid-startup browser-local caveat. - Add the extension-dialogs changeset (patch) for the release notes. --- .changeset/extension-dialogs.md | 5 +++++ docs/config.html | 38 ++++++++++++++++++++++++++++++++- docs/config.md | 12 ++++++++++- docs/plugins.html | 27 +++++++++++++++++++++++ docs/plugins.md | 13 +++++++++++ 5 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 .changeset/extension-dialogs.md 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 @@