fix(coding-agent): fix Theme type cast in todo hook example

This commit is contained in:
Mario Zechner 2026-01-03 00:00:05 +01:00
parent 9d8230dfc6
commit 65d3081d80

View file

@ -127,7 +127,8 @@ export default function (pi: HookAPI) {
const todos = getTodos(ctx);
await ctx.ui.custom<void>((_tui, theme, done) => {
return new TodoListComponent(todos, theme, () => done());
// Cast: Theme.fg uses ThemeColor union type, but we only use standard colors
return new TodoListComponent(todos, theme as { fg: (color: string, text: string) => string }, () => done());
});
},
});