@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.
- package/index.js +9 -9
- package/package.json +20 -20
- package/vscode/src/vs/base/common/objectCache.d.ts +13 -0
- package/vscode/src/vs/base/common/objectCache.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +12 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +95 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +81 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +144 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +17 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +11 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +168 -167
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +116 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.d.ts +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +105 -70
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +17 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +154 -83
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +150 -130
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +13 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +11 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +449 -229
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +11 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +76 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +5 -18
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js +4 -122
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +42 -11
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +73 -17
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +9 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.js +314 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +34 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +0 -334
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +0 -46
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +0 -168
|
@@ -2,32 +2,33 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
5
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
6
5
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
7
6
|
import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
8
|
-
import { CHAT_OPEN_ACTION_ID } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
9
7
|
import { InstallOperation } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
10
8
|
import { IExtensionManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
11
9
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
12
10
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
13
11
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
14
12
|
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
15
|
-
import { ensureSideBarChatViewSize } from '@codingame/monaco-vscode-
|
|
13
|
+
import { showCopilotView, ensureSideBarChatViewSize } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
14
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
15
|
+
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
16
16
|
|
|
17
17
|
var ChatGettingStartedContribution_1;
|
|
18
18
|
let ChatGettingStartedContribution = class ChatGettingStartedContribution extends Disposable {
|
|
19
19
|
static { ChatGettingStartedContribution_1 = this; }
|
|
20
20
|
static { this.ID = 'workbench.contrib.chatGettingStarted'; }
|
|
21
21
|
static { this.hideWelcomeView = 'workbench.chat.hideWelcomeView'; }
|
|
22
|
-
constructor(productService, extensionService,
|
|
22
|
+
constructor(productService, extensionService, viewsService, extensionManagementService, storageService, viewDescriptorService, layoutService, configurationService) {
|
|
23
23
|
super();
|
|
24
24
|
this.productService = productService;
|
|
25
25
|
this.extensionService = extensionService;
|
|
26
|
-
this.
|
|
26
|
+
this.viewsService = viewsService;
|
|
27
27
|
this.extensionManagementService = extensionManagementService;
|
|
28
28
|
this.storageService = storageService;
|
|
29
29
|
this.viewDescriptorService = viewDescriptorService;
|
|
30
30
|
this.layoutService = layoutService;
|
|
31
|
+
this.configurationService = configurationService;
|
|
31
32
|
this.recentlyInstalled = false;
|
|
32
33
|
const defaultChatAgent = this.productService.defaultChatAgent;
|
|
33
34
|
const hideWelcomeView = this.storageService.getBoolean(ChatGettingStartedContribution_1.hideWelcomeView, StorageScope.APPLICATION, false);
|
|
@@ -50,25 +51,30 @@ let ChatGettingStartedContribution = class ChatGettingStartedContribution extend
|
|
|
50
51
|
if (ExtensionIdentifier.equals(defaultChatAgent.extensionId, ext.value)) {
|
|
51
52
|
const extensionStatus = this.extensionService.getExtensionsStatus();
|
|
52
53
|
if (extensionStatus[ext.value].activationTimes && this.recentlyInstalled) {
|
|
53
|
-
|
|
54
|
-
ensureSideBarChatViewSize(400, this.viewDescriptorService, this.layoutService);
|
|
55
|
-
this.storageService.store(ChatGettingStartedContribution_1.hideWelcomeView, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
|
|
56
|
-
this.recentlyInstalled = false;
|
|
54
|
+
this.onDidInstallChat();
|
|
57
55
|
return;
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
}));
|
|
62
60
|
}
|
|
61
|
+
async onDidInstallChat() {
|
|
62
|
+
this.configurationService.updateValue('chat.commandCenter.enabled', true);
|
|
63
|
+
showCopilotView(this.viewsService, this.layoutService);
|
|
64
|
+
ensureSideBarChatViewSize(this.viewDescriptorService, this.layoutService, this.viewsService);
|
|
65
|
+
this.storageService.store(ChatGettingStartedContribution_1.hideWelcomeView, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
|
|
66
|
+
this.recentlyInstalled = false;
|
|
67
|
+
}
|
|
63
68
|
};
|
|
64
69
|
ChatGettingStartedContribution = ChatGettingStartedContribution_1 = ( __decorate([
|
|
65
70
|
( __param(0, IProductService)),
|
|
66
71
|
( __param(1, IExtensionService)),
|
|
67
|
-
( __param(2,
|
|
72
|
+
( __param(2, IViewsService)),
|
|
68
73
|
( __param(3, IExtensionManagementService)),
|
|
69
74
|
( __param(4, IStorageService)),
|
|
70
75
|
( __param(5, IViewDescriptorService)),
|
|
71
|
-
( __param(6, IWorkbenchLayoutService))
|
|
76
|
+
( __param(6, IWorkbenchLayoutService)),
|
|
77
|
+
( __param(7, IConfigurationService))
|
|
72
78
|
], ChatGettingStartedContribution));
|
|
73
79
|
|
|
74
80
|
export { ChatGettingStartedContribution };
|
|
@@ -5,23 +5,23 @@ import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls'
|
|
|
5
5
|
import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
6
6
|
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
7
7
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
8
|
-
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-
|
|
8
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
9
9
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
10
|
-
import { ChatEditorInput } from '@codingame/monaco-vscode-
|
|
10
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
11
11
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
12
|
-
import { isExportableSessionData } from '@codingame/monaco-vscode-
|
|
12
|
+
import { isExportableSessionData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
13
13
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
14
14
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
15
|
|
|
16
16
|
const defaultFileName = 'chat.json';
|
|
17
|
-
const filters = [{ name: ( localize(
|
|
17
|
+
const filters = [{ name: ( localize(4329, "Chat Session")), extensions: ['json'] }];
|
|
18
18
|
function registerChatExportActions() {
|
|
19
19
|
registerAction2(class ExportChatAction extends Action2 {
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: 'workbench.action.chat.export',
|
|
23
23
|
category: CHAT_CATEGORY,
|
|
24
|
-
title: ( localize2(
|
|
24
|
+
title: ( localize2(4330, "Export Chat...")),
|
|
25
25
|
precondition: ChatContextKeys.enabled,
|
|
26
26
|
f1: true,
|
|
27
27
|
});
|
|
@@ -55,7 +55,7 @@ function registerChatExportActions() {
|
|
|
55
55
|
constructor() {
|
|
56
56
|
super({
|
|
57
57
|
id: 'workbench.action.chat.import',
|
|
58
|
-
title: ( localize2(
|
|
58
|
+
title: ( localize2(4331, "Import Chat...")),
|
|
59
59
|
category: CHAT_CATEGORY,
|
|
60
60
|
precondition: ChatContextKeys.enabled,
|
|
61
61
|
f1: true,
|
|
@@ -3,17 +3,18 @@ import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
3
3
|
import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
4
4
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
5
|
import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
6
|
-
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-
|
|
7
|
-
import { ChatViewId } from '@codingame/monaco-vscode-
|
|
6
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
7
|
+
import { ChatViewId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
8
8
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
9
9
|
import { ChatEditor } from '../chatEditor.js';
|
|
10
|
-
import { ChatEditorInput } from '@codingame/monaco-vscode-
|
|
10
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
11
11
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
12
12
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
13
13
|
import { AUX_WINDOW_GROUP, ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
14
14
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
15
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
16
16
|
import { isChatViewTitleActionContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatActions';
|
|
17
|
+
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
17
18
|
|
|
18
19
|
var MoveToNewLocation;
|
|
19
20
|
(function (MoveToNewLocation) {
|
|
@@ -25,7 +26,7 @@ function registerMoveActions() {
|
|
|
25
26
|
constructor() {
|
|
26
27
|
super({
|
|
27
28
|
id: `workbench.action.chat.openInEditor`,
|
|
28
|
-
title: ( localize2(
|
|
29
|
+
title: ( localize2(4332, "Open Chat in Editor")),
|
|
29
30
|
category: CHAT_CATEGORY,
|
|
30
31
|
precondition: ChatContextKeys.enabled,
|
|
31
32
|
f1: true,
|
|
@@ -46,7 +47,7 @@ function registerMoveActions() {
|
|
|
46
47
|
constructor() {
|
|
47
48
|
super({
|
|
48
49
|
id: `workbench.action.chat.openInNewWindow`,
|
|
49
|
-
title: ( localize2(
|
|
50
|
+
title: ( localize2(4333, "Open Chat in New Window")),
|
|
50
51
|
category: CHAT_CATEGORY,
|
|
51
52
|
precondition: ChatContextKeys.enabled,
|
|
52
53
|
f1: true,
|
|
@@ -67,7 +68,7 @@ function registerMoveActions() {
|
|
|
67
68
|
constructor() {
|
|
68
69
|
super({
|
|
69
70
|
id: `workbench.action.chat.openInSidebar`,
|
|
70
|
-
title: ( localize2(
|
|
71
|
+
title: ( localize2(4334, "Open Chat in Side Bar")),
|
|
71
72
|
category: CHAT_CATEGORY,
|
|
72
73
|
precondition: ChatContextKeys.enabled,
|
|
73
74
|
f1: true,
|
|
@@ -88,7 +89,7 @@ async function executeMoveToAction(accessor, moveTo, _sessionId) {
|
|
|
88
89
|
const editorService = accessor.get(IEditorService);
|
|
89
90
|
const widget = (_sessionId ? widgetService.getWidgetBySessionId(_sessionId) : undefined)
|
|
90
91
|
?? widgetService.lastFocusedWidget;
|
|
91
|
-
if (!widget ||
|
|
92
|
+
if (!widget || widget.location !== ChatAgentLocation.Panel) {
|
|
92
93
|
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true } }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
|
|
93
94
|
return;
|
|
94
95
|
}
|
|
@@ -6,7 +6,7 @@ import { Selection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/
|
|
|
6
6
|
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
7
|
import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
8
8
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
9
|
-
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-
|
|
9
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
10
10
|
import { IQuickChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
11
11
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
12
12
|
import { InlineChatController } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
@@ -20,7 +20,7 @@ function registerQuickChatActions() {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: 'workbench.action.quickchat.openInChatView',
|
|
23
|
-
title: ( localize2(
|
|
23
|
+
title: ( localize2(4335, "Open in Chat View")),
|
|
24
24
|
f1: false,
|
|
25
25
|
category: CHAT_CATEGORY,
|
|
26
26
|
icon: Codicon.commentDiscussion,
|
|
@@ -40,7 +40,7 @@ function registerQuickChatActions() {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: 'workbench.action.quickchat.close',
|
|
43
|
-
title: ( localize2(
|
|
43
|
+
title: ( localize2(4336, "Close Quick Chat")),
|
|
44
44
|
f1: false,
|
|
45
45
|
category: CHAT_CATEGORY,
|
|
46
46
|
icon: Codicon.close,
|
|
@@ -60,7 +60,7 @@ function registerQuickChatActions() {
|
|
|
60
60
|
constructor() {
|
|
61
61
|
super({
|
|
62
62
|
id: 'workbench.action.quickchat.launchInlineChat',
|
|
63
|
-
title: ( localize2(
|
|
63
|
+
title: ( localize2(4337, "Launch Inline Chat")),
|
|
64
64
|
f1: false,
|
|
65
65
|
category: CHAT_CATEGORY
|
|
66
66
|
});
|
|
@@ -88,7 +88,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
88
88
|
constructor() {
|
|
89
89
|
super({
|
|
90
90
|
id: ASK_QUICK_QUESTION_ACTION_ID,
|
|
91
|
-
title: ( localize2(
|
|
91
|
+
title: ( localize2(4338, 'Quick Chat')),
|
|
92
92
|
precondition: ChatContextKeys.enabled,
|
|
93
93
|
icon: Codicon.commentDiscussion,
|
|
94
94
|
f1: false,
|
|
@@ -103,7 +103,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
103
103
|
order: 5
|
|
104
104
|
},
|
|
105
105
|
metadata: {
|
|
106
|
-
description: ( localize(
|
|
106
|
+
description: ( localize(4339, 'Toggle the quick chat')),
|
|
107
107
|
args: [{
|
|
108
108
|
name: 'args',
|
|
109
109
|
schema: {
|
|
@@ -113,18 +113,18 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
113
113
|
required: ['query'],
|
|
114
114
|
properties: {
|
|
115
115
|
query: {
|
|
116
|
-
description: ( localize(
|
|
116
|
+
description: ( localize(4340, "The query to open the quick chat with")),
|
|
117
117
|
type: 'string'
|
|
118
118
|
},
|
|
119
119
|
isPartialQuery: {
|
|
120
|
-
description: ( localize(
|
|
120
|
+
description: ( localize(4341, "Whether the query is partial; it will wait for more user input")),
|
|
121
121
|
type: 'boolean'
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
type: 'string',
|
|
127
|
-
description: ( localize(
|
|
127
|
+
description: ( localize(4340, "The query to open the quick chat with"))
|
|
128
128
|
}
|
|
129
129
|
]
|
|
130
130
|
}
|
|
@@ -154,7 +154,7 @@ class AskQuickChatAction extends Action2 {
|
|
|
154
154
|
super({
|
|
155
155
|
id: `workbench.action.openQuickChat`,
|
|
156
156
|
category: CHAT_CATEGORY,
|
|
157
|
-
title: ( localize2(
|
|
157
|
+
title: ( localize2(4342, "Open Quick Chat")),
|
|
158
158
|
f1: true
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { IBulkEditService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService";
|
|
2
2
|
import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService";
|
|
3
3
|
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language";
|
|
4
|
-
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures";
|
|
5
4
|
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
6
5
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
7
6
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
8
7
|
import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
|
|
9
8
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
10
9
|
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
10
|
+
import { ICodeMapperService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service";
|
|
11
11
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
12
12
|
import { ICodeBlockActionContext } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
|
|
13
|
+
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
14
|
+
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
13
15
|
export declare class InsertCodeBlockOperation {
|
|
14
16
|
private readonly editorService;
|
|
15
17
|
private readonly textFileService;
|
|
@@ -27,21 +29,22 @@ export declare class InsertCodeBlockOperation {
|
|
|
27
29
|
export declare class ApplyCodeBlockOperation {
|
|
28
30
|
private readonly editorService;
|
|
29
31
|
private readonly textFileService;
|
|
30
|
-
private readonly bulkEditService;
|
|
31
|
-
private readonly codeEditorService;
|
|
32
32
|
private readonly chatService;
|
|
33
|
-
private readonly languageFeaturesService;
|
|
34
|
-
private readonly progressService;
|
|
35
33
|
private readonly languageService;
|
|
36
34
|
private readonly fileService;
|
|
37
35
|
private readonly dialogService;
|
|
38
36
|
private readonly logService;
|
|
39
|
-
private
|
|
40
|
-
|
|
37
|
+
private readonly codeMapperService;
|
|
38
|
+
private readonly progressService;
|
|
39
|
+
private readonly quickInputService;
|
|
40
|
+
private readonly labelService;
|
|
41
|
+
constructor(editorService: IEditorService, textFileService: ITextFileService, chatService: IChatService, languageService: ILanguageService, fileService: IFileService, dialogService: IDialogService, logService: ILogService, codeMapperService: ICodeMapperService, progressService: IProgressService, quickInputService: IQuickInputService, labelService: ILabelService);
|
|
41
42
|
run(context: ICodeBlockActionContext): Promise<void>;
|
|
43
|
+
private evaluateURIToUse;
|
|
42
44
|
private handleNotebookEditor;
|
|
43
45
|
private handleTextEditor;
|
|
44
|
-
private
|
|
46
|
+
private getEdits;
|
|
47
|
+
private waitForFirstElement;
|
|
45
48
|
private applyWithInlinePreview;
|
|
46
49
|
private tryToRevealCodeBlock;
|
|
47
50
|
private notify;
|