mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 12:03:23 +00:00
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:
parent
7b94ddf36b
commit
ba11622d0c
2 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue