@codingame/monaco-vscode-chat-service-override 14.0.6 → 15.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 (110) hide show
  1. package/index.js +14 -8
  2. package/package.json +20 -20
  3. package/vscode/src/vs/base/common/objectCache.d.ts +1 -1
  4. package/vscode/src/vs/base/common/objectCache.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +43 -42
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +10 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +40 -0
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.d.ts +17 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.js +142 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +25 -25
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +2 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +252 -260
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -4
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +1 -1
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -1
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +8 -4
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +12 -41
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +7 -5
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +31 -29
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +151 -69
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.d.ts +4 -3
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +4 -4
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.d.ts +10 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +38 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +9 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +379 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/{chatEditingService.d.ts → chatEditingServiceImpl.d.ts} +12 -28
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +423 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +3 -3
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +6 -7
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +38 -38
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +16 -6
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +93 -24
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +21 -2
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +101 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +146 -126
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +39 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +386 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +4 -12
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +8 -91
  50. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +7 -11
  52. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  53. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +45 -45
  54. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +11 -19
  56. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css.js +6 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css.js +6 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +1 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +82 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +2 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +22 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +16 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +67 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.d.ts +9 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +17 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.d.ts +12 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +24 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.d.ts +6 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +78 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
  71. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +2 -0
  72. package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.d.ts +19 -0
  73. package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.js +13 -0
  74. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +12 -10
  75. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +26 -13
  76. package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.d.ts +31 -0
  77. package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.js +85 -0
  78. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +6 -2
  79. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +33 -27
  80. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +0 -10
  81. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +4 -0
  82. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +9 -0
  83. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +1 -1
  84. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +1 -1
  85. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.d.ts +4 -6
  86. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.js +15 -23
  87. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptPathAutocompletion.d.ts +22 -0
  88. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptPathAutocompletion.js +175 -0
  89. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +2 -3
  90. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +6 -7
  91. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +20 -0
  92. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +62 -0
  93. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +14 -0
  94. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +101 -0
  95. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +17 -17
  96. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  97. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  98. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -12
  99. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +2 -2
  100. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +4 -4
  101. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +1 -1
  102. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +31 -36
  103. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +0 -505
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +0 -104
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +0 -871
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +0 -54
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +0 -245
  109. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.d.ts +0 -39
  110. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.js +0 -314
@@ -2,17 +2,17 @@
2
2
  import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
3
  import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
4
4
  import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
