@codingame/monaco-vscode-notebook-service-override 11.1.2 → 12.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +64 -1
  3. package/package.json +47 -15
  4. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +38 -0
  6. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +43 -41
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.d.ts +1 -0
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +109 -130
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +25 -0
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +13 -11
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.d.ts +3 -0
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +72 -19
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +7 -0
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +23 -17
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +14 -0
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +4 -3
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.d.ts +1 -0
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +30 -28
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +18 -0
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +76 -0
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +21 -0
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -58
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.d.ts +1 -0
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +5 -3
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.d.ts +1 -0
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +4 -2
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +28 -0
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +8 -7
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +20 -0
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +10 -9
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.d.ts +1 -0
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +52 -50
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +13 -0
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +3 -2
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.d.ts +1 -0
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +28 -28
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.d.ts +10 -0
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +51 -50
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.d.ts +10 -0
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +21 -18
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.d.ts +1 -0
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +4 -2
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.d.ts +11 -0
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +3 -2
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.d.ts +1 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +6 -5
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +69 -0
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +460 -382
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.d.ts +1 -0
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +124 -0
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.d.ts +1 -0
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +87 -145
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.d.ts +2 -0
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -0
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.d.ts +27 -0
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +16 -15
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.d.ts +38 -0
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -7
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.d.ts +34 -0
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +9 -8
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +53 -0
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +40 -36
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +112 -0
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +115 -116
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.d.ts +8 -0
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -3
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +32 -0
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +111 -117
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +17 -0
  71. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +11 -9
  72. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.d.ts +1 -0
  73. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +5 -4
  74. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.d.ts +1 -0
  75. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +7 -6
  76. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.d.ts +1 -0
  77. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -0
  78. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +9 -0
  79. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +113 -198
  80. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
  81. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +25 -23
  82. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.d.ts +3 -0
  83. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +115 -145
  84. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.d.ts +3 -0
  85. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +76 -147
  86. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
  87. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +45 -77
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.d.ts +1 -0
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +30 -35
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +27 -0
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +19 -18
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +30 -0
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +59 -52
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.d.ts +1 -0
  95. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +11 -21
  96. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.d.ts +1 -0
  97. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +69 -113
  98. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +14 -0
  99. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +194 -184
  100. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.d.ts +10 -0
  101. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +51 -51
  102. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.d.ts +12 -0
  103. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +14 -36
  104. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.d.ts +48 -0
  105. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +57 -56
  106. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.d.ts +16 -0
  107. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +1 -0
  108. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +43 -0
  109. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +29 -11
  110. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +30 -0
  111. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +17 -16
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +46 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +14 -8
  114. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.d.ts +25 -0
  115. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +21 -19
  116. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +57 -0
  117. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -4
  118. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.d.ts +20 -0
  119. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +30 -26
  120. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +13 -0
  121. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +6 -5
  122. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.d.ts +23 -0
  123. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +2 -1
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +134 -0
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +164 -121
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +14 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -1
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +21 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +37 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +56 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +6 -3
  132. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +101 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +131 -55
  134. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.d.ts +29 -0
  135. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +4 -3
  136. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +48 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +12 -10
  138. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +38 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +1 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.d.ts +50 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +75 -1
  142. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +1 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +2 -1
  144. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +31 -0
  145. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -1
  146. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +78 -0
  147. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +45 -42
  148. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +96 -0
  149. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +57 -54
  150. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +74 -0
  151. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +6 -3
  152. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.d.ts +53 -0
  153. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +2 -1
  154. package/worker.js +2 -1
  155. package/workers/notebook.worker.d.ts +1 -0
  156. package/notebook.js +0 -50
  157. package/workers/notebook.worker.js +0 -1
@@ -1,3 +1,5 @@
1
+
2
+ import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
1
3
  import { Mimes } from 'vscode/vscode/vs/base/common/mime';
2
4
  import { URI } from 'vscode/vscode/vs/base/common/uri';
3
5
  import { Selection } from 'vscode/vscode/vs/editor/common/core/selection';
@@ -5,9 +7,10 @@ import { CommandExecutor } from 'vscode/vscode/vs/editor/common/cursor/cursor';
5
7
  import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
6
8
  import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
