mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 13:03:42 +00:00
Add todo hook companion to todo custom tool
- /todos command displays all todos on current branch with custom UI - Update hooks.md to clarify components must not be wrapped in Box/Container - Cross-reference tool and hook in example READMEs
This commit is contained in:
parent
a3772d2fd7
commit
74dc5e7c49
6 changed files with 148 additions and 2 deletions
|
|
@ -465,10 +465,12 @@ const result = await ctx.ui.custom((tui, theme, done) => {
|
|||
|
||||
doWork(loader.signal).then(done).catch(() => done(null));
|
||||
|
||||
return loader;
|
||||
return loader; // Return the component directly, do NOT wrap in Box/Container
|
||||
});
|
||||
```
|
||||
|
||||
**Important:** Return your component directly from the callback. Do not wrap it in a `Box` or `Container`, as this breaks input handling.
|
||||
|
||||
Your component can:
|
||||
- Implement `handleInput(data: string)` to receive keyboard input
|
||||
- Implement `render(width: number): string[]` to render lines
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue