@codingame/monaco-vscode-notebook-service-override 16.1.1 → 17.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 (87) hide show
  1. package/index.js +2 -2
  2. package/package.json +26 -24
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +7 -24
  4. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +88 -166
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +27 -27
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +1 -1
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +10 -3
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +9 -9
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +1 -1
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +4 -4
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +1 -1
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +4 -4
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +2 -2
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +10 -10
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +1 -1
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +4 -4
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +4 -11
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +11 -26
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +12 -12
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +1 -1
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +7 -7
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +7 -7
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +4 -4
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -2
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +1 -1
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +12 -12
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +1 -1
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +18 -18
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.d.ts +1 -1
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +4 -4
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +3 -3
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +2 -2
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +4 -4
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +4 -4
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +14 -14
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +14 -14
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +1 -1
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +5 -5
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +1 -1
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +4 -4
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +34 -34
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +23 -52
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +31 -31
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +30 -30
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +2 -2
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +28 -28
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +20 -20
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +8 -8
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +2 -2
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +17 -17
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +4 -4
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +26 -26
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +6 -0
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +111 -84
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +11 -11
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +3 -3
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.d.ts +89 -0
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +292 -0
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.d.ts +39 -0
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +93 -0
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +2 -2
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +4 -4
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +2 -2
  72. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +1 -1
  74. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
  75. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +4 -4
  76. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
  77. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +2 -2
  78. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +7 -7
  79. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +3 -3
  80. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +1 -1
  82. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +1 -1
  83. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +2 -2
  84. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +1 -1
  85. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +1 -1
  86. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
  87. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
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-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory';
34
- import { NotebookOriginalModelReferenceFactory } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory';
33
+ import { OriginalNotebookCellModelFactory } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory';
34
+ import { NotebookOriginalModelReferenceFactory } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory';
35
35
  import './vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js';
36
36
 
37
37
  function getServiceOverride() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-notebook-service-override",
3
- "version": "16.1.1",
3
+ "version": "17.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - notebook service-override",
6
6
  "keywords": [],
@@ -15,29 +15,31 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-0cd5242b-7b61-5f66-ac25-ffa40baf8e8f-common": "16.1.1",
19
- "@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "16.1.1",
20
- "@codingame/monaco-vscode-29bc1406-2925-5b8f-b25e-d04a7772d896-common": "16.1.1",
21
- "@codingame/monaco-vscode-2bd6777a-3bff-5b83-ad25-0e029e81ffe9-common": "16.1.1",
22
- "@codingame/monaco-vscode-3109a756-1f83-5d09-945b-9f0fcad928f0-common": "16.1.1",
23
- "@codingame/monaco-vscode-3a00040f-b81b-50bc-88da-35f611c0bd1e-common": "16.1.1",
24
- "@codingame/monaco-vscode-4e719823-8b6e-554d-b01a-5670b53fbb19-common": "16.1.1",
25
- "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "16.1.1",
26
- "@codingame/monaco-vscode-68b3311c-eb96-5711-8f72-f5f4b2e31932-common": "16.1.1",
27
- "@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common": "16.1.1",
28
- "@codingame/monaco-vscode-805e9c2f-56b6-5a43-8b5b-d2dc2d3805fc-common": "16.1.1",
29
- "@codingame/monaco-vscode-86d65fc6-30f9-5dca-9501-e249de688591-common": "16.1.1",
30
- "@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common": "16.1.1",
31
- "@codingame/monaco-vscode-897bebad-39df-57cb-8a57-36a271d038be-common": "16.1.1",
32
- "@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common": "16.1.1",
33
- "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common": "16.1.1",
34
- "@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common": "16.1.1",
35
- "@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common": "16.1.1",
36
- "@codingame/monaco-vscode-a3f28a41-ba19-5a7e-8f5a-d6c1403b507d-common": "16.1.1",
37
- "@codingame/monaco-vscode-api": "16.1.1",
38
- "@codingame/monaco-vscode-b99aef83-0d60-5e8c-a62e-9908b6256f35-common": "16.1.1",
39
- "@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common": "16.1.1",
40
- "@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common": "16.1.1",
18
+ "@codingame/monaco-vscode-0cd5242b-7b61-5f66-ac25-ffa40baf8e8f-common": "17.0.0",
19
+ "@codingame/monaco-vscode-3109a756-1f83-5d09-945b-9f0fcad928f0-common": "17.0.0",
20
+ "@codingame/monaco-vscode-324f9a6e-6231-5bfc-af17-e147abd2dfd2-common": "17.0.0",
21
+ "@codingame/monaco-vscode-3a00040f-b81b-50bc-88da-35f611c0bd1e-common": "17.0.0",
22
+ "@codingame/monaco-vscode-407531d3-fdae-5387-8c41-49ba0e9574b5-common": "17.0.0",
23
+ "@codingame/monaco-vscode-4e719823-8b6e-554d-b01a-5670b53fbb19-common": "17.0.0",
24
+ "@codingame/monaco-vscode-51fed910-d648-5620-9b80-9232cd79d116-common": "17.0.0",
25
+ "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "17.0.0",
26
+ "@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common": "17.0.0",
27
+ "@codingame/monaco-vscode-86d65fc6-30f9-5dca-9501-e249de688591-common": "17.0.0",
28
+ "@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common": "17.0.0",
29
+ "@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common": "17.0.0",
30
+ "@codingame/monaco-vscode-9ee79c1a-3f03-568b-8eac-b02513a98b68-common": "17.0.0",
31
+ "@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common": "17.0.0",
32
+ "@codingame/monaco-vscode-api": "17.0.0",
33
+ "@codingame/monaco-vscode-b99aef83-0d60-5e8c-a62e-9908b6256f35-common": "17.0.0",
34
+ "@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common": "17.0.0",
35
+ "@codingame/monaco-vscode-bed2b49f-41ae-5ed2-b61a-1105500a3f8a-common": "17.0.0",
36
+ "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common": "17.0.0",
37
+ "@codingame/monaco-vscode-c8227507-8e59-53d6-b50b-71c0ab384cf4-common": "17.0.0",
38
+ "@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "17.0.0",
39
+ "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "17.0.0",
40
+ "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "17.0.0",
41
+ "@codingame/monaco-vscode-ecf3436d-6064-5fbd-a760-37a211ce79c7-common": "17.0.0",
42
+ "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "17.0.0",
41
43
  "marked": "14.0.0"
