feat: add ctx.ui.setWorkingMessage() extension API

Allows extensions to customize the streaming loader message.
Pass undefined to restore default.
This commit is contained in:
Nico Bailon 2026-01-10 21:02:41 -08:00
parent 016a24e9a1
commit 271b49da3c
6 changed files with 24 additions and 1 deletions

View file

@ -79,6 +79,7 @@ const noOpUIContext: ExtensionUIContext = {
input: async () => undefined,
notify: () => {},
setStatus: () => {},
setWorkingMessage: () => {},
setWidget: () => {},
setFooter: () => {},
setHeader: () => {},

View file

@ -79,6 +79,9 @@ export interface ExtensionUIContext {
/** Set status text in the footer/status bar. Pass undefined to clear. */
setStatus(key: string, text: string | undefined): void;
/** Set the working/loading message shown during streaming. Call with no argument to restore default. */
setWorkingMessage(message?: string): void;
/** Set a widget to display above the editor. Accepts string array or component factory. */
setWidget(key: string, content: string[] | undefined): void;
setWidget(key: string, content: ((tui: TUI, theme: Theme) => Component & { dispose?(): void }) | undefined): void;