mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 22:03:45 +00:00
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:
parent
016a24e9a1
commit
271b49da3c
6 changed files with 24 additions and 1 deletions
|
|
@ -1170,6 +1170,7 @@ Extensions can interact with users via `ctx.ui` methods and customize how messag
|
|||
- Async operations with cancel (BorderedLoader)
|
||||
- Settings toggles (SettingsList)
|
||||
- Status indicators (setStatus)
|
||||
- Working message during streaming (setWorkingMessage)
|
||||
- Widgets above editor (setWidget)
|
||||
- Custom footers (setFooter)
|
||||
|
||||
|
|
@ -1256,6 +1257,10 @@ See [examples/extensions/timed-confirm.ts](../examples/extensions/timed-confirm.
|
|||
ctx.ui.setStatus("my-ext", "Processing...");
|
||||
ctx.ui.setStatus("my-ext", undefined); // Clear
|
||||
|
||||
// Working message (shown during streaming)
|
||||
ctx.ui.setWorkingMessage("Thinking deeply...");
|
||||
ctx.ui.setWorkingMessage(); // Restore default
|
||||
|
||||
// Widget above editor (string array or factory function)
|
||||
ctx.ui.setWidget("my-widget", ["Line 1", "Line 2"]);
|
||||
ctx.ui.setWidget("my-widget", (tui, theme) => new Text(theme.fg("accent", "Custom"), 0, 0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue