-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathpackage.json
250 lines (250 loc) · 7.79 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
{
"name": "llama-vscode",
"displayName": "llama-vscode",
"description": "Local LLM-assisted text completion using llama.cpp",
"version": "0.0.8",
"publisher": "ggml-org",
"repository": "/~https://github.com/ggml-org/llama.vscode",
"engines": {
"vscode": "^1.70.0"
},
"icon": "llama.png",
"activationEvents": [
"onLanguage:plaintext",
"onLanguage:javascript",
"onLanguage:typescript",
"onCommand.acceptFirstLine"
],
"main": "./dist/extension.js",
"contributes": {
"languages": [
{
"id": "plaintext",
"aliases": [
"Plain Text"
],
"extensions": [
".txt"
]
}
],
"commands": [
{
"command": "extension.triggerInlineCompletion",
"title": "Trigger Inline Completion"
},
{
"command": "extension.triggerNoCacheCompletion",
"title": "Trigger No Cache Completion"
},
{
"command": "extension.copyIntercept",
"title": "Copy Intercept"
},
{
"command": "extension.cutIntercept",
"title": "Cut Intercept"
},
{
"command": "extension.acceptFirstLine",
"title": "Accept First Line"
},
{
"command": "extension.acceptFirstWord",
"title": "Accept First Word"
},
{
"command": "extension.copyChunks",
"title": "Copy Chunks"
},
{
"command": "extension.showMenu",
"title": "Show Menu"
}
],
"keybindings": [
{
"key": "tab",
"command": "editor.action.inlineSuggest.commit",
"when": "inlineSuggestionVisible"
},
{
"command": "extension.triggerInlineCompletion",
"key": "ctrl+l",
"when": "editorTextFocus"
},
{
"command": "extension.triggerNoCacheCompletion",
"key": "ctrl+shift+l",
"when": "editorTextFocus"
},
{
"command": "extension.copyChunks",
"key": "ctrl+shift+,",
"when": "true"
},
{
"command": "extension.copyIntercept",
"key": "ctrl+c",
"when": "editorTextFocus"
},
{
"command": "extension.cutIntercept",
"key": "ctrl+x",
"when": "editorTextFocus"
},
{
"command": "extension.acceptFirstLine",
"key": "shift+tab",
"when": "editorTextFocus && inlineSuggestionVisible"
},
{
"command": "extension.acceptFirstWord",
"key": "ctrl+right",
"when": "editorTextFocus && inlineSuggestionVisible"
}
,
{
"command": "extension.showMenu",
"key": "ctrl+shift+m",
"when": "true"
}
],
"configuration": {
"type": "object",
"title": "llama.vscode Configuration",
"properties": {
"llama-vscode.launch_cmd": {
"type": "string",
"default": "",
"description": "Shell command executed from menu"
},
"llama-vscode.endpoint": {
"type": "string",
"default": "http://127.0.0.1:8012",
"description": "The URL to be used by the extension."
},
"llama-vscode.auto": {
"type": "boolean",
"default": true,
"description": "If code completion should be trggered automatically (true) or only by pressing Ctrl+l."
},
"llama-vscode.api_key": {
"type": "string",
"default": "",
"description": "llama.cpp server api key or OpenAI endpoint API key (optional)"
},
"llama-vscode.n_prefix": {
"type": "number",
"default": 256,
"description": "number of lines before the cursor location to include in the local prefix"
},
"llama-vscode.n_suffix": {
"type": "number",
"default": 64,
"description": "number of lines after the cursor location to include in the local suffix"
},
"llama-vscode.n_predict": {
"type": "number",
"default": 128,
"description": "max number of tokens to predict"
},
"llama-vscode.t_max_prompt_ms": {
"type": "number",
"default": 500,
"description": "max alloted time for the prompt processing (TODO: not yet supported)"
},
"llama-vscode.t_max_predict_ms": {
"type": "number",
"default": 500,
"description": "max alloted time for the prediction"
},
"llama-vscode.show_info": {
"type": "boolean",
"default": true,
"description": "show extra info about the inference (false - disabled, true - show extra info in status line)"
},
"llama-vscode.max_line_suffix": {
"type": "number",
"default": 8,
"description": "do not auto-trigger FIM completion if there are more than this number of characters to the right of the cursor"
},
"llama-vscode.max_cache_keys": {
"type": "number",
"default": 250,
"description": "max number of cached completions to keep in result_cache"
},
"llama-vscode.ring_n_chunks": {
"type": "number",
"default": 16,
"description": "max number of chunks to pass as extra context to the server (0 to disable)"
},
"llama-vscode.ring_chunk_size": {
"type": "number",
"default": 64,
"description": "max size of the chunks (in number of lines). Note: adjust these numbers so that you don't overrun your context at ring_n_chunks = 64 and ring_chunk_size = 64 you need ~32k context"
},
"llama-vscode.ring_scope": {
"type": "number",
"default": 1024,
"description": "the range around the cursor position (in number of lines) for gathering chunks after FIM"
},
"llama-vscode.ring_update_ms": {
"type": "number",
"default": 1000,
"description": "how often to process queued chunks in normal mode"
},
"llama-vscode.language": {
"type": "string",
"default": "en",
"description": "language: bg - Bulgarian (Български), cn - Chinese (中文), en - English, fr - French (Français), de - German (Deutsch), ru - Russian (Русский), es - Spanish (Español)"
},
"llama-vscode.enabled": {
"type": "boolean",
"default": true,
"description": "Enable/disable completions"
},
"llama-vscode.languageSettings": {
"type": "object",
"default": {
"*": true
},
"additionalProperties": {
"type": "boolean"
},
"description": "Enable/disable suggestions for specific languages"
},
"llama-vscode.use_openai_endpoint": {
"type": "boolean",
"default": false,
"description": "[EXPERIMENTAL] Use OAI endpoint. Slow and poor quality - avoid using"
},
"llama-vscode.openai_client_model": {
"type": "string",
"default": "",
"description": "The FIM friendly model supported by your OpenAI compatible endpoint to be used (e.g., Qwen2.5-Coder-14B-4-bit)"
},
"llama-vscode.openai_prompt_template": {
"type": "string",
"default": "<|fim_prefix|>{inputPrefix}{prompt}<|fim_suffix|>{inputSuffix}<|fim_middle|>",
"description": "The prompt template to be used for the OpenAI compatible endpoint."
}
}
}
},
"scripts": {
"watch": "tsc -watch -p ./"
},
"dependencies": {
"axios": "^1.1.2",
"openai": "^4.80.1"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "^18.0.0",
"@types/vscode": "^1.70.0",
"typescript": "^4.8.0",
"webpack": "^5.0.0",
"webpack-cli": "^4.0.0"
}
}