Add ui.custom() for custom hook components with keyboard focus

- Add custom() to HookUIContext: returns { close, requestRender }
- Component receives keyboard input via handleInput()
- CustomMessageComponent default rendering now limits to 5 lines when collapsed
- Add snake.ts example hook with /snake command
This commit is contained in:
Mario Zechner 2025-12-27 03:17:38 +01:00
parent a8866d7a83
commit 14ad8d6228
9 changed files with 315 additions and 2 deletions

View file

@ -52,6 +52,7 @@ const noOpUIContext: HookUIContext = {
confirm: async () => false,
input: async () => null,
notify: () => {},
custom: () => ({ close: () => {}, requestRender: () => {} }),
};
/**