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

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,14 +1,17 @@
1
+
1
2
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
3
+ import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
2
4
  import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
3
5
  import { localize } from 'vscode/vscode/vs/nls';
4
6
  import { registerAction2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
5
7
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
6
8
  import { InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
7
- import { insertCell } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
8
- import { NotebookAction } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
9
- import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_EDITABLE } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
9
+ import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
10
+ import { insertCell } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
11
+ import { NotebookAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
12
+ import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_EDITABLE } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
10
13
  import { CellKind, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
11
- import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
14
+ import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
12
15
 
13
16
  const INSERT_CODE_CELL_ABOVE_COMMAND_ID = 'notebook.cell.insertCodeCellAbove';
14
17
  const INSERT_CODE_CELL_BELOW_COMMAND_ID = 'notebook.cell.insertCodeCellBelow';
@@ -53,14 +56,11 @@ registerAction2(class InsertCodeCellAboveAction extends InsertCellCommand {
53
56
  constructor() {
54
57
  super({
55
58
  id: INSERT_CODE_CELL_ABOVE_COMMAND_ID,
56
- title: ( localize(8027, "Insert Code Cell Above")),
59
+ title: ( localize(7488, "Insert Code Cell Above")),
57
60
  keybinding: {
58
- primary: 2048 | 1024 | 3 ,
59
- when: ( (ContextKeyExpr.and(
60
- NOTEBOOK_CELL_LIST_FOCUSED,
61
- (InputFocusedContext.toNegated())
62
- ))),
63
- weight: 200
61
+ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter,
62
+ when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()))),
63
+ weight: KeybindingWeight.WorkbenchContrib
64
64
  },
65
65
  menu: {
66
66
  id: MenuId.NotebookCellInsert,
@@ -73,7 +73,7 @@ registerAction2(class InsertCodeCellAboveAndFocusContainerAction extends InsertC
73
73
  constructor() {
74
74
  super({
75
75
  id: INSERT_CODE_CELL_ABOVE_AND_FOCUS_CONTAINER_COMMAND_ID,
76
- title: ( localize(8028, "Insert Code Cell Above and Focus Container"))
76
+ title: ( localize(7489, "Insert Code Cell Above and Focus Container"))
77
77
  }, CellKind.Code, 'above', false);
78
78
  }
79
79
  });
@@ -81,15 +81,11 @@ registerAction2(class InsertCodeCellBelowAction extends InsertCellCommand {
81
81
  constructor() {
82
82
  super({
83
83
  id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
84
- title: ( localize(8029, "Insert Code Cell Below")),
84
+ title: ( localize(7490, "Insert Code Cell Below")),
85
85
  keybinding: {
86
- primary: 2048 | 3 ,
87
- when: ( (ContextKeyExpr.and(
88
- NOTEBOOK_CELL_LIST_FOCUSED,
89
- (InputFocusedContext.toNegated()),
90
- (CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
91
- ))),
92
- weight: 200
86
+ primary: KeyMod.CtrlCmd | KeyCode.Enter,
87
+ when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()), ( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('')))),
88
+ weight: KeybindingWeight.WorkbenchContrib
93
89
  },
94
90
  menu: {
95
91
  id: MenuId.NotebookCellInsert,
@@ -102,7 +98,7 @@ registerAction2(class InsertCodeCellBelowAndFocusContainerAction extends InsertC
102
98
  constructor() {
103
99
  super({
104
100
  id: INSERT_CODE_CELL_BELOW_AND_FOCUS_CONTAINER_COMMAND_ID,
105
- title: ( localize(8030, "Insert Code Cell Below and Focus Container")),
101
+ title: ( localize(7491, "Insert Code Cell Below and Focus Container")),
106
102
  }, CellKind.Code, 'below', false);
107
103
  }
108
104
  });
@@ -110,7 +106,7 @@ registerAction2(class InsertMarkdownCellAboveAction extends InsertCellCommand {
110
106
  constructor() {
111
107
  super({
112
108
  id: INSERT_MARKDOWN_CELL_ABOVE_COMMAND_ID,
113
- title: ( localize(8031, "Insert Markdown Cell Above")),
109
+ title: ( localize(7492, "Insert Markdown Cell Above")),
114
110
  menu: {
115
111
  id: MenuId.NotebookCellInsert,
116
112
  order: 2
@@ -122,7 +118,7 @@ registerAction2(class InsertMarkdownCellBelowAction extends InsertCellCommand {
122
118
  constructor() {
123
119
  super({
124
120
  id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
125
- title: ( localize(8032, "Insert Markdown Cell Below")),
121
+ title: ( localize(7493, "Insert Markdown Cell Below")),
126
122
  menu: {
127
123
  id: MenuId.NotebookCellInsert,
128
124
  order: 3
@@ -134,7 +130,7 @@ registerAction2(class InsertCodeCellAtTopAction extends NotebookAction {
134
130
  constructor() {
135
131
  super({
136
132
  id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
137
- title: ( localize(8033, "Add Code Cell At Top")),
133
+ title: ( localize(7494, "Add Code Cell At Top")),
138
134
  f1: false
139
135
  });
140
136
  }
@@ -156,7 +152,7 @@ registerAction2(class InsertMarkdownCellAtTopAction extends NotebookAction {
156
152
  constructor() {
157
153
  super({
158
154
  id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
159
- title: ( localize(8034, "Add Markdown Cell At Top")),
155
+ title: ( localize(7495, "Add Markdown Cell At Top")),
160
156
  f1: false
161
157
  });
162
158
  }
@@ -177,114 +173,86 @@ registerAction2(class InsertMarkdownCellAtTopAction extends NotebookAction {
177
173
  MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
178
174
  command: {
179
175
  id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
180
- title: '$(add) ' + ( localize(8035, "Code")),
181
- tooltip: ( localize(8036, "Add Code Cell"))
176
+ title: '$(add) ' + ( localize(7496, "Code")),
177
+ tooltip: ( localize(7497, "Add Code Cell"))
182
178
  },
183
179
  order: 0,
184
180
  group: 'inline',
185
- when: ( (ContextKeyExpr.and(
186
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
187
- (ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
188
- )))
181
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))))
189
182
  });
190
183
  MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
191
184
  command: {
192
185
  id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
193
- title: ( localize(8037, "Add Code")),
186
+ title: ( localize(7498, "Add Code")),
194
187
  icon: Codicon.add,
195
- tooltip: ( localize(8036, "Add Code Cell"))
188
+ tooltip: ( localize(7497, "Add Code Cell"))
196
189
  },
197
190
  order: 0,
198
191
  group: 'inline',
199
- when: ( (ContextKeyExpr.and(
200
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
201
- (ContextKeyExpr.equals('config.notebook.experimental.insertToolbarAlignment', 'left'))
202
- )))
192
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.equals('config.notebook.experimental.insertToolbarAlignment', 'left'))))
203
193
  });
204
194
  MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
205
195
  command: {
206
196
  id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
207
197
  icon: Codicon.add,
208
- title: ( localize(8038, "Code")),
209
- tooltip: ( localize(8036, "Add Code Cell"))
198
+ title: ( localize(7499, "Code")),
199
+ tooltip: ( localize(7497, "Add Code Cell"))
210
200
  },
211
201
  order: -5,
212
202
  group: 'navigation/add',
213
- when: ( (ContextKeyExpr.and(
214
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
215
- (ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')),
216
- (ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden'))
217
- )))
203
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')), ( ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden'))))
218
204
  });
219
205
  MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
220
206
  command: {
221
207
  id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
222
- title: '$(add) ' + ( localize(8035, "Code")),
223
- tooltip: ( localize(8036, "Add Code Cell"))
208
+ title: '$(add) ' + ( localize(7496, "Code")),
209
+ tooltip: ( localize(7497, "Add Code Cell"))
224
210
  },
225
211
  order: 0,
226
212
  group: 'inline',
227
- when: ( (ContextKeyExpr.and(
228
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
229
- (ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
230
- )))
213
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))))
231
214
  });
232
215
  MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
233
216
  command: {
234
217
  id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
235
- title: ( localize(8039, "Add Code")),
218
+ title: ( localize(7500, "Add Code")),
236
219
  icon: Codicon.add,
237
- tooltip: ( localize(8036, "Add Code Cell"))
220
+ tooltip: ( localize(7497, "Add Code Cell"))
238
221
  },
239
222
  order: 0,
240
223
  group: 'inline',
241
- when: ( (ContextKeyExpr.and(
242
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
243
- (ContextKeyExpr.equals('config.notebook.experimental.insertToolbarAlignment', 'left'))
244
- )))
224
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.equals('config.notebook.experimental.insertToolbarAlignment', 'left'))))
245
225
  });
246
226
  MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
247
227
  command: {
248
228
  id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
249
- title: '$(add) ' + ( localize(8040, "Markdown")),
250
- tooltip: ( localize(8041, "Add Markdown Cell"))
229
+ title: '$(add) ' + ( localize(7501, "Markdown")),
230
+ tooltip: ( localize(7502, "Add Markdown Cell"))
251
231
  },
252
232
  order: 1,
253
233
  group: 'inline',
254
- when: ( (ContextKeyExpr.and(
255
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
256
- (ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
257
- )))
234
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))))
258
235
  });
