@codingame/monaco-vscode-chat-service-override 4.5.2 → 5.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.
- package/chat.js +6 -6
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClear.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +32 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +52 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +35 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +83 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +23 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +3 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContributionServiceImpl.js → chatParticipantContributions.js} +43 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +33 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +48 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +76 -122
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +131 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +7 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChat.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +1 -4
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
2
2
|
import marked_1 from 'vscode/external/vscode-marked/lib/marked.esm.js';
|
|
3
3
|
import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
4
|
-
import { localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
5
|
-
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
|
+
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
5
|
+
import { registerAction2, Action2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
6
6
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
7
7
|
import { ResourceNotebookCellEdit } from 'vscode/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
8
8
|
import { CHAT_CATEGORY } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
9
9
|
import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
10
|
-
import {
|
|
10
|
+
import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
11
|
+
import { CONTEXT_RESPONSE_VOTE, CONTEXT_RESPONSE, CONTEXT_CHAT_RESPONSE_SUPPORT_ISSUE_REPORTING, CONTEXT_RESPONSE_FILTERED, CONTEXT_IN_CHAT_SESSION, CONTEXT_IN_CHAT_INPUT, CONTEXT_REQUEST, CONTEXT_CHAT_LOCATION, CONTEXT_RESPONSE_DETECTED_AGENT_COMMAND } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
11
12
|
import { InteractiveSessionVoteDirection } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
12
13
|
import { IChatService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
13
14
|
import { isResponseVM, isRequestVM } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
@@ -41,7 +42,6 @@ function registerChatTitleActions() {
|
|
|
41
42
|
}
|
|
42
43
|
const chatService = accessor.get(IChatService);
|
|
43
44
|
chatService.notifyUserAction({
|
|
44
|
-
providerId: item.providerId,
|
|
45
45
|
agentId: item.agent?.id,
|
|
46
46
|
sessionId: item.sessionId,
|
|
47
47
|
requestId: item.requestId,
|
|
@@ -78,7 +78,6 @@ function registerChatTitleActions() {
|
|
|
78
78
|
}
|
|
79
79
|
const chatService = accessor.get(IChatService);
|
|
80
80
|
chatService.notifyUserAction({
|
|
81
|
-
providerId: item.providerId,
|
|
82
81
|
agentId: item.agent?.id,
|
|
83
82
|
sessionId: item.sessionId,
|
|
84
83
|
requestId: item.requestId,
|
|
@@ -114,7 +113,6 @@ function registerChatTitleActions() {
|
|
|
114
113
|
}
|
|
115
114
|
const chatService = accessor.get(IChatService);
|
|
116
115
|
chatService.notifyUserAction({
|
|
117
|
-
providerId: item.providerId,
|
|
118
116
|
agentId: item.agent?.id,
|
|
119
117
|
sessionId: item.sessionId,
|
|
120
118
|
requestId: item.requestId,
|
|
@@ -226,6 +224,85 @@ function registerChatTitleActions() {
|
|
|
226
224
|
}
|
|
227
225
|
}
|
|
228
226
|
});
|
|
227
|
+
const rerunMenu = MenuId.for('ChatMessageTitle#Rerun');
|
|
228
|
+
MenuRegistry.appendMenuItem(MenuId.ChatMessageTitle, {
|
|
229
|
+
submenu: rerunMenu,
|
|
230
|
+
title: ( localizeWithPath(_moduleId, 5, "Rerun...")),
|
|
231
|
+
icon: Codicon.refresh,
|
|
232
|
+
group: 'navigation',
|
|
233
|
+
order: -10,
|
|
234
|
+
when: ( (ContextKeyExpr.and(
|
|
235
|
+
CONTEXT_RESPONSE,
|
|
236
|
+
(CONTEXT_CHAT_LOCATION.isEqualTo(ChatAgentLocation.Editor))
|
|
237
|
+
)))
|
|
238
|
+
});
|
|
239
|
+
registerAction2(class RerunAction extends Action2 {
|
|
240
|
+
constructor() {
|
|
241
|
+
super({
|
|
242
|
+
id: 'workbench.action.chat.rerun',
|
|
243
|
+
title: ( localize2WithPath(_moduleId, 6, "Rerun Request")),
|
|
244
|
+
f1: false,
|
|
245
|
+
category: CHAT_CATEGORY,
|
|
246
|
+
icon: Codicon.refresh,
|
|
247
|
+
precondition: ( (CONTEXT_CHAT_LOCATION.isEqualTo(ChatAgentLocation.Editor))),
|
|
248
|
+
menu: {
|
|
249
|
+
id: rerunMenu,
|
|
250
|
+
group: 'navigation',
|
|
251
|
+
order: -1,
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
async run(accessor, ...args) {
|
|
256
|
+
const chatWidgetService = accessor.get(IChatWidgetService);
|
|
257
|
+
const chatService = accessor.get(IChatService);
|
|
258
|
+
const widget = chatWidgetService.lastFocusedWidget;
|
|
259
|
+
let item = args[0];
|
|
260
|
+
if (!isResponseVM(item)) {
|
|
261
|
+
item = widget?.getFocus();
|
|
262
|
+
}
|
|
263
|
+
if (!isResponseVM(item) || !widget) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const request = chatService.getSession(item.sessionId)?.getRequests().find(candidate => candidate.id === item.requestId);
|
|
267
|
+
if (request) {
|
|
268
|
+
await chatService.resendRequest(request, { noCommandDetection: false, attempt: request.attempt + 1, location: widget.location, implicitVariablesEnabled: true });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
registerAction2(class RerunWithoutCommandDetectionAction extends Action2 {
|
|
273
|
+
constructor() {
|
|
274
|
+
super({
|
|
275
|
+
id: 'workbench.action.chat.rerunWithoutCommandDetection',
|
|
276
|
+
title: ( localize2WithPath(_moduleId, 7, "Rerun without Command Detection")),
|
|
277
|
+
f1: false,
|
|
278
|
+
category: CHAT_CATEGORY,
|
|
279
|
+
icon: Codicon.refresh,
|
|
280
|
+
precondition: ( (CONTEXT_CHAT_LOCATION.isEqualTo(ChatAgentLocation.Editor))),
|
|
281
|
+
menu: {
|
|
282
|
+
when: CONTEXT_RESPONSE_DETECTED_AGENT_COMMAND,
|
|
283
|
+
id: rerunMenu,
|
|
284
|
+
group: 'navigation',
|
|
285
|
+
order: -1,
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
async run(accessor, ...args) {
|
|
290
|
+
const chatWidgetService = accessor.get(IChatWidgetService);
|
|
291
|
+
const chatService = accessor.get(IChatService);
|
|
292
|
+
const widget = chatWidgetService.lastFocusedWidget;
|
|
293
|
+
let item = args[0];
|
|
294
|
+
if (!isResponseVM(item)) {
|
|
295
|
+
item = widget?.getFocus();
|
|
296
|
+
}
|
|
297
|
+
if (!isResponseVM(item) || !widget) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
const request = chatService.getSession(item.sessionId)?.getRequests().find(candidate => candidate.id === item.requestId);
|
|
301
|
+
if (request) {
|
|
302
|
+
await chatService.resendRequest(request, { noCommandDetection: true, attempt: request.attempt, location: widget.location, implicitVariablesEnabled: true });
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
});
|
|
229
306
|
}
|
|
230
307
|
function splitMarkdownAndCodeBlocks(markdown) {
|
|
231
308
|
const lexer = new marked_1.Lexer();
|
|
@@ -13,12 +13,12 @@ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
|
13
13
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
14
14
|
import { Extensions as Extensions$1, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
15
15
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
16
|
-
import { alertFocusChange } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityContributions';
|
|
17
16
|
import { IAccessibleViewService } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibleView.service';
|
|
18
17
|
import { AccessibleViewAction } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibleViewActions';
|
|
18
|
+
import { alertFocusChange } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibleViewContributions';
|
|
19
19
|
import { registerChatActions } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
20
20
|
import { ACTION_ID_NEW_CHAT, registerNewChatActions } from './actions/chatClearActions.js';
|
|
21
|
-
import { registerChatCodeBlockActions } from './actions/chatCodeblockActions.js';
|
|
21
|
+
import { registerChatCodeBlockActions, registerChatCodeCompareBlockActions } from './actions/chatCodeblockActions.js';
|
|
22
22
|
import { registerChatCopyActions } from './actions/chatCopyActions.js';
|
|
23
23
|
import { SubmitAction, registerChatExecuteActions } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatExecuteActions';
|
|
24
24
|
import { registerChatFileTreeActions } from './actions/chatFileTreeActions.js';
|
|
@@ -28,7 +28,6 @@ import { registerQuickChatActions } from 'vscode/vscode/vs/workbench/contrib/cha
|
|
|
28
28
|
import { registerChatTitleActions } from './actions/chatTitleActions.js';
|
|
29
29
|
import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
30
30
|
import './chatAccessibilityService.js';
|
|
31
|
-
import './chatContributionServiceImpl.js';
|
|
32
31
|
import { ChatEditor } from './chatEditor.js';
|
|
33
32
|
import { ChatEditorInput, ChatEditorInputSerializer } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
34
33
|
import './chatQuick.js';
|
|
@@ -48,10 +47,12 @@ import { IChatVariablesService } from 'vscode/vscode/vs/workbench/contrib/chat/c
|
|
|
48
47
|
import { isResponseVM } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
49
48
|
import '../common/chatWidgetHistoryService.js';
|
|
50
49
|
import 'vscode/vscode/vs/base/common/event';
|
|
50
|
+
import '../common/languageModelStats.js';
|
|
51
51
|
import '../common/voiceChat.js';
|
|
52
52
|
import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
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
|
+
import { ChatExtensionPointHandler } from './chatParticipantContributions.js';
|
|
55
56
|
|
|
56
57
|
const _moduleId = "vs/workbench/contrib/chat/browser/chat.contribution";
|
|
57
58
|
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
@@ -229,45 +230,52 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
|
|
|
229
230
|
progress.report({ content: defaultAgent.metadata.helpTextPrefix, kind: 'markdownContent' });
|
|
230
231
|
}
|
|
231
232
|
else {
|
|
232
|
-
progress.report({ content: defaultAgent.metadata.helpTextPrefix, kind: '
|
|
233
|
+
progress.report({ content: ( (new MarkdownString(defaultAgent.metadata.helpTextPrefix))), kind: 'markdownContent' });
|
|
233
234
|
}
|
|
234
|
-
progress.report({ content: '\n\n', kind: '
|
|
235
|
+
progress.report({ content: ( (new MarkdownString('\n\n'))), kind: 'markdownContent' });
|
|
235
236
|
}
|
|
236
237
|
const agentText = (await Promise.all(( (agents
|
|
237
238
|
.filter(a => a.id !== defaultAgent?.id)
|
|
239
|
+
.filter(a => a.locations.includes(ChatAgentLocation.Panel))
|
|
238
240
|
.map(async (a) => {
|
|
239
241
|
const agentWithLeader = `${chatAgentLeader}${a.name}`;
|
|
240
242
|
const actionArg = { inputValue: `${agentWithLeader} ${a.metadata.sampleRequest}` };
|
|
241
243
|
const urlSafeArg = encodeURIComponent(JSON.stringify(actionArg));
|
|
242
|
-
const
|
|
244
|
+
const description = a.description ? `- ${a.description}` : '';
|
|
245
|
+
const agentLine = `* [\`${agentWithLeader}\`](command:${SubmitAction.ID}?${urlSafeArg}) ${description}`;
|
|
243
246
|
const commandText = ( (a.slashCommands.map(c => {
|
|
244
247
|
const actionArg = { inputValue: `${agentWithLeader} ${chatSubcommandLeader}${c.name} ${c.sampleRequest ?? ''}` };
|
|
245
248
|
const urlSafeArg = encodeURIComponent(JSON.stringify(actionArg));
|
|
246
|
-
|
|
249
|
+
const description = c.description ? `- ${c.description}` : '';
|
|
250
|
+
return `\t* [\`${chatSubcommandLeader}${c.name}\`](command:${SubmitAction.ID}?${urlSafeArg}) ${description}`;
|
|
247
251
|
}))).join('\n');
|
|
248
252
|
return (agentLine + '\n' + commandText).trim();
|
|
249
253
|
}))))).join('\n');
|
|
250
254
|
progress.report({ content: ( (new MarkdownString(agentText, { isTrusted: { enabledCommands: [SubmitAction.ID] } }))), kind: 'markdownContent' });
|
|
251
255
|
if (defaultAgent?.metadata.helpTextVariablesPrefix) {
|
|
252
|
-
progress.report({ content: '\n\n', kind: '
|
|
256
|
+
progress.report({ content: ( (new MarkdownString('\n\n'))), kind: 'markdownContent' });
|
|
253
257
|
if (isMarkdownString(defaultAgent.metadata.helpTextVariablesPrefix)) {
|
|
254
258
|
progress.report({ content: defaultAgent.metadata.helpTextVariablesPrefix, kind: 'markdownContent' });
|
|
255
259
|
}
|
|
256
260
|
else {
|
|
257
|
-
progress.report({ content: defaultAgent.metadata.helpTextVariablesPrefix, kind: '
|
|
261
|
+
progress.report({ content: ( (new MarkdownString(defaultAgent.metadata.helpTextVariablesPrefix))), kind: 'markdownContent' });
|
|
258
262
|
}
|
|
259
|
-
const
|
|
263
|
+
const variables = [
|
|
264
|
+
...chatVariablesService.getVariables(),
|
|
265
|
+
{ name: 'file', description: ( localizeWithPath(_moduleId, 9, "Choose a file in the workspace")) }
|
|
266
|
+
];
|
|
267
|
+
const variableText = ( (variables
|
|
260
268
|
.map(v => `* \`${chatVariableLeader}${v.name}\` - ${v.description}`)))
|
|
261
269
|
.join('\n');
|
|
262
|
-
progress.report({ content: '\n' + variableText, kind: '
|
|
270
|
+
progress.report({ content: ( (new MarkdownString('\n' + variableText))), kind: 'markdownContent' });
|
|
263
271
|
}
|
|
264
272
|
if (defaultAgent?.metadata.helpTextPostfix) {
|
|
265
|
-
progress.report({ content: '\n\n', kind: '
|
|
273
|
+
progress.report({ content: ( (new MarkdownString('\n\n'))), kind: 'markdownContent' });
|
|
266
274
|
if (isMarkdownString(defaultAgent.metadata.helpTextPostfix)) {
|
|
267
275
|
progress.report({ content: defaultAgent.metadata.helpTextPostfix, kind: 'markdownContent' });
|
|
268
276
|
}
|
|
269
277
|
else {
|
|
270
|
-
progress.report({ content: defaultAgent.metadata.helpTextPostfix, kind: '
|
|
278
|
+
progress.report({ content: ( (new MarkdownString(defaultAgent.metadata.helpTextPostfix))), kind: 'markdownContent' });
|
|
271
279
|
}
|
|
272
280
|
}
|
|
273
281
|
}));
|
|
@@ -284,9 +292,11 @@ registerWorkbenchContribution2(ChatResolverContribution.ID, ChatResolverContribu
|
|
|
284
292
|
workbenchContributionsRegistry.registerWorkbenchContribution(ChatAccessibleViewContribution, 4 );
|
|
285
293
|
workbenchContributionsRegistry.registerWorkbenchContribution(ChatSlashStaticSlashCommandsContribution, 4 );
|
|
286
294
|
( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(ChatEditorInput.TypeID, ChatEditorInputSerializer);
|
|
295
|
+
registerWorkbenchContribution2(ChatExtensionPointHandler.ID, ChatExtensionPointHandler, 1 );
|
|
287
296
|
registerChatActions();
|
|
288
297
|
registerChatCopyActions();
|
|
289
298
|
registerChatCodeBlockActions();
|
|
299
|
+
registerChatCodeCompareBlockActions();
|
|
290
300
|
registerChatFileTreeActions();
|
|
291
301
|
registerChatTitleActions();
|
|
292
302
|
registerChatExecuteActions();
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { status } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
|
|
3
|
-
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
4
3
|
import { Disposable, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
4
|
import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
6
5
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
7
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
|
+
import { AccessibilityProgressSignalScheduler } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/progressAccessibilitySignalScheduler';
|
|
8
8
|
|
|
9
|
+
const CHAT_RESPONSE_PENDING_ALLOWANCE_MS = 4000;
|
|
9
10
|
let ChatAccessibilityService = class ChatAccessibilityService extends Disposable {
|
|
10
11
|
constructor(_accessibilitySignalService, _instantiationService) {
|
|
11
12
|
super();
|
|
@@ -17,7 +18,7 @@ let ChatAccessibilityService = class ChatAccessibilityService extends Disposable
|
|
|
17
18
|
acceptRequest() {
|
|
18
19
|
this._requestId++;
|
|
19
20
|
this._accessibilitySignalService.playSignal(AccessibilitySignal.chatRequestSent, { allowManyInParallel: true });
|
|
20
|
-
this._pendingSignalMap.set(this._requestId, this._instantiationService.createInstance(
|
|
21
|
+
this._pendingSignalMap.set(this._requestId, this._instantiationService.createInstance(AccessibilityProgressSignalScheduler, CHAT_RESPONSE_PENDING_ALLOWANCE_MS, undefined));
|
|
21
22
|
return this._requestId;
|
|
22
23
|
}
|
|
23
24
|
acceptResponse(response, requestId) {
|
|
@@ -36,26 +37,5 @@ ChatAccessibilityService = ( __decorate([
|
|
|
36
37
|
( __param(0, IAccessibilitySignalService)),
|
|
37
38
|
( __param(1, IInstantiationService))
|
|
38
39
|
], ChatAccessibilityService));
|
|
39
|
-
const CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS = 5000;
|
|
40
|
-
const CHAT_RESPONSE_PENDING_ALLOWANCE_MS = 4000;
|
|
41
|
-
let AccessibilitySignalScheduler = class AccessibilitySignalScheduler extends Disposable {
|
|
42
|
-
constructor(_accessibilitySignalService) {
|
|
43
|
-
super();
|
|
44
|
-
this._accessibilitySignalService = _accessibilitySignalService;
|
|
45
|
-
this._scheduler = ( new RunOnceScheduler(() => {
|
|
46
|
-
this._signalLoop = this._accessibilitySignalService.playSignalLoop(AccessibilitySignal.chatResponsePending, CHAT_RESPONSE_PENDING_AUDIO_CUE_LOOP_MS);
|
|
47
|
-
}, CHAT_RESPONSE_PENDING_ALLOWANCE_MS));
|
|
48
|
-
this._scheduler.schedule();
|
|
49
|
-
}
|
|
50
|
-
dispose() {
|
|
51
|
-
super.dispose();
|
|
52
|
-
this._signalLoop?.dispose();
|
|
53
|
-
this._scheduler.cancel();
|
|
54
|
-
this._scheduler.dispose();
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
AccessibilitySignalScheduler = ( __decorate([
|
|
58
|
-
( __param(0, IAccessibilitySignalService))
|
|
59
|
-
], AccessibilitySignalScheduler));
|
|
60
40
|
|
|
61
41
|
export { ChatAccessibilityService };
|
|
@@ -22,6 +22,7 @@ import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser
|
|
|
22
22
|
import { ChatWidget } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
23
23
|
import { clearChatEditor } from './actions/chatClear.js';
|
|
24
24
|
import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
25
|
+
import { CHAT_PROVIDER_ID } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatParticipantContribTypes';
|
|
25
26
|
|
|
26
27
|
let ChatEditor = class ChatEditor extends EditorPane {
|
|
27
28
|
get scopedContextKeyService() {
|
|
@@ -69,7 +70,7 @@ let ChatEditor = class ChatEditor extends EditorPane {
|
|
|
69
70
|
this.updateModel(editorModel.model, options?.viewState ?? input.options.viewState);
|
|
70
71
|
}
|
|
71
72
|
updateModel(model, viewState) {
|
|
72
|
-
this._memento = ( new Memento('interactive-session-editor-' +
|
|
73
|
+
this._memento = ( new Memento('interactive-session-editor-' + CHAT_PROVIDER_ID, this.storageService));
|
|
73
74
|
this._viewState = viewState ?? this._memento.getMemento(1 , 1 );
|
|
74
75
|
this.widget.setModel(model, { ...this._viewState });
|
|
75
76
|
}
|