mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08: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:
committed by
Mario Zechner
Unverified
parent
9b53b89bd5
commit
ce88ebcd68
@@ -50,6 +50,7 @@ const noOpUIContext: HookUIContext = {
|
||||
notify: () => {},
|
||||
setStatus: () => {},
|
||||
setWidget: () => {},
|
||||
setWidgetComponent: () => {},
|
||||
custom: async () => undefined as never,
|
||||
setEditorText: () => {},
|
||||
getEditorText: () => "",
|
||||
|
||||
Reference in New Issue
Block a user