@codingame/monaco-vscode-chat-service-override 13.1.7 → 14.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 (78) hide show
  1. package/index.js +9 -9
  2. package/package.json +20 -20
  3. package/vscode/src/vs/base/common/objectCache.d.ts +13 -0
  4. package/vscode/src/vs/base/common/objectCache.js +39 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +12 -5
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +95 -23
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +10 -1
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +81 -19
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +144 -66
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -4
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +6 -3
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +17 -11
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +8 -7
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +10 -10
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +11 -8
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +168 -167
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +116 -54
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +11 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.js +34 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.d.ts +11 -11
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +105 -70
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +17 -16
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +154 -83
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +3 -3
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +5 -5
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +150 -130
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +13 -7
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +3 -3
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +11 -6
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +449 -229
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +2 -2
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +2 -2
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +7 -6
  42. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +1 -1
  44. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +11 -9
  46. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +7 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +76 -13
  48. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  50. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +5 -18
  51. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js +4 -122
  52. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +3 -1
  53. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +5 -4
  54. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +6 -3
  55. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +42 -11
  56. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +13 -0
  57. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +49 -0
  58. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.d.ts +14 -0
  59. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.js +69 -0
  60. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +10 -0
  61. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +24 -0
  62. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +73 -17
  63. package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +11 -0
  64. package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +22 -0
  65. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  67. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +9 -6
  68. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.d.ts +2 -2
  69. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +2 -2
  70. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.d.ts +39 -0
  71. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.js +314 -0
  72. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +34 -19
  73. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +0 -3
  74. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +0 -334
  75. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +0 -31
  76. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +0 -46
  77. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.d.ts +0 -29
  78. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +0 -168
@@ -4,10 +4,11 @@ import { coalesce, isNonEmptyArray } from '@codingame/monaco-vscode-api/vscode/v
4
4
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
5
  import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
6
6
  import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
+ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
7
8
  import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