5
- import { CHAT_CATEGORY, stringifyItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
5
+ import { CHAT_CATEGORY, stringifyItem } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
6
6
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
7
7
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
8
- import { isRequestVM, isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
8
+ import { isRequestVM, isResponseVM } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
9
9
 
10
10
  function registerChatCopyActions() {
11
11
  registerAction2(class CopyAllAction extends Action2 {
12
12
  constructor() {
13
13
  super({
14
14
  id: 'workbench.action.chat.copyAll',
15
- title: ( localize2(4304, "Copy All")),
15
+ title: ( localize2(4334, "Copy All")),
16
16
  f1: false,
17
17
  category: CHAT_CATEGORY,
18
18
  menu: {
@@ -42,7 +42,7 @@ function registerChatCopyActions() {
42
42
  constructor() {
43
43
  super({
44
44
  id: 'workbench.action.chat.copyItem',
45
- title: ( localize2(4305, "Copy")),
45
+ title: ( localize2(4335, "Copy")),
46
46
  f1: false,
47
47
  category: CHAT_CATEGORY,
48
48
  menu: {
@@ -13,7 +13,7 @@ class LogChatInputHistoryAction extends Action2 {
13
13
  constructor() {
14
14
  super({
15
15
  id: LogChatInputHistoryAction.ID,
16
- title: ( localize2(4306, "Log Chat Input History")),
16
+ title: ( localize2(4336, "Log Chat Input History")),
17
17
  icon: Codicon.attach,
18
18
  category: Categories.Developer,
19
19
  f1: true
@@ -3,17 +3,17 @@ import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/com
3
3
  import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
4
  import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
5
5
  import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
6
- import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
6
+ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
7
7
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
8
8
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
9
- import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
9
+ import { isResponseVM } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
10
10
 
11
11
  function registerChatFileTreeActions() {
12
12
  registerAction2(class NextFileTreeAction extends Action2 {
13
13
  constructor() {
14
14
  super({
15
15
  id: 'workbench.action.chat.nextFileTree',
16
- title: ( localize2(4328, "Next File Tree")),
16
+ title: ( localize2(4358, "Next File Tree")),
17
17
  keybinding: {
18
18
  primary: KeyMod.CtrlCmd | KeyCode.F9,
19
19
  weight: KeybindingWeight.WorkbenchContrib,
@@ -32,7 +32,7 @@ function registerChatFileTreeActions() {
32
32
  constructor() {
33
33
  super({
34
34
  id: 'workbench.action.chat.previousFileTree',
35
- title: ( localize2(4329, "Previous File Tree")),
35
+ title: ( localize2(4359, "Previous File Tree")),
36
36
  keybinding: {
37
37
  primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F9,
38
38
  weight: KeybindingWeight.WorkbenchContrib,
@@ -8,6 +8,7 @@ import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/w
8
8
  import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
9
9
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
10
10
  import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
11
+ import { IStatusbarService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar.service";
11
12
  export declare class ChatGettingStartedContribution extends Disposable implements IWorkbenchContribution {
12
13
  private readonly productService;
13
14
  private readonly extensionService;
@@ -17,10 +18,11 @@ export declare class ChatGettingStartedContribution extends Disposable implement
17
18
  private readonly viewDescriptorService;
18
19
  private readonly layoutService;
19
20
  private readonly configurationService;
21
+ private readonly statusbarService;
20
22
  static readonly ID = "workbench.contrib.chatGettingStarted";
21
23
  private recentlyInstalled;
22
24
  private static readonly hideWelcomeView;
23
- constructor(productService: IProductService, extensionService: IExtensionService, viewsService: IViewsService, extensionManagementService: IExtensionManagementService, storageService: IStorageService, viewDescriptorService: IViewDescriptorService, layoutService: IWorkbenchLayoutService, configurationService: IConfigurationService);
25
+ constructor(productService: IProductService, extensionService: IExtensionService, viewsService: IViewsService, extensionManagementService: IExtensionManagementService, storageService: IStorageService, viewDescriptorService: IViewDescriptorService, layoutService: IWorkbenchLayoutService, configurationService: IConfigurationService, statusbarService: IStatusbarService);
24
26
  private registerListeners;
25
27
  private onDidInstallChat;
26
28
  }
@@ -10,16 +10,17 @@ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode
10
10
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
11
11
  import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
12
12
  import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
13
- import { showCopilotView, ensureSideBarChatViewSize } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
13
+ import { showCopilotView, ensureSideBarChatViewSize } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
14
14
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
15
15
  import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
16
+ import { IStatusbarService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
16
17
 
17
18
  var ChatGettingStartedContribution_1;
18
19
  let ChatGettingStartedContribution = class ChatGettingStartedContribution extends Disposable {
19
20
  static { ChatGettingStartedContribution_1 = this; }
20
21
  static { this.ID = 'workbench.contrib.chatGettingStarted'; }
21
22
  static { this.hideWelcomeView = 'workbench.chat.hideWelcomeView'; }
22
- constructor(productService, extensionService, viewsService, extensionManagementService, storageService, viewDescriptorService, layoutService, configurationService) {
23
+ constructor(productService, extensionService, viewsService, extensionManagementService, storageService, viewDescriptorService, layoutService, configurationService, statusbarService) {
23
24
  super();
24
25
  this.productService = productService;
25
26
  this.extensionService = extensionService;
@@ -29,6 +30,7 @@ let ChatGettingStartedContribution = class ChatGettingStartedContribution extend
29
30
  this.viewDescriptorService = viewDescriptorService;
30
31
  this.layoutService = layoutService;
31
32
  this.configurationService = configurationService;
33
+ this.statusbarService = statusbarService;
32
34
  this.recentlyInstalled = false;
33
35
  const defaultChatAgent = this.productService.defaultChatAgent;
34
36
  const hideWelcomeView = this.storageService.getBoolean(ChatGettingStartedContribution_1.hideWelcomeView, StorageScope.APPLICATION, false);
@@ -59,11 +61,12 @@ let ChatGettingStartedContribution = class ChatGettingStartedContribution extend
59
61
  }));
60
62
  }
61
63
  async onDidInstallChat() {
62
- this.configurationService.updateValue('chat.commandCenter.enabled', true);
63
64
  showCopilotView(this.viewsService, this.layoutService);
64
65
  ensureSideBarChatViewSize(this.viewDescriptorService, this.layoutService, this.viewsService);
65
66
  this.storageService.store(ChatGettingStartedContribution_1.hideWelcomeView, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
66
67
  this.recentlyInstalled = false;
68
+ this.statusbarService.updateEntryVisibility('chat.statusBarEntry', true);
69
+ this.configurationService.updateValue('chat.commandCenter.enabled', true);
67
70
  }
68
71
  };
69
72
  ChatGettingStartedContribution = ChatGettingStartedContribution_1 = ( __decorate([
@@ -74,7 +77,8 @@ ChatGettingStartedContribution = ChatGettingStartedContribution_1 = ( __decorate
74
77
  ( __param(4, IStorageService)),
75
78
  ( __param(5, IViewDescriptorService)),
76
79
  ( __param(6, IWorkbenchLayoutService)),
77
- ( __param(7, IConfigurationService))
80
+ ( __param(7, IConfigurationService)),
81
+ ( __param(8, IStatusbarService))
78
82
  ], ChatGettingStartedContribution));
79
83
 
80
84
  export { ChatGettingStartedContribution };
@@ -5,23 +5,23 @@ import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls'
5
5
  import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
6
6
  import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
7
7
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
8
- import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
8
+ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
9
9
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
10
- import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
10
+ import { ChatEditorInput } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
11
11
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
12
- import { isExportableSessionData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
12
+ import { isExportableSessionData } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatModel';
13
13
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
14
14
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
15
15
 
16
16
  const defaultFileName = 'chat.json';
17
- const filters = [{ name: ( localize(4330, "Chat Session")), extensions: ['json'] }];
17
+ const filters = [{ name: ( localize(4360, "Chat Session")), extensions: ['json'] }];
18
18
  function registerChatExportActions() {
19
19
  registerAction2(class ExportChatAction extends Action2 {
20
20
  constructor() {
21
21
  super({
22
22
  id: 'workbench.action.chat.export',
23
23
  category: CHAT_CATEGORY,
24
- title: ( localize2(4331, "Export Chat...")),
24
+ title: ( localize2(4361, "Export Chat...")),
25
25
  precondition: ChatContextKeys.enabled,
26
26
  f1: true,
27
27
  });
@@ -55,7 +55,7 @@ function registerChatExportActions() {
55
55
  constructor() {
56
56
  super({
57
57
  id: 'workbench.action.chat.import',
58
- title: ( localize2(4332, "Import Chat...")),
58
+ title: ( localize2(4362, "Import Chat...")),
59
59
  category: CHAT_CATEGORY,
60
60
  precondition: ChatContextKeys.enabled,
61
61
  f1: true,
@@ -3,11 +3,11 @@ import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
3
  import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
4
4
  import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
5
5
  import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
6
- import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
7
- import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
6
+ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
7
+ import { ChatViewId } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
8
8
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
9
9
  import { ChatEditor } from '../chatEditor.js';
10
- import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
10
+ import { ChatEditorInput } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
11
11
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
12
12
  import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
13
13
  import { AUX_WINDOW_GROUP, ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
@@ -26,7 +26,7 @@ function registerMoveActions() {
26
26
  constructor() {
27
27
  super({
28
28
  id: `workbench.action.chat.openInEditor`,
29
- title: ( localize2(4333, "Open Chat in Editor")),
29
+ title: ( localize2(4363, "Open Chat in Editor")),
30
30
  category: CHAT_CATEGORY,
31
31
  precondition: ChatContextKeys.enabled,
32
32
  f1: true,
@@ -47,7 +47,7 @@ function registerMoveActions() {
47
47
  constructor() {
48
48
  super({
49
49
  id: `workbench.action.chat.openInNewWindow`,
50
- title: ( localize2(4334, "Open Chat in New Window")),
50
+ title: ( localize2(4364, "Open Chat in New Window")),
51
51
  category: CHAT_CATEGORY,
52
52
  precondition: ChatContextKeys.enabled,
53
53
  f1: true,
@@ -68,7 +68,7 @@ function registerMoveActions() {
68
68
  constructor() {
69
69
  super({
70
70
  id: `workbench.action.chat.openInSidebar`,
71
- title: ( localize2(4335, "Open Chat in Side Bar")),
71
+ title: ( localize2(4365, "Open Chat in Side Bar")),
72
72
  category: CHAT_CATEGORY,
73
73
  precondition: ChatContextKeys.enabled,
74
74
  f1: true,
@@ -1,15 +1,13 @@
1
1
 
2
2
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
3
  import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
4
- import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService';
5
4
  import { Selection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
6
5
  import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
6
  import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
8
7
  import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
9
- import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
8
+ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
10
9
  import { IQuickChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
11
10
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
12
- import { InlineChatController } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
13
11
  import { ASK_QUICK_QUESTION_ACTION_ID } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
14
12
  export { ASK_QUICK_QUESTION_ACTION_ID } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
15
13
 
@@ -20,7 +18,7 @@ function registerQuickChatActions() {
20
18
  constructor() {
21
19
  super({
22
20
  id: 'workbench.action.quickchat.openInChatView',
23
- title: ( localize2(4336, "Open in Chat View")),
21
+ title: ( localize2(4366, "Open in Chat View")),
24
22
  f1: false,
25
23
  category: CHAT_CATEGORY,
26
24
  icon: Codicon.commentDiscussion,
@@ -40,7 +38,7 @@ function registerQuickChatActions() {
40
38
  constructor() {
41
39
  super({
42
40
  id: 'workbench.action.quickchat.close',
43
- title: ( localize2(4337, "Close Quick Chat")),
41
+ title: ( localize2(4367, "Close Quick Chat")),
44
42
  f1: false,
45
43
  category: CHAT_CATEGORY,
46
44
  icon: Codicon.close,
@@ -56,39 +54,12 @@ function registerQuickChatActions() {
56
54
  quickChatService.close();
57
55
  }
58
56
  });
59
- registerAction2(class LaunchInlineChatFromQuickChatAction extends Action2 {
60
- constructor() {
61
- super({
62
- id: 'workbench.action.quickchat.launchInlineChat',
63
- title: ( localize2(4338, "Launch Inline Chat")),
64
- f1: false,
65
- category: CHAT_CATEGORY
66
- });
67
- }
68
- async run(accessor) {
69
- const quickChatService = accessor.get(IQuickChatService);
70
- const codeEditorService = accessor.get(ICodeEditorService);
71
- if (quickChatService.focused) {
72
- quickChatService.close();
73
- }
74
- const codeEditor = codeEditorService.getActiveCodeEditor();
75
- if (!codeEditor) {
76
- return;
77
- }
78
- const controller = InlineChatController.get(codeEditor);
79
- if (!controller) {
80
- return;
81
- }
82
- await controller.run();
83
- controller.focus();
84
- }
85
- });
86
57
  }
87
58
  class QuickChatGlobalAction extends Action2 {
88
59
  constructor() {
89
60
  super({
90
61
  id: ASK_QUICK_QUESTION_ACTION_ID,
91
- title: ( localize2(4339, 'Quick Chat')),
62
+ title: ( localize2(4368, 'Quick Chat')),
92
63
  precondition: ChatContextKeys.enabled,
93
64
  icon: Codicon.commentDiscussion,
94
65
  f1: false,
@@ -98,12 +69,12 @@ class QuickChatGlobalAction extends Action2 {
98
69
  primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KeyL,
99
70
  },
100
71
  menu: {
101
- id: MenuId.ChatCommandCenter,
102
- group: 'e_quickChat',
103
- order: 5
72
+ id: MenuId.ChatTitleBarMenu,
73
+ group: 'a_open',
74
+ order: 4
104
75
  },
105
76
  metadata: {
106
- description: ( localize(4340, 'Toggle the quick chat')),
77
+ description: ( localize(4369, 'Toggle the quick chat')),
107
78
  args: [{
108
79
  name: 'args',
109
80
  schema: {
@@ -113,18 +84,18 @@ class QuickChatGlobalAction extends Action2 {
113
84
  required: ['query'],
114
85
  properties: {
115
86
  query: {
116
- description: ( localize(4341, "The query to open the quick chat with")),
87
+ description: ( localize(4370, "The query to open the quick chat with")),
117
88
  type: 'string'
118
89
  },
119
90
  isPartialQuery: {
120
- description: ( localize(4342, "Whether the query is partial; it will wait for more user input")),
91
+ description: ( localize(4371, "Whether the query is partial; it will wait for more user input")),
121
92
  type: 'boolean'
122
93
  }
123
94
  },
124
95
  },
125
96
  {
126
97
  type: 'string',
127
- description: ( localize(4341, "The query to open the quick chat with"))
98
+ description: ( localize(4370, "The query to open the quick chat with"))
128
99
  }
129
100
  ]
130
101
  }
@@ -154,7 +125,7 @@ class AskQuickChatAction extends Action2 {
154
125
  super({
155
126
  id: `workbench.action.openQuickChat`,
156
127
  category: CHAT_CATEGORY,
157
- title: ( localize2(4343, "Open Quick Chat")),
128
+ title: ( localize2(4372, "Open Quick Chat")),
158
129
  f1: true
159
130
  });
160
131
  }
@@ -1,6 +1,6 @@
1
- import { IBulkEditService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService";
2
- import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService";
3
- import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language";
1
+ import { IBulkEditService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service";
2
+ import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service";
3
+ import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
4
4
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
5
5
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
6
6
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
@@ -9,9 +9,10 @@ import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench
9
9
  import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
10
10
  import { ICodeMapperService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service";
11
11
  import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
12
- import { ICodeBlockActionContext } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
12
+ import { ICodeBlockActionContext } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
13
13
  import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
14
14
  import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
15
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
15
16
  export declare class InsertCodeBlockOperation {
16
17
  private readonly editorService;
17
18
  private readonly textFileService;
@@ -38,7 +39,8 @@ export declare class ApplyCodeBlockOperation {
38
39
  private readonly progressService;
39
40
  private readonly quickInputService;
40
41
  private readonly labelService;
41
- constructor(editorService: IEditorService, textFileService: ITextFileService, chatService: IChatService, languageService: ILanguageService, fileService: IFileService, dialogService: IDialogService, logService: ILogService, codeMapperService: ICodeMapperService, progressService: IProgressService, quickInputService: IQuickInputService, labelService: ILabelService);
42
+ private readonly instantiationService;
43
+ constructor(editorService: IEditorService, textFileService: ITextFileService, chatService: IChatService, languageService: ILanguageService, fileService: IFileService, dialogService: IDialogService, logService: ILogService, codeMapperService: ICodeMapperService, progressService: IProgressService, quickInputService: IQuickInputService, labelService: ILabelService, instantiationService: IInstantiationService);
42
44
  run(context: ICodeBlockActionContext): Promise<void>;
43
45
  private evaluateURIToUse;
44
46
  private handleNotebookEditor;
@@ -9,10 +9,11 @@ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/reso
9
9
  import { splitLines } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
10
10
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
11
11
  import { getCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
12
- import { ResourceTextEdit, IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService';
13
- import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService';
12
+ import { ResourceTextEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService';
13
+ import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service';
14
+ import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
14
15
  import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
15
- import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language';
16
+ import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
16
17
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
17
18
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
18
19
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
@@ -21,14 +22,15 @@ import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platfor
21
22
  import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
22
23
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
23
24
  import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
24
- import { InlineChatController } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
25
- import { insertCell } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
25
+ import { reviewEdits } from '@codingame/monaco-vscode-29bc1406-2925-5b8f-b25e-d04a7772d896-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
26
+ import { insertCell } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
26
27
  import { CellKind, NOTEBOOK_EDITOR_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
27
28
  import { ICodeMapperService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service';
28
29
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
29
- import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
30
+ import { isResponseVM } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
30
31
  import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
31
32
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
33
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
32
34
 
33
35
  let InsertCodeBlockOperation = class InsertCodeBlockOperation {
34
36
  constructor(editorService, textFileService, bulkEditService, codeEditorService, chatService, languageService, dialogService) {
@@ -52,7 +54,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
52
54
  }
53
55
  else {
54
56
  this.notify(( localize(
55
- 4360,
57
+ 4390,
56
58
  "To insert the code block, open a code editor or notebook editor and set the cursor at the location where to insert the code block."
57
59
  )));
58
60
  }
@@ -65,7 +67,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
65
67
  }
66
68
  async handleNotebookEditor(notebookEditor, codeBlockContext) {
67
69
  if (notebookEditor.isReadOnly) {
68
- this.notify(( localize(4361, "Cannot insert the code block to read-only notebook editor.")));
70
+ this.notify(( localize(4391, "Cannot insert the code block to read-only notebook editor.")));
69
71
  return false;
70
72
  }
71
73
  const focusRange = notebookEditor.getFocus();
@@ -76,7 +78,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
76
78
  async handleTextEditor(codeEditor, codeBlockContext) {
77
79
  const activeModel = codeEditor.getModel();
78
80
  if (isReadOnly(activeModel, this.textFileService)) {
79
- this.notify(( localize(4362, "Cannot insert the code block to read-only code editor.")));
81
+ this.notify(( localize(4392, "Cannot insert the code block to read-only code editor.")));
80
82
  return false;
81
83
  }
82
84
  const range = codeEditor.getSelection() ?? ( new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1));
@@ -100,7 +102,7 @@ InsertCodeBlockOperation = ( __decorate([
100
102
  ( __param(6, IDialogService))
101
103
  ], InsertCodeBlockOperation));
102
104
  let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
103
- constructor(editorService, textFileService, chatService, languageService, fileService, dialogService, logService, codeMapperService, progressService, quickInputService, labelService) {
105
+ constructor(editorService, textFileService, chatService, languageService, fileService, dialogService, logService, codeMapperService, progressService, quickInputService, labelService, instantiationService) {
104
106
  this.editorService = editorService;
105
107
  this.textFileService = textFileService;
106
108
  this.chatService = chatService;
@@ -112,6 +114,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
112
114
  this.progressService = progressService;
113
115
  this.quickInputService = quickInputService;
114
116
  this.labelService = labelService;
117
+ this.instantiationService = instantiationService;
115
118
  }
116
119
  async run(context) {
117
120
  let activeEditorControl = getEditableActiveCodeEditor(this.editorService);
@@ -128,7 +131,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
128
131
  activeEditorControl = codeEditor;
129
132
  }
130
133
  else {
131
- this.notify(( localize(4363, "Failed to open {0} in a code editor.", (codemapperUri.toString()))));
134
+ this.notify(( localize(4393, "Failed to open {0} in a code editor.", (codemapperUri.toString()))));
132
135
  return;
133
136
  }
134
137
  }
@@ -147,7 +150,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
147
150
  result = await this.handleNotebookEditor(activeNotebookEditor, context.code);
148
151
  }
149
152
  else {
150
- this.notify(( localize(4364, "To apply this code block, open a code or notebook editor.")));
153
+ this.notify(( localize(4394, "To apply this code block, open a code or notebook editor.")));
151
154
  }
152
155
  }
153
156
  notifyUserAction(this.chatService, context, {
@@ -163,15 +166,15 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
163
166
  return resource;
164
167
  }
165
168
  const activeEditorOption = activeEditorControl?.getModel().uri ? { label: ( localize(
166
- 4365,
169
+ 4395,
167
170
  "Active editor '{0}'",
168
171
  this.labelService.getUriLabel(activeEditorControl.getModel().uri, { relative: true })
169
172
  )), id: 'activeEditor' } : undefined;
170
- const untitledEditorOption = { label: ( localize(4366, "New untitled editor")), id: 'newUntitledFile' };
173
+ const untitledEditorOption = { label: ( localize(4396, "New untitled editor")), id: 'newUntitledFile' };
171
174
  const options = [];
172
175
  if (resource) {
173
176
  options.push({ label: ( localize(
174
- 4367,
177
+ 4397,
175
178
  "New file '{0}'",
176
179
  this.labelService.getUriLabel(resource, { relative: true })
177
180
  )), id: 'createFile' });
@@ -186,7 +189,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
186
189
  }
187
190
  options.push(untitledEditorOption);
188
191
  }
189
- const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(4368, "Select where to apply the code block")) }) : options[0];
192
+ const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(4398, "Select where to apply the code block")) }) : options[0];
190
193
  if (selected) {
191
194
  switch (selected.id) {
192
195
  case 'createFile':
@@ -195,7 +198,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
195
198
  await this.fileService.writeFile(resource, VSBuffer.fromString(''));
196
199
  }
197
200
  catch (error) {
198
- this.notify(( localize(4369, "Failed to create file: {0}", error.message)));
201
+ this.notify(( localize(4399, "Failed to create file: {0}", error.message)));
199
202
  return ( URI.from({ scheme: 'untitled', path: resource.path }));
200
203
  }
201
204
  }
@@ -210,7 +213,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
210
213
  }
211
214
  async handleNotebookEditor(notebookEditor, code) {
212
215
  if (notebookEditor.isReadOnly) {
213
- this.notify(( localize(4370, "Cannot apply code block to read-only notebook editor.")));
216
+ this.notify(( localize(4400, "Cannot apply code block to read-only notebook editor.")));
214
217
  return undefined;
215
218
  }
216
219
  const focusRange = notebookEditor.getFocus();
@@ -221,20 +224,20 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
221
224
  async handleTextEditor(codeEditor, code) {
222
225
  const activeModel = codeEditor.getModel();
223
226
  if (isReadOnly(activeModel, this.textFileService)) {
224
- this.notify(( localize(4371, "Cannot apply code block to read-only file.")));
227
+ this.notify(( localize(4401, "Cannot apply code block to read-only file.")));
225
228
  return undefined;
226
229
  }
227
230
  const codeBlock = { code, resource: activeModel.uri, markdownBeforeBlock: undefined };
228
231
  const codeMapper = this.codeMapperService.providers[0]?.displayName;
229
232
  if (!codeMapper) {
230
- this.notify(( localize(4372, "No code mapper available.")));
233
+ this.notify(( localize(4402, "No code mapper available.")));
231
234
  return undefined;
232
235
  }
233
236
  let editsProposed = false;
234
237
  const cancellationTokenSource = ( new CancellationTokenSource());
235
238
  try {
236
239
  const iterable = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
237
- progress.report({ message: ( localize(4373, "Applying code block using {0}...", codeMapper)) });
240
+ progress.report({ message: ( localize(4403, "Applying code block using {0}...", codeMapper)) });
238
241
  const editsIterable = this.getEdits(codeBlock, cancellationTokenSource.token);
239
242
  return await this.waitForFirstElement(editsIterable);
240
243
  }, () => cancellationTokenSource.cancel());
@@ -242,7 +245,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
242
245
  }
243
246
  catch (e) {
244
247
  if (!isCancellationError(e)) {
245
- this.notify(( localize(4374, "Failed to apply code block: {0}", e.message)));
248
+ this.notify(( localize(4404, "Failed to apply code block: {0}", e.message)));
246
249
  }
247
250
  }
248
251
  finally {
@@ -261,7 +264,9 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
261
264
  const response = {
262
265
  textEdit: (target, edit) => {
263
266
  executor.emitOne(edit);
264
- }
267
+ },
268
+ notebookEdit(_resource, _edit) {
269
+ },
265
270
  };
266
271
  const result = await this.codeMapperService.mapCode(request, response, token);
267
272
  if (result?.errorMessage) {
@@ -289,11 +294,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
289
294
  };
290
295
  }
291
296
  async applyWithInlinePreview(edits, codeEditor, tokenSource) {
292
- const inlineChatController = InlineChatController.get(codeEditor);
293
- if (inlineChatController) {
294
- return inlineChatController.reviewEdits(edits, tokenSource.token);
295
- }
296
- return false;
297
+ return this.instantiationService.invokeFunction(reviewEdits, codeEditor, edits, tokenSource.token);
297
298
  }
298
299
  tryToRevealCodeBlock(codeEditor, codeBlock) {
299
300
  const match = codeBlock.match(/(\S[^\n]*)\n/);
@@ -319,7 +320,8 @@ ApplyCodeBlockOperation = ( __decorate([
319
320
  ( __param(7, ICodeMapperService)),
320
321
  ( __param(8, IProgressService)),
321
322
  ( __param(9, IQuickInputService)),
322
- ( __param(10, ILabelService))
323
+ ( __param(10, ILabelService)),
324
+ ( __param(11, IInstantiationService))
323
325
  ], ApplyCodeBlockOperation));
324
326
  function notifyUserAction(chatService, context, action) {
325
327
  if (isResponseVM(context.element)) {