-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
615 lines (615 loc) · 19.6 KB
/
package.json
File metadata and controls
615 lines (615 loc) · 19.6 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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
{
"name": "snkmaker",
"displayName": "Snakemaker",
"description": "",
"version": "0.2.7",
"repository": "https://github.com/molinerisLab/snkmaker",
"engines": {
"vscode": "^1.95.0"
},
"categories": [
"Other"
],
"publisher": "SnakemakerUnito",
"icon": "resources/icon.png",
"activationEvents": [],
"main": "./out/extension.js",
"main_prod": "./dist/extension.js",
"contributes": {
"customEditors": [
{
"viewType": "NotebookView",
"displayName": "Export Notebook",
"selector": [
{
"filenamePattern": "*.snkmk"
}
],
"priority": "default"
}
],
"menus": {
"commandPalette": [
{
"command": "chat-set-notebook-mode",
"when": "false"
},
{
"command": "process-notebook",
"when": "false"
},
{
"command": "delete-model",
"when": "false"
},
{
"command": "add-model",
"when": "false"
},
{
"command": "print-rule",
"when": "false"
},
{
"command": "open-loging-details",
"when": "false"
},
{
"command": "archive-command",
"when": "false"
},
{
"command": "restore-command",
"when": "false"
},
{
"command": "delete-command",
"when": "false"
},
{
"command": "set-command-important",
"when": "false"
},
{
"command": "set-command-unimportant",
"when": "false"
},
{
"command": "modify-command-detail",
"when": "false"
},
{
"command": "use-model",
"when": "false"
},
{
"command": "history-undo",
"when": "false"
},
{
"command": "history-redo",
"when": "false"
},
{
"command": "history-set",
"when": "false"
},
{
"command": "history-redo-fake",
"when": "false"
},
{
"command": "history-undo-fake",
"when": "false"
},
{
"command": "history-redo",
"when": "false"
},
{
"command": "history-undo",
"when": "false"
}
],
"notebook/toolbar": [
{
"command": "process-notebook"
}
],
"view/title": [
{
"command": "chat-new-chat",
"when": "view == snakemaker-chat",
"group": "navigation@1"
},
{
"command": "open-snakemaker-settings",
"when": "view == bash-commands"
},
{
"command": "print-all-rules",
"when": "view == bash-commands",
"group": "navigation@7"
},
{
"command": "delete-all-commands",
"when": "view == bash-commands",
"group": "navigation@6"
},
{
"command": "delete-all-archived-commands",
"when": "view == bash-commands-archive",
"group": "navigation"
},
{
"command": "archive-all-commands",
"when": "view == bash-commands",
"group": "navigation@5"
},
{
"command": "stop-listening",
"when": "view == bash-commands && myExtension.isListening==true",
"group": "navigation@2"
},
{
"command": "start-listening",
"when": "view == bash-commands && myExtension.isListening==false",
"group": "navigation@2"
},
{
"command": "history-undo",
"when": "view == bash-commands && myExtension.canUndo",
"group": "navigation@3"
},
{
"command": "history-undo-fake",
"when": "view == bash-commands && !myExtension.canUndo",
"group": "navigation@2"
},
{
"command": "history-redo",
"when": "view == bash-commands && myExtension.canRedo",
"group": "navigation@3"
},
{
"command": "history-redo-fake",
"when": "view == bash-commands && !myExtension.canRedo",
"group": "navigation@3"
},
{
"command": "add-model",
"when": "view == llm-models",
"group": "navigation@1"
}
],
"view/item/context": [
{
"command": "print-rule",
"when": "view == bash-commands && (viewItem == ROOT_OBJ_I || viewItem == ROOT_OBJ_NI)",
"group": "inline@4"
},
{
"command": "archive-command",
"when": "view == bash-commands && (viewItem == ROOT_OBJ_I || viewItem == ROOT_OBJ_NI)",
"group": "inline@2"
},
{
"command": "restore-command",
"when": "view == bash-commands-archive && (viewItem == ROOT_OBJ_I || viewItem == ROOT_OBJ_NI)",
"group": "inline"
},
{
"command": "delete-command",
"when": "(view == bash-commands || view == bash-commands-archive) && (viewItem == ROOT_OBJ_I || viewItem == ROOT_OBJ_NI)",
"group": "inline@3"
},
{
"command": "set-command-important",
"when": "view == bash-commands && viewItem == ROOT_OBJ_NI",
"group": "inline@1"
},
{
"command": "set-command-unimportant",
"when": "view == bash-commands && viewItem == ROOT_OBJ_I",
"group": "inline@1"
},
{
"command": "modify-command-detail",
"when": "view == bash-commands && viewItem == CHILD_OBJ_MOD",
"group": "inline@1"
},
{
"command": "delete-model",
"when": "view == llm-models && viewItem == USER_MODEL",
"group": "inline@1"
}
]
},
"viewsContainers": {
"activitybar": [
{
"id": "snakemake-ai",
"title": "Snakemaker",
"icon": "resources/icon.svg"
}
]
},
"views": {
"snakemake-ai": [
{
"id": "bash-commands",
"name": "Bash commands"
},
{
"id": "bash-commands-archive",
"name": "Archived bash commands"
},
{
"type": "webview",
"id": "snakemaker-chat",
"name": "Snakemaker Chat - Bash mode"
},
{
"id": "llm-models",
"name": "Models",
"visibility": "collapsed"
}
]
},
"viewsWelcome": [
{
"view": "bash-commands",
"contents": "Listening to command - Your commands will dispay here",
"when": "myExtension.isListening==true"
},
{
"view": "bash-commands",
"contents": "Start listening to commands to populate the history",
"when": "myExtension.isListening==false"
},
{
"view": "bash-commands-archive",
"contents": "Your archived commands will dispay here"
}
],
"commands": [
{
"command": "chat-set-notebook-mode",
"title": "Set chat to Notebook mode"
},
{
"command": "chat-new-chat",
"title": "New chat",
"icon": "$(terminal-new)"
},
{
"command": "open-loging-details",
"title": "Snakemaker: Open Logging Feature Details"
},
{
"command": "snkmaker-open-readme",
"title": "Help: Snakemaker"
},
{
"command": "disable-logs-session",
"title": "Snakemaker: disable current session logs",
"enablement": "config.snakemaker.allowLogging"
},
{
"command": "print-rule",
"title": "Print rule",
"icon": "$(testing-run-icon)"
},
{
"command": "open-snakemaker-settings",
"title": "Open settings",
"icon": "$(settings-view-bar-icon)"
},
{
"command": "print-all-rules",
"title": "Snakemaker: Print all important rules",
"icon": "$(testing-run-all-icon)"
},
{
"command": "archive-command",
"title": "Archive",
"icon": "$(notebook-move-down)"
},
{
"command": "archive-all-commands",
"title": "Snakemaker: Archive all commands",
"icon": "$(notebook-move-down)"
},
{
"command": "restore-command",
"title": "Restore",
"icon": "$(notebook-move-up)"
},
{
"command": "delete-command",
"title": "Delete command",
"icon": "$(notifications-clear)"
},
{
"command": "delete-all-commands",
"title": "Snakemaker: Delete all",
"icon": "$(notifications-clear)"
},
{
"command": "delete-all-archived-commands",
"title": "Snakemaker: Delete all archived",
"icon": "$(notifications-clear)"
},
{
"command": "set-command-important",
"title": "Set important",
"icon": "$(debug-breakpoint-log-unverified)"
},
{
"command": "set-command-unimportant",
"title": "Set unimportant",
"icon": "$(debug-breakpoint-log-disabled)"
},
{
"command": "modify-command-detail",
"title": "Change",
"icon": "$(keybindings-edit)"
},
{
"command": "start-listening",
"title": "Snakemaker: Start listening",
"icon": "resources/play.svg"
},
{
"command": "stop-listening",
"title": "Snakemaker: Pause listening",
"icon": "resources/pause.svg"
},
{
"command": "use-model",
"title": "Use this model"
},
{
"command": "save-workspace",
"title": "Snakemaker: Save workspace"
},
{
"command": "load-workspace",
"title": "Snakemaker: Load workspace"
},
{
"command": "history-undo",
"title": "Undo",
"icon": {
"light": "resources/undo_light_theme.svg",
"dark": "resources/undo.svg"
},
"enablement": "myExtension.canUndo"
},
{
"command": "history-undo-fake",
"title": "Undo",
"icon": {
"light": "resources/undo_disabled_light_theme.svg",
"dark": "resources/undo_disabled.svg"
},
"enablement": "false"
},
{
"command": "history-redo",
"title": "Redo",
"icon": {
"light": "resources/redo_light_theme.svg",
"dark": "resources/redo.svg"
},
"enablement": "myExtension.canRedo"
},
{
"command": "history-redo-fake",
"title": "Redo",
"icon": {
"light": "resources/redo_disabled_light_theme.svg",
"dark": "resources/redo_disabled.svg"
},
"enablement": "false"
},
{
"command": "history-set",
"title": "Set"
},
{
"command": "delete-model",
"title": "Delete model",
"icon": "$(notifications-clear)"
},
{
"command": "add-model",
"title": "Add model"
},
{
"command": "add-history-manually",
"title": "Manually add commands to Snakemaker history"
},
{
"command": "process-notebook",
"title": "Process with Snakemaker"
},
{
"command": "generate-documentation",
"title": "Auto-generate documentation for current work."
}
],
"configuration": {
"title": "Snakemaker",
"properties": {
"snakemaker.allowLogging": {
"type": "boolean",
"default": false,
"markdownDescription": "Send anonymous logs to our server to improve the extension. [See details on what is logged](command:open-loging-details)."
},
"snakemaker.keepHistoryBetweenSessions": {
"type": "boolean",
"default": true,
"markdownDescription": "Maintain the command history between VSCode sessions"
},
"snakemaker.snakemakeBestPractices.SetLogFieldInSnakemakeRules": {
"type": "boolean",
"default": true,
"markdownDescription": "Each rule has a Log field, as recommended by [Snakemake best practices](https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files)."
},
"snakemaker.snakemakeBestPractices.PreferGenericFilenames": {
"type": "boolean",
"default": true,
"markdownDescription": "Snakemake rules are generated, when possible, with generic filenames, using wildcards, as recommended by [Snakemake best practices](https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#wildcards)."
},
"snakemaker.snakemakeBestPractices.CommentEveryRule": {
"type": "boolean",
"default": true,
"markdownDescription": "Every rule is generated with a short description."
},
"snakemaker.snakemakeBestPractices.AddCondaDirective": {
"type": "boolean",
"default": true,
"markdownDescription": "Track conda environments in the terminal, add a 'conda' directive to rules."
},
"snakemaker.snakemakeBestPractices.GenerateConfig": {
"type": "boolean",
"default": true,
"markdownDescription": "Move hardcoded values into a configuration. Generate a config.yaml file, or update existing ones. Can slow down rule generation."
},
"snakemaker.rulesOutputFormat": {
"type": "string",
"enum": [
"Snakemake",
"Make"
],
"default": "Snakemake",
"markdownDescription": "Produce rules in Snakemake or in Make format"
},
"snakemaker.snakemakeAbsolutePath": {
"type": "string",
"default": "",
"markdownDescription": "Absolute path to the Snakemake executable. Used to test the generated rules' correctness. If empty, the extension will try to find it in the PATH."
},
"snakemaker.ruleGeneration.validateSnakemakeRules": {
"type": "boolean",
"default": true,
"markdownDescription": "When generating Snakemake rules, validate them with the Snakemake executable and try to automatically correct errors."
},
"snakemaker.includeCurrentFileIntoPrompt": {
"type": "boolean",
"default": true,
"markdownDescription": "If turned on, the LLM generating the rules has the current Snakefile/Makefile included into its context. This causes the LLM to generate rules that are more context-aware."
},
"snakemaker.llm.numberParsingErrorTries": {
"type": "number",
"default": 3,
"markdownDescription": "When an error parsing the LLM's response occurs, the extension will feed the error back to the model and ask for a fix. This value set a limit to the number of tries."
},
"snakemaker.llm.parsingErrorActivateStepBackAt": {
"type": "number",
"default": 2,
"markdownDescription": "After a number of failures parsing the LLM's response, the step back strategy asks the LLM itself for a plan to fix the errors, and then fed the plan back to the LLM. This strategy is powerful but more expensive. A value >= numberParsingErrorTries will disable it."
},
"snakemaker.ruleGeneration.iterativeValidateAndFix.maxIterations": {
"type": "number",
"default": 8,
"markdownDescription": "When generating Snakemake rules or code, the extension will try to validate the generated code and fix it if needed. This value set a limit to the number of tries."
},
"snakemaker.ruleGeneration.iterativeValidateAndFix.activateStepBackAt": {
"type": "number",
"default": 6,
"markdownDescription": "When generating Snakemake rules or code, the extension will try to validate the generated code and fix it if needed; after a certain number of failures, the step back strategy asks the LLM itself for a plan to fix the errors, and then fed the plan back to the LLM. This strategy is powerful but more expensive. A value >= maxIterations will disable it."
}
}
},
"chatParticipants": [
{
"id": "chat-snakemaker-notebook",
"name": "snakemaker-notebook",
"fullName": "Snakemaker",
"description": "Hello I'm Snakemaker and I can assist you converting notebooks into Snakemake pipelines :)",
"isSticky": true
},
{
"id": "chat-snakemaker",
"name": "snakemaker",
"fullName": "Snakemaker",
"description": "Hello I'm Snakemaker and I can assist you building great pipelines :)",
"isSticky": true,
"disambiguation": [
{
"category": "Bash command history and Snakemake pipeline building support",
"description": "The user run bash commands on its terminal for its data analysis purposes and needs help tracking them and automatically turning them into Snakemake rules",
"examples": [
"How many commands to I have in history?",
"Can you write one single snakemake rule with all the commands currently in history?",
"Can you show me the most important commands in my history?",
"Can you convert this command into a snakemake rule?",
"Can you show me the commands that are not important?",
"Can you convert for me this command in a generic snakemake rule that uses wildcards?"
]
},
{
"category": "Support for the usage of the Snakemaker extension",
"description": "The user installed the Snakemaker extension but don't know how to use it, needs help with the commands and the views",
"examples": [
"How does Snakemaker work?",
"What does Snakemaker do?",
"How can I archive a command?",
"How can I restore a command?",
"Where is my command history?",
"How can I delete a command?",
"How can I set a command as important?",
"How can I set a command as unimportant?",
"What is an important command?",
"Why my commands aren't being recorded?",
"How can I change the details of a command?",
"How can I use a model?",
"How can I save my workspace?",
"How can I load my workspace?",
"How can I start listening to commands?",
"How can I stop listening to commands?"
]
}
]
}
]
},
"scripts_prod": {
"pretest": "npm run compile && npm run lint",
"lint": "eslint src",
"test": "vscode-test",
"compile": "npm run check-types && node esbuild.js",
"check-types": "tsc --noEmit",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"vscode:prepublish": "npm run package",
"package": "npm run check-types && node esbuild.js --production"
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./"
},
"devDependencies": {
"@types/mocha": "^10.0.9",
"@types/node": "20.x",
"@types/vscode": "^1.95.0",
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.7.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"esbuild": ">=0.25.0",
"eslint": "^9.13.0",
"typescript": "^5.6.3"
},
"dependencies": {
"diff": "^7.0.0",
"jsonrepair": "^3.12.0",
"markdown-it": "^14.1.0",
"openai": "^4.73.1",
"tmp": "^0.2.3"
}
}