From 553f6a3251a8ab735c541a0b7b7e2422114c4817 Mon Sep 17 00:00:00 2001 From: Saveliy Savenak <1986developer@gmail.com> Date: Wed, 12 Jul 2023 13:40:16 +0300 Subject: [PATCH] 1.0.5 --- README.md | 11 +++++++++-- package.json | 2 +- src/commands/scansel.ts | 1 + src/request.ts | 1 - 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3e92038..3068c83 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,19 @@ Usage: 4. PROFIT! 5. ***If you want to continue request select all output including original prompt and repeat steps*** + +## Local running + +For local model you can use that application https://github.com/LucienShui/huggingface-vscode-endpoint-server, and enter URL to that server in extension settings + ## Notes for prompt Good prompt: //POST Request on JSON to url variable //Params: url, object - function /* Good variant use Language syntax */ - + function +Good variant use Language syntax like "function" from JS Result: ![image](https://user-images.githubusercontent.com/56991906/236544392-e170c33e-11c4-489a-bf76-004c95f57526.png) @@ -57,6 +62,8 @@ This extension contributes the following settings: ## Release Notes +### 1.0.5 +Fixed request for token if selection is empty ### 1.0.41 Republish for fix error on Visual Studio Code Store ### 1.0.4 diff --git a/package.json b/package.json index 3e5f6b3..90c428e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Extension for using alternative GitHub Copilot (StarCoder API) in VSCode", "repository": "https://github.com/Lisoveliy/starcoderex", "icon": "logo.png", - "version": "1.0.41", + "version": "1.0.5", "publisher": "Lisoveliy", "engines": { "vscode": "^1.67.0" diff --git a/src/commands/scansel.ts b/src/commands/scansel.ts index 8441413..7e57a45 100644 --- a/src/commands/scansel.ts +++ b/src/commands/scansel.ts @@ -13,6 +13,7 @@ export default async function (){ let text = editor.document.getText(selection); if(text === ""){ vscode.window.showWarningMessage("Empty selection"); + return; } console.log("Prompt: ", text); let result: string | null; diff --git a/src/request.ts b/src/request.ts index f055a32..9b530a9 100644 --- a/src/request.ts +++ b/src/request.ts @@ -22,7 +22,6 @@ export default async (input: string): Promise =>{ return null; }else { vscode.window.showWarningMessage("Service turned off right now. Try later!"); - updatetoken(); } } let output = ((await response.json()) as ResponseModel[])[0].generated_text;