7
9
  import { ILanguageConfigurationService } from 'vscode/vscode/vs/editor/common/languages/languageConfigurationRegistry';
10
+ import { TrackedRangeStickiness } from 'vscode/vscode/vs/editor/common/model';
8
11
  import { getIconClasses } from 'vscode/vscode/vs/editor/common/services/getIconClasses';
9
12
  import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
10
- import { LineCommentCommand } from 'vscode/vscode/vs/editor/contrib/comment/browser/lineCommentCommand';
13
+ import { LineCommentCommand, Type } from 'vscode/vscode/vs/editor/contrib/comment/browser/lineCommentCommand';
11
14
  import { localize, localize2 } from 'vscode/vscode/vs/nls';
12
15
  import { registerAction2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
13
16
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -15,17 +18,18 @@ import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/cont
15
18
  import { InputFocusedContextKey, InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
16
19
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
17
20
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
21
+ import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
18
22
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
19
23
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
20
- import { InlineChatController } from '@codingame/monaco-vscode-chat-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
21
- import { CTX_INLINE_CHAT_FOCUSED } from '@codingame/monaco-vscode-chat-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
22
- import { runDeleteAction, changeCellToKind } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
23
- import { NotebookCellAction, CELL_TITLE_CELL_GROUP_ID, findTargetCellEditor, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, executeNotebookCondition, CELL_TITLE_OUTPUT_GROUP_ID, NotebookAction, NotebookMultiCellAction } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
24
+ import { InlineChatController } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
25
+ import { CTX_INLINE_CHAT_FOCUSED } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
26
+ import { runDeleteAction, changeCellToKind } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
27
+ import { NotebookCellAction, CellToolbarOrder, CELL_TITLE_CELL_GROUP_ID, findTargetCellEditor, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, executeNotebookCondition, CELL_TITLE_OUTPUT_GROUP_ID, NotebookAction, NotebookMultiCellAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
24
28
  import { NotebookIndentUsingTabs, NotebookIndentUsingSpaces, NotebookChangeTabDisplaySize, NotebookIndentationToTabsAction, NotebookIndentationToSpacesAction } from './notebookIndentationActions.js';
25
- import { QUIT_EDIT_CELL_COMMAND_ID, CellEditState, CHANGE_CELL_LANGUAGE, DETECT_CELL_LANGUAGE, getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
26
- import { editIcon, stopEditIcon, deleteCellIcon, clearIcon } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
27
- import { CellKind, NotebookCellExecutionState, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
28
- import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS, NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON, NOTEBOOK_CELL_IS_FIRST_OUTPUT, NOTEBOOK_HAS_OUTPUTS, NOTEBOOK_IS_ACTIVE_EDITOR } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
29
+ import { QUIT_EDIT_CELL_COMMAND_ID, CellEditState, CHANGE_CELL_LANGUAGE, DETECT_CELL_LANGUAGE, getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
30
+ import { editIcon, stopEditIcon, deleteCellIcon, clearIcon } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
31
+ import { CellKind, NotebookCellExecutionState, NotebookSetting, CellEditType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
32
+ import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS, NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON, NOTEBOOK_CELL_IS_FIRST_OUTPUT, NOTEBOOK_HAS_OUTPUTS, NOTEBOOK_IS_ACTIVE_EDITOR } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
29
33
  import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
30
34
  import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
31
35
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
@@ -41,34 +45,28 @@ registerAction2(class EditCellAction extends NotebookCellAction {
41
45
  constructor() {
42
46
  super({
43
47
  id: EDIT_CELL_COMMAND_ID,
44
- title: ( localize(8084, "Edit Cell")),
48
+ title: ( localize(7448, "Edit Cell")),
45
49
  keybinding: {
46
- when: ( (ContextKeyExpr.and(
50
+ when: ( ContextKeyExpr.and(
47
51
  NOTEBOOK_CELL_LIST_FOCUSED,
48
52
  ContextKeyExpr.not(InputFocusedContextKey),
49
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
50
- (EditorContextKeys.hoverFocused.toNegated()),
51
- (NOTEBOOK_OUTPUT_INPUT_FOCUSED.toNegated())
52
- ))),
53
- primary: 3 ,
54
- weight: 200
53
+ ( EditorContextKeys.hoverFocused.toNegated()),
54
+ ( NOTEBOOK_OUTPUT_INPUT_FOCUSED.toNegated())
55
+ )),
56
+ primary: KeyCode.Enter,
57
+ weight: KeybindingWeight.WorkbenchContrib
55
58
  },
56
59
  menu: {
57
60
  id: MenuId.NotebookCellTitle,
58
- when: ( (ContextKeyExpr.and(
59
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
60
- (NOTEBOOK_CELL_TYPE.isEqualTo('markup')),
61
- (NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.toNegated()),
62
- NOTEBOOK_CELL_EDITABLE
63
- ))),
64
- order: 0 ,
61
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( NOTEBOOK_CELL_TYPE.isEqualTo('markup')), ( NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.toNegated()), NOTEBOOK_CELL_EDITABLE)),
62
+ order: CellToolbarOrder.EditCell,
65
63
  group: CELL_TITLE_CELL_GROUP_ID
66
64
  },
67
65
  icon: editIcon,
68
66
  });
69
67
  }
70
68
  async runWithContext(accessor, context) {
71
- if (!context.notebookEditor.hasModel() || context.notebookEditor.isReadOnly) {
69
+ if (!context.notebookEditor.hasModel()) {
72
70
  return;
73
71
  }
74
72
  await context.notebookEditor.focusNotebookCell(context.cell, 'editor');
@@ -78,48 +76,35 @@ registerAction2(class EditCellAction extends NotebookCellAction {
78
76
  }
79
77
  }
80
78
  });
81
- const quitEditCondition = ( (ContextKeyExpr.and(
82
- NOTEBOOK_EDITOR_FOCUSED,
83
- InputFocusedContext,
84
- (CTX_INLINE_CHAT_FOCUSED.toNegated())
85
- )));
79
+ const quitEditCondition = ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, InputFocusedContext, ( CTX_INLINE_CHAT_FOCUSED.toNegated())));
86
80
  registerAction2(class QuitEditCellAction extends NotebookCellAction {
87
81
  constructor() {
88
82
  super({
89
83
  id: QUIT_EDIT_CELL_COMMAND_ID,
90
- title: ( localize(8085, "Stop Editing Cell")),
84
+ title: ( localize(7449, "Stop Editing Cell")),
91
85
  menu: {
92
86
  id: MenuId.NotebookCellTitle,
93
- when: ( (ContextKeyExpr.and(
94
- (NOTEBOOK_CELL_TYPE.isEqualTo('markup')),
95
- NOTEBOOK_CELL_MARKDOWN_EDIT_MODE,
96
- NOTEBOOK_CELL_EDITABLE
97
- ))),
98
- order: 3 ,
87
+ when: ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo('markup')), NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CELL_EDITABLE)),
88
+ order: CellToolbarOrder.SaveCell,
99
89
  group: CELL_TITLE_CELL_GROUP_ID
100
90
  },
101
91
  icon: stopEditIcon,
102
92
  keybinding: [
103
93
  {
104
- when: ( (ContextKeyExpr.and(
105
- quitEditCondition,
106
- (EditorContextKeys.hoverVisible.toNegated()),
107
- (EditorContextKeys.hasNonEmptySelection.toNegated()),
108
- (EditorContextKeys.hasMultipleSelections.toNegated())
109
- ))),
110
- primary: 9 ,
94
+ when: ( ContextKeyExpr.and(quitEditCondition, ( EditorContextKeys.hoverVisible.toNegated()), ( EditorContextKeys.hasNonEmptySelection.toNegated()), ( EditorContextKeys.hasMultipleSelections.toNegated()))),
95
+ primary: KeyCode.Escape,
111
96
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT - 5
112
97
  },
113
98
  {
114
- when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
115
- primary: 9 ,
116
- weight: 200 + 5
99
+ when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
100
+ primary: KeyCode.Escape,
101
+ weight: KeybindingWeight.WorkbenchContrib + 5
117
102
  },
118
103
  {
119
- when: ( (ContextKeyExpr.and(quitEditCondition, (NOTEBOOK_CELL_TYPE.isEqualTo('markup'))))),
120
- primary: 256 | 3 ,
104
+ when: ( ContextKeyExpr.and(quitEditCondition, ( NOTEBOOK_CELL_TYPE.isEqualTo('markup')))),
105
+ primary: KeyMod.WinCtrl | KeyCode.Enter,
121
106
  win: {
122
- primary: 2048 | 512 | 3
107
+ primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Enter
123
108
  },
124
109
  weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT - 5
125
110
  },
@@ -137,18 +122,18 @@ registerAction2(class DeleteCellAction extends NotebookCellAction {
137
122
  constructor() {
138
123
  super({
139
124
  id: DELETE_CELL_COMMAND_ID,
140
- title: ( localize(8086, "Delete Cell")),
125
+ title: ( localize(7450, "Delete Cell")),
141
126
  keybinding: {
142
- primary: 20 ,
127
+ primary: KeyCode.Delete,
143
128
  mac: {
144
- primary: 2048 | 1
129
+ primary: KeyMod.CtrlCmd | KeyCode.Backspace
145
130
  },
146
- when: ( (ContextKeyExpr.and(
131
+ when: ( ContextKeyExpr.and(
147
132
  NOTEBOOK_EDITOR_FOCUSED,
148
133
  ContextKeyExpr.not(InputFocusedContextKey),
149
- (NOTEBOOK_OUTPUT_INPUT_FOCUSED.toNegated())
150
- ))),
151
- weight: 200
134
+ ( NOTEBOOK_OUTPUT_INPUT_FOCUSED.toNegated())
135
+ )),
136
+ weight: KeybindingWeight.WorkbenchContrib
152
137
  },
153
138
  menu: [
154
139
  {
@@ -174,13 +159,13 @@ registerAction2(class DeleteCellAction extends NotebookCellAction {
174
159
  const configService = accessor.get(IConfigurationService);
175
160
  if (runState === NotebookCellExecutionState.Executing && configService.getValue(NotebookSetting.confirmDeleteRunningCell)) {
176
161
  const dialogService = accessor.get(IDialogService);
177
- const primaryButton = ( localize(8087, "Delete"));
162
+ const primaryButton = ( localize(7451, "Delete"));
178
163
  confirmation = await dialogService.confirm({
179
164
  type: 'question',
180
- message: ( localize(8088, "This cell is running, are you sure you want to delete it?")),
165
+ message: ( localize(7452, "This cell is running, are you sure you want to delete it?")),
181
166
  primaryButton: primaryButton,
182
167
  checkbox: {
183
- label: ( localize(8089, "Do not ask me again"))
168
+ label: ( localize(7453, "Do not ask me again"))
184
169
  }
185
170
  });
186
171
  }
@@ -200,42 +185,35 @@ registerAction2(class ClearCellOutputsAction extends NotebookCellAction {
200
185
  constructor() {
201
186
  super({
202
187
  id: CLEAR_CELL_OUTPUTS_COMMAND_ID,
203
- title: ( localize(8090, 'Clear Cell Outputs')),
188
+ title: ( localize(7454, 'Clear Cell Outputs')),
204
189
  menu: [
205
190
  {
206
191
  id: MenuId.NotebookCellTitle,
207
- when: ( (ContextKeyExpr.and(
208
- (NOTEBOOK_CELL_TYPE.isEqualTo('code')),
209
- executeNotebookCondition,
210
- NOTEBOOK_CELL_HAS_OUTPUTS,
211
- NOTEBOOK_EDITOR_EDITABLE,
212
- NOTEBOOK_CELL_EDITABLE,
213
- (NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.toNegated())
214
- ))),
215
- order: 5 ,
192
+ when: ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo('code')), executeNotebookCondition, NOTEBOOK_CELL_HAS_OUTPUTS, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, ( NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.toNegated()))),
193
+ order: CellToolbarOrder.ClearCellOutput,
216
194
  group: CELL_TITLE_OUTPUT_GROUP_ID
217
195
  },
218
196
  {
219
197
  id: MenuId.NotebookOutputToolbar,
220
- when: ( (ContextKeyExpr.and(
198
+ when: ( ContextKeyExpr.and(
221
199
  NOTEBOOK_CELL_HAS_OUTPUTS,
222
200
  NOTEBOOK_EDITOR_EDITABLE,
223
201
  NOTEBOOK_CELL_EDITABLE,
224
202
  NOTEBOOK_CELL_IS_FIRST_OUTPUT,
225
203
  NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON
226
- )))
204
+ ))
227
205
  },
228
206
  ],
229
207
  keybinding: {
230
- when: ( (ContextKeyExpr.and(
208
+ when: ( ContextKeyExpr.and(
231
209
  NOTEBOOK_EDITOR_FOCUSED,
232
210
  ContextKeyExpr.not(InputFocusedContextKey),
233
211
  NOTEBOOK_CELL_HAS_OUTPUTS,
234
212
  NOTEBOOK_EDITOR_EDITABLE,
235
213
  NOTEBOOK_CELL_EDITABLE
236
- ))),
237
- primary: 512 | 20 ,
238
- weight: 200
214
+ )),
215
+ primary: KeyMod.Alt | KeyCode.Delete,
216
+ weight: KeybindingWeight.WorkbenchContrib
239
217
  },
240
218
  icon: clearIcon
241
219
  });
@@ -252,11 +230,11 @@ registerAction2(class ClearCellOutputsAction extends NotebookCellAction {
252
230
  return;
253
231
  }
254
232
  const computeUndoRedo = !editor.isReadOnly;
255
- editor.textModel.applyEdits([{ editType: 2 , index, outputs: [] }], true, undefined, () => undefined, undefined, computeUndoRedo);
233
+ editor.textModel.applyEdits([{ editType: CellEditType.Output, index, outputs: [] }], true, undefined, () => undefined, undefined, computeUndoRedo);
256
234
  const runState = notebookExecutionStateService.getCellExecution(context.cell.uri)?.state;
257
235
  if (runState !== NotebookCellExecutionState.Executing) {
258
236
  context.notebookEditor.textModel.applyEdits([{
259
- editType: 9 , index, internalMetadata: {
237
+ editType: CellEditType.PartialInternalMetadata, index, internalMetadata: {
260
238
  runStartTime: null,
261
239
  runStartTimeAdjustment: null,
262
240
  runEndTime: null,
@@ -271,24 +249,18 @@ registerAction2(class ClearAllCellOutputsAction extends NotebookAction {
271
249
  constructor() {
272
250
  super({
273
251
  id: CLEAR_ALL_CELLS_OUTPUTS_COMMAND_ID,
274
- title: ( localize(8091, 'Clear All Outputs')),
252
+ title: ( localize(7455, 'Clear All Outputs')),
275
253
  precondition: NOTEBOOK_HAS_OUTPUTS,
276
254
  menu: [
277
255
  {
278
256
  id: MenuId.EditorTitle,
279
- when: ( (ContextKeyExpr.and(
280
- NOTEBOOK_IS_ACTIVE_EDITOR,
281
- (ContextKeyExpr.notEquals('config.notebook.globalToolbar', true))
282
- ))),
257
+ when: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( ContextKeyExpr.notEquals('config.notebook.globalToolbar', true)))),
283
258
  group: 'navigation',
284
259
  order: 0
285
260
  },
286
261
  {
287
262
  id: MenuId.NotebookToolbar,
288
- when: ( (ContextKeyExpr.and(
289
- executeNotebookCondition,
290
- (ContextKeyExpr.equals('config.notebook.globalToolbar', true))
291
- ))),
263
+ when: ( ContextKeyExpr.and(executeNotebookCondition, ( ContextKeyExpr.equals('config.notebook.globalToolbar', true)))),
292
264
  group: 'navigation/execute',
293
265
  order: 10
294
266
  }
@@ -303,14 +275,14 @@ registerAction2(class ClearAllCellOutputsAction extends NotebookAction {
303
275
  return;
304
276
  }
305
277
  const computeUndoRedo = !editor.isReadOnly;
306
- editor.textModel.applyEdits(( (editor.textModel.cells.map((cell, index) => ({
307
- editType: 2 , index, outputs: []
308
- })))), true, undefined, () => undefined, undefined, computeUndoRedo);
309
- const clearExecutionMetadataEdits = ( (editor.textModel.cells.map((cell, index) => {
278
+ editor.textModel.applyEdits(( editor.textModel.cells.map((cell, index) => ({
279
+ editType: CellEditType.Output, index, outputs: []
280
+ }))), true, undefined, () => undefined, undefined, computeUndoRedo);
281
+ const clearExecutionMetadataEdits = ( editor.textModel.cells.map((cell, index) => {
310
282
  const runState = notebookExecutionStateService.getCellExecution(cell.uri)?.state;
311
283
  if (runState !== NotebookCellExecutionState.Executing) {
312
284
  return {
313
- editType: 9 , index, internalMetadata: {
285
+ editType: CellEditType.PartialInternalMetadata, index, internalMetadata: {
314
286
  runStartTime: null,
315
287
  runStartTimeAdjustment: null,
316
288
  runEndTime: null,
@@ -322,7 +294,7 @@ registerAction2(class ClearAllCellOutputsAction extends NotebookAction {
322
294
  else {
323
295
  return undefined;
324
296
  }
325
- }))).filter(edit => !!edit);
297
+ })).filter(edit => !!edit);
326
298
  if (clearExecutionMetadataEdits.length) {
327
299
  context.notebookEditor.textModel.applyEdits(clearExecutionMetadataEdits, true, undefined, () => undefined, undefined, computeUndoRedo);
328
300
  }
@@ -332,9 +304,9 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
332
304
  constructor() {
333
305
  super({
334
306
  id: CHANGE_CELL_LANGUAGE,
335
- title: ( localize(8092, 'Change Cell Language')),
307
+ title: ( localize(7456, 'Change Cell Language')),
336
308
  metadata: {
337
- description: ( localize(8092, 'Change Cell Language')),
309
+ description: ( localize(7456, 'Change Cell Language')),
338
310
  args: [
339
311
  {
340
312
  name: 'range',
@@ -400,17 +372,17 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
400
372
  const allSupportedLanguages = matchResult.all.flatMap(kernel => kernel.supportedLanguages);
401
373
  languages = allSupportedLanguages.length > 0 ? allSupportedLanguages : languageService.getRegisteredLanguageIds();
402
374
  }
403
- const providerLanguages = ( (new Set([
375
+ const providerLanguages = ( new Set([
404
376
  ...languages,
405
377
  'markdown'
406
- ])));
378
+ ]));
407
379
  providerLanguages.forEach(languageId => {
408
380
  let description;
409
381
  if (context.cell.cellKind === CellKind.Markup ? (languageId === 'markdown') : (languageId === context.cell.language)) {
410
- description = ( localize(8093, "({0}) - Current Language", languageId));
382
+ description = ( localize(7457, "({0}) - Current Language", languageId));
411
383
  }
412
384
  else {
413
- description = ( localize(8094, "({0})", languageId));
385
+ description = ( localize(7458, "({0})", languageId));
414
386
  }
415
387
  const languageName = languageService.getLanguageName(languageId);
416
388
  if (!languageName) {
@@ -433,16 +405,16 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
433
405
  return a.description.localeCompare(b.description);
434
406
  });
435
407
  const autoDetectMode = {
436
- label: ( localize(8095, "Auto Detect"))
408
+ label: ( localize(7459, "Auto Detect"))
437
409
  };
438
410
  const picks = [
439
411
  autoDetectMode,
440
- { type: 'separator', label: ( localize(8096, "languages (identifier)")) },
412
+ { type: 'separator', label: ( localize(7460, "languages (identifier)")) },
441
413
  ...topItems,
442
414
  { type: 'separator' },
443
415
  ...mainItems
444
416
  ];
445
- const selection = await quickInputService.pick(picks, { placeHolder: ( localize(8097, "Select Language Mode")) });
417
+ const selection = await quickInputService.pick(picks, { placeHolder: ( localize(7461, "Select Language Mode")) });
446
418
  const languageId = selection === autoDetectMode
447
419
  ? await languageDetectionService.detectLanguage(context.cell.uri)
448
420
  : selection?.languageId;
@@ -475,10 +447,10 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
475
447
  constructor() {
476
448
  super({
477
449
  id: DETECT_CELL_LANGUAGE,
478
- title: ( localize2(8098, "Accept Detected Language for Cell")),
450
+ title: ( localize2(7462, "Accept Detected Language for Cell")),
479
451
  f1: true,
480
- precondition: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE))),
481
- keybinding: { primary: 34 | 512 | 1024 , weight: 200 }
452
+ precondition: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE)),
453
+ keybinding: { primary: KeyCode.KeyD | KeyMod.Alt | KeyMod.Shift, weight: KeybindingWeight.WorkbenchContrib }
482
454
  });
483
455
  }
484
456
  async runWithContext(accessor, context) {
@@ -493,7 +465,7 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
493
465
  setCellToLanguage(detection, context);
494
466
  }
495
467
  else {
496
- notificationService.warn(( localize(8099, "Unable to detect cell language")));
468
+ notificationService.warn(( localize(7463, "Unable to detect cell language")));
497
469
  }
498
470
  }
499
471
  });
@@ -511,20 +483,20 @@ async function setCellToLanguage(languageId, context) {
511
483
  }
512
484
  else {
513
485
  const index = context.notebookEditor.textModel.cells.indexOf(context.cell.model);
514
- context.notebookEditor.textModel.applyEdits([{ editType: 4 , index, language: languageId }], true, undefined, () => undefined, undefined, !context.notebookEditor.isReadOnly);
486
+ context.notebookEditor.textModel.applyEdits([{ editType: CellEditType.CellLanguage, index, language: languageId }], true, undefined, () => undefined, undefined, !context.notebookEditor.isReadOnly);
515
487
  }
516
488
  }
517
489
  registerAction2(class SelectNotebookIndentation extends NotebookAction {
518
490
  constructor() {
519
491
  super({
520
492
  id: SELECT_NOTEBOOK_INDENTATION_ID,
521
- title: ( localize2(8100, 'Select Indentation')),
493
+ title: ( localize2(7464, 'Select Indentation')),
522
494
  f1: true,
523
- precondition: ( (ContextKeyExpr.and(
495
+ precondition: ( ContextKeyExpr.and(
524
496
  NOTEBOOK_IS_ACTIVE_EDITOR,
525
497
  NOTEBOOK_EDITOR_EDITABLE,
526
498
  NOTEBOOK_CELL_EDITABLE
527
- ))),
499
+ )),
528
500
  });
529
501
  }
530
502
  async runWithContext(accessor, context) {
@@ -536,34 +508,34 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
536
508
  const instantiationService = accessor.get(IInstantiationService);
537
509
  const activeNotebook = getNotebookEditorFromEditorPane(editorService.activeEditorPane);
538
510
  if (!activeNotebook || activeNotebook.isDisposed) {
539
- return quickInputService.pick([{ label: ( localize(8101, "No notebook editor active at this time")) }]);
511
+ return quickInputService.pick([{ label: ( localize(7465, "No notebook editor active at this time")) }]);
540
512
  }
541
513
  if (activeNotebook.isReadOnly) {
542
- return quickInputService.pick([{ label: ( localize(8102, "The active notebook editor is read-only.")) }]);
514
+ return quickInputService.pick([{ label: ( localize(7466, "The active notebook editor is read-only.")) }]);
543
515
  }
544
- const picks = ( ([
516
+ const picks = ( [
545
517
  (
546
- (new NotebookIndentUsingTabs())),
518
+ new NotebookIndentUsingTabs()),
547
519
  (
548
- (new NotebookIndentUsingSpaces())),
520
+ new NotebookIndentUsingSpaces()),
549
521
  (
550
- (new NotebookChangeTabDisplaySize())),
522
+ new NotebookChangeTabDisplaySize()),
551
523
  (
552
- (new NotebookIndentationToTabsAction())),
524
+ new NotebookIndentationToTabsAction()),
553
525
  (
554
- (new NotebookIndentationToSpacesAction()))
526
+ new NotebookIndentationToSpacesAction())
555
527
  ].map(item => {
556
528
  return {
557
529
  id: item.desc.id,
558
- label: ( (item.desc.title.toString())),
530
+ label: ( item.desc.title.toString()),
559
531
  run: () => {
560
532
  instantiationService.invokeFunction(item.run);
561
533
  }
562
534
  };
563
- })));
564
- picks.splice(3, 0, { type: 'separator', label: ( localize(8103, "convert file")) });
565
- picks.unshift({ type: 'separator', label: ( localize(8104, "change view")) });
566
- const action = await quickInputService.pick(picks, { placeHolder: ( localize(8105, "Select Action")), matchOnDetail: true });
535
+ }));
536
+ picks.splice(3, 0, { type: 'separator', label: ( localize(7467, "convert file")) });
537
+ picks.unshift({ type: 'separator', label: ( localize(7468, "change view")) });
538
+ const action = await quickInputService.pick(picks, { placeHolder: ( localize(7469, "Select Action")), matchOnDetail: true });
567
539
  if (!action) {
568
540
  return;
569
541
  }
@@ -576,15 +548,15 @@ registerAction2(class CommentSelectedCellsAction extends NotebookMultiCellAction
576
548
  constructor() {
577
549
  super({
578
550
  id: COMMENT_SELECTED_CELLS_ID,
579
- title: ( localize(8106, "Comment Selected Cells")),
551
+ title: ( localize(7470, "Comment Selected Cells")),
580
552
  keybinding: {
581
- when: ( (ContextKeyExpr.and(
553
+ when: ( ContextKeyExpr.and(
582
554
  NOTEBOOK_EDITOR_FOCUSED,
583
555
  NOTEBOOK_EDITOR_EDITABLE,
584
556
  ContextKeyExpr.not(InputFocusedContextKey)
585
- ))),
586
- primary: 2048 | 90 ,
587
- weight: 200
557
+ )),
558
+ primary: KeyMod.CtrlCmd | KeyCode.Slash,
559
+ weight: KeybindingWeight.WorkbenchContrib
588
560
  }
589
561
  });
590
562
  }
@@ -593,30 +565,28 @@ registerAction2(class CommentSelectedCellsAction extends NotebookMultiCellAction
593
565
  context.selectedCells.forEach(async (cellViewModel) => {
594
566
  const textModel = await cellViewModel.resolveTextModel();
595
567
  const commentsOptions = cellViewModel.commentOptions;
596
- const cellCommentCommand = ( (new LineCommentCommand(languageConfigurationService,
597
- (new Selection(
568
+ const cellCommentCommand = ( new LineCommentCommand(languageConfigurationService, (
569
+ new Selection(
598
570
  1,
599
571
  1,
600
572
  textModel.getLineCount(),
601
573
  textModel.getLineMaxColumn(textModel.getLineCount())
602
- )), textModel.getOptions().tabSize, 0 , commentsOptions.insertSpace ?? true, commentsOptions.ignoreEmptyLines ?? true, false)));
574
+ )), textModel.getOptions().tabSize, Type.Toggle, commentsOptions.insertSpace ?? true, commentsOptions.ignoreEmptyLines ?? true, false));
603
575
  const cellEditorSelections = cellViewModel.getSelections();
604
- const initialTrackedRangesIDs = ( (cellEditorSelections.map(selection => {
605
- return textModel._setTrackedRange(null, selection, 1 );
606
- })));
576
+ const initialTrackedRangesIDs = ( cellEditorSelections.map(selection => {
577
+ return textModel._setTrackedRange(null, selection, TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges);
578
+ }));
607
579
  CommandExecutor.executeCommands(textModel, cellEditorSelections, [cellCommentCommand]);
608
- const newTrackedSelections = ( (( (initialTrackedRangesIDs.map(i => {
580
+ const newTrackedSelections = ( ( initialTrackedRangesIDs.map(i => {
609
581
  return textModel._getTrackedRange(i);
610
- }))).filter(r => !!r).map((range) => {
611
- return (
612
- (new Selection(
613
- range.startLineNumber,
614
- range.startColumn,
615
- range.endLineNumber,
616
- range.endColumn
617
- ))
618
- );
619
- })));
582
+ })).filter(r => !!r).map((range) => {
583
+ return ( new Selection(
584
+ range.startLineNumber,
585
+ range.startColumn,
586
+ range.endLineNumber,
587
+ range.endColumn
588
+ ));
589
+ }));
620
590
  cellViewModel.setSelections(newTrackedSelections ?? []);
621
591
  });
622
592
  }
@@ -0,0 +1,3 @@
1
+ export declare const executeCondition: import("vscode/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
2
+ export declare const executeThisCellCondition: import("vscode/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
3
+ export declare const executeSectionCondition: import("vscode/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;