8
- import { DisposableMap, DisposableStore, toDisposable, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
+ import { DisposableMap, DisposableStore, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
10
  import { AmbiguousCharacters, InvisibleCharacters } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
10
- import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
+ import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
12
  import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
12
13
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
13
14
  import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
@@ -15,22 +16,95 @@ import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/
15
16
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
16
17
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
17
18
  import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
18
- import { ViewPaneContainer } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
19
+ import { ViewPaneContainer } from '@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
19
20
  import { Extensions, ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
21
+ import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
20
22
  import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
21
23
  import { ExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
22
- import { showExtensionsWithIdsCommandId } from '@codingame/monaco-vscode-47923ab1-c4c8-58b5-89ac-fa1b998eb5dd-common/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
24
+ import { showExtensionsWithIdsCommandId } from '@codingame/monaco-vscode-ecf3436d-6064-5fbd-a760-37a211ce79c7-common/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
23
25
  import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
24
26
  import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
25
27
  import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
26
28
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
27
- import { ChatViewId } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chat';
29
+ import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
28
30
  import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane, CHAT_EDITING_SIDEBAR_PANEL_ID } from './chatViewPane.js';
29
31
 
32
+ const chatViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
33
+ id: CHAT_SIDEBAR_PANEL_ID,
34
+ title: ( localize2(4583, "Chat")),
35
+ icon: Codicon.commentDiscussion,
36
+ ctorDescriptor: ( new SyncDescriptor(
37
+ ViewPaneContainer,
38
+ [CHAT_SIDEBAR_PANEL_ID, { mergeViewWithContainerWhenSingleView: true }]
39
+ )),
40
+ storageId: CHAT_SIDEBAR_PANEL_ID,
41
+ hideIfEmpty: true,
42
+ order: 100,
43
+ }, ViewContainerLocation.AuxiliaryBar, { isDefault: true, doNotRegisterOpenCommand: true });
44
+ const chatViewDescriptor = [{
45
+ id: ChatViewId,
46
+ containerIcon: chatViewContainer.icon,
47
+ containerTitle: chatViewContainer.title.value,
48
+ singleViewPaneContainerTitle: chatViewContainer.title.value,
49
+ name: ( localize2(4583, "Chat")),
50
+ canToggleVisibility: false,
51
+ canMoveView: true,
52
+ openCommandActionDescriptor: {
53
+ id: CHAT_SIDEBAR_PANEL_ID,
54
+ title: chatViewContainer.title,
55
+ mnemonicTitle: ( localize(4584, "&&Chat")),
56
+ keybindings: {
57
+ primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyI,
58
+ mac: {
59
+ primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyI
60
+ }
61
+ },
62
+ order: 1
63
+ },
64
+ ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.Panel }])),
65
+ when: ( ContextKeyExpr.or(( ChatContextKeys.Setup.hidden.negate()), ChatContextKeys.Setup.installed, ChatContextKeys.panelParticipantRegistered, ChatContextKeys.extensionInvalid))
66
+ }];
67
+ ( Registry.as(Extensions.ViewsRegistry)).registerViews(chatViewDescriptor, chatViewContainer);
68
+ const editsViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
69
+ id: CHAT_EDITING_SIDEBAR_PANEL_ID,
70
+ title: ( localize2(4585, "Copilot Edits")),
71
+ icon: Codicon.editSession,
72
+ ctorDescriptor: ( new SyncDescriptor(
73
+ ViewPaneContainer,
74
+ [CHAT_EDITING_SIDEBAR_PANEL_ID, { mergeViewWithContainerWhenSingleView: true }]
75
+ )),
76
+ storageId: CHAT_EDITING_SIDEBAR_PANEL_ID,
77
+ hideIfEmpty: true,
78
+ order: 101,
79
+ }, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true });
80
+ const editsViewDescriptor = [{
81
+ id: 'workbench.panel.chat.view.edits',
82
+ containerIcon: editsViewContainer.icon,
83
+ containerTitle: editsViewContainer.title.value,
84
+ singleViewPaneContainerTitle: editsViewContainer.title.value,
85
+ name: editsViewContainer.title,
86
+ canToggleVisibility: false,
87
+ canMoveView: true,
88
+ openCommandActionDescriptor: {
89
+ id: CHAT_EDITING_SIDEBAR_PANEL_ID,
90
+ title: editsViewContainer.title,
91
+ mnemonicTitle: ( localize(4586, "Copilot Ed&&its")),
92
+ keybindings: {
93
+ primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI,
94
+ linux: {
95
+ primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.KeyI
96
+ }
97
+ },
98
+ order: 2
99
+ },
100
+ ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.EditingSession }])),
101
+ when: ( ContextKeyExpr.or(( ChatContextKeys.Setup.hidden.negate()), ChatContextKeys.Setup.installed, ChatContextKeys.editingParticipantRegistered))
102
+ }];
103
+ ( Registry.as(Extensions.ViewsRegistry)).registerViews(editsViewDescriptor, editsViewContainer);
30
104
  const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
31
105
  extensionPoint: 'chatParticipants',
