@codingame/monaco-vscode-chat-service-override 4.5.1 → 4.5.2

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 (19) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +6 -17
  3. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +26 -39
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +5 -12
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +3 -10
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -17
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -28
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +19 -34
  9. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +35 -58
  10. package/vscode/src/vs/workbench/contrib/chat/browser/chatContributionServiceImpl.js +57 -100
  11. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +1 -1
  14. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +1 -1
  15. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +66 -69
  16. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +96 -93
  17. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +3 -3
  18. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +4 -2
  19. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +35 -34
@@ -53,58 +53,39 @@ import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/ed
53
53
  import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService.service';
54
54
  import 'vscode/vscode/vs/workbench/contrib/chat/common/chatColors';
55
55
 
56
- const configurationRegistry = ( Registry.as(Extensions.Configuration));
56
+ const _moduleId = "vs/workbench/contrib/chat/browser/chat.contribution";
57
+ const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
57
58
  configurationRegistry.registerConfiguration({
58
59
  id: 'chatSidebar',
59
- title: ( localizeWithPath(
60
- 'vs/workbench/contrib/chat/browser/chat.contribution',
61
- 'interactiveSessionConfigurationTitle',
62
- "Chat"
63
- )),
60
+ title: ( localizeWithPath(_moduleId, 0, "Chat")),
64
61
  type: 'object',
65
62
  properties: {
66
63
  'chat.editor.fontSize': {
67
64
  type: 'number',
68
- description: ( localizeWithPath(
69
- 'vs/workbench/contrib/chat/browser/chat.contribution',
70
- 'interactiveSession.editor.fontSize',
71
- "Controls the font size in pixels in chat codeblocks."
72
- )),
65
+ description: ( localizeWithPath(_moduleId, 1, "Controls the font size in pixels in chat codeblocks.")),
73
66
  default: isMacintosh ? 12 : 14,
74
67
  },
75
68
  'chat.editor.fontFamily': {
76
69
  type: 'string',
77
- description: ( localizeWithPath(
78
- 'vs/workbench/contrib/chat/browser/chat.contribution',
79
- 'interactiveSession.editor.fontFamily',
80
- "Controls the font family in chat codeblocks."
81
- )),
70
+ description: ( localizeWithPath(_moduleId, 2, "Controls the font family in chat codeblocks.")),
82
71
  default: 'default'
83
72
  },
84
73
  'chat.editor.fontWeight': {
85
74
  type: 'string',
86
- description: ( localizeWithPath(
87
- 'vs/workbench/contrib/chat/browser/chat.contribution',
88
- 'interactiveSession.editor.fontWeight',
89
- "Controls the font weight in chat codeblocks."
90
- )),
75
+ description: ( localizeWithPath(_moduleId, 3, "Controls the font weight in chat codeblocks.")),
91
76
  default: 'default'
92
77
  },
93
78
  'chat.editor.wordWrap': {
94
79
  type: 'string',
95
- description: ( localizeWithPath(
96
- 'vs/workbench/contrib/chat/browser/chat.contribution',
97
- 'interactiveSession.editor.wordWrap',
98
- "Controls whether lines should wrap in chat codeblocks."
99
- )),
80
+ description: ( localizeWithPath(_moduleId, 4, "Controls whether lines should wrap in chat codeblocks.")),
100
81
  default: 'off',
101
82
  enum: ['on', 'off']
102
83
  },
103
84
  'chat.editor.lineHeight': {
104
85
  type: 'number',
105
86
  description: ( localizeWithPath(
106
- 'vs/workbench/contrib/chat/browser/chat.contribution',
107
- 'interactiveSession.editor.lineHeight',
87
+ _moduleId,
88
+ 5,
108
89
  "Controls the line height in pixels in chat codeblocks. Use 0 to compute the line height from the font size."
109
90
  )),
110
91
  default: 0
@@ -112,16 +93,16 @@ configurationRegistry.registerConfiguration({
112
93
  'chat.experimental.implicitContext': {
113
94
  type: 'boolean',
114
95
  description: ( localizeWithPath(
115
- 'vs/workbench/contrib/chat/browser/chat.contribution',
116
- 'chat.experimental.implicitContext',
96
+ _moduleId,
97
+ 6,
117
98
  "Controls whether a checkbox is shown to allow the user to determine which implicit context is included with a chat participant's prompt."
118
99
  )),
119
100
  default: false
120
101
  },
121
102
  }
122
103
  });
123
- ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localizeWithPath('vs/workbench/contrib/chat/browser/chat.contribution', 'chat', "Chat"))), [
124
- ( new SyncDescriptor(ChatEditorInput))
104
+ ( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localizeWithPath(_moduleId, 7, "Chat"))), [
105
+ ( (new SyncDescriptor(ChatEditorInput)))
125
106
  ]);
