git rid of uncaught promise error

master
Alessandro Mauri 12 months ago
parent a599d44c10
commit 534e82ffaf
  1. 6
      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<any>): Promise<void> {
async function showPendingStatusBar(message: string, operation: Promise<any>): Promise<void> {
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

Loading…
Cancel
Save