32
106
  jsonSchema: {
33
- description: ( localize(4490, 'Contributes a chat participant')),
107
+ description: ( localize(4587, 'Contributes a chat participant')),
34
108
  type: 'array',
35
109
  items: {
36
110
  additionalProperties: false,
@@ -39,12 +113,12 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
39
113
  required: ['name', 'id'],
40
114
  properties: {
41
115
  id: {
42
- description: ( localize(4491, "A unique id for this chat participant.")),
116
+ description: ( localize(4588, "A unique id for this chat participant.")),
43
117
  type: 'string'
44
118
  },
45
119
  name: {
46
120
  description: ( localize(
47
- 4492,
121
+ 4589,
48
122
  "User-facing name for this chat participant. The user will use '@' with this name to invoke the participant. Name must not contain whitespace."
49
123
  )),
50
124
  type: 'string',
@@ -52,37 +126,37 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
52
126
  },
53
127
  fullName: {
54
128
  markdownDescription: ( localize(
55
- 4493,
129
+ 4590,
56
130
  "The full name of this chat participant, which is shown as the label for responses coming from this participant. If not provided, {0} is used.",
57
131
  '`name`'
58
132
  )),
59
133
  type: 'string'
60
134
  },
61
135
  description: {
62
- description: ( localize(4494, "A description of this chat participant, shown in the UI.")),
136
+ description: ( localize(4591, "A description of this chat participant, shown in the UI.")),
63
137
  type: 'string'
64
138
  },
65
139
  isSticky: {
66
140
  description: ( localize(
67
- 4495,
141
+ 4592,
68
142
  "Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
69
143
  )),
70
144
  type: 'boolean'
71
145
  },
72
146
  sampleRequest: {
73
147
  description: ( localize(
74
- 4496,
148
+ 4593,
75
149
  "When the user clicks this participant in `/help`, this text will be submitted to the participant."
76
150
  )),
77
151
  type: 'string'
78
152
  },
79
153
  when: {
80
- description: ( localize(4497, "A condition which must be true to enable this participant.")),
154
+ description: ( localize(4594, "A condition which must be true to enable this participant.")),
81
155
  type: 'string'
82
156
  },
83
157
  disambiguation: {
84
158
  description: ( localize(
85
- 4498,
159
+ 4595,
86
160
  "Metadata to help with automatically routing user questions to this chat participant."
87
161
  )),
88
162
  type: 'array',
@@ -94,21 +168,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
94
168
  properties: {
95
169
  category: {
96
170
  markdownDescription: ( localize(
97
- 4499,
171
+ 4596,
98
172
  "A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
99
173
  )),
100
174
  type: 'string'
101
175
  },
102
176
  description: {
103
177
  description: ( localize(
104
- 4500,
178
+ 4597,
105
179
  "A detailed description of the kinds of questions that are suitable for this chat participant."
106
180
  )),
107
181
  type: 'string'
108
182
  },
109
183
  examples: {
110
184
  description: ( localize(
111
- 4501,
185
+ 4598,
112
186
  "A list of representative example questions that are suitable for this chat participant."
113
187
  )),
114
188
  type: 'array'
@@ -118,7 +192,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
118
192
  },
119
193
  commands: {
120
194
  markdownDescription: ( localize(
121
- 4502,
195
+ 4599,
122
196
  "Commands available for this chat participant, which the user can invoke with a `/`."
123
197
  )),
124
198
  type: 'array',
@@ -130,36 +204,36 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
130
204
  properties: {
131
205
  name: {
132
206
  description: ( localize(
133
- 4503,
207
+ 4600,
134
208
  "A short name by which this command is referred to in the UI, e.g. `fix` or * `explain` for commands that fix an issue or explain code. The name should be unique among the commands provided by this participant."
135
209
  )),
136
210
  type: 'string'
137
211
  },
138
212
  description: {
139
- description: ( localize(4504, "A description of this command.")),
213
+ description: ( localize(4601, "A description of this command.")),
140
214
  type: 'string'
141
215
  },
142
216
  when: {
143
- description: ( localize(4505, "A condition which must be true to enable this command.")),
217
+ description: ( localize(4602, "A condition which must be true to enable this command.")),
144
218
  type: 'string'
145
219
  },
146
220
  sampleRequest: {
147
221
  description: ( localize(
148
- 4506,
222
+ 4603,
149
223
  "When the user clicks this command in `/help`, this text will be submitted to the participant."
150
224
  )),
151
225
  type: 'string'
152
226
  },
153
227
  isSticky: {
154
228
  description: ( localize(
155
- 4495,
229
+ 4592,
156
230
  "Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
157
231
  )),
158
232
  type: 'boolean'
159
233
  },
160
234
  disambiguation: {
161
235
  description: ( localize(
162
- 4507,
236
+ 4604,
163
237
  "Metadata to help with automatically routing user questions to this chat command."
164
238
  )),
165
239
  type: 'array',
@@ -171,21 +245,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
171
245
  properties: {
172
246
  category: {
173
247
  markdownDescription: ( localize(
174
- 4508,
248
+ 4605,
175
249
  "A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
176
250
  )),
177
251
  type: 'string'
178
252
  },
179
253
  description: {
180
254
  description: ( localize(
181
- 4509,
255
+ 4606,
182
256
  "A detailed description of the kinds of questions that are suitable for this chat command."
183
257
  )),
184
258
  type: 'string'
185
259
  },
186
260
  examples: {
187
261
  description: ( localize(
188
- 4510,
262
+ 4607,
189
263
  "A list of representative example questions that are suitable for this chat command."
190
264
  )),
191
265
  type: 'array'
@@ -211,9 +285,6 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
211
285
  this._chatAgentService = _chatAgentService;
212
286
  this.logService = logService;
213
287
  this._participantRegistrationDisposables = ( new DisposableMap());
214
- this._viewContainer = this.registerViewContainer();
215
- this.registerDefaultParticipantView();
216
- this.registerChatEditingView();
217
288
  this.handleAndRegisterChatExtensions();
218
289
  }
219
290
  handleAndRegisterChatExtensions() {
@@ -232,11 +303,11 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
232
303
  this.logService.error(`Extension '${extension.description.identifier.value}' CANNOT register participant with fullName that contains invisible characters: ${providerDescriptor.fullName}.`);
233
304
  continue;
234
305
  }
235
- if (providerDescriptor.isDefault && !isProposedApiEnabled(extension.description, 'defaultChatParticipant')) {
306
+ if ((providerDescriptor.isDefault || providerDescriptor.isAgent) && !isProposedApiEnabled(extension.description, 'defaultChatParticipant')) {
236
307
  this.logService.error(`Extension '${extension.description.identifier.value}' CANNOT use API proposal: defaultChatParticipant.`);
237
308
  continue;
238
309
  }
239
- if ((providerDescriptor.defaultImplicitVariables || providerDescriptor.locations) && !isProposedApiEnabled(extension.description, 'chatParticipantAdditions')) {
310
+ if (providerDescriptor.locations && !isProposedApiEnabled(extension.description, 'chatParticipantAdditions')) {
240
311
  this.logService.error(`Extension '${extension.description.identifier.value}' CANNOT use API proposal: chatParticipantAdditions.`);
241
312
  continue;
242
313
  }
@@ -267,6 +338,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
267
338
  name: providerDescriptor.name,
268
339
  fullName: providerDescriptor.fullName,
269
340
  isDefault: providerDescriptor.isDefault,
341
+ isToolsAgent: providerDescriptor.isAgent,
270
342
  locations: isNonEmptyArray(providerDescriptor.locations) ?
271
343
  ( providerDescriptor.locations.map(ChatAgentLocation.fromRaw)) :
272
344
  [ChatAgentLocation.Panel],
@@ -287,102 +359,6 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
287
359
  }
288
360
  });
289
361
  }
290
- registerViewContainer() {
291
- const title = ( localize2(4511, "Chat"));
292
- const icon = Codicon.commentDiscussion;
293
- const viewContainerId = CHAT_SIDEBAR_PANEL_ID;
294
- const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
295
- id: viewContainerId,
296
- title,
297
- icon,
298
- ctorDescriptor: ( new SyncDescriptor(
299
- ViewPaneContainer,
300
- [viewContainerId, { mergeViewWithContainerWhenSingleView: true }]
301
- )),
302
- storageId: viewContainerId,
303
- hideIfEmpty: true,
304
- order: 100,
305
- }, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true });
306
- return viewContainer;
307
- }
308
- registerDefaultParticipantView() {
309
- const viewDescriptor = [{
310
- id: ChatViewId,
311
- containerIcon: this._viewContainer.icon,
312
- containerTitle: this._viewContainer.title.value,
313
- singleViewPaneContainerTitle: this._viewContainer.title.value,
314
- name: ( localize2(4511, "Chat")),
315
- canToggleVisibility: false,
316
- canMoveView: true,
317
- openCommandActionDescriptor: {
318
- id: CHAT_SIDEBAR_PANEL_ID,
319
- title: this._viewContainer.title,
320
- mnemonicTitle: ( localize(4512, "&&Chat")),
321
- keybindings: {
322
- primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyI,
323
- mac: {
324
- primary: KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KeyI
325
- }
326
- },
327
- order: 1
328
- },
329
- ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.Panel }])),
330
- when: ( ContextKeyExpr.or(( ContextKeyExpr.and(( ContextKeyExpr.has('config.chat.experimental.offerSetup')), ChatContextKeys.Setup.triggered)), ChatContextKeys.Setup.installed, ChatContextKeys.panelParticipantRegistered, ChatContextKeys.extensionInvalid))
331
- }];
332
- ( Registry.as(Extensions.ViewsRegistry)).registerViews(viewDescriptor, this._viewContainer);
333
- return toDisposable(() => {
334
- ( Registry.as(Extensions.ViewsRegistry)).deregisterViews(viewDescriptor, this._viewContainer);
335
- });
336
- }
337
- registerChatEditingView() {
338
- const title = ( localize2(4513, "Copilot Edits"));
339
- const icon = Codicon.editSession;
340
- const viewContainerId = CHAT_EDITING_SIDEBAR_PANEL_ID;
341
- const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
342
- id: viewContainerId,
343
- title,
344
- icon,
345
- ctorDescriptor: ( new SyncDescriptor(
346
- ViewPaneContainer,
347
- [viewContainerId, { mergeViewWithContainerWhenSingleView: true }]
348
- )),
349
- storageId: viewContainerId,
350
- hideIfEmpty: true,
351
- order: 101,
352
- }, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true });
353
- const id = 'workbench.panel.chat.view.edits';
354
- const viewDescriptor = [{
355
- id,
356
- containerIcon: viewContainer.icon,
357
- containerTitle: title.value,
358
- singleViewPaneContainerTitle: title.value,
359
- name: { value: title.value, original: title.value },
360
- canToggleVisibility: false,
361
- canMoveView: true,
362
- openCommandActionDescriptor: {
363
- id: viewContainerId,
364
- title,
365
- mnemonicTitle: ( localize(4514, "Copilot Ed&&its")),
366
- keybindings: {
367
- primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI,
368
- linux: {
369
- primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.Shift | KeyCode.KeyI
370
- }
371
- },
372
- order: 2
373
- },
374
- ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.EditingSession }])),
375
- when: ( ContextKeyExpr.or(
376
- ChatContextKeys.Setup.installed,
377
- ChatContextKeys.editingParticipantRegistered
378
- ))
379
- }];
380
- ( Registry.as(Extensions.ViewsRegistry)).registerViews(viewDescriptor, viewContainer);
381
- return toDisposable(() => {
382
- ( Registry.as(Extensions.ViewContainersRegistry)).deregisterViewContainer(viewContainer);
383
- ( Registry.as(Extensions.ViewsRegistry)).deregisterViews(viewDescriptor, viewContainer);
384
- });
385
- }
386
362
  };
