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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +64 -1
  3. package/package.json +32 -13
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +21 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +73 -60
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +3 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +73 -81
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +9 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +73 -112
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +12 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +253 -101
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.d.ts +1 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +8 -8
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.d.ts +1 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -1
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.d.ts +1 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +16 -14
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +23 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +30 -11
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.d.ts +1 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +12 -12
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.d.ts +1 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +22 -20
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +2 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +23 -20
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +52 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +50 -47
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.d.ts +1 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +124 -95
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +17 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +6 -3
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.d.ts +12 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +30 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.d.ts +69 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +203 -182
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +103 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +458 -165
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +42 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +14 -10
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +26 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/{chatParticipantContributions.js → chatParticipant.contribution.js} +101 -92
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +42 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +164 -25
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +26 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +6 -5
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +30 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +10 -7
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +17 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +941 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +26 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +9 -6
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +54 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +32 -15
  54. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +9 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.js +1 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.d.ts +1 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +8 -6
  58. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +26 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +16 -19
  60. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +15 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +108 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +7 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.js +3 -8
  64. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css.js +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +31 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +70 -49
  67. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +6 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.d.ts +7 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/{chatViewsWelcomeContributions.js → chatViewsWelcomeHandler.js} +13 -13
  70. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +44 -0
  71. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js +3 -1
  72. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +22 -0
  73. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +1 -0
  74. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +80 -0
  75. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +152 -104
  76. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +8 -0
  77. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +2 -1
  78. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +41 -0
  79. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +2 -1
  80. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +31 -0
  81. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +6 -4
  82. package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.d.ts +13 -0
  83. package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js +1 -0
  84. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +24 -0
  85. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +23 -21
  86. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +1 -0
  87. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +1 -0
  88. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +39 -0
  89. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +20 -19
  90. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.service.d.ts +7 -0
  91. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -0
  92. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +30 -33
  93. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.d.ts +10 -0
  94. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +6 -4
  95. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +10 -0
  96. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +9 -7
  97. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +44 -0
  98. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +247 -83
  99. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.d.ts +8 -0
  100. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +5 -4
  101. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.d.ts +29 -0
  102. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +35 -35
  103. package/chat.js +0 -59
  104. package/vscode/src/vs/editor/common/diff/documentDiffProvider.js +0 -8
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +0 -326
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +0 -76
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorActions.js +0 -110
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorController.js +0 -287
  109. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +0 -130
  110. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +0 -172
@@ -1,8 +1,10 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
3
4
  import { AsyncIterableObject } from 'vscode/vscode/vs/base/common/async';
4
5
  import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
5
6
  import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
7
+ import { CharCode } from 'vscode/vscode/vs/base/common/charCode';
6
8
  import { isCancellationError } from 'vscode/vscode/vs/base/common/errors';
7
9
  import { isEqual } from 'vscode/vscode/vs/base/common/resources';
8
10
  import { splitLines } from 'vscode/vscode/vs/base/common/strings';
@@ -16,15 +18,16 @@ import { localize } from 'vscode/vscode/vs/nls';
16
18
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
17
19
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
18
20
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
21
+ import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
19
22
  import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
20
23
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
21
24
  import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
22
- import { InlineChatController } from '@codingame/monaco-vscode-chat-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
23
- import { insertCell } from '@codingame/monaco-vscode-chat-interactive-notebook-search-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
25
+ import { InlineChatController } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
26
+ import { insertCell } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
24
27
  import { CellKind, NOTEBOOK_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
25
28
  import { getReferencesAsDocumentContext } from '../../common/chatCodeMapperService.js';
26
29
  import { IChatService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatService.service';
27
- import { isResponseVM, isRequestVM } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-search-terminal-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
30
+ import { isResponseVM, isRequestVM } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
28
31
 
29
32
  let InsertCodeBlockOperation = class InsertCodeBlockOperation {
30
33
  constructor(editorService, textFileService, bulkEditService, codeEditorService, chatService, languageService, dialogService) {
@@ -48,7 +51,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
48
51
  }
49
52
  else {
50
53
  this.notify(( localize(
51
- 10864,
54
+ 4262,
52
55
  "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."
53
56
  )));
54
57
  }
@@ -61,7 +64,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
61
64
  }
62
65
  async handleNotebookEditor(notebookEditor, codeBlockContext) {
63
66
  if (notebookEditor.isReadOnly) {
64
- this.notify(( localize(10865, "Cannot insert the code block to read-only notebook editor.")));
67
+ this.notify(( localize(4263, "Cannot insert the code block to read-only notebook editor.")));
65
68
  return false;
66
69
  }
67
70
  const focusRange = notebookEditor.getFocus();
@@ -72,29 +75,29 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
72
75
  async handleTextEditor(codeEditor, codeBlockContext) {
73
76
  const activeModel = codeEditor.getModel();
74
77
  if (isReadOnly(activeModel, this.textFileService)) {
75
- this.notify(( localize(10866, "Cannot insert the code block to read-only code editor.")));
78
+ this.notify(( localize(4264, "Cannot insert the code block to read-only code editor.")));
76
79
  return false;
77
80
  }
78
- const range = codeEditor.getSelection() ?? ( (new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1)));
81
+ const range = codeEditor.getSelection() ?? ( new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1));
79
82
  const text = reindent(codeBlockContext.code, activeModel, range.startLineNumber);
80
- const edits = [( (new ResourceTextEdit(activeModel.uri, { range, text })))];
83
+ const edits = [( new ResourceTextEdit(activeModel.uri, { range, text }))];
81
84
  await this.bulkEditService.apply(edits);
82
- this.codeEditorService.listCodeEditors().find(editor => editor.getModel()?.uri.toString() === ( (activeModel.uri.toString())))?.focus();
85
+ this.codeEditorService.listCodeEditors().find(editor => editor.getModel()?.uri.toString() === ( activeModel.uri.toString()))?.focus();
83
86
  return true;
84
87
  }
85
88
  notify(message) {
86
89
  this.dialogService.info(message);
87
90
  }
88
91
  };
