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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user