diff --git a/webview-ui/src/components/chat/CommandExecution.tsx b/webview-ui/src/components/chat/CommandExecution.tsx index e485ed5bc0..79d2b54edb 100644 --- a/webview-ui/src/components/chat/CommandExecution.tsx +++ b/webview-ui/src/components/chat/CommandExecution.tsx @@ -43,7 +43,7 @@ export const CommandExecution = ({ executionId, text, icon, title }: CommandExec if (outputIndex !== -1) { // Text is split into command and output - const cmd = text!.slice(0, outputIndex).trim() + const cmd = (text ?? '').slice(0, outputIndex).trim() // Skip the newline and "Output:" text const afterSeparator = outputIndex + 1 + outputSeparator.length let startOfOutput = afterSeparator