Fix hook message duplication in TUI

Two bugs:
1. createCustomMessage was returning role: 'user' instead of preserving
   the hook message structure (role: 'hookMessage', customType, etc.)
2. rebuildChatFromMessages wasn't clearing the container before rebuilding
This commit is contained in:
Mario Zechner 2025-12-28 12:16:36 +01:00
parent 01c4e879a1
commit ecef601d19
2 changed files with 6 additions and 2 deletions

View file

@ -1208,6 +1208,7 @@ export class InteractiveMode {
}
private rebuildChatFromMessages(): void {
this.chatContainer.clear();
const context = this.sessionManager.buildSessionContext();
this.renderSessionContext(context);
}