From 534e82ffaf8f3a1792b56cdc98420f2d175b4474 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Tue, 21 Nov 2023 19:34:44 +0100 Subject: [PATCH] git rid of uncaught promise error --- src/extension.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 7f9c24a..0a8384b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -90,12 +90,13 @@ async function showMessageWithTimeout(message: string, timeout: number): Promise // show a message on the status bar until the promise is resolved -async function showPendingStatusBar(message: string, resolve: Promise): Promise { +async function showPendingStatusBar(message: string, operation: Promise): Promise { void vscode.window.withProgress( { location: vscode.ProgressLocation.Window, title: message, - }, () => { return resolve; }); + }, () => operation ).then((aok) => {}, (err) => {}); + // we already resolve the operation elsewhere } @@ -201,7 +202,6 @@ export function activate(context: vscode.ExtensionContext) { req_str = '/completion'; request.prompt = doc_before; } - console.log(fim); let data: llamaData; // try to send the request to the running server