added custom header support and example extension

This commit is contained in:
Tudor Oancea 2026-01-06 14:59:26 +01:00 committed by Mario Zechner
parent 512ae4b4c0
commit f755f69e0a
9 changed files with 127 additions and 2 deletions

View file

@ -90,6 +90,7 @@ function createNoOpUIContext(): ExtensionUIContext {
setStatus: () => {},
setWidget: () => {},
setFooter: () => {},
setHeader: () => {},
setTitle: () => {},
custom: async () => undefined as never,
setEditorText: () => {},

View file

@ -65,6 +65,7 @@ const noOpUIContext: ExtensionUIContext = {
setStatus: () => {},
setWidget: () => {},
setFooter: () => {},
setHeader: () => {},
setTitle: () => {},
custom: async () => undefined as never,
setEditorText: () => {},

View file

@ -68,6 +68,9 @@ export interface ExtensionUIContext {
/** Set a custom footer component, or undefined to restore the built-in footer. */
setFooter(factory: ((tui: TUI, theme: Theme) => Component & { dispose?(): void }) | undefined): void;
/** Set a custom header component (shown at startup, above chat), or undefined to restore the built-in header. */
setHeader(factory: ((tui: TUI, theme: Theme) => Component & { dispose?(): void }) | undefined): void;
/** Set the terminal window/tab title. */
setTitle(title: string): void;