259
236
  MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
260
237
  command: {
261
238
  id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
262
239
  icon: Codicon.add,
263
- title: ( localize(8042, "Markdown")),
264
- tooltip: ( localize(8041, "Add Markdown Cell"))
240
+ title: ( localize(7503, "Markdown")),
241
+ tooltip: ( localize(7502, "Add Markdown Cell"))
265
242
  },
266
243
  order: -5,
267
244
  group: 'navigation/add',
268
- when: ( (ContextKeyExpr.and(
269
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
270
- (ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')),
271
- (ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden')),
272
- (ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, false)),
273
- (ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, 'never'))
274
- )))
245
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')), ( ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden')), ( ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, false)), ( ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, 'never'))))
275
246
  });
276
247
  MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
277
248
  command: {
278
249
  id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
279
- title: '$(add) ' + ( localize(8040, "Markdown")),
280
- tooltip: ( localize(8041, "Add Markdown Cell"))
250
+ title: '$(add) ' + ( localize(7501, "Markdown")),
251
+ tooltip: ( localize(7502, "Add Markdown Cell"))
281
252
  },
282
253
  order: 1,
283
254
  group: 'inline',
284
- when: ( (ContextKeyExpr.and(
285
- (NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
286
- (ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))
287
- )))
255
+ when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals('config.notebook.experimental.insertToolbarAlignment', 'left'))))
288
256
  });