126
107
  let ChatResolverContribution = class ChatResolverContribution extends Disposable {
127
108
  static { this.ID = 'workbench.contrib.chatResolver'; }
@@ -129,7 +110,7 @@ let ChatResolverContribution = class ChatResolverContribution extends Disposable
129
110
  super();
130
111
  this._register(editorResolverService.registerEditor(`${Schemas.vscodeChatSesssion}:**/**`, {
131
112
  id: ChatEditorInput.EditorID,
132
- label: ( localizeWithPath('vs/workbench/contrib/chat/browser/chat.contribution', 'chat', "Chat")),
113
+ label: ( localizeWithPath(_moduleId, 7, "Chat")),
133
114
  priority: RegisteredEditorPriority.builtin
134
115
  }, {
135
116
  singlePerResource: true,
@@ -141,10 +122,10 @@ let ChatResolverContribution = class ChatResolverContribution extends Disposable
141
122
  }));
142
123
  }
143
124
  };
144
- ChatResolverContribution = ( __decorate([
145
- ( __param(0, IEditorResolverService)),
146
- ( __param(1, IInstantiationService))
147
- ], ChatResolverContribution));
125
+ ChatResolverContribution = ( (__decorate([
126
+ ( (__param(0, IEditorResolverService))),
127
+ ( (__param(1, IInstantiationService)))
128
+ ], ChatResolverContribution)));
148
129
  class ChatAccessibleViewContribution extends Disposable {
149
130
  constructor() {
150
131
  super();
@@ -177,7 +158,7 @@ class ChatAccessibleViewContribution extends Disposable {
177
158
  const welcomeReplyContents = [];
178
159
  for (const content of focusedItem.content) {
179
160
  if (Array.isArray(content)) {
180
- welcomeReplyContents.push(...( content.map(m => m.message)));
161
+ welcomeReplyContents.push(...( (content.map(m => m.message))));
181
162
  }
182
163
  else {
183
164
  welcomeReplyContents.push(content.value);
@@ -229,11 +210,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
229
210
  super();
230
211
  this._store.add(slashCommandService.registerSlashCommand({
231
212
  command: 'clear',
232
- detail: ( localizeWithPath(
233
- 'vs/workbench/contrib/chat/browser/chat.contribution',
234
- 'clear',
235
- "Start a new chat"
236
- )),
213
+ detail: ( localizeWithPath(_moduleId, 8, "Start a new chat")),
237
214
  sortText: 'z2_clear',
238
215
  executeImmediately: true
239
216
  }, async () => {
@@ -256,21 +233,21 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
256
233
  }
257
234
  progress.report({ content: '\n\n', kind: 'content' });
258
235
  }
259
- const agentText = (await Promise.all(( agents
236
+ const agentText = (await Promise.all(( (agents
260
237
  .filter(a => a.id !== defaultAgent?.id)
261
238
  .map(async (a) => {
262
239
  const agentWithLeader = `${chatAgentLeader}${a.name}`;
263
240
  const actionArg = { inputValue: `${agentWithLeader} ${a.metadata.sampleRequest}` };
264
241
  const urlSafeArg = encodeURIComponent(JSON.stringify(actionArg));
265
242
  const agentLine = `* [\`${agentWithLeader}\`](command:${SubmitAction.ID}?${urlSafeArg}) - ${a.description}`;
266
- const commandText = ( a.slashCommands.map(c => {
243
+ const commandText = ( (a.slashCommands.map(c => {
267
244
  const actionArg = { inputValue: `${agentWithLeader} ${chatSubcommandLeader}${c.name} ${c.sampleRequest ?? ''}` };
268
245
  const urlSafeArg = encodeURIComponent(JSON.stringify(actionArg));
269
246
  return `\t* [\`${chatSubcommandLeader}${c.name}\`](command:${SubmitAction.ID}?${urlSafeArg}) - ${c.description}`;
270
- })).join('\n');
247
+ }))).join('\n');
271
248
  return (agentLine + '\n' + commandText).trim();
272
- })))).join('\n');
273
- progress.report({ content: ( new MarkdownString(agentText, { isTrusted: { enabledCommands: [SubmitAction.ID] } })), kind: 'markdownContent' });
249
+ }))))).join('\n');
250
+ progress.report({ content: ( (new MarkdownString(agentText, { isTrusted: { enabledCommands: [SubmitAction.ID] } }))), kind: 'markdownContent' });
274
251
  if (defaultAgent?.metadata.helpTextVariablesPrefix) {
275
252
  progress.report({ content: '\n\n', kind: 'content' });
276
253
  if (isMarkdownString(defaultAgent.metadata.helpTextVariablesPrefix)) {
@@ -279,8 +256,8 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
279
256
  else {
280
257
  progress.report({ content: defaultAgent.metadata.helpTextVariablesPrefix, kind: 'content' });
281
258
  }
282
- const variableText = ( Array.from(chatVariablesService.getVariables())
283
- .map(v => `* \`${chatVariableLeader}${v.name}\` - ${v.description}`))
259
+ const variableText = ( (Array.from(chatVariablesService.getVariables())
260
+ .map(v => `* \`${chatVariableLeader}${v.name}\` - ${v.description}`)))
284
261
  .join('\n');
285
262
  progress.report({ content: '\n' + variableText, kind: 'content' });
286
263
  }
@@ -296,17 +273,17 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
296
273
  }));
297
274
  }
298
275
  };
