@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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +6 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +26 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +5 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +3 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +19 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +35 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContributionServiceImpl.js +57 -100
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +66 -69
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +96 -93
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +4 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +35 -34
|
@@ -36,6 +36,7 @@ import { IChatSlashCommandService } from 'vscode/vscode/vs/workbench/contrib/cha
|
|
|
36
36
|
import { IChatVariablesService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatVariables.service';
|
|
37
37
|
|
|
38
38
|
var BuiltinDynamicCompletions_1, VariableCompletions_1;
|
|
39
|
+
const _moduleId = "vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib";
|
|
39
40
|
const decorationDescription = 'chat';
|
|
40
41
|
const placeholderDecorationType = 'chat-session-detail';
|
|
41
42
|
const slashCommandTextDecorationType = 'chat-session-text';
|
|
@@ -51,8 +52,8 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
51
52
|
this.themeService = themeService;
|
|
52
53
|
this.chatAgentService = chatAgentService;
|
|
53
54
|
this.id = 'inputEditorDecorations';
|
|
54
|
-
this.previouslyUsedAgents = ( new Set());
|
|
55
|
-
this.viewModelDisposables = this._register(( new MutableDisposable()));
|
|
55
|
+
this.previouslyUsedAgents = ( (new Set()));
|
|
56
|
+
this.viewModelDisposables = this._register(( (new MutableDisposable())));
|
|
56
57
|
this.codeEditorService.registerDecorationType(decorationDescription, placeholderDecorationType, {});
|
|
57
58
|
this._register(this.themeService.onDidColorThemeChange(() => this.updateRegisteredDecorationTypes()));
|
|
58
59
|
this.updateRegisteredDecorationTypes();
|
|
@@ -152,7 +153,7 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
152
153
|
});
|
|
153
154
|
const onlyAgentAndWhitespace = agentPart && parsedRequest.every(p => p instanceof ChatRequestTextPart && !p.text.trim().length || p instanceof ChatRequestAgentPart);
|
|
154
155
|
if (onlyAgentAndWhitespace) {
|
|
155
|
-
const isFollowupSlashCommand = ( this.previouslyUsedAgents.has(agentAndCommandToKey(agentPart.agent, undefined)));
|
|
156
|
+
const isFollowupSlashCommand = ( (this.previouslyUsedAgents.has(agentAndCommandToKey(agentPart.agent, undefined))));
|
|
156
157
|
const shouldRenderFollowupPlaceholder = isFollowupSlashCommand && agentPart.agent.metadata.followupPlaceholder;
|
|
157
158
|
if (agentPart.agent.description && exactlyOneSpaceAfterPart(agentPart)) {
|
|
158
159
|
placeholderDecoration = [{
|
|
@@ -168,7 +169,7 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
168
169
|
}
|
|
169
170
|
const onlyAgentCommandAndWhitespace = agentPart && agentSubcommandPart && parsedRequest.every(p => p instanceof ChatRequestTextPart && !p.text.trim().length || p instanceof ChatRequestAgentPart || p instanceof ChatRequestAgentSubcommandPart);
|
|
170
171
|
if (onlyAgentCommandAndWhitespace) {
|
|
171
|
-
const isFollowupSlashCommand = ( this.previouslyUsedAgents.has(agentAndCommandToKey(agentPart.agent, agentSubcommandPart.command.name)));
|
|
172
|
+
const isFollowupSlashCommand = ( (this.previouslyUsedAgents.has(agentAndCommandToKey(agentPart.agent, agentSubcommandPart.command.name))));
|
|
172
173
|
const shouldRenderFollowupPlaceholder = isFollowupSlashCommand && agentSubcommandPart.command.followupPlaceholder;
|
|
173
174
|
if (agentSubcommandPart?.command.description && exactlyOneSpaceAfterPart(agentSubcommandPart)) {
|
|
174
175
|
placeholderDecoration = [{
|
|
@@ -188,9 +189,9 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
188
189
|
const isDupe = !!this.chatAgentService.getAgents().find(other => other.name === agentPart.agent.name && other.id !== agentPart.agent.id);
|
|
189
190
|
const id = isDupe ? `(${agentPart.agent.id}) ` : '';
|
|
190
191
|
const agentHover = `${id}${agentPart.agent.description}`;
|
|
191
|
-
textDecorations.push({ range: agentPart.editorRange, hoverMessage: ( new MarkdownString(agentHover)) });
|
|
192
|
+
textDecorations.push({ range: agentPart.editorRange, hoverMessage: ( (new MarkdownString(agentHover))) });
|
|
192
193
|
if (agentSubcommandPart) {
|
|
193
|
-
textDecorations.push({ range: agentSubcommandPart.editorRange, hoverMessage: ( new MarkdownString(agentSubcommandPart.command.description)) });
|
|
194
|
+
textDecorations.push({ range: agentSubcommandPart.editorRange, hoverMessage: ( (new MarkdownString(agentSubcommandPart.command.description))) });
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
197
|
if (slashCommandPart) {
|
|
@@ -205,11 +206,11 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
205
206
|
this.widget.inputEditor.setDecorationsByType(decorationDescription, variableTextDecorationType, varDecorations);
|
|
206
207
|
}
|
|
207
208
|
};
|
|
208
|
-
InputEditorDecorations = ( __decorate([
|
|
209
|
-
( __param(1, ICodeEditorService)),
|
|
210
|
-
( __param(2, IThemeService)),
|
|
211
|
-
( __param(3, IChatAgentService))
|
|
212
|
-
], InputEditorDecorations));
|
|
209
|
+
InputEditorDecorations = ( (__decorate([
|
|
210
|
+
( (__param(1, ICodeEditorService))),
|
|
211
|
+
( (__param(2, IThemeService))),
|
|
212
|
+
( (__param(3, IChatAgentService)))
|
|
213
|
+
], InputEditorDecorations)));
|
|
213
214
|
class InputEditorSlashCommandMode extends Disposable {
|
|
214
215
|
constructor(widget) {
|
|
215
216
|
super();
|
|
@@ -262,29 +263,29 @@ let SlashCommandCompletions = class SlashCommandCompletions extends Disposable {
|
|
|
262
263
|
return null;
|
|
263
264
|
}
|
|
264
265
|
return {
|
|
265
|
-
suggestions: ( slashCommands.map((c, i) => {
|
|
266
|
+
suggestions: ( (slashCommands.map((c, i) => {
|
|
266
267
|
const withSlash = `/${c.command}`;
|
|
267
268
|
return {
|
|
268
269
|
label: withSlash,
|
|
269
270
|
insertText: c.executeImmediately ? '' : `${withSlash} `,
|
|
270
271
|
detail: c.detail,
|
|
271
|
-
range: ( new Range(1, 1, 1, 1)),
|
|
272
|
+
range: ( (new Range(1, 1, 1, 1))),
|
|
272
273
|
sortText: c.sortText ?? 'a'.repeat(i + 1),
|
|
273
274
|
kind: 18 ,
|
|
274
275
|
command: c.executeImmediately ? { id: SubmitAction.ID, title: withSlash, arguments: [{ widget, inputValue: `${withSlash} ` }] } : undefined,
|
|
275
276
|
};
|
|
276
|
-
}))
|
|
277
|
+
})))
|
|
277
278
|
};
|
|
278
279
|
}
|
|
279
280
|
}));
|
|
280
281
|
}
|
|
281
282
|
};
|
|
282
|
-
SlashCommandCompletions = ( __decorate([
|
|
283
|
-
( __param(0, ILanguageFeaturesService)),
|
|
284
|
-
( __param(1, IChatWidgetService)),
|
|
285
|
-
( __param(2, IChatSlashCommandService))
|
|
286
|
-
], SlashCommandCompletions));
|
|
287
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(SlashCommandCompletions, 4 );
|
|
283
|
+
SlashCommandCompletions = ( (__decorate([
|
|
284
|
+
( (__param(0, ILanguageFeaturesService))),
|
|
285
|
+
( (__param(1, IChatWidgetService))),
|
|
286
|
+
( (__param(2, IChatSlashCommandService)))
|
|
287
|
+
], SlashCommandCompletions)));
|
|
288
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(SlashCommandCompletions, 4 );
|
|
288
289
|
let AgentCompletions = class AgentCompletions extends Disposable {
|
|
289
290
|
constructor(languageFeaturesService, chatWidgetService, chatAgentService) {
|
|
290
291
|
super();
|
|
@@ -312,7 +313,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
312
313
|
.filter(a => !a.isDefault)
|
|
313
314
|
.filter(a => a.locations.includes(widget.location));
|
|
314
315
|
return {
|
|
315
|
-
suggestions: ( agents.map((a, i) => {
|
|
316
|
+
suggestions: ( (agents.map((a, i) => {
|
|
316
317
|
const withAt = `@${a.name}`;
|
|
317
318
|
const isDupe = !!agents.find(other => other.name === a.name && other.id !== a.id);
|
|
318
319
|
return {
|
|
@@ -321,11 +322,11 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
321
322
|
withAt,
|
|
322
323
|
insertText: `${withAt} `,
|
|
323
324
|
detail: a.description,
|
|
324
|
-
range: ( new Range(1, 1, 1, 1)),
|
|
325
|
+
range: ( (new Range(1, 1, 1, 1))),
|
|
325
326
|
command: { id: AssignSelectedAgentAction.ID, title: AssignSelectedAgentAction.ID, arguments: [{ agent: a, widget }] },
|
|
326
327
|
kind: 18 ,
|
|
327
328
|
};
|
|
328
|
-
}))
|
|
329
|
+
})))
|
|
329
330
|
};
|
|
330
331
|
}
|
|
331
332
|
}));
|
|
@@ -357,7 +358,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
357
358
|
}
|
|
358
359
|
const usedAgent = parsedRequest[usedAgentIdx];
|
|
359
360
|
return {
|
|
360
|
-
suggestions: ( usedAgent.agent.slashCommands.map((c, i) => {
|
|
361
|
+
suggestions: ( (usedAgent.agent.slashCommands.map((c, i) => {
|
|
361
362
|
const withSlash = `/${c.name}`;
|
|
362
363
|
return {
|
|
363
364
|
label: withSlash,
|
|
@@ -366,7 +367,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
366
367
|
range,
|
|
367
368
|
kind: 18 ,
|
|
368
369
|
};
|
|
369
|
-
}))
|
|
370
|
+
})))
|
|
370
371
|
};
|
|
371
372
|
}
|
|
372
373
|
}));
|
|
@@ -385,7 +386,7 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
385
386
|
}
|
|
386
387
|
const agents = this.chatAgentService.getAgents()
|
|
387
388
|
.filter(a => a.locations.includes(widget.location));
|
|
388
|
-
const justAgents = ( agents
|
|
389
|
+
const justAgents = ( (agents
|
|
389
390
|
.filter(a => !a.isDefault)
|
|
390
391
|
.map(agent => {
|
|
391
392
|
const isDupe = !!agents.find(other => other.name === agent.name && other.id !== agent.id);
|
|
@@ -398,14 +399,14 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
398
399
|
detail,
|
|
399
400
|
filterText: `${chatSubcommandLeader}${agent.name}`,
|
|
400
401
|
insertText: `${agentLabel} `,
|
|
401
|
-
range: ( new Range(1, 1, 1, 1)),
|
|
402
|
+
range: ( (new Range(1, 1, 1, 1))),
|
|
402
403
|
kind: 18 ,
|
|
403
404
|
sortText: `${chatSubcommandLeader}${agent.id}`,
|
|
404
405
|
command: { id: AssignSelectedAgentAction.ID, title: AssignSelectedAgentAction.ID, arguments: [{ agent, widget }] },
|
|
405
406
|
};
|
|
406
|
-
}));
|
|
407
|
+
})));
|
|
407
408
|
return {
|
|
408
|
-
suggestions: justAgents.concat(agents.flatMap(agent => ( agent.slashCommands.map((c, i) => {
|
|
409
|
+
suggestions: justAgents.concat(agents.flatMap(agent => ( (agent.slashCommands.map((c, i) => {
|
|
409
410
|
const agentLabel = `${chatAgentLeader}${agent.name}`;
|
|
410
411
|
const withSlash = `${chatSubcommandLeader}${c.name}`;
|
|
411
412
|
return {
|
|
@@ -414,23 +415,23 @@ let AgentCompletions = class AgentCompletions extends Disposable {
|
|
|
414
415
|
commitCharacters: [' '],
|
|
415
416
|
insertText: `${agentLabel} ${withSlash} `,
|
|
416
417
|
detail: `(${agentLabel}) ${c.description ?? ''}`,
|
|
417
|
-
range: ( new Range(1, 1, 1, 1)),
|
|
418
|
+
range: ( (new Range(1, 1, 1, 1))),
|
|
418
419
|
kind: 18 ,
|
|
419
420
|
sortText: `${chatSubcommandLeader}${agent.id}${c.name}`,
|
|
420
421
|
command: { id: AssignSelectedAgentAction.ID, title: AssignSelectedAgentAction.ID, arguments: [{ agent, widget }] },
|
|
421
422
|
};
|
|
422
|
-
}))))
|
|
423
|
+
})))))
|
|
423
424
|
};
|
|
424
425
|
}
|
|
425
426
|
}));
|
|
426
427
|
}
|
|
427
428
|
};
|
|
428
|
-
AgentCompletions = ( __decorate([
|
|
429
|
-
( __param(0, ILanguageFeaturesService)),
|
|
430
|
-
( __param(1, IChatWidgetService)),
|
|
431
|
-
( __param(2, IChatAgentService))
|
|
432
|
-
], AgentCompletions));
|
|
433
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(AgentCompletions, 4 );
|
|
429
|
+
AgentCompletions = ( (__decorate([
|
|
430
|
+
( (__param(0, ILanguageFeaturesService))),
|
|
431
|
+
( (__param(1, IChatWidgetService))),
|
|
432
|
+
( (__param(2, IChatAgentService)))
|
|
433
|
+
], AgentCompletions)));
|
|
434
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(AgentCompletions, 4 );
|
|
434
435
|
class AssignSelectedAgentAction extends Action2 {
|
|
435
436
|
static { this.ID = 'workbench.action.chat.assignSelectedAgent'; }
|
|
436
437
|
constructor() {
|
|
@@ -450,7 +451,7 @@ class AssignSelectedAgentAction extends Action2 {
|
|
|
450
451
|
registerAction2(AssignSelectedAgentAction);
|
|
451
452
|
let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposable {
|
|
452
453
|
static { BuiltinDynamicCompletions_1 = this; }
|
|
453
|
-
static { this.VariableNameDef = ( new RegExp(`${chatVariableLeader}\\w*`, 'g')); }
|
|
454
|
+
static { this.VariableNameDef = ( (new RegExp(`${chatVariableLeader}\\w*`, 'g'))); }
|
|
454
455
|
constructor(languageFeaturesService, chatWidgetService) {
|
|
455
456
|
super();
|
|
456
457
|
this.languageFeaturesService = languageFeaturesService;
|
|
@@ -467,22 +468,18 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
467
468
|
if (!range) {
|
|
468
469
|
return null;
|
|
469
470
|
}
|
|
470
|
-
const afterRange = ( new Range(
|
|
471
|
+
const afterRange = ( (new Range(
|
|
471
472
|
position.lineNumber,
|
|
472
473
|
range.replace.startColumn,
|
|
473
474
|
position.lineNumber,
|
|
474
475
|
range.replace.startColumn + '#file:'.length
|
|
475
|
-
));
|
|
476
|
+
)));
|
|
476
477
|
return {
|
|
477
478
|
suggestions: [
|
|
478
479
|
{
|
|
479
480
|
label: `${chatVariableLeader}file`,
|
|
480
481
|
insertText: `${chatVariableLeader}file:`,
|
|
481
|
-
detail: ( localizeWithPath(
|
|
482
|
-
'vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib',
|
|
483
|
-
'pickFileLabel',
|
|
484
|
-
"Pick a file"
|
|
485
|
-
)),
|
|
482
|
+
detail: ( localizeWithPath(_moduleId, 0, "Pick a file")),
|
|
486
483
|
range,
|
|
487
484
|
kind: 18 ,
|
|
488
485
|
command: { id: SelectAndInsertFileAction.ID, title: SelectAndInsertFileAction.ID, arguments: [{ widget, range: afterRange }] },
|
|
@@ -494,11 +491,11 @@ let BuiltinDynamicCompletions = class BuiltinDynamicCompletions extends Disposab
|
|
|
494
491
|
}));
|
|
495
492
|
}
|
|
496
493
|
};
|
|
497
|
-
BuiltinDynamicCompletions = BuiltinDynamicCompletions_1 = ( __decorate([
|
|
498
|
-
( __param(0, ILanguageFeaturesService)),
|
|
499
|
-
( __param(1, IChatWidgetService))
|
|
500
|
-
], BuiltinDynamicCompletions));
|
|
501
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(BuiltinDynamicCompletions, 4 );
|
|
494
|
+
BuiltinDynamicCompletions = BuiltinDynamicCompletions_1 = ( (__decorate([
|
|
495
|
+
( (__param(0, ILanguageFeaturesService))),
|
|
496
|
+
( (__param(1, IChatWidgetService)))
|
|
497
|
+
], BuiltinDynamicCompletions)));
|
|
498
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(BuiltinDynamicCompletions, 4 );
|
|
502
499
|
function computeCompletionRanges(model, position, reg) {
|
|
503
500
|
const varWord = getWordAtText(position.column, reg, model.getLineContent(position.lineNumber), 0);
|
|
504
501
|
if (!varWord && model.getWordUntilPosition(position).word) {
|
|
@@ -510,24 +507,24 @@ function computeCompletionRanges(model, position, reg) {
|
|
|
510
507
|
insert = replace = Range.fromPositions(position);
|
|
511
508
|
}
|
|
512
509
|
else {
|
|
513
|
-
insert = ( new Range(
|
|
510
|
+
insert = ( (new Range(
|
|
514
511
|
position.lineNumber,
|
|
515
512
|
varWord.startColumn,
|
|
516
513
|
position.lineNumber,
|
|
517
514
|
position.column
|
|
518
|
-
));
|
|
519
|
-
replace = ( new Range(
|
|
515
|
+
)));
|
|
516
|
+
replace = ( (new Range(
|
|
520
517
|
position.lineNumber,
|
|
521
518
|
varWord.startColumn,
|
|
522
519
|
position.lineNumber,
|
|
523
520
|
varWord.endColumn
|
|
524
|
-
));
|
|
521
|
+
)));
|
|
525
522
|
}
|
|
526
523
|
return { insert, replace, varWord };
|
|
527
524
|
}
|
|
528
525
|
let VariableCompletions = class VariableCompletions extends Disposable {
|
|
529
526
|
static { VariableCompletions_1 = this; }
|
|
530
|
-
static { this.VariableNameDef = ( new RegExp(`${chatVariableLeader}\\w*`, 'g')); }
|
|
527
|
+
static { this.VariableNameDef = ( (new RegExp(`${chatVariableLeader}\\w*`, 'g'))); }
|
|
531
528
|
constructor(languageFeaturesService, chatWidgetService, chatVariablesService) {
|
|
532
529
|
super();
|
|
533
530
|
this.languageFeaturesService = languageFeaturesService;
|
|
@@ -546,8 +543,8 @@ let VariableCompletions = class VariableCompletions extends Disposable {
|
|
|
546
543
|
return null;
|
|
547
544
|
}
|
|
548
545
|
const usedVariables = widget.parsedInput.parts.filter((p) => p instanceof ChatRequestVariablePart);
|
|
549
|
-
const variableItems = ( Array.from(this.chatVariablesService.getVariables())
|
|
550
|
-
.filter(v => !( usedVariables.some(usedVar => usedVar.variableName === v.name)))
|
|
546
|
+
const variableItems = ( (Array.from(this.chatVariablesService.getVariables())
|
|
547
|
+
.filter(v => !( (usedVariables.some(usedVar => usedVar.variableName === v.name))))
|
|
551
548
|
.map(v => {
|
|
552
549
|
const withLeader = `${chatVariableLeader}${v.name}`;
|
|
553
550
|
return {
|
|
@@ -558,7 +555,7 @@ let VariableCompletions = class VariableCompletions extends Disposable {
|
|
|
558
555
|
kind: 18 ,
|
|
559
556
|
sortText: 'z'
|
|
560
557
|
};
|
|
561
|
-
}));
|
|
558
|
+
})));
|
|
562
559
|
return {
|
|
563
560
|
suggestions: variableItems
|
|
564
561
|
};
|
|
@@ -566,12 +563,12 @@ let VariableCompletions = class VariableCompletions extends Disposable {
|
|
|
566
563
|
}));
|
|
567
564
|
}
|
|
568
565
|
};
|
|
569
|
-
VariableCompletions = VariableCompletions_1 = ( __decorate([
|
|
570
|
-
( __param(0, ILanguageFeaturesService)),
|
|
571
|
-
( __param(1, IChatWidgetService)),
|
|
572
|
-
( __param(2, IChatVariablesService))
|
|
573
|
-
], VariableCompletions));
|
|
574
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(VariableCompletions, 4 );
|
|
566
|
+
VariableCompletions = VariableCompletions_1 = ( (__decorate([
|
|
567
|
+
( (__param(0, ILanguageFeaturesService))),
|
|
568
|
+
( (__param(1, IChatWidgetService))),
|
|
569
|
+
( (__param(2, IChatVariablesService)))
|
|
570
|
+
], VariableCompletions)));
|
|
571
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(VariableCompletions, 4 );
|
|
575
572
|
let ChatTokenDeleter = class ChatTokenDeleter extends Disposable {
|
|
576
573
|
constructor(widget, instantiationService) {
|
|
577
574
|
super();
|
|
@@ -595,12 +592,12 @@ let ChatTokenDeleter = class ChatTokenDeleter extends Disposable {
|
|
|
595
592
|
const deletedRangeOfToken = Range.intersectRanges(token.editorRange, change.range);
|
|
596
593
|
if (deletedRangeOfToken && Range.compareRangesUsingStarts(token.editorRange, change.range) < 0) {
|
|
597
594
|
const length = deletedRangeOfToken.endColumn - deletedRangeOfToken.startColumn;
|
|
598
|
-
const rangeToDelete = ( new Range(
|
|
595
|
+
const rangeToDelete = ( (new Range(
|
|
599
596
|
token.editorRange.startLineNumber,
|
|
600
597
|
token.editorRange.startColumn,
|
|
601
598
|
token.editorRange.endLineNumber,
|
|
602
599
|
token.editorRange.endColumn - length
|
|
603
|
-
));
|
|
600
|
+
)));
|
|
604
601
|
this.widget.inputEditor.executeEdits(this.id, [{
|
|
605
602
|
range: rangeToDelete,
|
|
606
603
|
text: '',
|
|
@@ -613,7 +610,7 @@ let ChatTokenDeleter = class ChatTokenDeleter extends Disposable {
|
|
|
613
610
|
}));
|
|
614
611
|
}
|
|
615
612
|
};
|
|
616
|
-
ChatTokenDeleter = ( __decorate([
|
|
617
|
-
( __param(1, IInstantiationService))
|
|
618
|
-
], ChatTokenDeleter));
|
|
613
|
+
ChatTokenDeleter = ( (__decorate([
|
|
614
|
+
( (__param(1, IInstantiationService)))
|
|
615
|
+
], ChatTokenDeleter)));
|
|
619
616
|
ChatWidget.CONTRIBS.push(ChatTokenDeleter);
|