mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
Add ctx.ui.setFooter() for extensions to replace footer component
Extensions can now replace the built-in footer with a custom component: - setFooter(factory) replaces with custom component - setFooter(undefined) restores built-in footer Includes example extension demonstrating context usage display. Closes #481
This commit is contained in:
parent
2bc445498a
commit
f023af0dab
11 changed files with 147 additions and 1 deletions
|
|
@ -1069,6 +1069,13 @@ ctx.ui.setStatus("my-ext", null); // Clear
|
|||
// Widgets (above editor)
|
||||
ctx.ui.setWidget("my-ext", ["Line 1", "Line 2"]);
|
||||
|
||||
// Custom footer (replaces built-in footer)
|
||||
ctx.ui.setFooter((tui, theme) => ({
|
||||
render(width) { return [theme.fg("dim", "Custom footer")]; },
|
||||
invalidate() {},
|
||||
}));
|
||||
ctx.ui.setFooter(undefined); // Restore built-in footer
|
||||
|
||||
// Full custom component with keyboard handling
|
||||
await ctx.ui.custom((tui, theme, done) => ({
|
||||
render(width) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue