mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 03:01:56 +00:00
Add BranchSummaryMessageComponent, unify styling with hook messages
- CompactionSummaryMessageComponent now extends Box, uses customMessageBg - New BranchSummaryMessageComponent for branch summaries - Both use same background color as HookMessageComponent for consistency - Added Spacer before compaction/branch components in chat
This commit is contained in:
parent
b921298af7
commit
4ff5f61ffc
3 changed files with 60 additions and 27 deletions
|
|
@ -38,6 +38,7 @@ import { copyToClipboard } from "../../utils/clipboard.js";
|
|||
import { ArminComponent } from "./components/armin.js";
|
||||
import { AssistantMessageComponent } from "./components/assistant-message.js";
|
||||
import { BashExecutionComponent } from "./components/bash-execution.js";
|
||||
import { BranchSummaryMessageComponent } from "./components/branch-summary-message.js";
|
||||
import { CompactionSummaryMessageComponent } from "./components/compaction-summary-message.js";
|
||||
import { CustomEditor } from "./components/custom-editor.js";
|
||||
import { DynamicBorder } from "./components/dynamic-border.js";
|
||||
|
|
@ -1071,19 +1072,15 @@ export class InteractiveMode {
|
|||
break;
|
||||
}
|
||||
case "compactionSummary": {
|
||||
this.chatContainer.addChild(new Spacer(1));
|
||||
const component = new CompactionSummaryMessageComponent(message);
|
||||
component.setExpanded(this.toolOutputExpanded);
|
||||
this.chatContainer.addChild(component);
|
||||
break;
|
||||
}
|
||||
case "branchSummary": {
|
||||
// Branch summaries are rendered as compaction summaries
|
||||
const component = new CompactionSummaryMessageComponent({
|
||||
role: "compactionSummary",
|
||||
summary: message.summary,
|
||||
tokensBefore: 0,
|
||||
timestamp: message.timestamp,
|
||||
});
|
||||
this.chatContainer.addChild(new Spacer(1));
|
||||
const component = new BranchSummaryMessageComponent(message);
|
||||
component.setExpanded(this.toolOutputExpanded);
|
||||
this.chatContainer.addChild(component);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue