Remove unnecessary type cast in interactive-mode.ts
This commit is contained in:
@@ -562,16 +562,15 @@ export class InteractiveMode {
|
|||||||
|
|
||||||
private addMessageToChat(message: Message | AppMessage): void {
|
private addMessageToChat(message: Message | AppMessage): void {
|
||||||
if (isBashExecutionMessage(message)) {
|
if (isBashExecutionMessage(message)) {
|
||||||
const bashMsg = message as BashExecutionMessage;
|
const component = new BashExecutionComponent(message.command, this.ui);
|
||||||
const component = new BashExecutionComponent(bashMsg.command, this.ui);
|
if (message.output) {
|
||||||
if (bashMsg.output) {
|
component.appendOutput(message.output);
|
||||||
component.appendOutput(bashMsg.output);
|
|
||||||
}
|
}
|
||||||
component.setComplete(
|
component.setComplete(
|
||||||
bashMsg.exitCode,
|
message.exitCode,
|
||||||
bashMsg.cancelled,
|
message.cancelled,
|
||||||
bashMsg.truncated ? ({ truncated: true } as TruncationResult) : undefined,
|
message.truncated ? ({ truncated: true } as TruncationResult) : undefined,
|
||||||
bashMsg.fullOutputPath,
|
message.fullOutputPath,
|
||||||
);
|
);
|
||||||
this.chatContainer.addChild(component);
|
this.chatContainer.addChild(component);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user