387
363
  ChatExtensionPointHandler = ( __decorate([
388
364
  ( __param(0, IChatAgentService)),
@@ -415,9 +391,9 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
415
391
  return;
416
392
  }
417
393
  this.registeredWelcomeView = true;
418
- const showExtensionLabel = ( localize(4515, "Show Extension"));
394
+ const showExtensionLabel = ( localize(4608, "Show Extension"));
419
395
  const mainMessage = ( localize(
420
- 4516,
396
+ 4609,
421
397
  "Chat failed to load because the installed version of the Copilot Chat extension is not compatible with this version of {0}. Please ensure that the Copilot Chat extension is up to date.",
422
398
  this.productService.nameLong
423
399
  ));
@@ -435,5 +411,49 @@ ChatCompatibilityNotifier = ( __decorate([
435
411
  ( __param(1, IContextKeyService)),
436
412
  ( __param(2, IProductService))
437
413
  ], ChatCompatibilityNotifier));
414
+ class ChatParticipantDataRenderer extends Disposable {
415
+ constructor() {
416
+ super(...arguments);
417
+ this.type = 'table';
418
+ }
419
+ shouldRender(manifest) {
420
+ return !!manifest.contributes?.chatParticipants;
421
+ }
422
+ render(manifest) {
423
+ const nonDefaultContributions = manifest.contributes?.chatParticipants?.filter(c => !c.isDefault) ?? [];
424
+ if (!nonDefaultContributions.length) {
425
+ return { data: { headers: [], rows: [] }, dispose: () => { } };
426
+ }
427
+ const headers = [
428
+ ( localize(4610, "Name")),
429
+ ( localize(4611, "Full Name")),
430
+ ( localize(4612, "Description")),
431
+ ( localize(4613, "Commands")),
432
+ ];
433
+ const rows = ( nonDefaultContributions.map(d => {
434
+ return [
435
+ '@' + d.name,
436
+ d.fullName,
437
+ d.description ?? '-',
438
+ d.commands?.length ? ( new MarkdownString(( d.commands.map(c => `- /` + c.name)).join('\n'))) : '-'
439
+ ];
440
+ }));
441
+ return {
442
+ data: {
443
+ headers,
444
+ rows
445
+ },
446
+ dispose: () => { }
447
+ };
448
+ }
449
+ }
450
+ ( Registry.as(Extensions$1.ExtensionFeaturesRegistry)).registerExtensionFeature({
451
+ id: 'chatParticipants',
452
+ label: ( localize(4614, "Chat Participants")),
453
+ access: {
454
+ canToggle: false
455
+ },
456
+ renderer: ( new SyncDescriptor(ChatParticipantDataRenderer)),
457
+ });
438
458
 
439
459
  export { ChatCompatibilityNotifier, ChatExtensionPointHandler };
@@ -14,6 +14,7 @@ import { Mimes } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
14
14
  import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model';
15
15
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
16
16
  import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
17
+ import { resizeImage } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
17
18
 
18
19
  const COPY_MIME_TYPES = 'application/vnd.code.additional-editor-data';
19
20
  class PasteImageProvider {
@@ -58,20 +59,25 @@ class PasteImageProvider {
58
59
  return;
59
60
  }
60
61
  const attachedVariables = widget.attachmentModel.attachments;
61
- const displayName = ( localize(4517, 'Pasted Image'));
62
+ const displayName = ( localize(4615, 'Pasted Image'));
62
63
  let tempDisplayName = displayName;
63
64
  for (let appendValue = 2; ( attachedVariables.some(attachment => attachment.name === tempDisplayName)); appendValue++) {
64
65
  tempDisplayName = `${displayName} ${appendValue}`;
65
66
  }
66
- const imageContext = await getImageAttachContext(currClipboard, mimeType, token, tempDisplayName);
67
- if (token.isCancellationRequested || !imageContext) {
67
+ const scaledImageData = await resizeImage(currClipboard);
68
+ if (token.isCancellationRequested || !scaledImageData) {
68
69
  return;
69
70
  }
71
+ const scaledImageContext = await getImageAttachContext(scaledImageData, mimeType, token, tempDisplayName);
72
+ if (token.isCancellationRequested || !scaledImageContext) {
73
+ return;
74
+ }
75
+ widget.attachmentModel.addContext(scaledImageContext);
70
76
  const currentContextIds = widget.attachmentModel.getAttachmentIDs();
71
- if (( currentContextIds.has(imageContext.id))) {
77
+ if (( currentContextIds.has(scaledImageContext.id))) {
72
78
  return;
73
79
  }
74
- const edit = createCustomPasteEdit(model, imageContext, mimeType, this.kind, ( localize(4518, 'Pasted Image Attachment')), this.chatWidgetService);
80
+ const edit = createCustomPasteEdit(model, scaledImageContext, mimeType, this.kind, ( localize(4616, 'Pasted Image Attachment')), this.chatWidgetService);
75
81
  return createEditSession(edit);
76
82
  }
77
83
  }
@@ -170,7 +176,7 @@ class PasteTextProvider {
170
176
  if (( currentContextIds.has(copiedContext.id))) {
171
177
  return;
172
178
  }
173
- const edit = createCustomPasteEdit(model, copiedContext, Mimes.text, this.kind, ( localize(4519, 'Pasted Code Attachment')), this.chatWidgetService);
179
+ const edit = createCustomPasteEdit(model, copiedContext, Mimes.text, this.kind, ( localize(4617, 'Pasted Code Attachment')), this.chatWidgetService);
174
180
  edit.yieldTo = [{ kind: HierarchicalKind.Empty.append('text', 'plain') }];
175
181
  return createEditSession(edit);
176
182
  }
@@ -180,7 +186,7 @@ function getCopiedContext(code, file, language, range) {
180
186
  const start = range.startLineNumber;
181
187
  const end = range.endLineNumber;
182
188
  const resultText = `Copied Selection of Code: \n\n\n From the file: ${fileName} From lines ${start} to ${end} \n \`\`\`${code}\`\`\``;
183
- const pastedLines = start === end ? ( localize(4520, '1 line')) : ( localize(4521, '{0} lines', end + 1 - start));
189
+ const pastedLines = start === end ? ( localize(4618, '1 line')) : ( localize(4619, '{0} lines', end + 1 - start));
184
190
  return {
185
191
  kind: 'paste',
186
192
  value: resultText,
@@ -2,7 +2,7 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
3
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
4
  import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
5
- import { IQuickChatOpenOptions } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chat";
5
+ import { IQuickChatOpenOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
6
6
  import { IQuickChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
7
7
  import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
8
8
  export declare class QuickChatService extends Disposable implements IQuickChatService {
@@ -23,7 +23,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
23
23
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
24
24
  import { quickInputBackground, quickInputForeground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
25
25
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
26
- import { showChatView } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chat';
26
+ import { showChatView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
27
27
  import { ChatWidget } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
28
28
  import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
29
29
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
@@ -1,10 +1,10 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { AccessibleViewProviderId, AccessibleViewType, IAccessibleViewContentProvider } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
3
- import { IAccessibleViewImplentation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
3
+ import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
4
4
  import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
5
5
  import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
6
- import { ChatTreeItem, IChatWidget } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chat";
7
- export declare class ChatResponseAccessibleView implements IAccessibleViewImplentation {
6
+ import { ChatTreeItem, IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
7
+ export declare class ChatResponseAccessibleView implements IAccessibleViewImplementation {
8
8
  readonly priority = 100;
9
9
  readonly name = "panelChat";
10
10
  readonly type = AccessibleViewType.View;
@@ -5,7 +5,7 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
5
5
  import { AccessibleViewType, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
6
6
  import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
7
7
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
8
- import { isResponseVM } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
8
+ import { isResponseVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatViewModel';
9
9
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
10
10
 
11
11
  class ChatResponseAccessibleView {
@@ -1,17 +1,22 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
2
3
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
4
  import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
5
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
4
6
  import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
5
- export declare const SetupWelcomeViewKeys: Set<string>;
6
- export declare const SetupWelcomeViewCondition: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression;
7
+ import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
8
+ import { IWorkbenchAssignmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service";
7
9
  export declare class ChatSetupContribution extends Disposable implements IWorkbenchContribution {
8
10
  private readonly productService;
9
11
  private readonly instantiationService;
12
+ private readonly environmentService;
13
+ private readonly commandService;
14
+ private readonly telemetryService;
15
+ private readonly experimentService;
10
16
  static readonly ID = "workbench.chat.setup";
11
- private readonly context;
12
- private readonly requests;
13
- private readonly controller;
14
- constructor(productService: IProductService, instantiationService: IInstantiationService);
17
+ constructor(productService: IProductService, instantiationService: IInstantiationService, environmentService: IWorkbenchEnvironmentService, commandService: ICommandService, telemetryService: ITelemetryService, experimentService: IWorkbenchAssignmentService);
15
18
  private registerChatWelcome;
16
19
  private registerActions;
20
+ private registerUrlLinkHandler;
21
+ private registerSetting;
17
22
  }