42
44
  },
43
45
  "main": "index.js",
@@ -1,38 +1,21 @@
1
- import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
3
- import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
4
3
  import { IEditorContribution } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon";
5
4
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
6
- import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
7
- import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
8
5
  import { IInlineChatSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service";
9
- import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
10
- import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
11
- import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
12
6
  import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
13
- import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
14
- export interface IEmptyTextEditorHintOptions {
15
- readonly clickable?: boolean;
16
- }
7
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
17
8
  export declare const emptyTextEditorHintSetting = "workbench.editor.empty.hint";
18
- export declare class EmptyTextEditorHintContribution implements IEditorContribution {
9
+ export declare class EmptyTextEditorHintContribution extends Disposable implements IEditorContribution {
19
10
  protected readonly editor: ICodeEditor;
20
- private readonly editorGroupsService;
21
- private readonly commandService;
22
- protected readonly configurationService: IConfigurationService;
23
- protected readonly hoverService: IHoverService;
24
- private readonly keybindingService;
11
+ private readonly configurationService;
25
12
  private readonly inlineChatSessionService;
26
13
  private readonly chatAgentService;
27
- private readonly telemetryService;
28
- protected readonly productService: IProductService;
29
- private readonly contextMenuService;
14
+ private readonly instantiationService;
30
15
  static readonly ID = "editor.contrib.emptyTextEditorHint";
31
- protected toDispose: IDisposable[];
32
16
  private textHintContentWidget;
33
- constructor(editor: ICodeEditor, editorGroupsService: IEditorGroupsService, commandService: ICommandService, configurationService: IConfigurationService, hoverService: IHoverService, keybindingService: IKeybindingService, inlineChatSessionService: IInlineChatSessionService, chatAgentService: IChatAgentService, telemetryService: ITelemetryService, productService: IProductService, contextMenuService: IContextMenuService);
34
- protected _getOptions(): IEmptyTextEditorHintOptions;
35
- protected _shouldRenderHint(): boolean;
17
+ constructor(editor: ICodeEditor, configurationService: IConfigurationService, inlineChatSessionService: IInlineChatSessionService, chatAgentService: IChatAgentService, instantiationService: IInstantiationService);
18
+ protected shouldRenderHint(): boolean;
36
19
  protected update(): void;
37
20
  dispose(): void;
38
21
  }
@@ -2,8 +2,8 @@
2
2
  import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
4
  import * as emptyTextEditorHint from './emptyTextEditorHint.css';
5
- import { $ as $$1, getActiveWindow, addDisposableListener, EventType } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
- import { dispose, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { getActiveWindow, $, addDisposableListener } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
7
7
  import { ContentWidgetPositionPreference } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
8
8
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
9
9
  import { ChangeLanguageAction } from '@codingame/monaco-vscode-3109a756-1f83-5d09-945b-9f0fcad928f0-common/vscode/vs/workbench/browser/parts/editor/editorStatus';
@@ -20,68 +20,55 @@ import { renderFormattedText } from '@codingame/monaco-vscode-api/vscode/vs/base
20
20
  import { ApplyFileSnippetAction } from '@codingame/monaco-vscode-4e719823-8b6e-554d-b01a-5670b53fbb19-common/vscode/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets';
21
21
  import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
22
22
  import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
23
- import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
24
- import { KeybindingLabel } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/keybindingLabel/keybindingLabel';
25
- import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
26
23
  import { status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
27
24
  import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
28
25
  import { OUTPUT_MODE_ID, LOG_MODE_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/output/common/output';
29
26
  import { SEARCH_RESULT_LANGUAGE_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search';
30
- import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
31
- import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
32
27
  import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
33
28
  import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
34
29
  import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
35
30
  import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
31
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
36
32
 
33
+ var EmptyTextEditorHintContentWidget_1;
37
34
  registerCss(emptyTextEditorHint);
38
- const $ = $$1;
39
35
  const emptyTextEditorHintSetting = 'workbench.editor.empty.hint';
40
- let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
36
+ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution extends Disposable {
41
37
  static { this.ID = 'editor.contrib.emptyTextEditorHint'; }
42
- constructor(editor, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService, contextMenuService) {
38
+ constructor(editor, configurationService, inlineChatSessionService, chatAgentService, instantiationService) {
39
+ super();
43
40
  this.editor = editor;
44
- this.editorGroupsService = editorGroupsService;
45
- this.commandService = commandService;
46
41
  this.configurationService = configurationService;
47
- this.hoverService = hoverService;
48
- this.keybindingService = keybindingService;
49
42
  this.inlineChatSessionService = inlineChatSessionService;
50
43
  this.chatAgentService = chatAgentService;
51
- this.telemetryService = telemetryService;
52
- this.productService = productService;
53
- this.contextMenuService = contextMenuService;
54
- this.toDispose = [];
55
- this.toDispose.push(this.editor.onDidChangeModel(() => this.update()));
56
- this.toDispose.push(this.editor.onDidChangeModelLanguage(() => this.update()));
57
- this.toDispose.push(this.editor.onDidChangeModelContent(() => this.update()));
58
- this.toDispose.push(this.chatAgentService.onDidChangeAgents(() => this.update()));
59
- this.toDispose.push(this.editor.onDidChangeModelDecorations(() => this.update()));
60
- this.toDispose.push(this.editor.onDidChangeConfiguration((e) => {
44
+ this.instantiationService = instantiationService;
45
+ this._register(this.editor.onDidChangeModel(() => this.update()));
46
+ this._register(this.editor.onDidChangeModelLanguage(() => this.update()));
47
+ this._register(this.editor.onDidChangeModelContent(() => this.update()));
48
+ this._register(this.chatAgentService.onDidChangeAgents(() => this.update()));
49
+ this._register(this.editor.onDidChangeModelDecorations(() => this.update()));
50
+ this._register(this.editor.onDidChangeConfiguration((e) => {
61
51
  if (e.hasChanged(EditorOption.readOnly)) {
62
52
  this.update();
63
53
  }
64
54
  }));
65
- this.toDispose.push(this.configurationService.onDidChangeConfiguration(e => {
55
+ this._register(this.configurationService.onDidChangeConfiguration(e => {
66
56
  if (e.affectsConfiguration(emptyTextEditorHintSetting)) {
67
57
  this.update();
68
58
  }
69
59
  }));
70
- this.toDispose.push(inlineChatSessionService.onWillStartSession(editor => {
60
+ this._register(inlineChatSessionService.onWillStartSession(editor => {
71
61
  if (this.editor === editor) {
72
62
  this.textHintContentWidget?.dispose();
73
63
  }
74
64
  }));
75
- this.toDispose.push(inlineChatSessionService.onDidEndSession(e => {
65
+ this._register(inlineChatSessionService.onDidEndSession(e => {
76
66
  if (this.editor === e.editor) {
77
67
  this.update();
78
68
  }
79
69
  }));
80
70
  }
81
- _getOptions() {
82
- return { clickable: true };
83
- }
84
- _shouldRenderHint() {
71
+ shouldRenderHint() {
85
72
  const configValue = this.configurationService.getValue(emptyTextEditorHintSetting);
86
73
  if (configValue === 'hidden') {
87
74
  return false;
@@ -112,21 +99,9 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
112
99
  return hasEditorAgents || shouldRenderDefaultHint;
113
100
  }
114
101
  update() {
115
- const shouldRenderHint = this._shouldRenderHint();
102
+ const shouldRenderHint = this.shouldRenderHint();
116
103
  if (shouldRenderHint && !this.textHintContentWidget) {
117
- this.textHintContentWidget = ( new EmptyTextEditorHintContentWidget(
118
- this.editor,
119
- this._getOptions(),
120
- this.editorGroupsService,
121
- this.commandService,
122
- this.configurationService,
123
- this.hoverService,
124
- this.keybindingService,
125
- this.chatAgentService,
126
- this.telemetryService,
127
- this.productService,
128
- this.contextMenuService
129
- ));
104
+ this.textHintContentWidget = this.instantiationService.createInstance(EmptyTextEditorHintContentWidget, this.editor);
130
105
  }
131
106
  else if (!shouldRenderHint && this.textHintContentWidget) {
132
107
  this.textHintContentWidget.dispose();
@@ -134,46 +109,38 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
134
109
  }
135
110
  }
136
111
  dispose() {
137
- dispose(this.toDispose);
112
+ super.dispose();
138
113
  this.textHintContentWidget?.dispose();
139
114
  }
140
115
  };
141
116
  EmptyTextEditorHintContribution = ( __decorate([
142
- ( __param(1, IEditorGroupsService)),
143
- ( __param(2, ICommandService)),
144
- ( __param(3, IConfigurationService)),
145
- ( __param(4, IHoverService)),
146
- ( __param(5, IKeybindingService)),
147
- ( __param(6, IInlineChatSessionService)),
148
- ( __param(7, IChatAgentService)),
149
- ( __param(8, ITelemetryService)),
150
- ( __param(9, IProductService)),
151
- ( __param(10, IContextMenuService))
117
+ ( __param(1, IConfigurationService)),
118
+ ( __param(2, IInlineChatSessionService)),
119
+ ( __param(3, IChatAgentService)),
120
+ ( __param(4, IInstantiationService))
152
121
  ], EmptyTextEditorHintContribution));
153
- class EmptyTextEditorHintContentWidget {
122
+ let EmptyTextEditorHintContentWidget = class EmptyTextEditorHintContentWidget extends Disposable {
123
+ static { EmptyTextEditorHintContentWidget_1 = this; }
154
124
  static { this.ID = 'editor.widget.emptyHint'; }
155
- constructor(editor, options, editorGroupsService, commandService, configurationService, hoverService, keybindingService, chatAgentService, telemetryService, productService, contextMenuService) {
125
+ constructor(editor, editorGroupsService, commandService, configurationService, keybindingService, chatAgentService, telemetryService, contextMenuService) {
126
+ super();
156
127
  this.editor = editor;
157
- this.options = options;
158
128
  this.editorGroupsService = editorGroupsService;
159
129
  this.commandService = commandService;
160
130
  this.configurationService = configurationService;
161
- this.hoverService = hoverService;
162
131
  this.keybindingService = keybindingService;
163
132
  this.chatAgentService = chatAgentService;
164
133
  this.telemetryService = telemetryService;
165
- this.productService = productService;
166
134
  this.contextMenuService = contextMenuService;
167
135
  this.isVisible = false;
168
136
  this.ariaLabel = '';
169
- this.toDispose = ( new DisposableStore());
170
- this.toDispose.add(this.editor.onDidChangeConfiguration((e) => {
137
+ this._register(this.editor.onDidChangeConfiguration((e) => {
171
138
  if (this.domNode && e.hasChanged(EditorOption.fontInfo)) {
172
139
  this.editor.applyFontInfo(this.domNode);
173
140
  }
174
141
  }));
175
142
  const onDidFocusEditorText = Event.debounce(this.editor.onDidFocusEditorText, () => undefined, 500);
176
- this.toDispose.add(onDidFocusEditorText(() => {
143
+ this._register(onDidFocusEditorText(() => {
177
144
  if (this.editor.hasTextFocus() && this.isVisible && this.ariaLabel && this.configurationService.getValue(AccessibilityVerbositySettingId.EmptyEditorHint)) {
178
145
  status(this.ariaLabel);
179
146
  }
@@ -181,9 +148,9 @@ class EmptyTextEditorHintContentWidget {
181
148
  this.editor.addContentWidget(this);
182
149
  }
183
150
  getId() {
184
- return EmptyTextEditorHintContentWidget.ID;
151
+ return EmptyTextEditorHintContentWidget_1.ID;
185
152
  }
186
- _disableHint(e) {
153
+ disableHint(e) {
187
154
  const disableHint = () => {
188
155
  this.configurationService.updateValue(emptyTextEditorHintSetting, 'hidden');
189
156
  this.dispose();
@@ -198,8 +165,8 @@ class EmptyTextEditorHintContentWidget {
198
165
  getActions: () => {
199
166
  return [{
200
167
  id: 'workench.action.disableEmptyEditorHint',
201
- label: ( localize(5052, "Disable Empty Editor Hint")),
202
- tooltip: ( localize(5052, "Disable Empty Editor Hint")),
168
+ label: ( localize(5138, "Disable Empty Editor Hint")),
169
+ tooltip: ( localize(5138, "Disable Empty Editor Hint")),
203
170
  enabled: true,
204
171
  class: undefined,
205
172
  run: () => {
@@ -210,101 +177,36 @@ class EmptyTextEditorHintContentWidget {
210
177
  }
211
178
  });
212
179
  }
213
- _getHintInlineChat(providers) {
214
- const providerName = (providers.length === 1 ? providers[0].fullName : undefined) ?? this.productService.nameShort;
215
- const inlineChatId = 'inlineChat.start';
216
- let ariaLabel = `Ask ${providerName} something or start typing to dismiss.`;
217
- const handleClick = () => {
218
- this.telemetryService.publicLog2('workbenchActionExecuted', {
219
- id: 'inlineChat.hintAction',
220
- from: 'hint'
221
- });
222
- this.commandService.executeCommand(inlineChatId, { from: 'hint' });
223
- };
224
- const hintHandler = {
225
- disposables: this.toDispose,
226
- callback: (index, _event) => {
227
- switch (index) {
228
- case '0':
229
- handleClick();
230
- break;
231
- }
232
- }
233
- };
234
- const hintElement = $('empty-hint-text');
235
- hintElement.style.display = 'block';
236
- const keybindingHint = this.keybindingService.lookupKeybinding(inlineChatId);
237
- const keybindingHintLabel = keybindingHint?.getLabel();
238
- if (keybindingHint && keybindingHintLabel) {
239
- const actionPart = ( localize(
240
- 5053,
241
- 'Press {0} to ask {1} to do something. ',
242
- keybindingHintLabel,
243
- providerName
244
- ));
245
- const [before, after] = ( actionPart.split(keybindingHintLabel).map((fragment) => {
246
- if (this.options.clickable) {
247
- const hintPart = $('a', undefined, fragment);
248
- hintPart.style.fontStyle = 'italic';
249
- hintPart.style.cursor = 'pointer';
250
- this.toDispose.add(addDisposableListener(hintPart, EventType.CONTEXT_MENU, (e) => this._disableHint(e)));
251
- this.toDispose.add(addDisposableListener(hintPart, EventType.CLICK, handleClick));
252
- return hintPart;
253
- }
254
- else {
255
- const hintPart = $('span', undefined, fragment);
256
- hintPart.style.fontStyle = 'italic';
257
- return hintPart;
258
- }
259
- }));
260
- hintElement.appendChild(before);
261
- const label = hintHandler.disposables.add(( new KeybindingLabel(hintElement, OS)));
262
- label.set(keybindingHint);
263
- label.element.style.width = 'min-content';
264
- label.element.style.display = 'inline';
265
- if (this.options.clickable) {
266
- label.element.style.cursor = 'pointer';
267
- this.toDispose.add(addDisposableListener(label.element, EventType.CONTEXT_MENU, (e) => this._disableHint(e)));
268
- this.toDispose.add(addDisposableListener(label.element, EventType.CLICK, handleClick));
269
- }
270
- hintElement.appendChild(after);
271
- const typeToDismiss = ( localize(5054, 'Start typing to dismiss.'));
272
- const textHint2 = $('span', undefined, typeToDismiss);
273
- textHint2.style.fontStyle = 'italic';
274
- hintElement.appendChild(textHint2);
275
- ariaLabel = actionPart.concat(typeToDismiss);
276
- }
277
- else {
278
- const hintMsg = ( localize(
279
- 5055,
280
- '[[Ask {0} to do something]] or start typing to dismiss.',
281
- providerName
282
- ));
283
- const rendered = renderFormattedText(hintMsg, { actionHandler: hintHandler });
284
- hintElement.appendChild(rendered);
285
- }
286
- return { ariaLabel, hintElement };
287
- }
288
- _getHintDefault() {
180
+ getHint() {
181
+ const hasInlineChatProvider = this.chatAgentService.getActivatedAgents().filter(candidate => candidate.locations.includes(ChatAgentLocation.Editor)).length > 0;
289
182
  const hintHandler = {
290
- disposables: this.toDispose,
183
+ disposables: this._store,
291
184
  callback: (index, event) => {
292
185
  switch (index) {
293
186
  case '0':
294
- languageOnClickOrTap(event.browserEvent);
187
+ hasInlineChatProvider ? askSomething(event.browserEvent) : languageOnClickOrTap(event.browserEvent);
295
188
  break;
296
189
  case '1':
297
- snippetOnClickOrTap(event.browserEvent);
190
+ hasInlineChatProvider ? languageOnClickOrTap(event.browserEvent) : snippetOnClickOrTap(event.browserEvent);
298
191
  break;
299
192
  case '2':
300
- chooseEditorOnClickOrTap(event.browserEvent);
193
+ hasInlineChatProvider ? snippetOnClickOrTap(event.browserEvent) : chooseEditorOnClickOrTap(event.browserEvent);
301
194
  break;
302
195
  case '3':
303
- this._disableHint();
196
+ this.disableHint();
304
197
  break;
305
198
  }
306
199
  }
307
200
  };
201
+ const askSomethingCommandId = 'inlineChat.start';
202
+ const askSomething = async (e) => {
203
+ e.stopPropagation();
204
+ this.telemetryService.publicLog2('workbenchActionExecuted', {
205
+ id: askSomethingCommandId,
206
+ from: 'hint'
207
+ });
208
+ await this.commandService.executeCommand(askSomethingCommandId, { from: 'hint' });
209
+ };
308
210
  const languageOnClickOrTap = async (e) => {
309
211
  e.stopPropagation();
310
212
  this.editor.focus();
@@ -335,27 +237,39 @@ class EmptyTextEditorHintContentWidget {
335
237
  this.editorGroupsService.activeGroup.closeEditor(activeEditorInput, { preserveFocus: true });
336
238
  }
337
239
  };
338
- const hintMsg = ( localize(
339
- 5056,
340
- '[[Select a language]], or [[fill with template]], or [[open a different editor]] to get started.\nStart typing to dismiss or [[don\'t show]] this again.'
341
- ));
240
+ const keybindingsLookup = hasInlineChatProvider ? [askSomethingCommandId, ChangeLanguageAction.ID, ApplyFileSnippetAction.Id] : [ChangeLanguageAction.ID, ApplyFileSnippetAction.Id, 'welcome.showNewFileEntries'];
241
+ const keybindingLabels = ( keybindingsLookup.map(id => this.keybindingService.lookupKeybinding(id)?.getLabel()));
242
+ const hintMsg = (hasInlineChatProvider ? ( localize(
243
+ 5139,
244
+ '[[Open chat]] ({0}), or [[select a language]] ({1}), or [[fill with template]] ({2}) to get started.\nStart typing to dismiss or [[don\'t show]] this again.',
245
+ keybindingLabels.at(0) ?? '',
246
+ keybindingLabels.at(1) ?? '',
247
+ keybindingLabels.at(2) ?? ''
248
+ )) : ( localize(
249
+ 5140,
250
+ '[[Select a language]] ({0}), or [[fill with template]] ({1}), or [[open a different editor]] ({2}) to get started.\nStart typing to dismiss or [[don\'t show]] this again.',
251
+ keybindingLabels.at(0) ?? '',
252
+ keybindingLabels.at(1) ?? '',
253
+ keybindingLabels.at(2) ?? ''
254
+ ))).replaceAll('()', '');
342
255
  const hintElement = renderFormattedText(hintMsg, {
343
256
  actionHandler: hintHandler,
344
257
  renderCodeSegments: false,
345
258
  });
346
259
  hintElement.style.fontStyle = 'italic';
347
- const keybindingsLookup = [ChangeLanguageAction.ID, ApplyFileSnippetAction.Id, 'welcome.showNewFileEntries'];
348
- const keybindingLabels = ( keybindingsLookup.map((id) => this.keybindingService.lookupKeybinding(id)?.getLabel() ?? id));
349
- const ariaLabel = ( localize(
350
- 5057,
260
+ const ariaLabel = hasInlineChatProvider ?
261
+ ( localize(
262
+ 5141,
263
+ 'Execute {0} to ask a question, execute {1} to select a language, or execute {2} to fill with template and get started. Start typing to dismiss.',
264
+ ...keybindingLabels
265
+ )) :
266
+ ( localize(
267
+ 5142,
351
268
  'Execute {0} to select a language, execute {1} to fill with template, or execute {2} to open a different editor and get started. Start typing to dismiss.',
352
269
  ...keybindingLabels
353
270
  ));
354
271
  for (const anchor of hintElement.querySelectorAll('a')) {
355
272
  anchor.style.cursor = 'pointer';
356
- const id = keybindingsLookup.shift();
357
- const title = id && this.keybindingService.lookupKeybinding(id)?.getLabel();
358
- hintHandler.disposables.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), anchor, title ?? ''));
359
273
  }
360
274
  return { hintElement, ariaLabel };
361
275
  }
@@ -364,15 +278,14 @@ class EmptyTextEditorHintContentWidget {
364
278
  this.domNode = $('.empty-editor-hint');
365
279
  this.domNode.style.width = 'max-content';
366
280
  this.domNode.style.paddingLeft = '4px';
367
- const inlineChatProviders = this.chatAgentService.getActivatedAgents().filter(candidate => candidate.locations.includes(ChatAgentLocation.Editor));
368
- const { hintElement, ariaLabel } = !inlineChatProviders.length ? this._getHintDefault() : this._getHintInlineChat(inlineChatProviders);
281
+ const { hintElement, ariaLabel } = this.getHint();
369
282
  this.domNode.append(hintElement);
370
283
  this.ariaLabel = ariaLabel.concat(( localize(
371
- 5058,
284
+ 5143,
372
285
  ' Toggle {0} in settings to disable this hint.',
373
286
  AccessibilityVerbositySettingId.EmptyEditorHint
374
287
  )));
375
- this.toDispose.add(addDisposableListener(this.domNode, 'click', () => {
288
+ this._register(addDisposableListener(this.domNode, 'click', () => {
376
289
  this.editor.focus();
377
290
  }));
378
291
  this.editor.applyFontInfo(this.domNode);
@@ -386,10 +299,19 @@ class EmptyTextEditorHintContentWidget {
386
299
  };
387
300
  }
388
301
  dispose() {
302
+ super.dispose();
389
303
  this.editor.removeContentWidget(this);
390
- dispose(this.toDispose);
391
304
  }
392
- }
305
+ };
306
+ EmptyTextEditorHintContentWidget = EmptyTextEditorHintContentWidget_1 = ( __decorate([
307
+ ( __param(1, IEditorGroupsService)),
308
+ ( __param(2, ICommandService)),
309
+ ( __param(3, IConfigurationService)),
310
+ ( __param(4, IKeybindingService)),
311
+ ( __param(5, IChatAgentService)),
312
+ ( __param(6, ITelemetryService)),
313
+ ( __param(7, IContextMenuService))
314
+ ], EmptyTextEditorHintContentWidget));
393
315
  registerEditorContribution(EmptyTextEditorHintContribution.ID, EmptyTextEditorHintContribution, EditorContributionInstantiation.Eager);
394
316
 
395
317
  export { EmptyTextEditorHintContribution, emptyTextEditorHintSetting };