formatting json files

master
Alessandro Mauri 11 months ago
parent aaa78c03bc
commit fe68daac38
  1. 4
      TODO.md
  2. 5270
      package-lock.json
  3. 542
      package.json
  4. 180
      src/comments.json

@ -1,12 +1,12 @@
[x] - in extensions.json add suffix for languages that require it such as css where comments are: /_ stuff _/ [x] - in extensions.json add suffix for languages that require it such as css where comments are: /_ stuff _/
[] - test cancel token [] - test cancel token
[] - add fill in middle [x] - add fill in middle
[x] - add config option to disable the extension [x] - add config option to disable the extension
[] - add command to test and query connection to server [] - add command to test and query connection to server
[x] - add feedback when waiting response [x] - add feedback when waiting response
[] - add a chat window [] - add a chat window
[] - if the model is an instruct-type add the system prompt to the chat [] - if the model is an instruct-type add the system prompt to the chat
[] - add an icon [x] - add an icon
[] - option to backup and restore model settings [] - option to backup and restore model settings
[] - add a window to quickly modify model configs [] - add a window to quickly modify model configs
[] - decorate ai generated text https://github.com/microsoft/vscode-extension-samples/tree/main/decorator-sample [] - decorate ai generated text https://github.com/microsoft/vscode-extension-samples/tree/main/decorator-sample

