-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpackage.json
More file actions
306 lines (306 loc) · 9.26 KB
/
Copy pathpackage.json
File metadata and controls
306 lines (306 loc) · 9.26 KB
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
{
"name": "fim",
"displayName": "FIM - AI Code Completion",
"description": "FIM — locally hosted AI completion engine",
"version": "0.1.0",
"icon": "assets/icon.png",
"keywords": [
"code-inference",
"code-suggestion",
"copilot",
"localhost",
"no-leaks",
"private",
"fim",
"fill-in-the-middle",
"ai",
"deepseek",
"llama",
"development",
"extension",
"llama-code",
"snippets",
"code-snippets",
"autocomplete",
"intellisense",
"llama-ai",
"vscode-extension"
],
"repository": {
"url": "https://github.com/UN-Self/FIM"
},
"license": "MIT",
"publisher": "UN-Self",
"engines": {
"vscode": "^1.84.0"
},
"bugs": {
"url": "https://github.com/UN-Self/FIM/issues"
},
"categories": [
"Programming Languages",
"Snippets",
"Debuggers",
"Formatters",
"Machine Learning",
"Education",
"Testing",
"Data Science",
"Extension Packs",
"Linters"
],
"activationEvents": [
"onStartupFinished"
],
"author": {
"name": "HandyWote",
"email": "18666119673@163.com"
},
"main": "./out/index.js",
"browser": "./out/index.js",
"contributes": {
"menus": {
"editor/context": [],
"view/title": [
{
"command": "fim.manageProviders",
"group": "navigation@1",
"when": "view == fim.sidebar"
}
]
},
"commands": [
{
"command": "fim.enable",
"shortTitle": "Enable FIM",
"title": "Enable FIM"
},
{
"command": "fim.stopGeneration",
"title": "Stop generation"
},
{
"command": "fim.disable",
"title": "Disable FIM",
"shortTitle": "Disable FIM"
},
{
"command": "fim.sidebar.focus",
"shortTitle": "Enable FIM sidebar",
"title": "Enable FIM sidebar"
},
{
"command": "fim.settings",
"shortTitle": "FIM settings",
"title": "Open FIM settings",
"icon": "$(gear)"
},
{
"command": "fim.manageProviders",
"shortTitle": "Manage FIM providers",
"title": "Manage FIM providers",
"icon": "$(robot)"
}
],
"keybindings": [
{
"key": "Alt+\\",
"command": "editor.action.inlineSuggest.trigger",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "CTRL+SHIFT+/",
"command": "fim.stopGeneration",
"when": "fimGeneratingText"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "fim-sidebar-view",
"title": "FIM",
"icon": "assets/fim.png"
}
]
},
"views": {
"fim-sidebar-view": [
{
"type": "webview",
"id": "fim.sidebar",
"name": "FIM",
"icon": "assets/fim.png",
"contextualTitle": "FIM"
}
]
},
"configuration": {
"title": "FIM",
"properties": {
"fim.enabled": {
"order": 0,
"type": "boolean",
"default": true,
"markdownDescription": "Toggles the FIM extension on or off. When `true`, FIM is active and ready to provide completions."
},
"fim.enabledLanguages": {
"order": 1,
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"default": {
"*": true
},
"markdownDescription": "Specifies which languages to enable completions with FIM for. Use `*` as the default for all languages. Example:\n```json\n{\n \"*\": true,\n \"python\": true,\n \"javascript\": false\n}\n```"
},
"fim.locale": {
"order": 2,
"type": "string",
"enum": [
"en",
"zh-CN"
],
"enumDescriptions": [
"English",
"Chinese (Simplified)"
],
"default": "en",
"markdownDescription": "Sets the locale for FIM. The default is `en` (English)."
},
"fim.autoSuggestEnabled": {
"order": 3,
"type": "boolean",
"default": true,
"markdownDescription": "When `true`, FIM will automatically suggest completions. You can still manually trigger completions using the default shortcut (`Alt+\\`)."
},
"fim.contextLength": {
"order": 4,
"type": "number",
"default": 100,
"markdownDescription": "Specifies how many lines of context (before and after the current line) to include in Fill-in-Middle (FIM) prompts. A higher number provides more context but may slow down completions.",
"required": true
},
"fim.debounceWait": {
"order": 5,
"type": "number",
"default": 300,
"markdownDescription": "Sets the delay (in milliseconds) before triggering the next completion. This helps reduce API calls and improve performance.",
"required": true
},
"fim.temperature": {
"order": 6,
"type": "number",
"default": 0.2,
"markdownDescription": "Controls the randomness of the model's output. Lower values (e.g., 0.2) produce more focused and deterministic outputs, while higher values (e.g., 0.8) lead to more diverse and creative completions.",
"required": true
},
"fim.multilineCompletionsEnabled": {
"order": 7,
"type": "boolean",
"default": true,
"markdownDescription": "When `true`, FIM will attempt to generate multi-line completions. This is an experimental feature and may not work perfectly in all scenarios."
},
"fim.maxLines": {
"dependencies": {
"fim.multilineCompletionsEnabled": true
},
"order": 8,
"type": "number",
"default": 40,
"markdownDescription": "Sets the maximum number of lines for multi-line completions. Only applies when `fim.multilineCompletionsEnabled` is `true`."
},
"fim.fileContextEnabled": {
"order": 9,
"type": "boolean",
"default": false,
"markdownDescription": "When `true`, FIM will scan neighboring documents to provide more context for completions. This is an experimental feature and may impact performance."
},
"fim.completionCacheEnabled": {
"order": 10,
"type": "boolean",
"default": false,
"markdownDescription": "Enables caching of Fill-in-Middle (FIM) completions for identical prompts. This can significantly improve performance but may use more memory."
},
"fim.numPredictFim": {
"order": 12,
"type": "number",
"default": 512,
"markdownDescription": "Defines the maximum number of tokens for Fill-in-Middle (FIM) completions. Use `-1` for no limit. FIM will attempt to stop at logical line breaks regardless of this setting.",
"required": true
},
"fim.enableSubsequentCompletions": {
"order": 13,
"type": "boolean",
"default": true,
"markdownDescription": "When `true`, FIM will continue to make completion requests to the API after the previous completion was accepted. This can provide a more fluid completion experience."
},
"fim.embeddingIgnoredGlobs": {
"order": 14,
"type": "array",
"default": [],
"markdownDescription": "Ignores file paths matching these globs when gathering completion context."
},
"fim.enableLogging": {
"order": 19,
"type": "boolean",
"default": true,
"markdownDescription": "Activates debug logging for FIM. When `true`, FIM will output detailed logs, which can be helpful for troubleshooting."
}
}
}
},
"scripts": {
"build": "node scripts/build.mjs",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"package": "node scripts/build.mjs",
"vscode:package": "npm exec vsce package",
"vscode:prepublish": "npm run package",
"vscode:publish": "npm exec vsce publish",
"watch": "node scripts/build.mjs --watch"
},
"devDependencies": {
"@types/async-lock": "^1.4.2",
"@types/node": "^16.18.68",
"@types/react-dom": "^18.2.18",
"@types/string_score": "^0.1.31",
"@types/uuid": "^9.0.8",
"@types/vscode": "^1.70.0",
"@typescript-eslint/eslint-plugin": "^8.21.0",
"@typescript-eslint/parser": "^8.21.0",
"@vscode/vsce": "^3.1.1",
"esbuild": "^0.21.5",
"esbuild-plugin-copy": "^2.1.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"tree-sitter-wasms": "^0.1.7",
"typescript": "^4.7.4",
"web-tree-sitter": "^0.22.1"
},
"dependencies": {
"@types/react": "^18.2.46",
"@vscode/codicons": "^0.0.35",
"@vscode/webview-ui-toolkit": "^1.4.0",
"async-lock": "^1.4.1",
"fastest-levenshtein": "^1.0.16",
"fluency.js": "^1.0.23",
"i18next": "^23.16.5",
"i18next-http-backend": "^2.6.2",
"ignore": "^6.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^15.1.1",
"string_score": "^0.1.22",
"uuid": "^9.0.1"
},
"os": [
"darwin",
"linux",
"win32"
],
"cpu": [
"x64",
"arm64"
]
}