89
- InsertCodeBlockOperation = ( (__decorate([
90
- ( (__param(0, IEditorService))),
91
- ( (__param(1, ITextFileService))),
92
- ( (__param(2, IBulkEditService))),
93
- ( (__param(3, ICodeEditorService))),
94
- ( (__param(4, IChatService))),
95
- ( (__param(5, ILanguageService))),
96
- ( (__param(6, IDialogService)))
97
- ], InsertCodeBlockOperation)));
92
+ InsertCodeBlockOperation = ( __decorate([
93
+ ( __param(0, IEditorService)),
94
+ ( __param(1, ITextFileService)),
95
+ ( __param(2, IBulkEditService)),
96
+ ( __param(3, ICodeEditorService)),
97
+ ( __param(4, IChatService)),
98
+ ( __param(5, ILanguageService)),
99
+ ( __param(6, IDialogService))
100
+ ], InsertCodeBlockOperation));
98
101
  let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
99
102
  constructor(editorService, textFileService, bulkEditService, codeEditorService, chatService, languageFeaturesService, progressService, languageService, fileService, dialogService, logService) {
100
103
  this.editorService = editorService;
@@ -112,7 +115,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
112
115
  async run(context) {
113
116
  if (this.inlineChatPreview && this.inlineChatPreview.isOpen()) {
114
117
  await this.dialogService.info(( localize(
115
- 10867,
118
+ 4265,
116
119
  "Another code change is being previewed. Please apply or discard the pending changes first."
117
120
  )));
118
121
  return;
@@ -143,7 +146,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
143
146
  result = await this.handleNotebookEditor(activeNotebookEditor, context);
144
147
  }
145
148
  else {
146
- this.notify(( localize(10868, "To apply this code block, open a code or notebook editor.")));
149
+ this.notify(( localize(4266, "To apply this code block, open a code or notebook editor.")));
147
150
  }
148
151
  }
149
152
  notifyUserAction(this.chatService, context, {
@@ -156,7 +159,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
156
159
  }
157
160
  async handleNotebookEditor(notebookEditor, codeBlockContext) {
158
161
  if (notebookEditor.isReadOnly) {
159
- this.notify(( localize(10869, "Cannot apply code block to read-only notebook editor.")));
162
+ this.notify(( localize(4267, "Cannot apply code block to read-only notebook editor.")));
160
163
  return undefined;
161
164
  }
162
165
  const focusRange = notebookEditor.getFocus();
@@ -166,7 +169,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
166
169
  }
167
170
  async handleTextEditor(codeEditor, codeBlockContext) {
168
171
  if (isReadOnly(codeEditor.getModel(), this.textFileService)) {
169
- this.notify(( localize(10870, "Cannot apply code block to read-only file.")));
172
+ this.notify(( localize(4268, "Cannot apply code block to read-only file.")));
170
173
  return undefined;
171
174
  }
172
175
  const result = await this.computeEdits(codeEditor, codeBlockContext);
@@ -175,7 +178,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
175
178
  if (!showWithPreview) {
176
179
  await this.bulkEditService.apply(result.edits, { showPreview: true });
177
180
  const activeModel = codeEditor.getModel();
178
- this.codeEditorService.listCodeEditors().find(editor => editor.getModel()?.uri.toString() === ( (activeModel.uri.toString())))?.focus();
181
+ this.codeEditorService.listCodeEditors().find(editor => editor.getModel()?.uri.toString() === ( activeModel.uri.toString()))?.focus();
179
182
  }
180
183
  }
181
184
  return result;
@@ -187,13 +190,13 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
187
190
  const docRefs = [];
188
191
  collectDocumentContextFromSelections(codeEditor, docRefs);
189
192
  collectDocumentContextFromContext(codeBlockActionContext, docRefs);
190
- const cancellationTokenSource = ( (new CancellationTokenSource()));
193
+ const cancellationTokenSource = ( new CancellationTokenSource());
191
194
  let codeMapper;
192
195
  try {
193
- const result = await this.progressService.withProgress({ location: 15 , delay: 500, sticky: true, cancellable: true }, async (progress) => {
196
+ const result = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
194
197
  for (const provider of mappedEditsProviders) {
195
198
  codeMapper = provider.displayName;
196
- progress.report({ message: ( localize(10871, "Applying code block using {0}...", codeMapper)) });
199
+ progress.report({ message: ( localize(4269, "Applying code block using {0}...", codeMapper)) });
197
200
  const mappedEdits = await provider.provideMappedEdits(activeModel, [codeBlockActionContext.code], {
198
201
  documents: docRefs,
199
202
  conversation: getChatConversation(codeBlockActionContext),
@@ -210,7 +213,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
210
213
  }
211
214
  catch (e) {
212
215
  if (!isCancellationError(e)) {
213
- this.notify(( localize(10872, "Failed to apply code block: {0}", e.message)));
216
+ this.notify(( localize(4270, "Failed to apply code block: {0}", e.message)));
214
217
  }
215
218
  }
216
219
  finally {
@@ -226,9 +229,9 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
226
229
  return false;
227
230
  }
228
231
  const resource = firstEdit.resource;
229
- const textEdits = coalesce(( (edits.map(
232
+ const textEdits = coalesce(( edits.map(
230
233
  edit => ResourceTextEdit.is(edit) && isEqual(resource, edit.resource) ? edit.textEdit : undefined
231
- ))));
234
+ )));
232
235
  if (textEdits.length !== edits.length) {
233
236
  return false;
234
237
  }
@@ -236,7 +239,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
236
239
  if (editorToApply) {
237
240
  const inlineChatController = InlineChatController.get(editorToApply);
238
241
  if (inlineChatController) {
239
- const tokenSource = ( (new CancellationTokenSource()));
242
+ const tokenSource = ( new CancellationTokenSource());
240
243
  let isOpen = true;
241
244
  const firstEdit = textEdits[0];
242
245
  editorToApply.revealLineInCenterIfOutsideViewport(firstEdit.range.startLineNumber);
@@ -268,19 +271,19 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
268
271
  this.dialogService.info(message);
269
272
  }
270
273
  };
271
- ApplyCodeBlockOperation = ( (__decorate([
272
- ( (__param(0, IEditorService))),
273
- ( (__param(1, ITextFileService))),
274
- ( (__param(2, IBulkEditService))),
275
- ( (__param(3, ICodeEditorService))),
276
- ( (__param(4, IChatService))),
277
- ( (__param(5, ILanguageFeaturesService))),
278
- ( (__param(6, IProgressService))),
279
- ( (__param(7, ILanguageService))),
280
- ( (__param(8, IFileService))),
281
- ( (__param(9, IDialogService))),
282
- ( (__param(10, ILogService)))
283
- ], ApplyCodeBlockOperation)));
274
+ ApplyCodeBlockOperation = ( __decorate([
275
+ ( __param(0, IEditorService)),
276
+ ( __param(1, ITextFileService)),
277
+ ( __param(2, IBulkEditService)),
278
+ ( __param(3, ICodeEditorService)),
279
+ ( __param(4, IChatService)),
280
+ ( __param(5, ILanguageFeaturesService)),
281
+ ( __param(6, IProgressService)),
282
+ ( __param(7, ILanguageService)),
283
+ ( __param(8, IFileService)),
284
+ ( __param(9, IDialogService)),
285
+ ( __param(10, ILogService))
286
+ ], ApplyCodeBlockOperation));
284
287
  function notifyUserAction(chatService, context, action) {
285
288
  if (isResponseVM(context.element)) {
286
289
  chatService.notifyUserAction({
@@ -369,7 +372,7 @@ function reindent(codeBlockContent, model, seletionStartLine) {
369
372
  }
370
373
  const formattingOptions = model.getFormattingOptions();
371
374
  const codeIndentLevel = computeIndentation(model.getLineContent(seletionStartLine), formattingOptions.tabSize).level;
372
- const indents = ( (newContent.map(line => computeIndentation(line, formattingOptions.tabSize))));
375
+ const indents = ( newContent.map(line => computeIndentation(line, formattingOptions.tabSize)));
373
376
  const newContentIndentLevel = indents.reduce((min, indent, index) => {
374
377
  if (indent.length !== newContent[index].length) {
375
378
  return Math.min(indent.level, min);
@@ -396,7 +399,7 @@ function computeIndentation(line, tabSize) {
396
399
  const len = line.length;
397
400
  while (i < len) {
398
401
  const chCode = line.charCodeAt(i);
399
- if (chCode === 32 ) {
402
+ if (chCode === CharCode.Space) {
400
403
  nSpaces++;
401
404
  if (nSpaces === tabSize) {
402
405
  level++;
@@ -404,7 +407,7 @@ function computeIndentation(line, tabSize) {
404
407
  length = i + 1;
405
408
  }
406
409
  }
407
- else if (chCode === 9 ) {
410
+ else if (chCode === CharCode.Tab) {
408
411
  level++;
409
412
  nSpaces = 0;
410
413
  length = i + 1;