@codingame/monaco-vscode-chat-service-override 15.0.2 → 16.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 +11 -8
- package/package.json +29 -20
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +22 -0
- package/vscode/src/vs/editor/common/diff/documentDiffProvider.js +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +80 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +17 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/{askToSelectPrompt.d.ts → askToSelectPrompt/askToSelectPrompt.d.ts} +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +79 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +163 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +242 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.js +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +688 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +355 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +395 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +216 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +97 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +831 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +985 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +147 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +284 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +578 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +320 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +22 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +166 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +6 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +704 -732
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +10 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +329 -236
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +14 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +217 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +114 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +90 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +65 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +14 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +175 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +313 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +10 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptPathAutocompletion.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +157 -65
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +39 -21
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +11 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +47 -0
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +5 -0
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.js +0 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +0 -331
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +0 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.js +0 -85
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +0 -22
|
@@ -3,18 +3,20 @@ 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-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
7
|
-
import { ChatViewId } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
8
|
-
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
9
|
-
import { ChatEditor } from '../chatEditor.js';
|
|
10
|
-
import { ChatEditorInput } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
11
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
12
6
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
13
7
|
import { AUX_WINDOW_GROUP, ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
14
8
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
9
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
16
10
|
import { isChatViewTitleActionContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatActions';
|
|
17
|
-
import {
|
|
11
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
12
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
13
|
+
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
14
|
+
import { ChatViewId } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
15
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
16
|
+
import { ChatEditor } from '../chatEditor.js';
|
|
17
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
18
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
19
|
+
import { waitForChatSessionCleared } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatClearActions';
|
|
18
20
|
|
|
19
21
|
var MoveToNewLocation;
|
|
20
22
|
(function (MoveToNewLocation) {
|
|
@@ -26,7 +28,7 @@ function registerMoveActions() {
|
|
|
26
28
|
constructor() {
|
|
27
29
|
super({
|
|
28
30
|
id: `workbench.action.chat.openInEditor`,
|
|
29
|
-
title: ( localize2(
|
|
31
|
+
title: ( localize2(4437, "Open Chat in Editor")),
|
|
30
32
|
category: CHAT_CATEGORY,
|
|
31
33
|
precondition: ChatContextKeys.enabled,
|
|
32
34
|
f1: true,
|
|
@@ -47,7 +49,7 @@ function registerMoveActions() {
|
|
|
47
49
|
constructor() {
|
|
48
50
|
super({
|
|
49
51
|
id: `workbench.action.chat.openInNewWindow`,
|
|
50
|
-
title: ( localize2(
|
|
52
|
+
title: ( localize2(4438, "Open Chat in New Window")),
|
|
51
53
|
category: CHAT_CATEGORY,
|
|
52
54
|
precondition: ChatContextKeys.enabled,
|
|
53
55
|
f1: true,
|
|
@@ -68,7 +70,7 @@ function registerMoveActions() {
|
|
|
68
70
|
constructor() {
|
|
69
71
|
super({
|
|
70
72
|
id: `workbench.action.chat.openInSidebar`,
|
|
71
|
-
title: ( localize2(
|
|
73
|
+
title: ( localize2(4439, "Open Chat in Side Bar")),
|
|
72
74
|
category: CHAT_CATEGORY,
|
|
73
75
|
precondition: ChatContextKeys.enabled,
|
|
74
76
|
f1: true,
|
|
@@ -87,19 +89,17 @@ function registerMoveActions() {
|
|
|
87
89
|
async function executeMoveToAction(accessor, moveTo, _sessionId) {
|
|
88
90
|
const widgetService = accessor.get(IChatWidgetService);
|
|
89
91
|
const editorService = accessor.get(IEditorService);
|
|
92
|
+
const chatService = accessor.get(IChatService);
|
|
90
93
|
const widget = (_sessionId ? widgetService.getWidgetBySessionId(_sessionId) : undefined)
|
|
91
94
|
?? widgetService.lastFocusedWidget;
|
|
92
|
-
if (!widget || widget.location !== ChatAgentLocation.Panel) {
|
|
95
|
+
if (!widget || !widget.viewModel || widget.location !== ChatAgentLocation.Panel) {
|
|
93
96
|
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true } }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
|
|
94
97
|
return;
|
|
95
98
|
}
|
|
96
|
-
const
|
|
97
|
-
if (!viewModel) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
const sessionId = viewModel.sessionId;
|
|
99
|
+
const sessionId = widget.viewModel.sessionId;
|
|
101
100
|
const viewState = widget.getViewState();
|
|
102
101
|
widget.clear();
|
|
102
|
+
await waitForChatSessionCleared(sessionId, chatService);
|
|
103
103
|
const options = { target: { sessionId }, pinned: true, viewState: viewState };
|
|
104
104
|
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
|
|
105
105
|
}
|
|
@@ -113,7 +113,7 @@ async function moveToSidebar(accessor) {
|
|
|
113
113
|
if (chatEditor instanceof ChatEditor && chatEditorInput instanceof ChatEditorInput && chatEditorInput.sessionId) {
|
|
114
114
|
await editorService.closeEditor({ editor: chatEditor.input, groupId: editorGroupService.activeGroup.id });
|
|
115
115
|
view = await viewsService.openView(ChatViewId);
|
|
116
|
-
view.loadSession(chatEditorInput.sessionId, chatEditor.getViewState());
|
|
116
|
+
await view.loadSession(chatEditorInput.sessionId, chatEditor.getViewState());
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
119
119
|
view = await viewsService.openView(ChatViewId);
|
|
@@ -18,7 +18,7 @@ function registerQuickChatActions() {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super({
|
|
20
20
|
id: 'workbench.action.quickchat.openInChatView',
|
|
21
|
-
title: ( localize2(
|
|
21
|
+
title: ( localize2(4440, "Open in Chat View")),
|
|
22
22
|
f1: false,
|
|
23
23
|
category: CHAT_CATEGORY,
|
|
24
24
|
icon: Codicon.commentDiscussion,
|
|
@@ -38,7 +38,7 @@ function registerQuickChatActions() {
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super({
|
|
40
40
|
id: 'workbench.action.quickchat.close',
|
|
41
|
-
title: ( localize2(
|
|
41
|
+
title: ( localize2(4441, "Close Quick Chat")),
|
|
42
42
|
f1: false,
|
|
43
43
|
category: CHAT_CATEGORY,
|
|
44
44
|
icon: Codicon.close,
|
|
@@ -59,7 +59,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
59
59
|
constructor() {
|
|
60
60
|
super({
|
|
61
61
|
id: ASK_QUICK_QUESTION_ACTION_ID,
|
|
62
|
-
title: ( localize2(
|
|
62
|
+
title: ( localize2(4442, 'Quick Chat')),
|
|
63
63
|
precondition: ChatContextKeys.enabled,
|
|
64
64
|
icon: Codicon.commentDiscussion,
|
|
65
65
|
f1: false,
|
|
@@ -74,7 +74,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
74
74
|
order: 4
|
|
75
75
|
},
|
|
76
76
|
metadata: {
|
|
77
|
-
description: ( localize(
|
|
77
|
+
description: ( localize(4443, 'Toggle the quick chat')),
|
|
78
78
|
args: [{
|
|
79
79
|
name: 'args',
|
|
80
80
|
schema: {
|
|
@@ -84,18 +84,18 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
84
84
|
required: ['query'],
|
|
85
85
|
properties: {
|
|
86
86
|
query: {
|
|
87
|
-
description: ( localize(
|
|
87
|
+
description: ( localize(4444, "The query to open the quick chat with")),
|
|
88
88
|
type: 'string'
|
|
89
89
|
},
|
|
90
90
|
isPartialQuery: {
|
|
91
|
-
description: ( localize(
|
|
91
|
+
description: ( localize(4445, "Whether the query is partial; it will wait for more user input")),
|
|
92
92
|
type: 'boolean'
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
type: 'string',
|
|
98
|
-
description: ( localize(
|
|
98
|
+
description: ( localize(4444, "The query to open the quick chat with"))
|
|
99
99
|
}
|
|
100
100
|
]
|
|
101
101
|
}
|
|
@@ -125,7 +125,8 @@ class AskQuickChatAction extends Action2 {
|
|
|
125
125
|
super({
|
|
126
126
|
id: `workbench.action.openQuickChat`,
|
|
127
127
|
category: CHAT_CATEGORY,
|
|
128
|
-
title: ( localize2(
|
|
128
|
+
title: ( localize2(4446, "Open Quick Chat")),
|
|
129
|
+
precondition: ChatContextKeys.enabled,
|
|
129
130
|
f1: true
|
|
130
131
|
});
|
|
131
132
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { IChatTransferService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTransferService.service";
|
|
4
|
+
export declare class ChatTransferContribution extends Disposable implements IWorkbenchContribution {
|
|
5
|
+
static readonly ID = "workbench.contrib.chatTransfer";
|
|
6
|
+
constructor(chatTransferService: IChatTransferService);
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { IChatTransferService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTransferService.service';
|
|
5
|
+
|
|
6
|
+
let ChatTransferContribution = class ChatTransferContribution extends Disposable {
|
|
7
|
+
static { this.ID = 'workbench.contrib.chatTransfer'; }
|
|
8
|
+
constructor(chatTransferService) {
|
|
9
|
+
super();
|
|
10
|
+
chatTransferService.checkAndSetWorkspaceTrust();
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
ChatTransferContribution = ( __decorate([
|
|
14
|
+
( __param(0, IChatTransferService))
|
|
15
|
+
], ChatTransferContribution));
|
|
16
|
+
|
|
17
|
+
export { ChatTransferContribution };
|
|
@@ -54,7 +54,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
this.notify(( localize(
|
|
57
|
-
|
|
57
|
+
4473,
|
|
58
58
|
"To insert the code block, open a code editor or notebook editor and set the cursor at the location where to insert the code block."
|
|
59
59
|
)));
|
|
60
60
|
}
|
|
@@ -67,7 +67,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
67
67
|
}
|
|
68
68
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
69
69
|
if (notebookEditor.isReadOnly) {
|
|
70
|
-
this.notify(( localize(
|
|
70
|
+
this.notify(( localize(4474, "Cannot insert the code block to read-only notebook editor.")));
|
|
71
71
|
return false;
|
|
72
72
|
}
|
|
73
73
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -78,7 +78,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
78
78
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
79
79
|
const activeModel = codeEditor.getModel();
|
|
80
80
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
81
|
-
this.notify(( localize(
|
|
81
|
+
this.notify(( localize(4475, "Cannot insert the code block to read-only code editor.")));
|
|
82
82
|
return false;
|
|
83
83
|
}
|
|
84
84
|
const range = codeEditor.getSelection() ?? ( new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1));
|
|
@@ -131,7 +131,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
131
131
|
activeEditorControl = codeEditor;
|
|
132
132
|
}
|
|
133
133
|
else {
|
|
134
|
-
this.notify(( localize(
|
|
134
|
+
this.notify(( localize(4476, "Failed to open {0} in a code editor.", (codemapperUri.toString()))));
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -150,7 +150,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
150
150
|
result = await this.handleNotebookEditor(activeNotebookEditor, context.code);
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
|
-
this.notify(( localize(
|
|
153
|
+
this.notify(( localize(4477, "To apply this code block, open a code or notebook editor.")));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
notifyUserAction(this.chatService, context, {
|
|
@@ -166,15 +166,15 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
166
166
|
return resource;
|
|
167
167
|
}
|
|
168
168
|
const activeEditorOption = activeEditorControl?.getModel().uri ? { label: ( localize(
|
|
169
|
-
|
|
169
|
+
4478,
|
|
170
170
|
"Active editor '{0}'",
|
|
171
171
|
this.labelService.getUriLabel(activeEditorControl.getModel().uri, { relative: true })
|
|
172
172
|
)), id: 'activeEditor' } : undefined;
|
|
173
|
-
const untitledEditorOption = { label: ( localize(
|
|
173
|
+
const untitledEditorOption = { label: ( localize(4479, "New untitled editor")), id: 'newUntitledFile' };
|
|
174
174
|
const options = [];
|
|
175
175
|
if (resource) {
|
|
176
176
|
options.push({ label: ( localize(
|
|
177
|
-
|
|
177
|
+
4480,
|
|
178
178
|
"New file '{0}'",
|
|
179
179
|
this.labelService.getUriLabel(resource, { relative: true })
|
|
180
180
|
)), id: 'createFile' });
|
|
@@ -189,7 +189,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
189
189
|
}
|
|
190
190
|
options.push(untitledEditorOption);
|
|
191
191
|
}
|
|
192
|
-
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(
|
|
192
|
+
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(4481, "Select where to apply the code block")) }) : options[0];
|
|
193
193
|
if (selected) {
|
|
194
194
|
switch (selected.id) {
|
|
195
195
|
case 'createFile':
|
|
@@ -198,7 +198,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
198
198
|
await this.fileService.writeFile(resource, VSBuffer.fromString(''));
|
|
199
199
|
}
|
|
200
200
|
catch (error) {
|
|
201
|
-
this.notify(( localize(
|
|
201
|
+
this.notify(( localize(4482, "Failed to create file: {0}", error.message)));
|
|
202
202
|
return ( URI.from({ scheme: 'untitled', path: resource.path }));
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -213,7 +213,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
213
213
|
}
|
|
214
214
|
async handleNotebookEditor(notebookEditor, code) {
|
|
215
215
|
if (notebookEditor.isReadOnly) {
|
|
216
|
-
this.notify(( localize(
|
|
216
|
+
this.notify(( localize(4483, "Cannot apply code block to read-only notebook editor.")));
|
|
217
217
|
return undefined;
|
|
218
218
|
}
|
|
219
219
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -224,20 +224,20 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
224
224
|
async handleTextEditor(codeEditor, code) {
|
|
225
225
|
const activeModel = codeEditor.getModel();
|
|
226
226
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
227
|
-
this.notify(( localize(
|
|
227
|
+
this.notify(( localize(4484, "Cannot apply code block to read-only file.")));
|
|
228
228
|
return undefined;
|
|
229
229
|
}
|
|
230
230
|
const codeBlock = { code, resource: activeModel.uri, markdownBeforeBlock: undefined };
|
|
231
231
|
const codeMapper = this.codeMapperService.providers[0]?.displayName;
|
|
232
232
|
if (!codeMapper) {
|
|
233
|
-
this.notify(( localize(
|
|
233
|
+
this.notify(( localize(4485, "No code mapper available.")));
|
|
234
234
|
return undefined;
|
|
235
235
|
}
|
|
236
236
|
let editsProposed = false;
|
|
237
237
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
238
238
|
try {
|
|
239
239
|
const iterable = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
240
|
-
progress.report({ message: ( localize(
|
|
240
|
+
progress.report({ message: ( localize(4486, "Applying code block using {0}...", codeMapper)) });
|
|
241
241
|
const editsIterable = this.getEdits(codeBlock, cancellationTokenSource.token);
|
|
242
242
|
return await this.waitForFirstElement(editsIterable);
|
|
243
243
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -245,7 +245,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
245
245
|
}
|
|
246
246
|
catch (e) {
|
|
247
247
|
if (!isCancellationError(e)) {
|
|
248
|
-
this.notify(( localize(
|
|
248
|
+
this.notify(( localize(4487, "Failed to apply code block: {0}", e.message)));
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
finally {
|