updated to version 2.0

This commit is contained in:
Falko Victor Habel 2024-10-09 15:22:51 +02:00
parent 439a538c7e
commit 621db41722
1 changed files with 151 additions and 134 deletions

View File

@ -1,135 +1,152 @@
{ {
"name": "fabelous-autocoder", "name": "fabelous-autocoder",
"version": "0.2.0", "version": "0.2.0",
"displayName": "Fabelous Autocoder", "displayName": "Fabelous Autocoder",
"description": "A simple to use Ollama autocompletion Plugin", "description": "A simple to use Ollama autocompletion Plugin",
"icon": "icon.png", "icon": "icon.png",
"publisher": "fabel", "publisher": "fabel",
"license": "CC BY-ND 4.0", "license": "CC BY-ND 4.0",
"bugs": { "bugs": {
"url": "https://gitea.fabelous.app/fabel/Fabelous-Autocoder/issues" "url": "https://gitea.fabelous.app/fabel/Fabelous-Autocoder/issues"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://gitea.fabelous.app/fabel/Fabelous-Autocoder.git" "url": "https://gitea.fabelous.app/fabel/Fabelous-Autocoder.git"
}, },
"engines": { "engines": {
"vscode": "^1.89.0" "vscode": "^1.89.0"
}, },
"categories": [ "categories": [
"Machine Learning", "Machine Learning",
"Snippets", "Snippets",
"Programming Languages" "Programming Languages"
], ],
"keywords": [ "keywords": [
"ollama", "ollama",
"coding", "coding",
"autocomplete", "autocomplete",
"open source", "open source",
"assistant", "assistant",
"ai", "ai",
"llm" "llm"
], ],
"galleryBanner": { "galleryBanner": {
"color": "#133773" "color": "#133773"
}, },
"activationEvents": [ "activationEvents": [
"onStartupFinished" "onStartupFinished"
], ],
"main": "./out/extension.js", "main": "./out/extension.js",
"contributes": { "contributes": {
"configuration": { "configuration": {
"title": "Fabelous Autocoder", "title": "Fabelous Autocoder",
"properties": { "properties": {
"fabelous-autocoder.endpoint": { "fabelous-autocoder.endpoint": {
"type": "string", "type": "string",
"default": "http://localhost:11434/api/generate", "default": "http://localhost:11434/api/generate",
"description": "The endpoint of the ollama REST API" "description": "The endpoint of the ollama REST API"
}, },
"fabelous-autocoder.authentication": { "fabelous-autocoder.authentication": {
"type": "string", "type": "string",
"default": "", "default": "",
"description": "Authorization Token for Ollama" "description": "Authorization Token for Ollama"
}, },
"fabelous-autocoder.model": { "fabelous-autocoder.model": {
"type": "string", "type": "string",
"default": "", "default": "",
"description": "The model to use for generating completions" "description": "The model to use for generating completions"
}, },
"fabelous-autocoder.max tokens predicted": { "fabelous-autocoder.max tokens predicted": {
"type": "integer", "type": "integer",
"default": 1000, "default": 1000,
"description": "The maximum number of tokens generated by the model." "description": "The maximum number of tokens generated by the model."
}, },
"fabelous-autocoder.prompt window size": { "fabelous-autocoder.prompt window size": {
"type": "integer", "type": "integer",
"default": 2000, "default": 2000,
"description": "The size of the prompt in characters. NOT tokens, so can be set about 1.5-2x the max tokens of the model (varies)." "description": "The size of the prompt in characters. NOT tokens, so can be set about 1.5-2x the max tokens of the model (varies)."
}, },
"fabelous-autocoder.completion keys": { "fabelous-autocoder.completion keys": {
"type": "string", "type": "string",
"default": " ", "default": " ",
"description": "Character that the autocompletion item provider appear on. Multiple characters will be treated as different entries. REQUIRES RELOAD" "description": "Character that the autocompletion item provider appear on. Multiple characters will be treated as different entries. REQUIRES RELOAD"
}, },
"fabelous-autocoder.response preview": { "fabelous-autocoder.response preview": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Inline completion label will be the first line of response. Max is 10 tokens, but this is unlikely to be reached. If the first line is empty, the default label will be used. Not streamable, disable on slow devices." "description": "Inline completion label will be the first line of response. Max is 10 tokens, but this is unlikely to be reached. If the first line is empty, the default label will be used. Not streamable, disable on slow devices."
}, },
"fabelous-autocoder.preview max tokens": { "fabelous-autocoder.preview max tokens": {
"type": "integer", "type": "integer",
"default": 50, "default": 50,
"description": "The maximum number of tokens generated by the model for the response preview. Typically not reached as the preview stops on newline. Recommended to keep very low due to computational cost." "description": "The maximum number of tokens generated by the model for the response preview. Typically not reached as the preview stops on newline. Recommended to keep very low due to computational cost."
}, },
"fabelous-autocoder.preview delay": { "fabelous-autocoder.preview delay": {
"type": "number", "type": "number",
"default": 1, "default": 1,
"description": "Time to wait in seconds before starting inline preview generation. Prevents Ollama server from running briefly every time the completion key is pressed, which causes unnecessary compute usage. If you are not on a battery powered device, set this to 0 for a more responsive experience." "description": "Time to wait in seconds before starting inline preview generation. Prevents Ollama server from running briefly every time the completion key is pressed, which causes unnecessary compute usage. If you are not on a battery powered device, set this to 0 for a more responsive experience."
}, },
"fabelous-autocoder.continue inline": { "fabelous-autocoder.continue inline": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Ollama continues autocompletion after what is previewed inline. Disabling disables that feature as some may find it irritating. Multiline completion is still accessible through the shortcut even after disabling." "description": "Ollama continues autocompletion after what is previewed inline. Disabling disables that feature as some may find it irritating. Multiline completion is still accessible through the shortcut even after disabling."
},
}, "fabelous-autocoder.temperature": {
"fabelous-autocoder.temperature": { "type": "number",
"type": "number", "default": 0.5,
"default": 0.5, "description": "Temperature of the model. It is recommended to set it lower than you would for dialogue."
"description": "Temperature of the model. It is recommended to set it lower than you would for dialogue." },
}, "fabelous-autocoder.keep alive": {
"fabelous-autocoder.keep alive": { "type": "number",
"type": "number", "default": 10,
"default": 10, "description": "Time in minutes before Ollama unloads the model."
"description": "Time in minutes before Ollama unloads the model." },
}, "fabelous-autocoder.top p": {
"fabelous-autocoder.top p": { "type": "number",
"type": "number", "default": 1,
"description": "Top p sampling for the model." "description": "Top p sampling for the model."
} },
} "fabelous-autocoder.enableLineByLineAcceptance": {
}, "type": "boolean",
"commands": [ "default": false,
{ "description": "Enable line-by-line acceptance of the generated code."
"command": "fabelous-autocoder.autocomplete", }
"title": "Fabelous Autocompletion" }
}] },
}, "keybindings": [
"scripts": { {
"vscode:prepublish": "npm run compile", "command": "fabelous-autocoder.handleTab",
"compile": "tsc --skipLibCheck -p ./", "key": "tab",
"package": "npm run compile && vsce package", "when": "editorTextFocus && !editorTabMovesFocus"
"lint": "eslint \"src/**/*.ts\"", }
"watch": "tsc --skipLibCheck -watch -p ./" ],
}, "commands": [
"devDependencies": { {
"@types/node": "^20.12.8", "command": "fabelous-autocoder.autocomplete",
"@types/vscode": "^1.89.0", "title": "Fabelous Autocompletion"
"@typescript-eslint/eslint-plugin": "^7.8.0", },
"@typescript-eslint/parser": "^7.8.0", {
"eslint": "^8.57.0", "command": "fabelous-autocoder.handleTab",
"typescript": "^5.4.5" "title": "Handle Tab"
}, }
"dependencies": { ]
"axios": "^1.6.8" },
} "scripts": {
} "vscode:prepublish": "npm run compile",
"compile": "tsc --skipLibCheck -p ./",
"package": "npm run compile && vsce package",
"lint": "eslint \"src/**/*.ts\"",
"watch": "tsc --skipLibCheck -watch -p ./"
},
"devDependencies": {
"@types/node": "^20.12.8",
"@types/vscode": "^1.89.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"eslint": "^8.57.0",
"typescript": "^5.4.5"
},
"dependencies": {
"axios": "^1.6.8"
}
}