|
333 | 333 | "command": "kdb.datasource.import.ds",
|
334 | 334 | "title": "Import Datasource from old format"
|
335 | 335 | },
|
| 336 | + { |
| 337 | + "category": "KX", |
| 338 | + "command": "kdb.terminal.run", |
| 339 | + "title": "Run q file in a new q instance", |
| 340 | + "icon": "$(debug-alt)" |
| 341 | + }, |
336 | 342 | {
|
337 | 343 | "category": "KX",
|
338 | 344 | "command": "kdb.terminal.start",
|
|
341 | 347 | {
|
342 | 348 | "category": "KX",
|
343 | 349 | "command": "kdb.execute.selectedQuery",
|
344 |
| - "title": "Execute Current Selection", |
| 350 | + "title": "KX: Execute Current Selection", |
345 | 351 | "icon": "$(run-below)"
|
346 | 352 | },
|
347 | 353 | {
|
348 | 354 | "category": "KX",
|
349 | 355 | "command": "kdb.execute.fileQuery",
|
350 |
| - "title": "Execute Entire File", |
| 356 | + "title": "KX: Execute Entire File", |
351 | 357 | "icon": "$(run)"
|
352 | 358 | },
|
353 | 359 | {
|
354 | 360 | "category": "KX",
|
355 | 361 | "command": "kdb.execute.pythonScratchpadQuery",
|
356 |
| - "title": "Execute Current Selection in Insights Scratchpad", |
| 362 | + "title": "KX: Execute Current Python Selection", |
357 | 363 | "icon": "$(run-below)"
|
358 | 364 | },
|
359 | 365 | {
|
360 | 366 | "category": "KX",
|
361 | 367 | "command": "kdb.execute.pythonFileScratchpadQuery",
|
362 |
| - "title": "Execute Entire File in Insights Scratchpad", |
| 368 | + "title": "KX: Execute Entire Python File", |
363 | 369 | "icon": "$(run)"
|
364 | 370 | },
|
365 | 371 | {
|
|
394 | 400 | "command": "kdb.execute.pythonScratchpadQuery",
|
395 | 401 | "key": "ctrl+d",
|
396 | 402 | "mac": "cmd+d",
|
397 |
| - "when": "editorLangId == python" |
| 403 | + "when": "editorLangId == python && (resourceFilename =~ /.kdb.py/ || kdb.insightsConnected)" |
398 | 404 | },
|
399 | 405 | {
|
400 | 406 | "command": "kdb.execute.pythonFileScratchpadQuery",
|
401 | 407 | "key": "ctrl+shift+d",
|
402 | 408 | "mac": "cmd+shift+d",
|
403 |
| - "when": "editorLangId == python" |
| 409 | + "when": "editorLangId == python && (resourceFilename =~ /.kdb.py/ || kdb.insightsConnected)" |
404 | 410 | },
|
405 | 411 | {
|
406 | 412 | "command": "kdb.terminal.run",
|
407 | 413 | "key": "ctrl+shift+r",
|
408 | 414 | "mac": "cmd+shift+r",
|
409 |
| - "when": "editorLangId == q" |
| 415 | + "when": "editorLangId == q && !(resourceFilename =~ /.kdb.q/)" |
410 | 416 | }
|
411 | 417 | ],
|
412 | 418 | "snippets": [
|
|
701 | 707 | {
|
702 | 708 | "command": "kdb.terminal.run",
|
703 | 709 | "group": "q@2",
|
704 |
| - "when": "editorLangId == q" |
| 710 | + "when": "editorLangId == q && !(resourceFilename =~ /.kdb.q/)" |
705 | 711 | },
|
706 | 712 | {
|
707 | 713 | "command": "kdb.execute.pythonFileScratchpadQuery",
|
708 | 714 | "group": "q@0",
|
709 |
| - "when": "editorLangId == python" |
| 715 | + "when": "editorLangId == python && (resourceFilename =~ /.kdb.py/ || kdb.insightsConnected)" |
710 | 716 | },
|
711 | 717 | {
|
712 | 718 | "command": "kdb.execute.pythonScratchpadQuery",
|
713 | 719 | "group": "q@1",
|
714 |
| - "when": "editorLangId == python" |
| 720 | + "when": "editorLangId == python && (resourceFilename =~ /.kdb.py/ || kdb.insightsConnected)" |
715 | 721 | }
|
716 | 722 | ],
|
717 | 723 | "editor/context": [
|
|
728 | 734 | {
|
729 | 735 | "command": "kdb.terminal.run",
|
730 | 736 | "group": "q@2",
|
731 |
| - "when": "editorLangId == q" |
| 737 | + "when": "editorLangId == q && !(resourceFilename =~ /.kdb.q/)" |
732 | 738 | },
|
733 | 739 | {
|
734 | 740 | "command": "kdb.execute.pythonFileScratchpadQuery",
|
735 | 741 | "group": "q@0",
|
736 |
| - "when": "editorLangId == python" |
| 742 | + "when": "editorLangId == python && (resourceFilename =~ /.kdb.py/ || kdb.insightsConnected)" |
737 | 743 | },
|
738 | 744 | {
|
739 | 745 | "command": "kdb.execute.pythonScratchpadQuery",
|
740 | 746 | "group": "q@1",
|
741 |
| - "when": "editorLangId == python" |
| 747 | + "when": "editorLangId == python && (resourceFilename =~ /.kdb.py/ || kdb.insightsConnected)" |
742 | 748 | }
|
743 | 749 | ]
|
744 | 750 | },
|
|
829 | 835 | "axios": "^1.6.8",
|
830 | 836 | "chevrotain": "^10.5.0",
|
831 | 837 | "csv-parser": "^3.0.0",
|
832 |
| - "esbuild-plugin-copy": "^2.1.1", |
833 | 838 | "extract-zip": "^2.0.1",
|
834 | 839 | "fs-extra": "^11.2.0",
|
835 | 840 | "fuse.js": "^7.0.0",
|
|
0 commit comments