289
257
 
290
258
  export { InsertCellCommand, insertNewCell };
@@ -1,3 +1,4 @@
1
+
1
2
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
2
3
  import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
3
4
  import { URI } from 'vscode/vscode/vs/base/common/uri';
@@ -5,14 +6,15 @@ import { localize2, localize } from 'vscode/vscode/vs/nls';
5
6
  import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
6
7
  import { registerAction2, Action2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
7
8
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
9
+ import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
8
10
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
9
11
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
10
12
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
11
- import { NOTEBOOK_ACTIONS_CATEGORY } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
12
- import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
13
+ import { NOTEBOOK_ACTIONS_CATEGORY } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
14
+ import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
13
15
  import { INotebookEditorService } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
14
16
  import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
15
- import { NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
17
+ import { NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_FOCUSED } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
16
18
  import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
17
19
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
18
20
  import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
@@ -21,28 +23,21 @@ registerAction2(class NotebookConfigureLayoutAction extends Action2 {
21
23
  constructor() {
22
24
  super({
23
25
  id: 'workbench.notebook.layout.select',
24
- title: ( localize2(8066, "Select between Notebook Layouts")),
26
+ title: ( localize2(7504, "Select between Notebook Layouts")),
25
27
  f1: true,
26
- precondition: ( (ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true))),
28
+ precondition: ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)),
27
29
  category: NOTEBOOK_ACTIONS_CATEGORY,
28
30
  menu: [
29
31
  {
30
32
  id: MenuId.EditorTitle,
31
33
  group: 'notebookLayout',
32
- when: ( (ContextKeyExpr.and(
33
- NOTEBOOK_IS_ACTIVE_EDITOR,
34
- (ContextKeyExpr.notEquals('config.notebook.globalToolbar', true)),
35
- (ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true))
36
- ))),
34
+ when: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( ContextKeyExpr.notEquals('config.notebook.globalToolbar', true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)))),
37
35
  order: 0
38
36
  },
39
37
  {
40
38
  id: MenuId.NotebookToolbar,
41
39
  group: 'notebookLayout',
42
- when: ( (ContextKeyExpr.and(
43
- (ContextKeyExpr.equals('config.notebook.globalToolbar', true)),
44
- (ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true))
45
- ))),
40
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.notebook.globalToolbar', true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)))),
46
41
  order: 0
47
42
  }
48
43
  ]
@@ -56,14 +51,14 @@ registerAction2(class NotebookConfigureLayoutAction extends Action2 {
56
51
  constructor() {
57
52
  super({
58
53
  id: 'workbench.notebook.layout.configure',
59
- title: ( localize2(8067, "Customize Notebook Layout")),
54
+ title: ( localize2(7505, "Customize Notebook Layout")),
60
55
  f1: true,
61
56
  category: NOTEBOOK_ACTIONS_CATEGORY,
62
57
  menu: [
63
58
  {
64
59
  id: MenuId.NotebookToolbar,
65
60
  group: 'notebookLayout',
66
- when: ( (ContextKeyExpr.equals('config.notebook.globalToolbar', true))),
61
+ when: ( ContextKeyExpr.equals('config.notebook.globalToolbar', true)),
67
62
  order: 1
68
63
  }
69
64
  ]
@@ -77,7 +72,7 @@ registerAction2(class NotebookConfigureLayoutFromEditorTitle extends Action2 {
77
72
  constructor() {
78
73
  super({
79
74
  id: 'workbench.notebook.layout.configure.editorTitle',
80
- title: ( localize2(8067, "Customize Notebook Layout")),
75
+ title: ( localize2(7505, "Customize Notebook Layout")),
81
76
  f1: false,
82
77
  category: NOTEBOOK_ACTIONS_CATEGORY,
83
78
  menu: [
@@ -97,7 +92,7 @@ registerAction2(class NotebookConfigureLayoutFromEditorTitle extends Action2 {
97
92
  MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
98
93
  submenu: MenuId.NotebookEditorLayoutConfigure,
99
94
  rememberDefaultAction: false,
100
- title: ( localize2(8068, "Customize Notebook...")),
95
+ title: ( localize2(7506, "Customize Notebook...")),
101
96
  icon: Codicon.gear,
102
97
  group: 'navigation',
103
98
  order: -1,
@@ -107,7 +102,7 @@ registerAction2(class ToggleLineNumberFromEditorTitle extends Action2 {
107
102
  constructor() {
108
103
  super({
109
104
  id: 'notebook.toggleLineNumbersFromEditorTitle',
110
- title: ( localize2(8069, 'Toggle Notebook Line Numbers')),
105
+ title: ( localize2(7507, 'Toggle Notebook Line Numbers')),
111
106
  precondition: NOTEBOOK_EDITOR_FOCUSED,
112
107
  menu: [
113
108
  {
@@ -120,8 +115,8 @@ registerAction2(class ToggleLineNumberFromEditorTitle extends Action2 {
120
115
  category: NOTEBOOK_ACTIONS_CATEGORY,
121
116
  f1: true,
122
117
  toggled: {
123
- condition: ( (ContextKeyExpr.notEquals('config.notebook.lineNumbers', 'off'))),
124
- title: ( localize(8070, "Notebook Line Numbers")),
118
+ condition: ( ContextKeyExpr.notEquals('config.notebook.lineNumbers', 'off')),
119
+ title: ( localize(7508, "Notebook Line Numbers")),
125
120
  }
126
121
  });
127
122
  }
@@ -133,7 +128,7 @@ registerAction2(class ToggleCellToolbarPositionFromEditorTitle extends Action2 {
133
128
  constructor() {
134
129
  super({
135
130
  id: 'notebook.toggleCellToolbarPositionFromEditorTitle',
136
- title: ( localize2(8071, 'Toggle Cell Toolbar Position')),
131
+ title: ( localize2(7509, 'Toggle Cell Toolbar Position')),
137
132
  menu: [{
138
133
  id: MenuId.NotebookEditorLayoutConfigure,
139
134
  group: 'notebookLayoutDetails',
@@ -151,7 +146,7 @@ registerAction2(class ToggleBreadcrumbFromEditorTitle extends Action2 {
151
146
  constructor() {
152
147
  super({
153
148
  id: 'breadcrumbs.toggleFromEditorTitle',
154
- title: ( localize2(8072, 'Toggle Breadcrumbs')),
149
+ title: ( localize2(7510, 'Toggle Breadcrumbs')),
155
150
  menu: [{
156
151
  id: MenuId.NotebookEditorLayoutConfigure,
157
152
  group: 'notebookLayoutDetails',
@@ -168,7 +163,7 @@ registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
168
163
  constructor() {
169
164
  super({
170
165
  id: 'notebook.saveMimeTypeOrder',
171
- title: ( localize2(8073, "Save Mimetype Display Order")),
166
+ title: ( localize2(7511, "Save Mimetype Display Order")),
172
167
  f1: true,
173
168
  category: NOTEBOOK_ACTIONS_CATEGORY,
174
169
  precondition: NOTEBOOK_IS_ACTIVE_EDITOR,
@@ -176,12 +171,12 @@ registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
176
171
  }
177
172
  run(accessor) {
178
173
  const service = accessor.get(INotebookService);
179
- const disposables = ( (new DisposableStore()));
174
+ const disposables = ( new DisposableStore());
180
175
  const qp = disposables.add(accessor.get(IQuickInputService).createQuickPick());
181
- qp.placeholder = ( localize(8074, 'Settings file to save in'));
176
+ qp.placeholder = ( localize(7512, 'Settings file to save in'));
182
177
  qp.items = [
183
- { target: 2 , label: ( localize(8075, 'User Settings')) },
184
- { target: 5 , label: ( localize(8076, 'Workspace Settings')) },
178
+ { target: ConfigurationTarget.USER, label: ( localize(7513, 'User Settings')) },
179
+ { target: ConfigurationTarget.WORKSPACE, label: ( localize(7514, 'Workspace Settings')) },
185
180
  ];
186
181
  disposables.add(qp.onDidAccept(() => {
187
182
  const target = qp.selectedItems[0]?.target;
@@ -198,7 +193,7 @@ registerAction2(class NotebookWebviewResetAction extends Action2 {
198
193
  constructor() {
199
194
  super({
200
195
  id: 'workbench.notebook.layout.webview.reset',
201
- title: ( localize2(8077, "Reset Notebook Webview")),
196
+ title: ( localize2(7515, "Reset Notebook Webview")),
202
197
  f1: false,
203
198
  category: NOTEBOOK_ACTIONS_CATEGORY
204
199
  });
@@ -208,7 +203,7 @@ registerAction2(class NotebookWebviewResetAction extends Action2 {
208
203
  if (args) {
209
204
  const uri = URI.revive(args);
210
205
  const notebookEditorService = accessor.get(INotebookEditorService);
211
- const widgets = notebookEditorService.listNotebookEditors().filter(widget => widget.hasModel() && ( (widget.textModel.uri.toString())) === ( (uri.toString())));
206
+ const widgets = notebookEditorService.listNotebookEditors().filter(widget => widget.hasModel() && ( widget.textModel.uri.toString()) === ( uri.toString()));
212
207
  for (const widget of widgets) {
213
208
  if (widget.hasModel()) {
214
209
  widget.getInnerWebview()?.reload();
@@ -229,14 +224,14 @@ registerAction2(class ToggleNotebookStickyScroll extends Action2 {
229
224
  super({
230
225
  id: 'notebook.action.toggleNotebookStickyScroll',
231
226
  title: {
232
- ...( localize2(8078, "Toggle Notebook Sticky Scroll")),
233
- mnemonicTitle: ( localize(8079, "&&Toggle Notebook Sticky Scroll")),
227
+ ...( localize2(7516, "Toggle Notebook Sticky Scroll")),
228
+ mnemonicTitle: ( localize(7517, "&&Toggle Notebook Sticky Scroll")),
234
229
  },
235
230
  category: Categories.View,
236
231
  toggled: {
237
- condition: ( (ContextKeyExpr.equals('config.notebook.stickyScroll.enabled', true))),
238
- title: ( localize(8080, "Toggle Notebook Sticky Scroll")),
239
- mnemonicTitle: ( localize(8079, "&&Toggle Notebook Sticky Scroll")),
232
+ condition: ( ContextKeyExpr.equals('config.notebook.stickyScroll.enabled', true)),
233
+ title: ( localize(7518, "Toggle Notebook Sticky Scroll")),
234
+ mnemonicTitle: ( localize(7517, "&&Toggle Notebook Sticky Scroll")),
240
235
  },
241
236
  menu: [
242
237
  { id: MenuId.CommandPalette },
@@ -0,0 +1,27 @@
1
+ import { ServicesAccessor } from "vscode/vscode/vs/editor/browser/editorExtensions";
2
+ import { Action2 } from "vscode/vscode/vs/platform/actions/common/actions";
3
+ export declare class NotebookIndentUsingTabs extends Action2 {
4
+ static readonly ID = "notebook.action.indentUsingTabs";
5
+ constructor();
6
+ run(accessor: ServicesAccessor, ...args: any[]): void;
7
+ }
8
+ export declare class NotebookIndentUsingSpaces extends Action2 {
9
+ static readonly ID = "notebook.action.indentUsingSpaces";
10
+ constructor();
11
+ run(accessor: ServicesAccessor, ...args: any[]): void;
12
+ }
13
+ export declare class NotebookChangeTabDisplaySize extends Action2 {
14
+ static readonly ID = "notebook.action.changeTabDisplaySize";
15
+ constructor();
16
+ run(accessor: ServicesAccessor, ...args: any[]): void;
17
+ }
18
+ export declare class NotebookIndentationToSpacesAction extends Action2 {
19
+ static readonly ID = "notebook.action.convertIndentationToSpaces";
20
+ constructor();
21
+ run(accessor: ServicesAccessor, ...args: any[]): void;
22
+ }
23
+ export declare class NotebookIndentationToTabsAction extends Action2 {
24
+ static readonly ID = "notebook.action.convertIndentationToTabs";
25
+ constructor();
26
+ run(accessor: ServicesAccessor, ...args: any[]): void;
27
+ }
@@ -1,3 +1,4 @@
1
+
1
2
  import { localize } from 'vscode/vscode/vs/nls';
2
3
  import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
3
4
  import { IBulkEditService, ResourceTextEdit } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
@@ -9,7 +10,7 @@ import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
9
10
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
10
11
  import { INotebookEditorService } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
11
12
  import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
12
- import { isNotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
13
+ import { isNotebookEditorInput } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
13
14
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
14
15
 
15
16
  class NotebookIndentUsingTabs extends Action2 {
@@ -17,7 +18,7 @@ class NotebookIndentUsingTabs extends Action2 {
17
18
  constructor() {
18
19
  super({
19
20
  id: NotebookIndentUsingTabs.ID,
20
- title: ( localize(10950, "Indent Using Tabs")),
21
+ title: ( localize(7519, "Indent Using Tabs")),
21
22
  precondition: undefined,
22
23
  });
23
24
  }
@@ -30,7 +31,7 @@ class NotebookIndentUsingSpaces extends Action2 {
30
31
  constructor() {
31
32
  super({
32
33
  id: NotebookIndentUsingSpaces.ID,
33
- title: ( localize(10951, "Indent Using Spaces")),
34
+ title: ( localize(7520, "Indent Using Spaces")),
34
35
  precondition: undefined,
35
36
  });
36
37
  }
@@ -43,7 +44,7 @@ class NotebookChangeTabDisplaySize extends Action2 {
43
44
  constructor() {
44
45
  super({
45
46
  id: NotebookChangeTabDisplaySize.ID,
46
- title: ( localize(10952, "Change Tab Display Size")),
47
+ title: ( localize(7521, "Change Tab Display Size")),
47
48
  precondition: undefined,
48
49
  });
49
50
  }
@@ -56,7 +57,7 @@ class NotebookIndentationToSpacesAction extends Action2 {
56
57
  constructor() {
57
58
  super({
58
59
  id: NotebookIndentationToSpacesAction.ID,
59
- title: ( localize(10953, "Convert Indentation to Spaces")),
60
+ title: ( localize(7522, "Convert Indentation to Spaces")),
60
61
  precondition: undefined,
61
62
  });
62
63
  }
@@ -69,7 +70,7 @@ class NotebookIndentationToTabsAction extends Action2 {
69
70
  constructor() {
70
71
  super({
71
72
  id: NotebookIndentationToTabsAction.ID,
72
- title: ( localize(10954, "Convert Indentation to Tabs")),
73
+ title: ( localize(7523, "Convert Indentation to Tabs")),
73
74
  precondition: undefined,
74
75
  });
75
76
  }
@@ -91,17 +92,17 @@ function changeNotebookIndentation(accessor, insertSpaces, displaySizeOnly) {
91
92
  if (!notebookEditor) {
92
93
  return;
93
94
  }
94
- const picks = ( ([1, 2, 3, 4, 5, 6, 7, 8].map(n => ({
95
- id: ( (n.toString())),
96
- label: ( (n.toString())),
97
- }))));
95
+ const picks = ( [1, 2, 3, 4, 5, 6, 7, 8].map(n => ({
96
+ id: ( n.toString()),
97
+ label: ( n.toString()),
98
+ })));
98
99
  const initialConfig = configurationService.getValue(NotebookSetting.cellEditorOptionsCustomizations);
99
100
  const initialInsertSpaces = initialConfig['editor.insertSpaces'];
100
101
  delete initialConfig['editor.indentSize'];
101
102
  delete initialConfig['editor.tabSize'];
102
103
  delete initialConfig['editor.insertSpaces'];
103
104
  setTimeout(() => {
104
- quickInputService.pick(picks, { placeHolder: ( localize(10955, "Select Tab Size for Current File")) }).then(pick => {
105
+ quickInputService.pick(picks, { placeHolder: ( localize(7524, "Select Tab Size for Current File")) }).then(pick => {
105
106
  if (pick) {
106
107
  const pickedVal = parseInt(pick.label, 10);
107
108
  if (displaySizeOnly) {
@@ -140,9 +141,9 @@ function convertNotebookIndentation(accessor, tabsToSpaces) {
140
141
  if (!notebookTextModel) {
141
142
  return;
142
143
  }
143
- const disposable = ( (new DisposableStore()));
144
+ const disposable = ( new DisposableStore());
144
145
  try {
145
- Promise.all(( (notebookTextModel.cells.map(async (cell) => {
146
+ Promise.all(( notebookTextModel.cells.map(async (cell) => {
146
147
  const ref = await textModelService.createModelReference(cell.uri);
147
148
  disposable.add(ref);
148
149
  const textEditorModel = ref.object.textEditorModel;
@@ -151,8 +152,8 @@ function convertNotebookIndentation(accessor, tabsToSpaces) {
151
152
  return;
152
153
  }
153
154
  const edits = getIndentationEditOperations(textEditorModel, modelOpts.tabSize, tabsToSpaces);
154
- bulkEditService.apply(edits, { label: ( localize(10956, "Convert Indentation")), code: 'undoredo.convertIndentation', });
155
- })))).then(() => {
155
+ bulkEditService.apply(edits, { label: ( localize(7525, "Convert Indentation")), code: 'undoredo.convertIndentation', });
156
+ }))).then(() => {
156
157
  const initialConfig = configurationService.getValue(NotebookSetting.cellEditorOptionsCustomizations);
157
158
  const initialIndentSize = initialConfig['editor.indentSize'];
158
159
  const initialTabSize = initialConfig['editor.tabSize'];
@@ -180,7 +181,7 @@ function getIndentationEditOperations(model, tabSize, tabsToSpaces) {
180
181
  for (let i = 0; i < tabSize; i++) {
181
182
  spaces += ' ';
182
183
  }
183
- const spacesRegExp = ( (new RegExp(spaces, 'gi')));
184
+ const spacesRegExp = ( new RegExp(spaces, 'gi'));
184
185
  const edits = [];
185
186
  for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) {
186
187
  let lastIndentationColumn = model.getLineFirstNonWhitespaceColumn(lineNumber);
@@ -190,12 +191,12 @@ function getIndentationEditOperations(model, tabSize, tabsToSpaces) {
190
191
  if (lastIndentationColumn === 1) {
191
192
  continue;
192
193
  }
193
- const originalIndentationRange = ( (new Range(lineNumber, 1, lineNumber, lastIndentationColumn)));
194
+ const originalIndentationRange = ( new Range(lineNumber, 1, lineNumber, lastIndentationColumn));
194
195
  const originalIndentation = model.getValueInRange(originalIndentationRange);
195
196
  const newIndentation = (tabsToSpaces
196
197
  ? originalIndentation.replace(/\t/ig, spaces)
197
198
  : originalIndentation.replace(spacesRegExp, '\t'));
198
- edits.push(( (new ResourceTextEdit(model.uri, { range: originalIndentationRange, text: newIndentation }))));
199
+ edits.push(( new ResourceTextEdit(model.uri, { range: originalIndentationRange, text: newIndentation })));
199
200
  }
200
201
  return edits;
201
202
  }
@@ -0,0 +1,30 @@
1
+ import { Action2 } from "vscode/vscode/vs/platform/actions/common/actions";
2
+ import { ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
3
+ import { ICellViewModel, INotebookEditor } from "@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
4
+ import { OutlineEntry } from "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry";
5
+ export type NotebookOutlineEntryArgs = {
6
+ notebookEditor: INotebookEditor;
7
+ outlineEntry: OutlineEntry;
8
+ };
9
+ export type NotebookCellArgs = {
10
+ notebookEditor: INotebookEditor;
11
+ cell: ICellViewModel;
12
+ };
13
+ export declare class NotebookRunSingleCellInSection extends Action2 {
14
+ constructor();
15
+ run(_accessor: ServicesAccessor, context: any): Promise<void>;
16
+ }
17
+ export declare class NotebookRunCellsInSection extends Action2 {
18
+ constructor();
19
+ run(_accessor: ServicesAccessor, context: any): Promise<void>;
20
+ }
21
+ export declare class NotebookFoldSection extends Action2 {
22
+ constructor();
23
+ run(_accessor: ServicesAccessor, context: any): Promise<void>;
24
+ private toggleFoldRange;
25
+ }
26
+ export declare class NotebookExpandSection extends Action2 {
27
+ constructor();
28
+ run(_accessor: ServicesAccessor, context: any): Promise<void>;
29
+ private toggleFoldRange;
30
+ }