mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 22:03:45 +00:00
Add spacing before aborted messages
This commit is contained in:
parent
62a423a218
commit
e2d14cdc23
1 changed files with 6 additions and 2 deletions
|
|
@ -88,8 +88,12 @@ export class AssistantMessageComponent extends Container {
|
|||
message.errorMessage && message.errorMessage !== "Request was aborted"
|
||||
? message.errorMessage
|
||||
: "Operation aborted";
|
||||
const prefix = hasVisibleContent ? "\n" : "";
|
||||
this.contentContainer.addChild(new Text(theme.fg("error", `${prefix}${abortMessage}`), 1, 0));
|
||||
if (hasVisibleContent) {
|
||||
this.contentContainer.addChild(new Spacer(1));
|
||||
} else {
|
||||
this.contentContainer.addChild(new Spacer(1));
|
||||
}
|
||||
this.contentContainer.addChild(new Text(theme.fg("error", abortMessage), 1, 0));
|
||||
} else if (message.stopReason === "error") {
|
||||
const errorMsg = message.errorMessage || "Unknown error";
|
||||
this.contentContainer.addChild(new Spacer(1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue