diff --git a/src/extension.ts b/src/extension.ts index f8f9dd2..1a32283 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -175,12 +175,13 @@ export function activate(context: vscode.ExtensionContext) { // Prefix the filename in a comment let pfx: string, sfx: string; + const fname = document.fileName.split('/').at(-1); const lang = document.languageId; const prefixes = commentPrefix; pfx = (prefixes as any)[lang][0] as string; sfx = (prefixes as any)[lang][1] as string; // FIXME: is there a more efficient way? - doc_before = pfx + ' ' + document.fileName + sfx + '\n' + doc_before; + doc_before = pfx + ' ' + fname + sfx + '\n' + doc_before; // server request object const request: llamaCompletionRequest = { @@ -221,7 +222,6 @@ export function activate(context: vscode.ExtensionContext) { } data = await response.json() as llamaData; - console.log(JSON.stringify(data)); } catch (e: any) { const err = e as TypeError;