@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
|
@@ -22,6 +22,7 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
22
22
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
23
23
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
24
24
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
25
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
25
26
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
26
27
|
import { ActiveEditorContext, TextCompareEditorActiveContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
27
28
|
import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
@@ -34,25 +35,25 @@ import { VIEW_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/servic
|
|
|
34
35
|
import { UntitledTextEditorInput } from '@codingame/monaco-vscode-c4e2825a-b5b1-5f0e-b547-068c32e06d50-common/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput';
|
|
35
36
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
36
37
|
import { FileEditorInput } from '@codingame/monaco-vscode-c4e2825a-b5b1-5f0e-b547-068c32e06d50-common/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput';
|
|
37
|
-
import { TEXT_FILE_EDITOR_ID } from '@codingame/monaco-vscode-
|
|
38
|
+
import { TEXT_FILE_EDITOR_ID } from '@codingame/monaco-vscode-68b3311c-eb96-5711-8f72-f5f4b2e31932-common/vscode/vs/workbench/contrib/files/common/files';
|
|
38
39
|
import { NotebookEditorInput } from '@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
39
40
|
import { AnythingQuickAccessProvider } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/workbench/contrib/search/browser/anythingQuickAccess';
|
|
40
41
|
import { isSearchTreeFileMatch, isSearchTreeMatch } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon';
|
|
41
42
|
import { SymbolsQuickAccessProvider } from '@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common/vscode/vs/workbench/contrib/search/browser/symbolsQuickAccess';
|
|
42
43
|
import { SearchContext } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/search/common/constants';
|
|
43
|
-
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
44
44
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
45
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
45
|
+
import { ChatContextKeys, ChatContextKeyExprs } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
46
46
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
47
47
|
import { IDiagnosticVariableEntryFilterData } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
48
48
|
import { ChatRequestAgentPart } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
49
49
|
import { IChatVariablesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariables.service';
|
|
50
|
+
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
50
51
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
51
52
|
import { showChatView, showEditsView } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
52
53
|
import { IChatWidgetService, IQuickChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
53
|
-
import { imageToHash, isImage } from '
|
|
54
|
+
import { imageToHash, isImage } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatPasteProviders';
|
|
54
55
|
import { isQuickChat } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
55
|
-
import { createMarkersQuickPick, createFolderQuickPick } from '@codingame/monaco-vscode-
|
|
56
|
+
import { createMarkersQuickPick, createFolderQuickPick } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables';
|
|
56
57
|
import { convertBufferToScreenshotVariable, ScreenshotVariableId } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/contrib/screenshot';
|
|
57
58
|
import { resizeImage } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
|
|
58
59
|
import { COMMAND_ID } from '../promptSyntax/contributions/usePromptCommand.js';
|
|
@@ -62,9 +63,12 @@ import { ATTACH_PROMPT_ACTION_ID, AttachPromptAction } from './chatAttachPromptA
|
|
|
62
63
|
function registerChatContextActions() {
|
|
63
64
|
registerAction2(AttachContextAction);
|
|
64
65
|
registerAction2(AttachFileToChatAction);
|
|
66
|
+
registerAction2(AttachFolderToChatAction);
|
|
65
67
|
registerAction2(AttachSelectionToChatAction);
|
|
66
68
|
registerAction2(AttachFileToEditingSessionAction);
|
|
69
|
+
registerAction2(AttachFolderToEditingSessionAction);
|
|
67
70
|
registerAction2(AttachSelectionToEditingSessionAction);
|
|
71
|
+
registerAction2(AttachSearchResultAction);
|
|
68
72
|
}
|
|
69
73
|
function isIGotoSymbolQuickPickItem(obj) {
|
|
70
74
|
return (typeof obj === 'object'
|
|
@@ -113,8 +117,8 @@ function isPromptInstructionsQuickPickItem(obj) {
|
|
|
113
117
|
return ('kind' in obj && obj.kind === 'reusable-prompt');
|
|
114
118
|
}
|
|
115
119
|
const REUSABLE_PROMPT_PICK_ID = 'reusable-prompt';
|
|
116
|
-
class
|
|
117
|
-
|
|
120
|
+
class AttachResourceAction extends Action2 {
|
|
121
|
+
getResources(accessor, ...args) {
|
|
118
122
|
const editorService = accessor.get(IEditorService);
|
|
119
123
|
const contexts = Array.isArray(args[1]) ? args[1] : [args[0]];
|
|
120
124
|
const files = [];
|
|
@@ -139,25 +143,25 @@ class AttachFileAction extends Action2 {
|
|
|
139
143
|
return files;
|
|
140
144
|
}
|
|
141
145
|
}
|
|
142
|
-
class AttachFileToChatAction extends
|
|
146
|
+
class AttachFileToChatAction extends AttachResourceAction {
|
|
143
147
|
static { this.ID = 'workbench.action.chat.attachFile'; }
|
|
144
148
|
constructor() {
|
|
145
149
|
super({
|
|
146
150
|
id: AttachFileToChatAction.ID,
|
|
147
|
-
title: ( localize2(
|
|
151
|
+
title: ( localize2(4382, "Add File to Chat")),
|
|
148
152
|
category: CHAT_CATEGORY,
|
|
149
153
|
f1: false,
|
|
150
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
|
|
151
154
|
menu: [{
|
|
152
155
|
id: MenuId.SearchContext,
|
|
153
156
|
group: 'z_chat',
|
|
154
|
-
order: 1
|
|
157
|
+
order: 1,
|
|
158
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)), ( SearchContext.SearchResultHeaderFocused.negate()))),
|
|
155
159
|
}]
|
|
156
160
|
});
|
|
157
161
|
}
|
|
158
162
|
async run(accessor, ...args) {
|
|
159
163
|
const variablesService = accessor.get(IChatVariablesService);
|
|
160
|
-
const files = this.
|
|
164
|
+
const files = this.getResources(accessor, ...args);
|
|
161
165
|
if (files.length) {
|
|
162
166
|
(await showChatView(accessor.get(IViewsService)))?.focusInput();
|
|
163
167
|
for (const file of files) {
|
|
@@ -166,20 +170,35 @@ class AttachFileToChatAction extends AttachFileAction {
|
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
|
173
|
+
class AttachFolderToChatAction extends AttachResourceAction {
|
|
174
|
+
static { this.ID = 'workbench.action.chat.attachFolder'; }
|
|
175
|
+
constructor() {
|
|
176
|
+
super({
|
|
177
|
+
id: AttachFolderToChatAction.ID,
|
|
178
|
+
title: ( localize2(4383, "Add Folder to Chat")),
|
|
179
|
+
category: CHAT_CATEGORY,
|
|
180
|
+
f1: false,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async run(accessor, ...args) {
|
|
184
|
+
const variablesService = accessor.get(IChatVariablesService);
|
|
185
|
+
const folders = this.getResources(accessor, ...args);
|
|
186
|
+
if (folders.length) {
|
|
187
|
+
(await showChatView(accessor.get(IViewsService)))?.focusInput();
|
|
188
|
+
for (const folder of folders) {
|
|
189
|
+
variablesService.attachContext('folder', folder, ChatAgentLocation.Panel);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
169
194
|
class AttachSelectionToChatAction extends Action2 {
|
|
170
195
|
static { this.ID = 'workbench.action.chat.attachSelection'; }
|
|
171
196
|
constructor() {
|
|
172
197
|
super({
|
|
173
198
|
id: AttachSelectionToChatAction.ID,
|
|
174
|
-
title: ( localize2(
|
|
199
|
+
title: ( localize2(4384, "Add Selection to Chat")),
|
|
175
200
|
category: CHAT_CATEGORY,
|
|
176
201
|
f1: false,
|
|
177
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
|
|
178
|
-
menu: [{
|
|
179
|
-
id: MenuId.SearchContext,
|
|
180
|
-
group: 'z_chat',
|
|
181
|
-
order: 2
|
|
182
|
-
}]
|
|
183
202
|
});
|
|
184
203
|
}
|
|
185
204
|
async run(accessor, ...args) {
|
|
@@ -223,25 +242,25 @@ class AttachSelectionToChatAction extends Action2 {
|
|
|
223
242
|
}
|
|
224
243
|
}
|
|
225
244
|
}
|
|
226
|
-
class AttachFileToEditingSessionAction extends
|
|
245
|
+
class AttachFileToEditingSessionAction extends AttachResourceAction {
|
|
227
246
|
static { this.ID = 'workbench.action.edits.attachFile'; }
|
|
228
247
|
constructor() {
|
|
229
248
|
super({
|
|
230
249
|
id: AttachFileToEditingSessionAction.ID,
|
|
231
|
-
title: ( localize2(
|
|
250
|
+
title: ( localize2(4385, "Add File to {0}", 'Copilot Edits')),
|
|
232
251
|
category: CHAT_CATEGORY,
|
|
233
252
|
f1: false,
|
|
234
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
|
|
235
253
|
menu: [{
|
|
236
254
|
id: MenuId.SearchContext,
|
|
237
255
|
group: 'z_chat',
|
|
238
|
-
order: 2
|
|
256
|
+
order: 2,
|
|
257
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)), ( ChatContextKeyExprs.unifiedChatEnabled.negate()), ( SearchContext.SearchResultHeaderFocused.negate()))),
|
|
239
258
|
}]
|
|
240
259
|
});
|
|
241
260
|
}
|
|
242
261
|
async run(accessor, ...args) {
|
|
243
262
|
const variablesService = accessor.get(IChatVariablesService);
|
|
244
|
-
const files = this.
|
|
263
|
+
const files = this.getResources(accessor, ...args);
|
|
245
264
|
if (files.length) {
|
|
246
265
|
(await showEditsView(accessor.get(IViewsService)))?.focusInput();
|
|
247
266
|
for (const file of files) {
|
|
@@ -250,15 +269,90 @@ class AttachFileToEditingSessionAction extends AttachFileAction {
|
|
|
250
269
|
}
|
|
251
270
|
}
|
|
252
271
|
}
|
|
272
|
+
class AttachSearchResultAction extends Action2 {
|
|
273
|
+
static { this.Name = 'searchResults'; }
|
|
274
|
+
static { this.ID = 'workbench.action.chat.insertSearchResults'; }
|
|
275
|
+
constructor() {
|
|
276
|
+
super({
|
|
277
|
+
id: AttachSearchResultAction.ID,
|
|
278
|
+
title: ( localize2(4386, 'Add Search Results to Chat')),
|
|
279
|
+
category: CHAT_CATEGORY,
|
|
280
|
+
f1: false,
|
|
281
|
+
menu: [{
|
|
282
|
+
id: MenuId.SearchContext,
|
|
283
|
+
group: 'z_chat',
|
|
284
|
+
order: 3,
|
|
285
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.enabled, SearchContext.SearchResultHeaderFocused)),
|
|
286
|
+
}]
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
async run(accessor, ...args) {
|
|
290
|
+
const logService = accessor.get(ILogService);
|
|
291
|
+
const widget = (await showChatView(accessor.get(IViewsService)));
|
|
292
|
+
if (!widget) {
|
|
293
|
+
logService.trace('InsertSearchResultAction: no chat view available');
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const editor = widget.inputEditor;
|
|
297
|
+
const originalRange = editor.getSelection() ?? editor.getModel()?.getFullModelRange().collapseToEnd();
|
|
298
|
+
if (!originalRange) {
|
|
299
|
+
logService.trace('InsertSearchResultAction: no selection');
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
let insertText = `#${AttachSearchResultAction.Name}`;
|
|
303
|
+
const varRange = ( new Range(
|
|
304
|
+
originalRange.startLineNumber,
|
|
305
|
+
originalRange.startColumn,
|
|
306
|
+
originalRange.endLineNumber,
|
|
307
|
+
originalRange.startColumn + insertText.length
|
|
308
|
+
));
|
|
309
|
+
const model = editor.getModel();
|
|
310
|
+
if (model && model.getValueInRange(( new Range(
|
|
311
|
+
originalRange.startLineNumber,
|
|
312
|
+
originalRange.startColumn - 1,
|
|
313
|
+
originalRange.startLineNumber,
|
|
314
|
+
originalRange.startColumn
|
|
315
|
+
))) !== ' ') {
|
|
316
|
+
insertText = ' ' + insertText;
|
|
317
|
+
}
|
|
318
|
+
const success = editor.executeEdits('chatInsertSearch', [{ range: varRange, text: insertText + ' ' }]);
|
|
319
|
+
if (!success) {
|
|
320
|
+
logService.trace(`InsertSearchResultAction: failed to insert "${insertText}"`);
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
class AttachFolderToEditingSessionAction extends AttachResourceAction {
|
|
326
|
+
static { this.ID = 'workbench.action.edits.attachFolder'; }
|
|
327
|
+
constructor() {
|
|
328
|
+
super({
|
|
329
|
+
id: AttachFolderToEditingSessionAction.ID,
|
|
330
|
+
title: ( localize2(4387, "Add Folder to {0}", 'Copilot Edits')),
|
|
331
|
+
category: CHAT_CATEGORY,
|
|
332
|
+
f1: false,
|
|
333
|
+
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ChatContextKeyExprs.unifiedChatEnabled.negate()))),
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
async run(accessor, ...args) {
|
|
337
|
+
const variablesService = accessor.get(IChatVariablesService);
|
|
338
|
+
const folders = this.getResources(accessor, ...args);
|
|
339
|
+
if (folders.length) {
|
|
340
|
+
(await showEditsView(accessor.get(IViewsService)))?.focusInput();
|
|
341
|
+
for (const folder of folders) {
|
|
342
|
+
variablesService.attachContext('folder', folder, ChatAgentLocation.EditingSession);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
253
347
|
class AttachSelectionToEditingSessionAction extends Action2 {
|
|
254
348
|
static { this.ID = 'workbench.action.edits.attachSelection'; }
|
|
255
349
|
constructor() {
|
|
256
350
|
super({
|
|
257
351
|
id: AttachSelectionToEditingSessionAction.ID,
|
|
258
|
-
title: ( localize2(
|
|
352
|
+
title: ( localize2(4388, "Add Selection to {0}", 'Copilot Edits')),
|
|
259
353
|
category: CHAT_CATEGORY,
|
|
260
354
|
f1: false,
|
|
261
|
-
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext))))
|
|
355
|
+
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)), ( ChatContextKeyExprs.unifiedChatEnabled.negate())))
|
|
262
356
|
});
|
|
263
357
|
}
|
|
264
358
|
async run(accessor, ...args) {
|
|
@@ -278,31 +372,23 @@ class AttachSelectionToEditingSessionAction extends Action2 {
|
|
|
278
372
|
}
|
|
279
373
|
class AttachContextAction extends Action2 {
|
|
280
374
|
static { this.ID = 'workbench.action.chat.attachContext'; }
|
|
281
|
-
static { this._cdt = ( ContextKeyExpr.or(( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Panel)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Editor)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Notebook)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Terminal)))))); }
|
|
282
375
|
constructor(desc = {
|
|
283
376
|
id: AttachContextAction.ID,
|
|
284
|
-
title: ( localize2(
|
|
377
|
+
title: ( localize2(4389, "Add Context")),
|
|
285
378
|
icon: Codicon.attach,
|
|
286
379
|
category: CHAT_CATEGORY,
|
|
287
|
-
precondition: ( ContextKeyExpr.or(AttachContextAction._cdt, ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.EditingSession)))))),
|
|
288
380
|
keybinding: {
|
|
289
|
-
when: ( ContextKeyExpr.and(( ChatContextKeys.location.notEqualsTo(ChatAgentLocation.EditingSession)), ChatContextKeys.inChatInput)),
|
|
381
|
+
when: ( ContextKeyExpr.and(( ChatContextKeys.location.notEqualsTo(ChatAgentLocation.EditingSession)), ChatContextKeys.inChatInput, ChatContextKeyExprs.inNonUnifiedPanel)),
|
|
290
382
|
primary: KeyMod.CtrlCmd | KeyCode.Slash,
|
|
291
383
|
weight: KeybindingWeight.EditorContrib
|
|
292
384
|
},
|
|
293
385
|
menu: [
|
|
294
386
|
{
|
|
295
|
-
when:
|
|
296
|
-
id: MenuId.
|
|
387
|
+
when: ChatContextKeyExprs.inNonUnifiedPanel,
|
|
388
|
+
id: MenuId.ChatInputAttachmentToolbar,
|
|
297
389
|
group: 'navigation',
|
|
298
390
|
order: 2
|
|
299
|
-
}
|
|
300
|
-
{
|
|
301
|
-
when: ( ContextKeyExpr.and(( ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Panel)).negate()), AttachContextAction._cdt)),
|
|
302
|
-
id: MenuId.ChatExecute,
|
|
303
|
-
group: 'navigation',
|
|
304
|
-
order: 1
|
|
305
|
-
},
|
|
391
|
+
}
|
|
306
392
|
]
|
|
307
393
|
}) {
|
|
308
394
|
super(desc);
|
|
@@ -438,9 +524,15 @@ class AttachContextAction extends Action2 {
|
|
|
438
524
|
}
|
|
439
525
|
return acc;
|
|
440
526
|
}, []));
|
|
441
|
-
const selectedFiles = await quickInputService.pick(itemsPromise, { placeHolder: ( localize(
|
|
527
|
+
const selectedFiles = await quickInputService.pick(itemsPromise, { placeHolder: ( localize(4390, 'Add related files to your working set')), canPickMany: true });
|
|
442
528
|
for (const file of selectedFiles ?? []) {
|
|
443
|
-
|
|
529
|
+
toAttach.push({
|
|
530
|
+
id: this._getFileContextId({ resource: file.value }),
|
|
531
|
+
value: file.value,
|
|
532
|
+
name: file.label,
|
|
533
|
+
isFile: true,
|
|
534
|
+
isOmitted: false
|
|
535
|
+
});
|
|
444
536
|
}
|
|
445
537
|
}
|
|
446
538
|
else if (isScreenshotQuickPickItem(pick)) {
|
|
@@ -450,7 +542,7 @@ class AttachContextAction extends Action2 {
|
|
|
450
542
|
}
|
|
451
543
|
}
|
|
452
544
|
else if (isPromptInstructionsQuickPickItem(pick)) {
|
|
453
|
-
const options = { widget
|
|
545
|
+
const options = { widget };
|
|
454
546
|
await commandService.executeCommand(ATTACH_PROMPT_ACTION_ID, options);
|
|
455
547
|
}
|
|
456
548
|
else {
|
|
@@ -481,8 +573,8 @@ class AttachContextAction extends Action2 {
|
|
|
481
573
|
const fileBuffer = await clipboardService.readImage();
|
|
482
574
|
toAttach.push({
|
|
483
575
|
id: await imageToHash(fileBuffer),
|
|
484
|
-
name: ( localize(
|
|
485
|
-
fullName: ( localize(
|
|
576
|
+
name: ( localize(4391, 'Pasted Image')),
|
|
577
|
+
fullName: ( localize(4391, 'Pasted Image')),
|
|
486
578
|
value: fileBuffer,
|
|
487
579
|
isImage: true
|
|
488
580
|
});
|
|
@@ -517,7 +609,7 @@ class AttachContextAction extends Action2 {
|
|
|
517
609
|
if (!widget) {
|
|
518
610
|
return;
|
|
519
611
|
}
|
|
520
|
-
const chatEditingService = widget.location === ChatAgentLocation.EditingSession ? accessor.get(IChatEditingService) : undefined;
|
|
612
|
+
const chatEditingService = widget.location === ChatAgentLocation.EditingSession || widget.isUnifiedPanelWidget ? accessor.get(IChatEditingService) : undefined;
|
|
521
613
|
const quickPickItems = [];
|
|
522
614
|
if (( extensionService.extensions.some(ext => isProposedApiEnabled(ext, 'chatReferenceBinaryData')))) {
|
|
523
615
|
const imageData = await clipboardService.readImage();
|
|
@@ -525,7 +617,7 @@ class AttachContextAction extends Action2 {
|
|
|
525
617
|
quickPickItems.push({
|
|
526
618
|
kind: 'image',
|
|
527
619
|
id: await imageToHash(imageData),
|
|
528
|
-
label: ( localize(
|
|
620
|
+
label: ( localize(4392, 'Image from Clipboard')),
|
|
529
621
|
iconClass: ThemeIcon.asClassName(Codicon.fileMedia),
|
|
530
622
|
});
|
|
531
623
|
}
|
|
@@ -535,8 +627,8 @@ class AttachContextAction extends Action2 {
|
|
|
535
627
|
icon: ThemeIcon.fromId(Codicon.deviceCamera.id),
|
|
536
628
|
iconClass: ThemeIcon.asClassName(Codicon.deviceCamera),
|
|
537
629
|
label: (isElectron
|
|
538
|
-
? ( localize(
|
|
539
|
-
: ( localize(
|
|
630
|
+
? ( localize(4393, 'Screenshot Window'))
|
|
631
|
+
: ( localize(4394, 'Screenshot'))),
|
|
540
632
|
});
|
|
541
633
|
}
|
|
542
634
|
if (widget.viewModel?.sessionId) {
|
|
@@ -578,20 +670,20 @@ class AttachContextAction extends Action2 {
|
|
|
578
670
|
}
|
|
579
671
|
quickPickItems.push({
|
|
580
672
|
kind: 'quickaccess',
|
|
581
|
-
label: ( localize(
|
|
673
|
+
label: ( localize(4395, 'Symbol...')),
|
|
582
674
|
iconClass: ThemeIcon.asClassName(Codicon.symbolField),
|
|
583
675
|
prefix: SymbolsQuickAccessProvider.PREFIX,
|
|
584
676
|
id: 'symbol'
|
|
585
677
|
});
|
|
586
678
|
quickPickItems.push({
|
|
587
679
|
kind: 'folder',
|
|
588
|
-
label: ( localize(
|
|
680
|
+
label: ( localize(4396, 'Folder...')),
|
|
589
681
|
iconClass: ThemeIcon.asClassName(Codicon.folder),
|
|
590
682
|
id: 'folder',
|
|
591
683
|
});
|
|
592
684
|
quickPickItems.push({
|
|
593
685
|
kind: 'diagnostic',
|
|
594
|
-
label: ( localize(
|
|
686
|
+
label: ( localize(4397, 'Problem...')),
|
|
595
687
|
iconClass: ThemeIcon.asClassName(Codicon.error),
|
|
596
688
|
id: 'diagnostic'
|
|
597
689
|
});
|
|
@@ -602,20 +694,20 @@ class AttachContextAction extends Action2 {
|
|
|
602
694
|
icon: ThemeIcon.fromId(Codicon.serverEnvironment.id),
|
|
603
695
|
iconClass: ThemeIcon.asClassName(Codicon.serverEnvironment),
|
|
604
696
|
value: 'kernelVariable',
|
|
605
|
-
label: ( localize(
|
|
697
|
+
label: ( localize(4398, 'Kernel Variable...')),
|
|
606
698
|
command: {
|
|
607
699
|
id: 'notebook.chat.selectAndInsertKernelVariable',
|
|
608
|
-
title: ( localize(
|
|
700
|
+
title: ( localize(4399, 'Select and Insert Kernel Variable')),
|
|
609
701
|
arguments: [{ widget, range: undefined }]
|
|
610
702
|
}
|
|
611
703
|
});
|
|
612
704
|
}
|
|
613
705
|
if (context?.showFilesOnly) {
|
|
614
|
-
if (chatEditingService?.hasRelatedFilesProviders() && (widget.getInput() ||
|
|
706
|
+
if (chatEditingService?.hasRelatedFilesProviders() && (widget.getInput() || widget.attachmentModel.fileAttachments.length > 0)) {
|
|
615
707
|
quickPickItems.unshift({
|
|
616
708
|
kind: 'related-files',
|
|
617
709
|
id: 'related-files',
|
|
618
|
-
label: ( localize(
|
|
710
|
+
label: ( localize(4400, 'Related Files')),
|
|
619
711
|
iconClass: ThemeIcon.asClassName(Codicon.sparkle),
|
|
620
712
|
});
|
|
621
713
|
}
|
|
@@ -623,7 +715,7 @@ class AttachContextAction extends Action2 {
|
|
|
623
715
|
quickPickItems.unshift({
|
|
624
716
|
kind: 'open-editors',
|
|
625
717
|
id: 'open-editors',
|
|
626
|
-
label: ( localize(
|
|
718
|
+
label: ( localize(4401, 'Open Editors')),
|
|
627
719
|
iconClass: ThemeIcon.asClassName(Codicon.files),
|
|
628
720
|
});
|
|
629
721
|
}
|
|
@@ -631,7 +723,7 @@ class AttachContextAction extends Action2 {
|
|
|
631
723
|
quickPickItems.unshift({
|
|
632
724
|
kind: 'search-results',
|
|
633
725
|
id: 'search-results',
|
|
634
|
-
label: ( localize(
|
|
726
|
+
label: ( localize(4402, 'Search Results')),
|
|
635
727
|
iconClass: ThemeIcon.asClassName(Codicon.search),
|
|
636
728
|
});
|
|
637
729
|
}
|
|
@@ -641,7 +733,7 @@ class AttachContextAction extends Action2 {
|
|
|
641
733
|
quickPickItems.push({
|
|
642
734
|
id: REUSABLE_PROMPT_PICK_ID,
|
|
643
735
|
kind: REUSABLE_PROMPT_PICK_ID,
|
|
644
|
-
label: ( localize(
|
|
736
|
+
label: ( localize(4403, 'Prompt...')),
|
|
645
737
|
iconClass: ThemeIcon.asClassName(Codicon.bookmark),
|
|
646
738
|
keybinding,
|
|
647
739
|
});
|
|
@@ -742,7 +834,7 @@ class AttachContextAction extends Action2 {
|
|
|
742
834
|
SymbolsQuickAccessProvider.PREFIX,
|
|
743
835
|
AbstractGotoSymbolQuickAccessProvider.PREFIX
|
|
744
836
|
],
|
|
745
|
-
placeholder: placeholder ?? ( localize(
|
|
837
|
+
placeholder: placeholder ?? ( localize(4404, 'Search attachments')),
|
|
746
838
|
providerOptions,
|
|
747
839
|
});
|
|
748
840
|
}
|
|
@@ -762,16 +854,21 @@ class AttachContextAction extends Action2 {
|
|
|
762
854
|
registerAction2(class AttachFilesAction extends AttachContextAction {
|
|
763
855
|
constructor() {
|
|
764
856
|
super({
|
|
765
|
-
id: 'workbench.action.chat.editing.
|
|
766
|
-
title: ( localize2(
|
|
767
|
-
shortTitle: ( localize2(
|
|
857
|
+
id: 'workbench.action.chat.editing.attachContext',
|
|
858
|
+
title: ( localize2(4405, "Add Context to Copilot Edits")),
|
|
859
|
+
shortTitle: ( localize2(4406, "Add Context...")),
|
|
768
860
|
f1: false,
|
|
769
861
|
category: CHAT_CATEGORY,
|
|
770
|
-
menu: {
|
|
862
|
+
menu: {
|
|
863
|
+
when: ChatContextKeyExprs.inEditsOrUnified,
|
|
864
|
+
id: MenuId.ChatInputAttachmentToolbar,
|
|
865
|
+
group: 'navigation',
|
|
866
|
+
order: 3
|
|
867
|
+
},
|
|
771
868
|
icon: Codicon.attach,
|
|
772
|
-
precondition:
|
|
869
|
+
precondition: ChatContextKeyExprs.inEditsOrUnified,
|
|
773
870
|
keybinding: {
|
|
774
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput,
|
|
871
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inChatInput, ChatContextKeyExprs.inEditsOrUnified)),
|
|
775
872
|
primary: KeyMod.CtrlCmd | KeyCode.Slash,
|
|
776
873
|
weight: KeybindingWeight.EditorContrib
|
|
777
874
|
}
|
|
@@ -783,12 +880,6 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
|
|
|
783
880
|
return super.run(accessor, attachFilesContext);
|
|
784
881
|
}
|
|
785
882
|
});
|
|
786
|
-
function getEditingSession(chatEditingService, chatWidget) {
|
|
787
|
-
if (!chatWidget.viewModel?.sessionId) {
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
return chatEditingService.getEditingSession(chatWidget.viewModel.sessionId);
|
|
791
|
-
}
|
|
792
883
|
registerAction2(AttachPromptAction);
|
|
793
884
|
|
|
794
|
-
export { AttachContextAction, registerChatContextActions };
|
|
885
|
+
export { AttachContextAction, AttachSearchResultAction, registerChatContextActions };
|
|
@@ -12,7 +12,7 @@ function registerChatCopyActions() {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
|
14
14
|
id: 'workbench.action.chat.copyAll',
|
|
15
|
-
title: ( localize2(
|
|
15
|
+
title: ( localize2(4407, "Copy All")),
|
|
16
16
|
f1: false,
|
|
17
17
|
category: CHAT_CATEGORY,
|
|
18
18
|
menu: {
|
|
@@ -42,7 +42,7 @@ function registerChatCopyActions() {
|
|
|
42
42
|
constructor() {
|
|
43
43
|
super({
|
|
44
44
|
id: 'workbench.action.chat.copyItem',
|
|
45
|
-
title: ( localize2(
|
|
45
|
+
title: ( localize2(4408, "Copy")),
|
|
46
46
|
f1: false,
|
|
47
47
|
category: CHAT_CATEGORY,
|
|
48
48
|
menu: {
|
|
@@ -3,20 +3,24 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
|
|
|
3
3
|
import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
4
|
import { Categories } from '@codingame/monaco-vscode-api/vscode/vs/platform/action/common/actionCommonCategories';
|
|
5
5
|
import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
6
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
7
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
6
8
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
7
9
|
|
|
8
10
|
function registerChatDeveloperActions() {
|
|
9
11
|
registerAction2(LogChatInputHistoryAction);
|
|
12
|
+
registerAction2(LogChatIndexAction);
|
|
10
13
|
}
|
|
11
14
|
class LogChatInputHistoryAction extends Action2 {
|
|
12
15
|
static { this.ID = 'workbench.action.chat.logInputHistory'; }
|
|
13
16
|
constructor() {
|
|
14
17
|
super({
|
|
15
18
|
id: LogChatInputHistoryAction.ID,
|
|
16
|
-
title: ( localize2(
|
|
19
|
+
title: ( localize2(4409, "Log Chat Input History")),
|
|
17
20
|
icon: Codicon.attach,
|
|
18
21
|
category: Categories.Developer,
|
|
19
|
-
f1: true
|
|
22
|
+
f1: true,
|
|
23
|
+
precondition: ChatContextKeys.enabled
|
|
20
24
|
});
|
|
21
25
|
}
|
|
22
26
|
async run(accessor, ...args) {
|
|
@@ -24,5 +28,21 @@ class LogChatInputHistoryAction extends Action2 {
|
|
|
24
28
|
chatWidgetService.lastFocusedWidget?.logInputHistory();
|
|
25
29
|
}
|
|
26
30
|
}
|
|
31
|
+
class LogChatIndexAction extends Action2 {
|
|
32
|
+
static { this.ID = 'workbench.action.chat.logChatIndex'; }
|
|
33
|
+
constructor() {
|
|
34
|
+
super({
|
|
35
|
+
id: LogChatIndexAction.ID,
|
|
36
|
+
title: ( localize2(4410, "Log Chat Index")),
|
|
37
|
+
icon: Codicon.attach,
|
|
38
|
+
category: Categories.Developer,
|
|
39
|
+
f1: true
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async run(accessor, ...args) {
|
|
43
|
+
const chatService = accessor.get(IChatService);
|
|
44
|
+
chatService.logChatIndex();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
27
47
|
|
|
28
48
|
export { registerChatDeveloperActions };
|
|
@@ -13,7 +13,7 @@ function registerChatFileTreeActions() {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super({
|
|
15
15
|
id: 'workbench.action.chat.nextFileTree',
|
|
16
|
-
title: ( localize2(
|
|
16
|
+
title: ( localize2(4432, "Next File Tree")),
|
|
17
17
|
keybinding: {
|
|
18
18
|
primary: KeyMod.CtrlCmd | KeyCode.F9,
|
|
19
19
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -32,7 +32,7 @@ function registerChatFileTreeActions() {
|
|
|
32
32
|
constructor() {
|
|
33
33
|
super({
|
|
34
34
|
id: 'workbench.action.chat.previousFileTree',
|
|
35
|
-
title: ( localize2(
|
|
35
|
+
title: ( localize2(4433, "Previous File Tree")),
|
|
36
36
|
keybinding: {
|
|
37
37
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F9,
|
|
38
38
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -62,7 +62,10 @@ let ChatGettingStartedContribution = class ChatGettingStartedContribution extend
|
|
|
62
62
|
}
|
|
63
63
|
async onDidInstallChat() {
|
|
64
64
|
showCopilotView(this.viewsService, this.layoutService);
|
|
65
|
-
|
|
65
|
+
const setupFromDialog = this.configurationService.getValue('chat.setupFromDialog');
|
|
66
|
+
if (!setupFromDialog) {
|
|
67
|
+
ensureSideBarChatViewSize(this.viewDescriptorService, this.layoutService, this.viewsService);
|
|
68
|
+
}
|
|
66
69
|
this.storageService.store(ChatGettingStartedContribution_1.hideWelcomeView, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
|
|
67
70
|
this.recentlyInstalled = false;
|
|
68
71
|
this.statusbarService.updateEntryVisibility('chat.statusBarEntry', true);
|
|
@@ -14,14 +14,14 @@ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
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(4434, "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(4435, "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(4436, "Import Chat...")),
|
|
59
59
|
category: CHAT_CATEGORY,
|
|
60
60
|
precondition: ChatContextKeys.enabled,
|
|
61
61
|
f1: true,
|