mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 03:01:56 +00:00
feat(hooks): add setWidgetComponent for custom TUI components
- New ctx.ui.setWidgetComponent(key, factory) method - Allows custom Component to render as widget without taking focus - Unlike custom(), widget components render inline above editor - Components are disposed when cleared or replaced - Falls back to no-op in RPC/print modes
This commit is contained in:
parent
9b53b89bd5
commit
ce88ebcd68
8 changed files with 94 additions and 6 deletions
|
|
@ -142,6 +142,10 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
|
|||
} as RpcHookUIRequest);
|
||||
},
|
||||
|
||||
setWidgetComponent(): void {
|
||||
// Custom components not supported in RPC mode - host would need to implement
|
||||
},
|
||||
|
||||
async custom() {
|
||||
// Custom UI not supported in RPC mode
|
||||
return undefined as never;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue