@codingame/monaco-vscode-notebook-service-override 25.1.2 → 26.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 (94) hide show
  1. package/index.js +2 -2
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +112 -94
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +95 -96
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +28 -19
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +15 -9
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +22 -17
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +25 -10
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +37 -44
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +211 -115
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +16 -18
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +5 -8
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +57 -49
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +24 -11
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +78 -76
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +14 -15
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +43 -28
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +65 -34
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +19 -16
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +6 -10
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +15 -17
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +28 -16
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +211 -170
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +11 -11
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +158 -156
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +109 -105
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +28 -22
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +26 -17
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +23 -16
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +72 -40
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +233 -186
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +22 -18
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +239 -151
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +85 -86
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +25 -11
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +13 -10
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +8 -5
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +218 -196
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +258 -255
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +106 -98
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +63 -49
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +55 -64
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +21 -25
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +149 -129
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +286 -0
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +82 -0
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +452 -363
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +44 -61
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +9 -11
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +203 -207
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +148 -104
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +19 -11
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +9 -11
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +9 -6
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +34 -22
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +29 -18
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +70 -52
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +31 -19
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +78 -41
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +37 -27
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +9 -6
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +8 -7
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +214 -119
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +38 -36
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.js +24 -25
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js +2 -6
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +26 -15
  71. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +35 -15
  72. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +468 -258
  73. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
  74. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +113 -0
  75. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +74 -58
  76. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +7 -10
  78. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.js +72 -16
  79. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +70 -51
  80. package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +195 -149
  81. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +60 -81
  82. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +7 -12
  83. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +104 -66
  84. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +115 -77
  85. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +42 -26
  86. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +19 -12
  87. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +0 -7
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -198
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +0 -8
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +0 -333
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +0 -2
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -7
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -261
package/index.js CHANGED
@@ -30,8 +30,8 @@ import { NotebookDocumentWorkbenchService } from '@codingame/monaco-vscode-api/v
30
30
  import { INotebookDocumentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/notebook/common/notebookDocumentService.service';
31
31
  import { INotebookOriginalCellModelFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.service';
32
32
  import { INotebookOriginalModelReferenceFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.service';
33
- import { OriginalNotebookCellModelFactory } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory';
34
- import { NotebookOriginalModelReferenceFactory } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory';
33
+ import { OriginalNotebookCellModelFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory';
34
+ import { NotebookOriginalModelReferenceFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory';
35
35
  import { INotebookCellOutlineDataSourceFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service';
36
36
  import { NotebookCellOutlineDataSourceFactory } from './vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js';
37
37
  import { NotebookOutlineEntryFactory } from './vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-notebook-service-override",
3
- "version": "25.1.2",
3
+ "version": "26.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - notebook service-override",
6
6
  "keywords": [],
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "25.1.2",
19
- "@codingame/monaco-vscode-katex-common": "25.1.2"
18
+ "@codingame/monaco-vscode-api": "26.0.0",
19
+ "@codingame/monaco-vscode-katex-common": "26.0.0"
20
20
  },
21
21
  "main": "index.js",
22
22
  "module": "index.js",
@@ -31,10 +31,18 @@ import * as emptyTextEditorHint from './emptyTextEditorHint.css';
31
31
 
32
32
  var EmptyTextEditorHintContentWidget_1;
33
33
  registerCss(emptyTextEditorHint);
34
- const emptyTextEditorHintSetting = 'workbench.editor.empty.hint';
34
+ const emptyTextEditorHintSetting = "workbench.editor.empty.hint";
35
35
  let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution extends Disposable {
36
- static { this.ID = 'editor.contrib.emptyTextEditorHint'; }
37
- constructor(editor, configurationService, inlineChatSessionService, chatAgentService, instantiationService) {
36
+ static {
37
+ this.ID = "editor.contrib.emptyTextEditorHint";
38
+ }
39
+ constructor(
40
+ editor,
41
+ configurationService,
42
+ inlineChatSessionService,
43
+ chatAgentService,
44
+ instantiationService
45
+ ) {
38
46
  super();
39
47
  this.editor = editor;
40
48
  this.configurationService = configurationService;
@@ -46,7 +54,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution exte
46
54
  this._register(this.editor.onDidChangeModelContent(() => this.update()));
47
55
  this._register(this.chatAgentService.onDidChangeAgents(() => this.update()));
48
56
  this._register(this.editor.onDidChangeModelDecorations(() => this.update()));
49
- this._register(this.editor.onDidChangeConfiguration((e) => {
57
+ this._register(this.editor.onDidChangeConfiguration(e => {
50
58
  if (e.hasChanged(EditorOption.readOnly)) {
51
59
  this.update();
52
60
  }
@@ -61,15 +69,13 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution exte
61
69
  this.textHintContentWidget?.dispose();
62
70
  }
63
71
  }));
64
- this._register(inlineChatSessionService.onDidEndSession(e => {
65
- if (this.editor === e.editor) {
66
- this.update();
67
- }
72
+ this._register(inlineChatSessionService.onDidChangeSessions(() => {
73
+ this.update();
68
74
  }));
69
75
  }
70
76
  shouldRenderHint() {
71
77
  const configValue = this.configurationService.getValue(emptyTextEditorHintSetting);
72
- if (configValue === 'hidden') {
78
+ if (configValue === "hidden") {
73
79
  return false;
74
80
  }
75
81
  if (this.editor.getOption(EditorOption.readOnly)) {
@@ -80,16 +86,15 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution exte
80
86
  if (!model || languageId === OUTPUT_MODE_ID || languageId === LOG_MODE_ID || languageId === SEARCH_RESULT_LANGUAGE_ID) {
81
87
  return false;
82
88
  }
83
- if (this.inlineChatSessionService.getSession(this.editor, model.uri)) {
89
+ if (this.inlineChatSessionService.getSessionByTextModel(model.uri)) {
84
90
  return false;
85
91
  }
86
92
  if (this.editor.getModel()?.getValueLength()) {
87
93
  return false;
88
94
  }
89
- const hasConflictingDecorations = Boolean(this.editor.getLineDecorations(1)?.find((d) => d.options.beforeContentClassName
90
- || d.options.afterContentClassName
91
- || d.options.before?.content
92
- || d.options.after?.content));
95
+ const hasConflictingDecorations = Boolean(this.editor.getLineDecorations(1)?.find(
96
+ d => d.options.beforeContentClassName || d.options.afterContentClassName || d.options.before?.content || d.options.after?.content
97
+ ));
93
98
  if (hasConflictingDecorations) {
94
99
  return false;
95
100
  }
@@ -101,8 +106,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution exte
101
106
  const shouldRenderHint = this.shouldRenderHint();
102
107
  if (shouldRenderHint && !this.textHintContentWidget) {
103
108
  this.textHintContentWidget = this.instantiationService.createInstance(EmptyTextEditorHintContentWidget, this.editor);
104
- }
105
- else if (!shouldRenderHint && this.textHintContentWidget) {
109
+ } else if (!shouldRenderHint && this.textHintContentWidget) {
106
110
  this.textHintContentWidget.dispose();
107
111
  this.textHintContentWidget = undefined;
108
112
  }
@@ -112,16 +116,23 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution exte
112
116
  this.textHintContentWidget?.dispose();
113
117
  }
114
118
  };
115
- EmptyTextEditorHintContribution = ( __decorate([
116
- ( __param(1, IConfigurationService)),
117
- ( __param(2, IInlineChatSessionService)),
118
- ( __param(3, IChatAgentService)),
119
- ( __param(4, IInstantiationService))
120
- ], EmptyTextEditorHintContribution));
119
+ EmptyTextEditorHintContribution = ( __decorate([( __param(1, IConfigurationService)), ( __param(2, IInlineChatSessionService)), ( __param(3, IChatAgentService)), ( __param(4, IInstantiationService))], EmptyTextEditorHintContribution));
121
120
  let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget extends Disposable {
122
- static { EmptyTextEditorHintContentWidget_1 = this; }
123
- static { this.ID = 'editor.widget.emptyHint'; }
124
- constructor(editor, commandService, configurationService, keybindingService, chatAgentService, telemetryService, contextMenuService) {
121
+ static {
122
+ EmptyTextEditorHintContentWidget_1 = this;
123
+ }
124
+ static {
125
+ this.ID = "editor.widget.emptyHint";
126
+ }
127
+ constructor(
128
+ editor,
129
+ commandService,
130
+ configurationService,
131
+ keybindingService,
132
+ chatAgentService,
133
+ telemetryService,
134
+ contextMenuService
135
+ ) {
125
136
  super();
126
137
  this.editor = editor;
127
138
  this.commandService = commandService;
@@ -131,8 +142,8 @@ let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget ex
131
142
  this.telemetryService = telemetryService;
132
143
  this.contextMenuService = contextMenuService;
133
144
  this.isVisible = false;
134
- this.ariaLabel = '';
135
- this._register(this.editor.onDidChangeConfiguration((e) => {
145
+ this.ariaLabel = "";
146
+ this._register(this.editor.onDidChangeConfiguration(e => {
136
147
  if (this.domNode && e.hasChanged(EditorOption.fontInfo)) {
137
148
  this.editor.applyFontInfo(this.domNode);
138
149
  }
@@ -150,7 +161,7 @@ let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget ex
150
161
  }
151
162
  disableHint(e) {
152
163
  const disableHint = () => {
153
- this.configurationService.updateValue(emptyTextEditorHintSetting, 'hidden');
164
+ this.configurationService.updateValue(emptyTextEditorHintSetting, "hidden");
154
165
  this.dispose();
155
166
  this.editor.focus();
156
167
  };
@@ -159,19 +170,20 @@ let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget ex
159
170
  return;
160
171
  }
161
172
  this.contextMenuService.showContextMenu({
162
- getAnchor: () => { return ( new StandardMouseEvent(getActiveWindow(), e)); },
173
+ getAnchor: () => {
174
+ return ( new StandardMouseEvent(getActiveWindow(), e));
175
+ },
163
176
  getActions: () => {
164
177
  return [{
165
- id: 'workench.action.disableEmptyEditorHint',
166
- label: ( localize(6159, "Disable Empty Editor Hint")),
167
- tooltip: ( localize(6159, "Disable Empty Editor Hint")),
168
- enabled: true,
169
- class: undefined,
170
- run: () => {
171
- disableHint();
172
- }
178
+ id: "workench.action.disableEmptyEditorHint",
179
+ label: ( localize(6472, "Disable Empty Editor Hint")),
180
+ tooltip: ( localize(6472, "Disable Empty Editor Hint")),
181
+ enabled: true,
182
+ class: undefined,
183
+ run: () => {
184
+ disableHint();
173
185
  }
174
- ];
186
+ }];
175
187
  }
176
188
  });
177
189
  }
@@ -181,33 +193,35 @@ let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget ex
181
193
  disposables: this._store,
182
194
  callback: (index, event) => {
183
195
  switch (index) {
184
- case '0':
185
- hasInlineChatProvider ? askSomething(event.browserEvent) : languageOnClickOrTap(event.browserEvent);
186
- break;
187
- case '1':
188
- hasInlineChatProvider ? languageOnClickOrTap(event.browserEvent) : this.disableHint();
189
- break;
190
- case '2':
191
- this.disableHint();
192
- break;
196
+ case "0":
197
+ hasInlineChatProvider ? askSomething(event.browserEvent) : languageOnClickOrTap(event.browserEvent);
198
+ break;
199
+ case "1":
200
+ hasInlineChatProvider ? languageOnClickOrTap(event.browserEvent) : this.disableHint();
201
+ break;
202
+ case "2":
203
+ this.disableHint();
204
+ break;
193
205
  }
194
206
  }
195
207
  };
196
- const askSomethingCommandId = 'inlineChat.start';
197
- const askSomething = async (e) => {
208
+ const askSomethingCommandId = "inlineChat.start";
209
+ const askSomething = async e => {
198
210
  e.stopPropagation();
199
- this.telemetryService.publicLog2('workbenchActionExecuted', {
211
+ this.telemetryService.publicLog2("workbenchActionExecuted", {
200
212
  id: askSomethingCommandId,
201
- from: 'hint'
213
+ from: "hint"
214
+ });
215
+ await this.commandService.executeCommand(askSomethingCommandId, {
216
+ from: "hint"
202
217
  });
203
- await this.commandService.executeCommand(askSomethingCommandId, { from: 'hint' });
204
218
  };
205
- const languageOnClickOrTap = async (e) => {
219
+ const languageOnClickOrTap = async e => {
206
220
  e.stopPropagation();
207
221
  this.editor.focus();
208
- this.telemetryService.publicLog2('workbenchActionExecuted', {
222
+ this.telemetryService.publicLog2("workbenchActionExecuted", {
209
223
  id: ChangeLanguageAction.ID,
210
- from: 'hint'
224
+ from: "hint"
211
225
  });
212
226
  await this.commandService.executeCommand(ChangeLanguageAction.ID);
213
227
  this.editor.focus();
@@ -215,60 +229,67 @@ let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget ex
215
229
  const keybindingsLookup = [askSomethingCommandId, ChangeLanguageAction.ID];
216
230
  const keybindingLabels = ( keybindingsLookup.map(id => this.keybindingService.lookupKeybinding(id)?.getLabel()));
217
231
  const hintMsg = (hasInlineChatProvider ? ( localize(
218
- 6160,
219
- '[[Generate code]] ({0}), or [[select a language]] ({1}). Start typing to dismiss or [[don\'t show]] this again.',
220
- keybindingLabels.at(0) ?? '',
221
- keybindingLabels.at(1) ?? ''
232
+ 6473,
233
+ "[[Generate code]] ({0}), or [[select a language]] ({1}). Start typing to dismiss or [[don't show]] this again.",
234
+ keybindingLabels.at(0) ?? "",
235
+ keybindingLabels.at(1) ?? ""
222
236
  )) : ( localize(
223
- 6161,
224
- '[[Select a language]] ({0}) to get started. Start typing to dismiss or [[don\'t show]] this again.',
225
- keybindingLabels.at(1) ?? ''
226
- ))).replaceAll(' ()', '');
237
+ 6474,
238
+ "[[Select a language]] ({0}) to get started. Start typing to dismiss or [[don't show]] this again.",
239
+ keybindingLabels.at(1) ?? ""
240
+ ))).replaceAll(" ()", "");
227
241
  const hintElement = renderFormattedText(hintMsg, {
228
242
  actionHandler: hintHandler,
229
- renderCodeSegments: false,
243
+ renderCodeSegments: false
230
244
  });
231
- hintElement.style.fontStyle = 'italic';
232
- const ariaLabel = hasInlineChatProvider ?
233
- ( localize(
234
- 6162,
235
- 'Execute {0} to ask a question, execute {1} to select a language and get started. Start typing to dismiss.',
245
+ hintElement.style.fontStyle = "italic";
246
+ const ariaLabel = hasInlineChatProvider ? ( localize(
247
+ 6475,
248
+ "Execute {0} to ask a question, execute {1} to select a language and get started. Start typing to dismiss.",
236
249
  ...keybindingLabels
237
- )) :
238
- ( localize(
239
- 6163,
240
- 'Execute {0} to select a language and get started. Start typing to dismiss.',
250
+ )) : ( localize(
251
+ 6476,
252
+ "Execute {0} to select a language and get started. Start typing to dismiss.",
241
253
  ...keybindingLabels
242
254
  ));
243
- for (const anchor of hintElement.querySelectorAll('a')) {
244
- anchor.style.cursor = 'pointer';
255
+ for (const anchor of hintElement.querySelectorAll("a")) {
256
+ anchor.style.cursor = "pointer";
245
257
  }
246
- return { hintElement, ariaLabel };
258
+ return {
259
+ hintElement,
260
+ ariaLabel
261
+ };
247
262
  }
248
263
  getDomNode() {
249
264
  if (!this.domNode) {
250
- this.domNode = $('.empty-editor-hint');
251
- this.domNode.style.width = 'max-content';
252
- this.domNode.style.paddingLeft = '4px';
253
- const { hintElement, ariaLabel } = this.getHint();
265
+ this.domNode = $(".empty-editor-hint");
266
+ this.domNode.style.width = "max-content";
267
+ this.domNode.style.paddingLeft = "4px";
268
+ const {
269
+ hintElement,
270
+ ariaLabel
271
+ } = this.getHint();
254
272
  this.domNode.append(hintElement);
255
273
  this.ariaLabel = ariaLabel.concat(( localize(
256
- 6164,
257
- ' Toggle {0} in settings to disable this hint.',
274
+ 6477,
275
+ " Toggle {0} in settings to disable this hint.",
258
276
  AccessibilityVerbositySettingId.EmptyEditorHint
259
277
  )));
260
- this._register(addDisposableListener(this.domNode, 'click', () => {
278
+ this._register(addDisposableListener(this.domNode, "click", () => {
261
279
  this.editor.focus();
262
280
  }));
263
281
  this.editor.applyFontInfo(this.domNode);
264
282
  const lineHeight = this.editor.getLineHeightForPosition(( new Position(1, 1)));
265
- this.domNode.style.lineHeight = lineHeight + 'px';
283
+ this.domNode.style.lineHeight = lineHeight + "px";
266
284
  }
267
285
  return this.domNode;
268
286
  }
269
287
  getPosition() {
270
288
  return {
271
- position: { lineNumber: 1, column: 1 },
289
+ position: {
290
+ lineNumber: 1,
291
+ column: 1
292
+ },
272
293
  preference: [ContentWidgetPositionPreference.EXACT]
273
294
  };
274
295
  }
@@ -277,14 +298,11 @@ let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget ex
277
298
  this.editor.removeContentWidget(this);
278
299
  }
279
300
  };
280
- EmptyTextEditorHintContentWidget = EmptyTextEditorHintContentWidget_1 = ( __decorate([
281
- ( __param(1, ICommandService)),
282
- ( __param(2, IConfigurationService)),
283
- ( __param(3, IKeybindingService)),
284
- ( __param(4, IChatAgentService)),
285
- ( __param(5, ITelemetryService)),
286
- ( __param(6, IContextMenuService))
287
- ], EmptyTextEditorHintContentWidget));
288
- registerEditorContribution(EmptyTextEditorHintContribution.ID, EmptyTextEditorHintContribution, EditorContributionInstantiation.Eager);
301
+ EmptyTextEditorHintContentWidget = EmptyTextEditorHintContentWidget_1 = ( __decorate([( __param(1, ICommandService)), ( __param(2, IConfigurationService)), ( __param(3, IKeybindingService)), ( __param(4, IChatAgentService)), ( __param(5, ITelemetryService)), ( __param(6, IContextMenuService))], EmptyTextEditorHintContentWidget));
302
+ registerEditorContribution(
303
+ EmptyTextEditorHintContribution.ID,
304
+ EmptyTextEditorHintContribution,
305
+ EditorContributionInstantiation.Eager
306
+ );
289
307
 
290
308
  export { EmptyTextEditorHintContribution, emptyTextEditorHintSetting };