5270
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,272 +1,272 @@
{ {
"name": "dumbpilot", "name": "dumbpilot",
"displayName": "dumbpilot", "displayName": "dumbpilot",
"description": "Simple code prediction using llama.cpp server api", "description": "Simple code prediction using llama.cpp server api",
"publisher": "Alessandro Mauri", "publisher": "Alessandro Mauri",
"version": "0.0.1", "version": "0.0.1",
"icon": "dummy.ico", "icon": "dummy.ico",
"engines": { "engines": {
"vscode": "^1.84.0" "vscode": "^1.84.0"
}, },
"categories": [ "categories": [
"Other" "Other"
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.alemauri.eu/alema/dumbpilot.git" "url": "https://git.alemauri.eu/alema/dumbpilot.git"
}, },
"activationEvents": [ "activationEvents": [
"onLanguage:ada", "onLanguage:ada",
"onLanguage:agda", "onLanguage:agda",
"onLanguage:alloy", "onLanguage:alloy",
"onLanguage:antlr", "onLanguage:antlr",
"onLanguage:applescript", "onLanguage:applescript",
"onLanguage:assembly", "onLanguage:assembly",
"onLanguage:augeas", "onLanguage:augeas",
"onLanguage:awk", "onLanguage:awk",
"onLanguage:batchfile", "onLanguage:batchfile",
"onLanguage:bluespec", "onLanguage:bluespec",
"onLanguage:c-sharp", "onLanguage:c-sharp",
"onLanguage:c", "onLanguage:c",
"onLanguage:clojure", "onLanguage:clojure",
"onLanguage:cmake", "onLanguage:cmake",
"onLanguage:coffeescript", "onLanguage:coffeescript",
"onLanguage:common-lisp", "onLanguage:common-lisp",
"onLanguage:cpp", "onLanguage:cpp",
"onLanguage:css", "onLanguage:css",
"onLanguage:cuda", "onLanguage:cuda",
"onLanguage:dart", "onLanguage:dart",
"onLanguage:dockerfile", "onLanguage:dockerfile",
"onLanguage:elixir", "onLanguage:elixir",
"onLanguage:elm", "onLanguage:elm",
"onLanguage:emacs-lisp", "onLanguage:emacs-lisp",
"onLanguage:erlang", "onLanguage:erlang",
"onLanguage:f-sharp", "onLanguage:f-sharp",
"onLanguage:fortran", "onLanguage:fortran",
"onLanguage:glsl", "onLanguage:glsl",
"onLanguage:go", "onLanguage:go",
"onLanguage:groovy", "onLanguage:groovy",
"onLanguage:haskell", "onLanguage:haskell",
"onLanguage:html", "onLanguage:html",
"onLanguage:idris", "onLanguage:idris",
"onLanguage:isabelle", "onLanguage:isabelle",
"onLanguage:java-server-pages", "onLanguage:java-server-pages",
"onLanguage:java", "onLanguage:java",
"onLanguage:javascript", "onLanguage:javascript",
"onLanguage:json", "onLanguage:json",
"onLanguage:julia", "onLanguage:julia",
"onLanguage:jupyter-notebook", "onLanguage:jupyter-notebook",
"onLanguage:kotlin", "onLanguage:kotlin",
"onLanguage:lean", "onLanguage:lean",
"onLanguage:literate-agda", "onLanguage:literate-agda",
"onLanguage:literate-coffeescript", "onLanguage:literate-coffeescript",
"onLanguage:literate-haskell", "onLanguage:literate-haskell",
"onLanguage:lua", "onLanguage:lua",
"onLanguage:makefile", "onLanguage:makefile",
"onLanguage:maple", "onLanguage:maple",
"onLanguage:markdown", "onLanguage:markdown",
"onLanguage:mathematica", "onLanguage:mathematica",
"onLanguage:matlab", "onLanguage:matlab",
"onLanguage:ocaml", "onLanguage:ocaml",
"onLanguage:pascal", "onLanguage:pascal",
"onLanguage:perl", "onLanguage:perl",
"onLanguage:php", "onLanguage:php",
"onLanguage:powershell", "onLanguage:powershell",
"onLanguage:prolog", "onLanguage:prolog",
"onLanguage:protocol-buffer", "onLanguage:protocol-buffer",
"onLanguage:python", "onLanguage:python",
"onLanguage:r", "onLanguage:r",
"onLanguage:racket", "onLanguage:racket",
"onLanguage:restructuredtext", "onLanguage:restructuredtext",
"onLanguage:rmarkdown", "onLanguage:rmarkdown",
"onLanguage:ruby", "onLanguage:ruby",
"onLanguage:rust", "onLanguage:rust",
"onLanguage:sas", "onLanguage:sas",
"onLanguage:scala", "onLanguage:scala",
"onLanguage:scheme", "onLanguage:scheme",
"onLanguage:shell", "onLanguage:shell",
"onLanguage:smalltalk", "onLanguage:smalltalk",
"onLanguage:solidity", "onLanguage:solidity",
"onLanguage:sparql", "onLanguage:sparql",
"onLanguage:sql", "onLanguage:sql",
"onLanguage:stan", "onLanguage:stan",
"onLanguage:standard-ml", "onLanguage:standard-ml",
"onLanguage:stata", "onLanguage:stata",
"onLanguage:systemverilog", "onLanguage:systemverilog",
"onLanguage:tcl", "onLanguage:tcl",
"onLanguage:tcsh", "onLanguage:tcsh",
"onLanguage:tex", "onLanguage:tex",
"onLanguage:thrift", "onLanguage:thrift",
"onLanguage:typescript", "onLanguage:typescript",
"onLanguage:verilog", "onLanguage:verilog",
"onLanguage:vhdl", "onLanguage:vhdl",
"onLanguage:visual-basic", "onLanguage:visual-basic",
"onLanguage:xslt", "onLanguage:xslt",
"onLanguage:yacc", "onLanguage:yacc",
"onLanguage:yaml", "onLanguage:yaml",
"onLanguage:zig" "onLanguage:zig"
], ],
"main": "./out/extension.js", "main": "./out/extension.js",
"contributes": { "contributes": {
"commands": [ "commands": [
{ {
"command": "dumbpilot.disableCompletion", "command": "dumbpilot.disableCompletion",
"title": "Disable predictive code completion", "title": "Disable predictive code completion",
"category": "dumbpilot" "category": "dumbpilot"
}, },
{ {
"command": "dumbpilot.enableCompletion", "command": "dumbpilot.enableCompletion",
"title": "Enable predictive code completion", "title": "Enable predictive code completion",
"category": "dumbpilot" "category": "dumbpilot"
} }
], ],
"keybindings": [ "keybindings": [
{ {
"key": "ctrl+shift+l", "key": "ctrl+shift+l",
"mac": "cmd+shift+l", "mac": "cmd+shift+l",
"when": "editorTextFocus", "when": "editorTextFocus",
"command": "editor.action.inlineSuggest.trigger" "command": "editor.action.inlineSuggest.trigger"
} }
], ],
"configuration": { "configuration": {
"title": "dumbpilot", "title": "dumbpilot",
"properties": { "properties": {
"dumbpilot.completionEnabled": { "dumbpilot.completionEnabled": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Enable predictive code completion" "description": "Enable predictive code completion"
}, },
"dumbpilot.fimEnabled": { "dumbpilot.fimEnabled": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "Enable Fill in Middle mode, defaults to Up-to cursor context" "description": "Enable Fill in Middle mode, defaults to Up-to cursor context"
}, },
"dumbpilot.llamaHost": { "dumbpilot.llamaHost": {
"type": "string", "type": "string",
"default": "http://0.0.0.0:8080", "default": "http://0.0.0.0:8080",
"description": "llama.cpp server address" "description": "llama.cpp server address"
}, },
"dumbpilot.llamaCtxsize": { "dumbpilot.llamaCtxsize": {
"type": "number", "type": "number",
"default": 2048 "default": 2048
}, },
"dumbpilot.llamaMaxtokens": { "dumbpilot.llamaMaxtokens": {
"type": "number", "type": "number",
"default": -1 "default": -1
}, },
"dumbpilot.llamaMirostat": { "dumbpilot.llamaMirostat": {
"type": "number", "type": "number",
"default": 0 "default": 0
}, },
"dumbpilot.llamaRepeatPenalty": { "dumbpilot.llamaRepeatPenalty": {
"type": "number", "type": "number",
"default": 1.11 "default": 1.11
}, },
"dumbpilot.llamaFrequencyPenalty": { "dumbpilot.llamaFrequencyPenalty": {
"type": "number", "type": "number",
"default": 0.0 "default": 0
}, },
"dumbpilot.llamaPresencePenalty": { "dumbpilot.llamaPresencePenalty": {
"type": "number", "type": "number",
"default": 0.0 "default": 0
}, },
"dumbpilot.llamaRepeatCtx": { "dumbpilot.llamaRepeatCtx": {
"type": "number", "type": "number",
"default": 256 "default": 256
}, },
"dumbpilot.llamaTemperature": { "dumbpilot.llamaTemperature": {
"type": "number", "type": "number",
"default": 0.25 "default": 0.25
}, },
"dumbpilot.llamaTop_p": { "dumbpilot.llamaTop_p": {
"type": "number", "type": "number",
"default": 0.95 "default": 0.95
}, },
"dumbpilot.llamaTop_k": { "dumbpilot.llamaTop_k": {
"type": "number", "type": "number",
"default": 40 "default": 40
}, },
"dumbpilot.llamaTypical_p": { "dumbpilot.llamaTypical_p": {
"type": "number", "type": "number",
"default": 0.95 "default": 0.95
}, },
"dumbpilot.llamaTailfree_z": { "dumbpilot.llamaTailfree_z": {
"type": "number", "type": "number",
"default": 0.5 "default": 0.5
}, },
"dumbpilot.llamaSeed": { "dumbpilot.llamaSeed": {
"type": "number", "type": "number",
"default": -1 "default": -1
}, },
"dumbpilot.fimBeginString": { "dumbpilot.fimBeginString": {
"type": "string", "type": "string",
"default": "<|fim▁begin|>" "default": "<|fim▁begin|>"
}, },
"dumbpilot.fimHoleString": { "dumbpilot.fimHoleString": {
"type": "string", "type": "string",
"default": "<|fim▁hole|>" "default": "<|fim▁hole|>"
}, },
"dumbpilot.fimEndString": { "dumbpilot.fimEndString": {
"type": "string", "type": "string",
"default": "<|fim▁end|>" "default": "<|fim▁end|>"
}, },
"dumbpilot.useFillInMiddleRequest": { "dumbpilot.useFillInMiddleRequest": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "Use the fill in middle request type provided by llama.cpp server, otherwise use the FIM token strings to delimit the text" "description": "Use the fill in middle request type provided by llama.cpp server, otherwise use the FIM token strings to delimit the text"
}, },
"dumbpilot.llamaCachePrompt": { "dumbpilot.llamaCachePrompt": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Enable prompt caching for faster results" "description": "Enable prompt caching for faster results"
}, },
"dumbpilot.llamaInstructModel": { "dumbpilot.llamaInstructModel": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "For use with instruct models" "description": "For use with instruct models"
}, },
"dumbpilot.llamaSystemPrompt": { "dumbpilot.llamaSystemPrompt": {
"type": "string", "type": "string",
"description": "The system prompt that the model considers at the beginning of every request, used by instruct models" "description": "The system prompt that the model considers at the beginning of every request, used by instruct models"
}, },
"dumbpilot.llamaUseOpenAIAPI": { "dumbpilot.llamaUseOpenAIAPI": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Use the OpenAI API to make requests to the server instead of the llama.cpp server API" "description": "Use the OpenAI API to make requests to the server instead of the llama.cpp server API"
}, },
"dumbpilot.llamaModelName": { "dumbpilot.llamaModelName": {
"type": "string", "type": "string",
"default": "deepseek-coder-6.7B-base.gguf", "default": "deepseek-coder-6.7B-base.gguf",
"description": "Name of the model to use, only works in OpenAI API mode" "description": "Name of the model to use, only works in OpenAI API mode"
} }
} }
} }
}, },
"scripts": { "scripts": {
"vscode:prepublish": "npm run compile", "vscode:prepublish": "npm run compile",
"compile": "tsc -p ./", "compile": "tsc -p ./",
"watch": "tsc -watch -p ./", "watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint", "pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts", "lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js" "test": "node ./out/test/runTest.js"
}, },
"devDependencies": { "devDependencies": {
"@types/vscode": "^1.84.0", "@types/vscode": "^1.84.0",
"@types/mocha": "^10.0.3", "@types/mocha": "^10.0.3",
"@types/node": "18.x", "@types/node": "18.x",
"@typescript-eslint/eslint-plugin": "^6.9.0", "@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0", "@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.52.0", "eslint": "^8.52.0",
"glob": "^10.3.10", "glob": "^10.3.10",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"@vscode/test-electron": "^2.3.6" "@vscode/test-electron": "^2.3.6"
}, },
"prettier": { "prettier": {
"tabWidth": 4, "tabWidth": 4,
"printWidth": 100, "printWidth": 100,
"useTabs": true, "useTabs": true,
"singleQuote": true, "singleQuote": true,
"trailingComma": "es5" "trailingComma": "es5"
} }
} }

@ -1,91 +1,91 @@
{ {
"ada": ["--", ""], "ada": ["--", ""],
"agda": ["--", ""], "agda": ["--", ""],
"alloy": ["//", ""], "alloy": ["//", ""],
"antlr": ["#", ""], "antlr": ["#", ""],
"applescript": ["--", ""], "applescript": ["--", ""],
"assembly": [";", ""], "assembly": [";", ""],
"augeas": ["##", ""], "augeas": ["##", ""],
"awk": ["#", ""], "awk": ["#", ""],
"batchfile": ["::", ""], "batchfile": ["::", ""],
"bluespec": ["//", ""], "bluespec": ["//", ""],
"c-sharp": ["///", ""], "c-sharp": ["///", ""],
"c": ["//", ""], "c": ["//", ""],
"clojure": [";;", ""], "clojure": [";;", ""],
"cmake": ["#", ""], "cmake": ["#", ""],
"coffeescript": ["#", ""], "coffeescript": ["#", ""],
"common-lisp": [";;;", ""], "common-lisp": [";;;", ""],
"cpp": ["//", ""], "cpp": ["//", ""],
"css": ["/*", "*/"], "css": ["/*", "*/"],
"cuda": ["//", ""], "cuda": ["//", ""],
"dart": ["//", ""], "dart": ["//", ""],
"dockerfile": ["#", ""], "dockerfile": ["#", ""],
"elixir": ["#", ""], "elixir": ["#", ""],
"elm": ["--", ""], "elm": ["--", ""],
"emacs-lisp": [";;;", ""], "emacs-lisp": [";;;", ""],
"erlang": ["%", ""], "erlang": ["%", ""],
"f-sharp": ["//", ""], "f-sharp": ["//", ""],
"fortran": ["!", ""], "fortran": ["!", ""],
"glsl": ["//", ""], "glsl": ["//", ""],
"go": ["//", ""], "go": ["//", ""],
"groovy": ["//", ""], "groovy": ["//", ""],
"haskell": ["--", ""], "haskell": ["--", ""],
"html": ["<!--", "-->"], "html": ["<!--", "-->"],
"idris": ["|||", ""], "idris": ["|||", ""],
"isabelle": ["--", ""], "isabelle": ["--", ""],
"java-server-pages": ["<%--", "--%>"], "java-server-pages": ["<%--", "--%>"],
"java": ["//", ""], "java": ["//", ""],
"javascript": ["//", ""], "javascript": ["//", ""],
"json": ["\"comment\":\"", "\","], "json": ["\"comment\":\"", "\","],
"julia": ["#", ""], "julia": ["#", ""],
"jupyter-notebook": ["#", ""], "jupyter-notebook": ["#", ""],
"kotlin": ["//", ""], "kotlin": ["//", ""],
"lean": ["/--", "-/"], "lean": ["/--", "-/"],
"literate-agda": ["--", ""], "literate-agda": ["--", ""],
"literate-coffeescript": ["#", ""], "literate-coffeescript": ["#", ""],
"literate-haskell": ["--", ""], "literate-haskell": ["--", ""],
"lua": ["--", ""], "lua": ["--", ""],
"makefile": ["#", ""], "makefile": ["#", ""],
"maple": ["#", ""], "maple": ["#", ""],
"markdown": ["<!---", "-->"], "markdown": ["<!---", "-->"],
"mathematica": ["(*", "*)"], "mathematica": ["(*", "*)"],
"matlab": ["%", ""], "matlab": ["%", ""],
"ocaml": ["(*", "*)"], "ocaml": ["(*", "*)"],
"pascal": ["(*", "*)"], "pascal": ["(*", "*)"],
"perl": ["#", ""], "perl": ["#", ""],
"php": ["//", ""], "php": ["//", ""],
"powershell": ["#", ""], "powershell": ["#", ""],
"prolog": ["/*", "*/"], "prolog": ["/*", "*/"],
"protocol-buffer": ["//", ""], "protocol-buffer": ["//", ""],
"python": ["#", ""], "python": ["#", ""],
"r": ["#", ""], "r": ["#", ""],
"racket": [";", ""], "racket": [";", ""],
"restructuredtext": [".. ", ""], "restructuredtext": [".. ", ""],
"rmarkdown": ["<!--", "-->"], "rmarkdown": ["<!--", "-->"],
"ruby": ["#", ""], "ruby": ["#", ""],
"rust": ["//", ""], "rust": ["//", ""],
"sas": ["/*", "*/"], "sas": ["/*", "*/"],
"scala": ["//", ""], "scala": ["//", ""],
"scheme": [";", ""], "scheme": [";", ""],
"shell": ["#", ""], "shell": ["#", ""],
"smalltalk": ["\"", "\""], "smalltalk": ["\"", "\""],
"solidity": ["//", ""], "solidity": ["//", ""],
"sparql": ["#", ""], "sparql": ["#", ""],
"sql": ["--", ""], "sql": ["--", ""],
"stan": ["//", ""], "stan": ["//", ""],
"standard-ml": ["(*", "*)"], "standard-ml": ["(*", "*)"],
"stata": ["//", ""], "stata": ["//", ""],
"systemverilog": ["//", ""], "systemverilog": ["//", ""],
"tcl": ["#", ""], "tcl": ["#", ""],
"tcsh": [": ", ""], "tcsh": [": ", ""],
"tex": ["%", ""], "tex": ["%", ""],
"thrift": ["//", ""], "thrift": ["//", ""],
"typescript": ["//", ""], "typescript": ["//", ""],
"verilog": ["//", ""], "verilog": ["//", ""],
"vhdl": ["--", ""], "vhdl": ["--", ""],
"visual-basic": ["'", ""], "visual-basic": ["'", ""],
"xslt": ["<xsl:comment>", "</xsl:comment>"], "xslt": ["<xsl:comment>", "</xsl:comment>"],
"yacc": ["//", ""], "yacc": ["//", ""],
"yaml": ["#", ""], "yaml": ["#", ""],
"zig": ["//", ""] "zig": ["//", ""]
} }

Loading…
Cancel
Save