-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpackage.json
178 lines (178 loc) · 5.68 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
{
"name": "localcompletion",
"displayName": "LocalCompletion",
"description": "Local LLM based code completion like Copilot",
"publisher": "lufixSch",
"version": "0.3.0",
"repository": {
"type": "git",
"url": "https://github.com/lufixSch/LocalCompletion"
},
"icon": "static/minimal_logo_dark.png",
"engines": {
"vscode": "^1.83.0"
},
"categories": [
"Machine Learning",
"Snippets"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.js",
"contributes": {
"views": {
"explorer": [
{
"id": "contextSelection",
"name": "LocalCompletion Context"
}
]
},
"menus": {
"view/title": [
{
"command": "localcompletion.refresh_context_view",
"when": "view == contextSelection",
"group": "navigation"
},
{
"command": "localcompletion.apply_context_gitignore",
"when": "view == contextSelection && !localcompletion:useContextGitignore"
},
{
"command": "localcompletion.disable_context_gitignore",
"when": "view == contextSelection && localcompletion:useContextGitignore"
}
]
},
"commands": [
{
"command": "localcompletion.select_endpoint",
"title": "LocalCompletion: Change API Endpoint"
},
{
"command": "localcompletion.toggle",
"title": "LocalCompletion: Toggle code completion on/off"
},
{
"command": "localcompletion.regenerate",
"title": "LocalCompletion: Regenerate completion"
},
{
"command": "localcompletion.refresh_context_view",
"title": "LocalCompletion: Refresh context view",
"icon": "$(extensions-refresh)"
},
{
"command": "localcompletion.apply_context_gitignore",
"title": "LocalCompletion: Apply .gitignore to context",
"shortTitle": " Apply .gitignore to context"
},
{
"command": "localcompletion.disable_context_gitignore",
"title": "LocalCompletion: Disable .gitignore to context",
"shortTitle": "✓ Apply .gitignore to context"
}
],
"configuration": [
{
"title": "LocalCompletion",
"properties": {
"localcompletion.active_endpoint": {
"description": "The URL of any OpenAI compatible API which is then used for generating the code completion",
"type": "string",
"default": "http://localhost:5000/v1"
},
"localcompletion.endpoints": {
"description": "List of possible API endpoints in order to make switching easier",
"type": "array",
"default": [
"http://localhost:5000/v1"
]
},
"localcompletion.temperature": {
"description": "Temperature of the LLM",
"type": "number",
"default": 0.5
},
"localcompletion.max_tokens": {
"description": "Maximum number of tokens in the response",
"type": "number",
"default": 300
},
"localcompletion.stop_sequences": {
"description": "Additional stop sequences (max. 2)",
"type": "array",
"default": []
},
"localcompletion.max_lines": {
"description": "Maximum number of lines in the response",
"type": "number",
"default": 5
},
"localcompletion.reduce_calls": {
"description": "Reduce API calls with various strategies",
"type": "boolean",
"default": true
},
"localcompletion.skip_autocomplete_widget": {
"description": "Skip completion if autocomplete widget is active",
"type": "boolean",
"default": false
},
"localcompletion.completion_timeout": {
"description": "Minimum time between keystrokes (in ms) before sending a completion request (Reduces API calls, which are closed immedietly after)",
"type": "number",
"default": 300
},
"localcompletion.add_visible_files": {
"description": "Add all visible files to completion context",
"type": "boolean",
"default": true
},
"localcompletion.context_files": {
"description": "List of files to add to completion context (should ussually not be edited manually)",
"type": "array",
"default": []
},
"localcompletion.context_gitignore": {
"description": "Whether to ignore files in the gitignore for context generation",
"type": "boolean",
"default": true
}
}
}
]
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "npm run compile-tests && npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/mocha": "^10.0.2",
"@types/node": "18.x",
"@types/vscode": "^1.83.0",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"@vscode/test-electron": "^2.3.4",
"eslint": "^8.50.0",
"glob": "^10.3.3",
"mocha": "^10.2.0",
"ts-loader": "^9.4.4",
"typescript": "^5.2.2",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"openai": "^4.14.1",
"simple-git": "^3.22.0"
}
}