mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Closes #11816. ## Problem `ctx.ui.custom()` accepted `blocked` only for inline components. Overlays ignored it, so an extension question shown as an overlay left pi reporting `working` over OSC 7501. Example: pi-ask-user in its default overlay mode inside Herdr App never shows the session as blocked and never notifies. ## Change - Each overlay opened with `blocked` registers its own program status source (`extension-overlay:N`) after `showOverlay()` and clears it when the overlay calls `done()`. - The status stays while the overlay is hidden with `setHidden()` or covered by another overlay: the question is still unanswered. - Separate sources per overlay, so closing one keeps other open questions, dialogs and login prompts blocked. With several blocking prompts, the most recently shown one supplies `kind` and `message`. - Overlays without `blocked` (loaders etc.) register nothing and cannot clear another overlay's status. - `/reload` and session switches drop overlays without calling `done()`; `resetExtensionUI()` now clears their blocked status so pi does not stay blocked. - Inline components are unchanged: they report the dialog shown in the editor slot, so a non-blocking component shown in its place clears the status until it closes. - Docs (`docs/tui.md`, `custom()` JSDoc) and changelog updated. ## Testing - `npm run check` - `test/interactive-mode-extension-dialogs.test.ts`: new regression test (two blocking overlays, one non-blocking overlay, hide, close in order) and one for clearing the status on reset. pi-ask-user still needs to pass `blocked` for its overlay prompts. |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| chord | ||
| codemode | ||
| coding-agent | ||
| durable | ||
| env | ||
| evals | ||
| mcp | ||
| schema | ||
| telemetry | ||
| tui | ||