mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
Remove unnecessary type cast in interactive-mode.ts
This commit is contained in:
parent
6adfb64279
commit
376b858d2b
1 changed files with 7 additions and 8 deletions
|
|
@ -562,16 +562,15 @@ export class InteractiveMode {
|
|||
|
||||
private addMessageToChat(message: Message | AppMessage): void {
|
||||
if (isBashExecutionMessage(message)) {
|
||||
const bashMsg = message as BashExecutionMessage;
|
||||
const component = new BashExecutionComponent(bashMsg.command, this.ui);
|
||||
if (bashMsg.output) {
|
||||
component.appendOutput(bashMsg.output);
|
||||
const component = new BashExecutionComponent(message.command, this.ui);
|
||||
if (message.output) {
|
||||
component.appendOutput(message.output);
|
||||
}
|
||||
component.setComplete(
|
||||
bashMsg.exitCode,
|
||||
bashMsg.cancelled,
|
||||
bashMsg.truncated ? ({ truncated: true } as TruncationResult) : undefined,
|
||||
bashMsg.fullOutputPath,
|
||||
message.exitCode,
|
||||
message.cancelled,
|
||||
message.truncated ? ({ truncated: true } as TruncationResult) : undefined,
|
||||
message.fullOutputPath,
|
||||
);
|
||||
this.chatContainer.addChild(component);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue