Wire up hook custom message renderers to TUI

- CustomMessageComponent accepts optional CustomMessageRenderer
- If hook provides a renderer, call it and use returned Component inside Box
- Falls back to default rendering (label + Markdown) if no renderer or null returned
- renderSessionContext gets renderer from hookRunner and passes to component
This commit is contained in:
Mario Zechner 2025-12-26 23:32:22 +01:00
parent 7b94ddf36b
commit ba11622d0c
2 changed files with 3 additions and 1 deletions

View file

@ -1054,7 +1054,8 @@ export class InteractiveMode {
// Check if this is a custom_message entry
if (entry?.type === "custom_message") {
if (entry.display) {
this.chatContainer.addChild(new CustomMessageComponent(entry));
const renderer = this.session.hookRunner?.getCustomMessageRenderer(entry.customType);
this.chatContainer.addChild(new CustomMessageComponent(entry, renderer));
}
continue;
}