299
- ChatSlashStaticSlashCommandsContribution = ( __decorate([
300
- ( __param(0, IChatSlashCommandService)),
301
- ( __param(1, ICommandService)),
302
- ( __param(2, IChatAgentService)),
303
- ( __param(3, IChatVariablesService))
304
- ], ChatSlashStaticSlashCommandsContribution));
305
- const workbenchContributionsRegistry = ( Registry.as(Extensions$1.Workbench));
276
+ ChatSlashStaticSlashCommandsContribution = ( (__decorate([
277
+ ( (__param(0, IChatSlashCommandService))),
278
+ ( (__param(1, ICommandService))),
279
+ ( (__param(2, IChatAgentService))),
280
+ ( (__param(3, IChatVariablesService)))
281
+ ], ChatSlashStaticSlashCommandsContribution)));
282
+ const workbenchContributionsRegistry = ( (Registry.as(Extensions$1.Workbench)));
306
283
  registerWorkbenchContribution2(ChatResolverContribution.ID, ChatResolverContribution, 1 );
307
284
  workbenchContributionsRegistry.registerWorkbenchContribution(ChatAccessibleViewContribution, 4 );
308
285
  workbenchContributionsRegistry.registerWorkbenchContribution(ChatSlashStaticSlashCommandsContribution, 4 );
