From 1353805c963a5da1a98273c53a1a9181dec48053 Mon Sep 17 00:00:00 2001 From: Sherzod Kenjaev Date: Thu, 13 Feb 2025 13:38:22 +0500 Subject: [PATCH] Fixed bug Undefined added to File on Execution error --- commands/predict.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/predict.js b/commands/predict.js index fd7eb35..085bce7 100644 --- a/commands/predict.js +++ b/commands/predict.js @@ -91,6 +91,8 @@ module.exports = async function () { }); } else if (answer.type == "prepend") { vscode.window.activeTextEditor.insertSnippet(new vscode.SnippetString(`${answer.content}\n`), sel_start); + } else if (typeof answer === "string") { + vscode.window.showInformationMessage(answer); } else { vscode.window.activeTextEditor.insertSnippet(new vscode.SnippetString(`\n${answer.content}`), sel_end); }