309
- ( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(ChatEditorInput.TypeID, ChatEditorInputSerializer);
286
+ ( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(ChatEditorInput.TypeID, ChatEditorInputSerializer);
310
287
  registerChatActions();
311
288
  registerChatCopyActions();
312
289
  registerChatCodeBlockActions();
@@ -24,14 +24,11 @@ import { IChatContributionService } from 'vscode/vscode/vs/workbench/contrib/cha
24
24
  import { isProposedApiEnabled } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
25
25
  import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
26
26
 
27
+ const _moduleId = "vs/workbench/contrib/chat/browser/chatContributionServiceImpl";
27
28
  const chatExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
28
29
  extensionPoint: 'interactiveSession',
29
30
  jsonSchema: {
30
- description: ( localizeWithPath(
31
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
32
- 'vscode.extension.contributes.interactiveSession',
33
- 'Contributes an Interactive Session provider'
34
- )),
31
+ description: ( localizeWithPath(_moduleId, 0, 'Contributes an Interactive Session provider')),
35
32
  type: 'array',
36
33
  items: {
37
34
  additionalProperties: false,
@@ -40,33 +37,21 @@ const chatExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
40
37
  required: ['id', 'label'],
41
38
  properties: {
42
39
  id: {
43
- description: ( localizeWithPath(
44
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
45
- 'vscode.extension.contributes.interactiveSession.id',
46
- "Unique identifier for this Interactive Session provider."
47
- )),
40
+ description: ( localizeWithPath(_moduleId, 1, "Unique identifier for this Interactive Session provider.")),
48
41
  type: 'string'
49
42
  },
50
43
  label: {
51
- description: ( localizeWithPath(
52
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
53
- 'vscode.extension.contributes.interactiveSession.label',
54
- "Display name for this Interactive Session provider."
55
- )),
44
+ description: ( localizeWithPath(_moduleId, 2, "Display name for this Interactive Session provider.")),
56
45
  type: 'string'
57
46
  },
58
47
  icon: {
59
- description: ( localizeWithPath(
60
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
61
- 'vscode.extension.contributes.interactiveSession.icon',
62
- "An icon for this Interactive Session provider."
63
- )),
48
+ description: ( localizeWithPath(_moduleId, 3, "An icon for this Interactive Session provider.")),
64
49
  type: 'string'
65
50
  },
66
51
  when: {
67
52
  description: ( localizeWithPath(
68
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
69
- 'vscode.extension.contributes.interactiveSession.when',
53
+ _moduleId,
54
+ 4,
70
55
  "A condition which must be true to enable this Interactive Session provider."
71
56
  )),
72
57
  type: 'string'
@@ -83,11 +68,7 @@ const chatExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
83
68
  const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
84
69
  extensionPoint: 'chatParticipants',
85
70
  jsonSchema: {
86
- description: ( localizeWithPath(
87
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
88
- 'vscode.extension.contributes.chatParticipant',
89
- 'Contributes a chat participant'
90
- )),
71
+ description: ( localizeWithPath(_moduleId, 5, 'Contributes a chat participant')),
91
72
  type: 'array',
92
73
  items: {
93
74
  additionalProperties: false,
@@ -96,41 +77,33 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
96
77
  required: ['name', 'id'],
97
78
  properties: {
98
79
  id: {
99
- description: ( localizeWithPath(
100
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
101
- 'chatParticipantId',
102
- "A unique id for this chat participant."
103
- )),
80
+ description: ( localizeWithPath(_moduleId, 6, "A unique id for this chat participant.")),
104
81
  type: 'string'
105
82
  },
106
83
  name: {
107
84
  description: ( localizeWithPath(
108
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
109
- 'chatParticipantName',
85
+ _moduleId,
86
+ 7,
110
87
  "User-facing display name for this chat participant. The user will use '@' with this name to invoke the participant."
111
88
  )),
112
89
  type: 'string'
113
90
  },
114
91
  description: {
115
- description: ( localizeWithPath(
116
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
117
- 'chatParticipantDescription',
118
- "A description of this chat participant, shown in the UI."
119
- )),
92
+ description: ( localizeWithPath(_moduleId, 8, "A description of this chat participant, shown in the UI.")),
120
93
  type: 'string'
121
94
  },
122
95
  isDefault: {
123
96
  markdownDescription: ( localizeWithPath(
124
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
125
- 'chatParticipantIsDefaultDescription',
97
+ _moduleId,
98
+ 9,
126
99
  "**Only** allowed for extensions that have the `defaultChatParticipant` proposal."
127
100
  )),
128
101
  type: 'boolean',
129
102
  },
130
103
  isSticky: {
131
104
  description: ( localizeWithPath(
132
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
133
- 'chatCommandSticky',
105
+ _moduleId,
106
+ 10,
134
107
  "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."
135
108
  )),
136
109
  type: 'boolean'
@@ -144,8 +117,8 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
144
117
  },
145
118
  commands: {
146
119
  markdownDescription: ( localizeWithPath(
147
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
148
- 'chatCommandsDescription',
120
+ _moduleId,
121
+ 11,
149
122
  "Commands available for this chat participant, which the user can invoke with a `/`."
150
123
  )),
151
124
  type: 'array',
@@ -157,48 +130,40 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
157
130
  properties: {
158
131
  name: {
159
132
  description: ( localizeWithPath(
160
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
161
- 'chatCommand',
133
+ _moduleId,
134
+ 12,
162
135
  "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."
163
136
  )),
164
137
  type: 'string'
165
138
  },
166
139
  description: {
167
- description: ( localizeWithPath(
168
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
169
- 'chatCommandDescription',
170
- "A description of this command."
171
- )),
140
+ description: ( localizeWithPath(_moduleId, 13, "A description of this command.")),
172
141
  type: 'string'
173
142
  },
174
143
  when: {
175
- description: ( localizeWithPath(
176
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
177
- 'chatCommandWhen',
178
- "A condition which must be true to enable this command."
179
- )),
144
+ description: ( localizeWithPath(_moduleId, 14, "A condition which must be true to enable this command.")),
180
145
  type: 'string'
181
146
  },
182
147
  sampleRequest: {
183
148
  description: ( localizeWithPath(
184
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
185
- 'chatCommandSampleRequest',
149
+ _moduleId,
150
+ 15,
186
151
  "When the user clicks this command in `/help`, this text will be submitted to this participant."
187
152
  )),
188
153
  type: 'string'
189
154
  },
190
155
  isSticky: {
191
156
  description: ( localizeWithPath(
192
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
193
- 'chatCommandSticky',
157
+ _moduleId,
158
+ 10,
194
159
  "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."
195
160
  )),
196
161
  type: 'boolean'
197
162
  },
198
163
  defaultImplicitVariables: {
199
164
  markdownDescription: ( localizeWithPath(
200
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
201
- 'defaultImplicitVariables',
165
+ _moduleId,
166
+ 16,
202
167
  "**Only** allowed for extensions that have the `chatParticipantAdditions` proposal. The names of the variables that are invoked by default"
203
168
  )),
204
169
  type: 'array',
@@ -210,11 +175,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
210
175
  }
211
176
  },
212
177
  locations: {
213
- markdownDescription: ( localizeWithPath(
214
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
215
- 'chatLocationsDescription',
216
- "Locations in which this chat participant is available."
217
- )),
178
+ markdownDescription: ( localizeWithPath(_moduleId, 17, "Locations in which this chat participant is available.")),
218
179
  type: 'array',
219
180
  default: ['panel'],
220
181
  items: {
@@ -239,9 +200,9 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
239
200
  this.productService = productService;
240
201
  this.contextService = contextService;
241
202
  this.logService = logService;
242
- this.disposables = ( new DisposableStore());
243
- this._registrationDisposables = ( new Map());
244
- this._participantRegistrationDisposables = ( new DisposableMap());
203
+ this.disposables = ( (new DisposableStore()));
204
+ this._registrationDisposables = ( (new Map()));
205
+ this._participantRegistrationDisposables = ( (new DisposableMap()));
245
206
  this._viewContainer = this.registerViewContainer();
246
207
  this.registerListeners();
247
208
  this.handleAndRegisterChatExtensions();
@@ -252,20 +213,20 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
252
213
  return;
253
214
  }
254
215
  const showWelcomeViewConfigKey = 'workbench.chat.experimental.showWelcomeView';
255
- const keys = ( new Set([showWelcomeViewConfigKey]));
216
+ const keys = ( (new Set([showWelcomeViewConfigKey])));
256
217
  if (e.affectsSome(keys)) {
257
- const contextKeyExpr = ( ContextKeyExpr.equals(showWelcomeViewConfigKey, true));
258
- const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
218
+ const contextKeyExpr = ( (ContextKeyExpr.equals(showWelcomeViewConfigKey, true)));
219
+ const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
259
220
  if (this.contextService.contextMatchesRules(contextKeyExpr)) {
260
221
  const viewId = this._chatContributionService.getViewIdForProvider(this.productService.chatWelcomeView.welcomeViewId);
261
222
  this._welcomeViewDescriptor = {
262
223
  id: viewId,
263
224
  name: { original: this.productService.chatWelcomeView.welcomeViewTitle, value: this.productService.chatWelcomeView.welcomeViewTitle },
264
225
  containerIcon: this._viewContainer.icon,
265
- ctorDescriptor: ( new SyncDescriptor(
226
+ ctorDescriptor: ( (new SyncDescriptor(
266
227
  ChatViewPane,
267
228
  [{ providerId: this.productService.chatWelcomeView.welcomeViewId }]
268
- )),
229
+ ))),
269
230
  canToggleVisibility: false,
270
231
  canMoveView: true,
271
232
  order: 100
@@ -284,7 +245,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
284
245
  handleAndRegisterChatExtensions() {
285
246
  chatExtensionPoint.setHandler((extensions, delta) => {
286
247
  for (const extension of delta.added) {
287
- const extensionDisposable = ( new DisposableStore());
248
+ const extensionDisposable = ( (new DisposableStore()));
288
249
  for (const providerDescriptor of extension.value) {
289
250
  this.registerChatProvider(providerDescriptor);
290
251
  this._chatContributionService.registerChatProvider(providerDescriptor);
@@ -328,7 +289,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
328
289
  isDefault: providerDescriptor.isDefault,
329
290
  defaultImplicitVariables: providerDescriptor.defaultImplicitVariables,
330
291
  locations: isNonEmptyArray(providerDescriptor.locations) ?
331
- ( providerDescriptor.locations.map(ChatAgentLocation.fromRaw)) :
292
+ ( (providerDescriptor.locations.map(ChatAgentLocation.fromRaw))) :
332
293
  [ChatAgentLocation.Panel],
333
294
  slashCommands: providerDescriptor.commands ?? []
334
295
  }));
@@ -342,21 +303,17 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
342
303
  });
343
304
  }
344
305
  registerViewContainer() {
345
- const title = ( localize2WithPath(
346
- 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl',
347
- 'chat.viewContainer.label',
348
- "Chat"
349
- ));
306
+ const title = ( localize2WithPath(_moduleId, 18, "Chat"));
350
307
  const icon = Codicon.commentDiscussion;
351
308
  const viewContainerId = CHAT_SIDEBAR_PANEL_ID;
352
- const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
309
+ const viewContainer = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
353
310
  id: viewContainerId,
354
311
  title,
355
312
  icon,
356
- ctorDescriptor: ( new SyncDescriptor(
313
+ ctorDescriptor: ( (new SyncDescriptor(
357
314
  ViewPaneContainer,
358
315
  [viewContainerId, { mergeViewWithContainerWhenSingleView: true }]
359
- )),
316
+ ))),
360
317
  storageId: viewContainerId,
361
318
  hideIfEmpty: true,
362
319
  order: 100,
@@ -373,11 +330,11 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
373
330
  name: { value: providerDescriptor.label, original: providerDescriptor.label },
374
331
  canToggleVisibility: false,
375
332
  canMoveView: true,
376
- ctorDescriptor: ( new SyncDescriptor(ChatViewPane, [{ providerId: providerDescriptor.id }])),
333
+ ctorDescriptor: ( (new SyncDescriptor(ChatViewPane, [{ providerId: providerDescriptor.id }]))),
377
334
  when: ContextKeyExpr.deserialize(providerDescriptor.when)
378
335
  }];
379
- ( Registry.as(Extensions.ViewsRegistry)).registerViews(viewDescriptor, this._viewContainer);
380
- const disposables = ( new DisposableStore());
336
+ ( (Registry.as(Extensions.ViewsRegistry))).registerViews(viewDescriptor, this._viewContainer);
337
+ const disposables = ( (new DisposableStore()));
381
338
  disposables.add(registerAction2(getHistoryAction(viewId, providerDescriptor.id)));
382
339
  disposables.add(registerAction2(getNewChatAction(viewId, providerDescriptor.id)));
383
340
  disposables.add(registerAction2(getMoveToEditorAction(viewId, providerDescriptor.id)));
@@ -386,27 +343,27 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
386
343
  disposables.add(registerAction2(getQuickChatActionForProvider(providerDescriptor.id, providerDescriptor.label)));
387
344
  return {
388
345
  dispose: () => {
389
- ( Registry.as(Extensions.ViewsRegistry)).deregisterViews(viewDescriptor, this._viewContainer);
390
- ( Registry.as(Extensions.ViewContainersRegistry)).deregisterViewContainer(this._viewContainer);
346
+ ( (Registry.as(Extensions.ViewsRegistry))).deregisterViews(viewDescriptor, this._viewContainer);
347
+ ( (Registry.as(Extensions.ViewContainersRegistry))).deregisterViewContainer(this._viewContainer);
391
348
  disposables.dispose();
392
349
  }
393
350
  };
394
351
  }
395
352
  };
396
- ChatExtensionPointHandler = ( __decorate([
397
- ( __param(0, IChatContributionService)),
398
- ( __param(1, IChatAgentService)),
399
- ( __param(2, IProductService)),
400
- ( __param(3, IContextKeyService)),
401
- ( __param(4, ILogService))
402
- ], ChatExtensionPointHandler));
353
+ ChatExtensionPointHandler = ( (__decorate([
354
+ ( (__param(0, IChatContributionService))),
355
+ ( (__param(1, IChatAgentService))),
356
+ ( (__param(2, IProductService))),
357
+ ( (__param(3, IContextKeyService))),
358
+ ( (__param(4, ILogService)))
359
+ ], ChatExtensionPointHandler)));
403
360
  registerWorkbenchContribution2(ChatExtensionPointHandler.ID, ChatExtensionPointHandler, 1 );
404
361
  function getParticipantKey(extensionId, participantName) {
405
362
  return `${extensionId.value}_${participantName}`;
406
363
  }
407
364
  class ChatContributionService {
408
365
  constructor() {
409
- this._registeredProviders = ( new Map());
366
+ this._registeredProviders = ( (new Map()));
410
367
  }
411
368
  getViewIdForProvider(providerId) {
412
369
  return ChatViewPane.ID + '.' + providerId;
@@ -418,7 +375,7 @@ class ChatContributionService {
418
375
  this._registeredProviders.delete(providerId);
419
376
  }
420
377
  get registeredProviders() {
421
- return Array.from(( this._registeredProviders.values()));
378
+ return Array.from(( (this._registeredProviders.values())));
422
379
  }
423
380
  }
424
381
 
@@ -61,10 +61,10 @@ let ChatEditor = class ChatEditor extends EditorPane {
61
61
  super.setInput(input, options, context, token);
62
62
  const editorModel = await input.resolve();
63
63
  if (!editorModel) {
64
- throw new Error(`Failed to get model for chat editor. id: ${input.sessionId}`);
64
+ throw ( new Error(`Failed to get model for chat editor. id: ${input.sessionId}`));
65
65
  }
66
66
  if (!this.widget) {
67
- throw new Error('ChatEditor lifecycle issue: no editor widget');
67
+ throw ( new Error('ChatEditor lifecycle issue: no editor widget'));
68
68
  }
69
69
  this.updateModel(editorModel.model, options?.viewState ?? input.options.viewState);
70
70
  }
@@ -180,7 +180,7 @@ let QuickChat = class QuickChat extends Disposable {
180
180
  }
181
181
  render(parent) {
182
182
  if (this.widget) {
183
- throw new Error('Cannot render quick chat twice');
183
+ throw ( new Error('Cannot render quick chat twice'));
184
184
  }
185
185
  const scopedInstantiationService = this.instantiationService.createChild(( new ServiceCollection([
186
186
  IContextKeyService,
@@ -269,7 +269,7 @@ let QuickChat = class QuickChat extends Disposable {
269
269
  updateModel() {
270
270
  this.model ??= this.chatService.startSession(this._options.providerId, CancellationToken.None);
271
271
  if (!this.model) {
272
- throw new Error('Could not start chat session');
272
+ throw ( new Error('Could not start chat session'));
273
273
  }
274
274
  this.widget.setModel(this.model, { inputValue: this._currentQuery });
275
275
  }
@@ -75,7 +75,7 @@ let ChatVariablesService = class ChatVariablesService {
75
75
  registerVariable(data, resolver) {
76
76
  const key = data.name.toLowerCase();
77
77
  if (( this._resolver.has(key))) {
78
- throw new Error(`A chat variable with the name '${data.name}' already exists.`);
78
+ throw ( new Error(`A chat variable with the name '${data.name}' already exists.`));
79
79
  }
80
80
  this._resolver.set(key, { data, resolver });
81
81
  return toDisposable(() => {
@@ -78,7 +78,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
78
78
  ? this.chatService.getOrRestoreSession(this.chatService.transferredSessionData.sessionId)
79
79
  : this.chatService.startSession(this.chatViewOptions.providerId, CancellationToken.None));
80
80
  if (!model) {
81
- throw new Error('Could not start chat session');
81
+ throw ( new Error('Could not start chat session'));
82
82
  }
83
83
  this._widget.setModel(model, { ...(viewState ?? this.viewState) });
84
84
  this.viewState.sessionId = model.sessionId;