@codingame/monaco-vscode-chat-service-override 14.0.6 → 15.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 +14 -8
- package/package.json +20 -20
- package/vscode/src/vs/base/common/objectCache.d.ts +1 -1
- package/vscode/src/vs/base/common/objectCache.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +43 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.js +142 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +252 -260
- 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 +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +12 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +31 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +151 -69
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +379 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/{chatEditingService.d.ts → chatEditingServiceImpl.d.ts} +12 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +423 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +6 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +38 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +16 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +93 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +101 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +146 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +386 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +4 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +8 -91
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +45 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +11 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +12 -10
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +26 -13
- package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +33 -27
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.js +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkProvider.js +15 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptPathAutocompletion.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptPathAutocompletion.js +175 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +17 -17
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +31 -36
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +0 -505
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +0 -104
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +0 -871
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +0 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +0 -245
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.d.ts +0 -39
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController2.js +0 -314
|
@@ -16,22 +16,22 @@ import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
16
16
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
17
17
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
18
18
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
19
|
-
import { ViewPaneContainer } from '@codingame/monaco-vscode-
|
|
19
|
+
import { ViewPaneContainer } from '@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
20
20
|
import { Extensions, ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
21
21
|
import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
22
22
|
import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
23
23
|
import { ExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
24
|
-
import { showExtensionsWithIdsCommandId } from '@codingame/monaco-vscode-
|
|
24
|
+
import { showExtensionsWithIdsCommandId } from '@codingame/monaco-vscode-805e9c2f-56b6-5a43-8b5b-d2dc2d3805fc-common/vscode/vs/workbench/contrib/extensions/browser/extensionsActions';
|
|
25
25
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
26
26
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
27
27
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
28
28
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
29
|
-
import { ChatViewId } from '@codingame/monaco-vscode-
|
|
30
|
-
import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane, CHAT_EDITING_SIDEBAR_PANEL_ID } from '
|
|
29
|
+
import { ChatViewId } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
30
|
+
import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane, CHAT_EDITING_SIDEBAR_PANEL_ID } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatViewPane';
|
|
31
31
|
|
|
32
32
|
const chatViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
33
33
|
id: CHAT_SIDEBAR_PANEL_ID,
|
|
34
|
-
title: ( localize2(
|
|
34
|
+
title: ( localize2(4635, "Chat")),
|
|
35
35
|
icon: Codicon.commentDiscussion,
|
|
36
36
|
ctorDescriptor: ( new SyncDescriptor(
|
|
37
37
|
ViewPaneContainer,
|
|
@@ -46,13 +46,13 @@ const chatViewDescriptor = [{
|
|
|
46
46
|
containerIcon: chatViewContainer.icon,
|
|
47
47
|
containerTitle: chatViewContainer.title.value,
|
|
48
48
|
singleViewPaneContainerTitle: chatViewContainer.title.value,
|
|
49
|
-
name: ( localize2(
|
|
49
|
+
name: ( localize2(4635, "Chat")),
|
|
50
50
|
canToggleVisibility: false,
|
|
51
51
|
canMoveView: true,
|
|
52
52
|
openCommandActionDescriptor: {
|
|
53
53
|
id: CHAT_SIDEBAR_PANEL_ID,
|
|
54
54
|
title: chatViewContainer.title,
|
|
55
|
-
mnemonicTitle: ( localize(
|
|
55
|
+
mnemonicTitle: ( localize(4636, "&&Chat")),
|
|
56
56
|
keybindings: {
|
|
57
57
|
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyI,
|
|
58
58
|
mac: {
|
|
@@ -67,7 +67,7 @@ const chatViewDescriptor = [{
|
|
|
67
67
|
( Registry.as(Extensions.ViewsRegistry)).registerViews(chatViewDescriptor, chatViewContainer);
|
|
68
68
|
const editsViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
69
69
|
id: CHAT_EDITING_SIDEBAR_PANEL_ID,
|
|
70
|
-
title: ( localize2(
|
|
70
|
+
title: ( localize2(4637, "Copilot Edits")),
|
|
71
71
|
icon: Codicon.editSession,
|
|
72
72
|
ctorDescriptor: ( new SyncDescriptor(
|
|
73
73
|
ViewPaneContainer,
|
|
@@ -88,7 +88,7 @@ const editsViewDescriptor = [{
|
|
|
88
88
|
openCommandActionDescriptor: {
|
|
89
89
|
id: CHAT_EDITING_SIDEBAR_PANEL_ID,
|
|
90
90
|
title: editsViewContainer.title,
|
|
91
|
-
mnemonicTitle: ( localize(
|
|
91
|
+
mnemonicTitle: ( localize(4638, "Copilot Ed&&its")),
|
|
92
92
|
keybindings: {
|
|
93
93
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI,
|
|
94
94
|
linux: {
|
|
@@ -104,7 +104,7 @@ const editsViewDescriptor = [{
|
|
|
104
104
|
const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
105
105
|
extensionPoint: 'chatParticipants',
|
|
106
106
|
jsonSchema: {
|
|
107
|
-
description: ( localize(
|
|
107
|
+
description: ( localize(4639, 'Contributes a chat participant')),
|
|
108
108
|
type: 'array',
|
|
109
109
|
items: {
|
|
110
110
|
additionalProperties: false,
|
|
@@ -113,12 +113,12 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
113
113
|
required: ['name', 'id'],
|
|
114
114
|
properties: {
|
|
115
115
|
id: {
|
|
116
|
-
description: ( localize(
|
|
116
|
+
description: ( localize(4640, "A unique id for this chat participant.")),
|
|
117
117
|
type: 'string'
|
|
118
118
|
},
|
|
119
119
|
name: {
|
|
120
120
|
description: ( localize(
|
|
121
|
-
|
|
121
|
+
4641,
|
|
122
122
|
"User-facing name for this chat participant. The user will use '@' with this name to invoke the participant. Name must not contain whitespace."
|
|
123
123
|
)),
|
|
124
124
|
type: 'string',
|
|
@@ -126,37 +126,37 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
126
126
|
},
|
|
127
127
|
fullName: {
|
|
128
128
|
markdownDescription: ( localize(
|
|
129
|
-
|
|
129
|
+
4642,
|
|
130
130
|
"The full name of this chat participant, which is shown as the label for responses coming from this participant. If not provided, {0} is used.",
|
|
131
131
|
'`name`'
|
|
132
132
|
)),
|
|
133
133
|
type: 'string'
|
|
134
134
|
},
|
|
135
135
|
description: {
|
|
136
|
-
description: ( localize(
|
|
136
|
+
description: ( localize(4643, "A description of this chat participant, shown in the UI.")),
|
|
137
137
|
type: 'string'
|
|
138
138
|
},
|
|
139
139
|
isSticky: {
|
|
140
140
|
description: ( localize(
|
|
141
|
-
|
|
141
|
+
4644,
|
|
142
142
|
"Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
|
|
143
143
|
)),
|
|
144
144
|
type: 'boolean'
|
|
145
145
|
},
|
|
146
146
|
sampleRequest: {
|
|
147
147
|
description: ( localize(
|
|
148
|
-
|
|
148
|
+
4645,
|
|
149
149
|
"When the user clicks this participant in `/help`, this text will be submitted to the participant."
|
|
150
150
|
)),
|
|
151
151
|
type: 'string'
|
|
152
152
|
},
|
|
153
153
|
when: {
|
|
154
|
-
description: ( localize(
|
|
154
|
+
description: ( localize(4646, "A condition which must be true to enable this participant.")),
|
|
155
155
|
type: 'string'
|
|
156
156
|
},
|
|
157
157
|
disambiguation: {
|
|
158
158
|
description: ( localize(
|
|
159
|
-
|
|
159
|
+
4647,
|
|
160
160
|
"Metadata to help with automatically routing user questions to this chat participant."
|
|
161
161
|
)),
|
|
162
162
|
type: 'array',
|
|
@@ -168,21 +168,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
168
168
|
properties: {
|
|
169
169
|
category: {
|
|
170
170
|
markdownDescription: ( localize(
|
|
171
|
-
|
|
171
|
+
4648,
|
|
172
172
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
173
173
|
)),
|
|
174
174
|
type: 'string'
|
|
175
175
|
},
|
|
176
176
|
description: {
|
|
177
177
|
description: ( localize(
|
|
178
|
-
|
|
178
|
+
4649,
|
|
179
179
|
"A detailed description of the kinds of questions that are suitable for this chat participant."
|
|
180
180
|
)),
|
|
181
181
|
type: 'string'
|
|
182
182
|
},
|
|
183
183
|
examples: {
|
|
184
184
|
description: ( localize(
|
|
185
|
-
|
|
185
|
+
4650,
|
|
186
186
|
"A list of representative example questions that are suitable for this chat participant."
|
|
187
187
|
)),
|
|
188
188
|
type: 'array'
|
|
@@ -192,7 +192,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
192
192
|
},
|
|
193
193
|
commands: {
|
|
194
194
|
markdownDescription: ( localize(
|
|
195
|
-
|
|
195
|
+
4651,
|
|
196
196
|
"Commands available for this chat participant, which the user can invoke with a `/`."
|
|
197
197
|
)),
|
|
198
198
|
type: 'array',
|
|
@@ -204,36 +204,36 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
204
204
|
properties: {
|
|
205
205
|
name: {
|
|
206
206
|
description: ( localize(
|
|
207
|
-
|
|
207
|
+
4652,
|
|
208
208
|
"A short name by which this command is referred to in the UI, e.g. `fix` or * `explain` for commands that fix an issue or explain code. The name should be unique among the commands provided by this participant."
|
|
209
209
|
)),
|
|
210
210
|
type: 'string'
|
|
211
211
|
},
|
|
212
212
|
description: {
|
|
213
|
-
description: ( localize(
|
|
213
|
+
description: ( localize(4653, "A description of this command.")),
|
|
214
214
|
type: 'string'
|
|
215
215
|
},
|
|
216
216
|
when: {
|
|
217
|
-
description: ( localize(
|
|
217
|
+
description: ( localize(4654, "A condition which must be true to enable this command.")),
|
|
218
218
|
type: 'string'
|
|
219
219
|
},
|
|
220
220
|
sampleRequest: {
|
|
221
221
|
description: ( localize(
|
|
222
|
-
|
|
222
|
+
4655,
|
|
223
223
|
"When the user clicks this command in `/help`, this text will be submitted to the participant."
|
|
224
224
|
)),
|
|
225
225
|
type: 'string'
|
|
226
226
|
},
|
|
227
227
|
isSticky: {
|
|
228
228
|
description: ( localize(
|
|
229
|
-
|
|
229
|
+
4644,
|
|
230
230
|
"Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
|
|
231
231
|
)),
|
|
232
232
|
type: 'boolean'
|
|
233
233
|
},
|
|
234
234
|
disambiguation: {
|
|
235
235
|
description: ( localize(
|
|
236
|
-
|
|
236
|
+
4656,
|
|
237
237
|
"Metadata to help with automatically routing user questions to this chat command."
|
|
238
238
|
)),
|
|
239
239
|
type: 'array',
|
|
@@ -245,21 +245,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
245
245
|
properties: {
|
|
246
246
|
category: {
|
|
247
247
|
markdownDescription: ( localize(
|
|
248
|
-
|
|
248
|
+
4657,
|
|
249
249
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
250
250
|
)),
|
|
251
251
|
type: 'string'
|
|
252
252
|
},
|
|
253
253
|
description: {
|
|
254
254
|
description: ( localize(
|
|
255
|
-
|
|
255
|
+
4658,
|
|
256
256
|
"A detailed description of the kinds of questions that are suitable for this chat command."
|
|
257
257
|
)),
|
|
258
258
|
type: 'string'
|
|
259
259
|
},
|
|
260
260
|
examples: {
|
|
261
261
|
description: ( localize(
|
|
262
|
-
|
|
262
|
+
4659,
|
|
263
263
|
"A list of representative example questions that are suitable for this chat command."
|
|
264
264
|
)),
|
|
265
265
|
type: 'array'
|
|
@@ -391,9 +391,9 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
|
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
393
|
this.registeredWelcomeView = true;
|
|
394
|
-
const showExtensionLabel = ( localize(
|
|
394
|
+
const showExtensionLabel = ( localize(4660, "Show Extension"));
|
|
395
395
|
const mainMessage = ( localize(
|
|
396
|
-
|
|
396
|
+
4661,
|
|
397
397
|
"Chat failed to load because the installed version of the Copilot Chat extension is not compatible with this version of {0}. Please ensure that the Copilot Chat extension is up to date.",
|
|
398
398
|
this.productService.nameLong
|
|
399
399
|
));
|
|
@@ -425,10 +425,10 @@ class ChatParticipantDataRenderer extends Disposable {
|
|
|
425
425
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
426
426
|
}
|
|
427
427
|
const headers = [
|
|
428
|
-
( localize(
|
|
429
|
-
( localize(
|
|
430
|
-
( localize(
|
|
431
|
-
( localize(
|
|
428
|
+
( localize(4662, "Name")),
|
|
429
|
+
( localize(4663, "Full Name")),
|
|
430
|
+
( localize(4664, "Description")),
|
|
431
|
+
( localize(4665, "Commands")),
|
|
432
432
|
];
|
|
433
433
|
const rows = ( nonDefaultContributions.map(d => {
|
|
434
434
|
return [
|
|
@@ -449,7 +449,7 @@ class ChatParticipantDataRenderer extends Disposable {
|
|
|
449
449
|
}
|
|
450
450
|
( Registry.as(Extensions$1.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
451
451
|
id: 'chatParticipants',
|
|
452
|
-
label: ( localize(
|
|
452
|
+
label: ( localize(4666, "Chat Participants")),
|
|
453
453
|
access: {
|
|
454
454
|
canToggle: false
|
|
455
455
|
},
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { IReadonlyVSDataTransfer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/dataTransfer";
|
|
3
3
|
import { HierarchicalKind } from "@codingame/monaco-vscode-api/vscode/vs/base/common/hierarchicalKind";
|
|
4
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
5
|
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
|
5
6
|
import { DocumentPasteContext, DocumentPasteEditProvider, DocumentPasteEditsSession } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
|
|
6
7
|
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
7
|
-
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service";
|
|
9
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
10
|
+
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
11
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
12
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
13
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
11
|
-
import {
|
|
14
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
12
15
|
export declare class PasteImageProvider implements DocumentPasteEditProvider {
|
|
13
16
|
private readonly chatWidgetService;
|
|
14
17
|
private readonly extensionService;
|
|
18
|
+
private readonly fileService;
|
|
19
|
+
private readonly environmentService;
|
|
20
|
+
private readonly logService;
|
|
21
|
+
private readonly imagesFolder;
|
|
15
22
|
readonly kind: HierarchicalKind;
|
|
16
23
|
readonly providedPasteEditKinds: HierarchicalKind[];
|
|
17
24
|
readonly copyMimeTypes: never[];
|
|
18
25
|
readonly pasteMimeTypes: string[];
|
|
19
|
-
constructor(chatWidgetService: IChatWidgetService, extensionService: IExtensionService);
|
|
26
|
+
constructor(chatWidgetService: IChatWidgetService, extensionService: IExtensionService, fileService: IFileService, environmentService: IEnvironmentService, logService: ILogService);
|
|
20
27
|
provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, context: DocumentPasteContext, token: CancellationToken): Promise<DocumentPasteEditsSession | undefined>;
|
|
28
|
+
private createFileForMedia;
|
|
29
|
+
private cleanupOldImages;
|
|
30
|
+
private getTimestampFromFilename;
|
|
21
31
|
}
|
|
22
32
|
export declare function imageToHash(data: Uint8Array): Promise<string>;
|
|
23
33
|
export declare function isImage(array: Uint8Array): boolean;
|
|
@@ -38,5 +48,5 @@ export declare class PasteTextProvider implements DocumentPasteEditProvider {
|
|
|
38
48
|
provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: IReadonlyVSDataTransfer, context: DocumentPasteContext, token: CancellationToken): Promise<DocumentPasteEditsSession | undefined>;
|
|
39
49
|
}
|
|
40
50
|
export declare class ChatPasteProvidersFeature extends Disposable {
|
|
41
|
-
constructor(languageFeaturesService: ILanguageFeaturesService, chatWidgetService: IChatWidgetService, extensionService: IExtensionService, modelService: IModelService);
|
|
51
|
+
constructor(languageFeaturesService: ILanguageFeaturesService, chatWidgetService: IChatWidgetService, extensionService: IExtensionService, fileService: IFileService, modelService: IModelService, environmentService: IEnvironmentService, logService: ILogService);
|
|
42
52
|
}
|
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
5
|
import { VSDataTransfer, createStringDataTransferItem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/dataTransfer';
|
|
4
6
|
import { HierarchicalKind } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hierarchicalKind';
|
|
5
|
-
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures';
|
|
6
7
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Mimes } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
9
|
+
import { joinPath, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
10
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
11
|
+
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
12
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
10
13
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
14
|
+
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
15
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
16
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
17
|
import { isProposedApiEnabled } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions';
|
|
12
18
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
17
|
-
import { resizeImage } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
|
|
19
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
20
|
+
import { ChatInputPart } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatInputPart';
|
|
21
|
+
import { resizeImage } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
|
|
18
22
|
|
|
19
23
|
const COPY_MIME_TYPES = 'application/vnd.code.additional-editor-data';
|
|
20
|
-
class PasteImageProvider {
|
|
21
|
-
constructor(chatWidgetService, extensionService) {
|
|
24
|
+
let PasteImageProvider = class PasteImageProvider {
|
|
25
|
+
constructor(chatWidgetService, extensionService, fileService, environmentService, logService) {
|
|
22
26
|
this.chatWidgetService = chatWidgetService;
|
|
23
27
|
this.extensionService = extensionService;
|
|
28
|
+
this.fileService = fileService;
|
|
29
|
+
this.environmentService = environmentService;
|
|
30
|
+
this.logService = logService;
|
|
24
31
|
this.kind = ( new HierarchicalKind('chat.attach.image'));
|
|
25
32
|
this.providedPasteEditKinds = [this.kind];
|
|
26
33
|
this.copyMimeTypes = [];
|
|
27
34
|
this.pasteMimeTypes = ['image/*'];
|
|
35
|
+
this.imagesFolder = joinPath(this.environmentService.workspaceStorageHome, 'vscode-chat-images');
|
|
36
|
+
this.cleanupOldImages();
|
|
28
37
|
}
|
|
29
38
|
async provideDocumentPasteEdits(model, ranges, dataTransfer, context, token) {
|
|
30
39
|
if (!( this.extensionService.extensions.some(ext => isProposedApiEnabled(ext, 'chatReferenceBinaryData')))) {
|
|
@@ -59,16 +68,20 @@ class PasteImageProvider {
|
|
|
59
68
|
return;
|
|
60
69
|
}
|
|
61
70
|
const attachedVariables = widget.attachmentModel.attachments;
|
|
62
|
-
const displayName = ( localize(
|
|
71
|
+
const displayName = ( localize(4667, 'Pasted Image'));
|
|
63
72
|
let tempDisplayName = displayName;
|
|
64
73
|
for (let appendValue = 2; ( attachedVariables.some(attachment => attachment.name === tempDisplayName)); appendValue++) {
|
|
65
74
|
tempDisplayName = `${displayName} ${appendValue}`;
|
|
66
75
|
}
|
|
76
|
+
const fileReference = await this.createFileForMedia(currClipboard, mimeType);
|
|
77
|
+
if (token.isCancellationRequested || !fileReference) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
67
80
|
const scaledImageData = await resizeImage(currClipboard);
|
|
68
81
|
if (token.isCancellationRequested || !scaledImageData) {
|
|
69
82
|
return;
|
|
70
83
|
}
|
|
71
|
-
const scaledImageContext = await getImageAttachContext(scaledImageData, mimeType, token, tempDisplayName);
|
|
84
|
+
const scaledImageContext = await getImageAttachContext(scaledImageData, mimeType, token, tempDisplayName, fileReference);
|
|
72
85
|
if (token.isCancellationRequested || !scaledImageContext) {
|
|
73
86
|
return;
|
|
74
87
|
}
|
|
@@ -77,23 +90,71 @@ class PasteImageProvider {
|
|
|
77
90
|
if (( currentContextIds.has(scaledImageContext.id))) {
|
|
78
91
|
return;
|
|
79
92
|
}
|
|
80
|
-
const edit = createCustomPasteEdit(model, scaledImageContext, mimeType, this.kind, ( localize(
|
|
93
|
+
const edit = createCustomPasteEdit(model, scaledImageContext, mimeType, this.kind, ( localize(4668, 'Pasted Image Attachment')), this.chatWidgetService);
|
|
81
94
|
return createEditSession(edit);
|
|
82
95
|
}
|
|
83
|
-
|
|
84
|
-
|
|
96
|
+
async createFileForMedia(dataTransfer, mimeType) {
|
|
97
|
+
const exists = await this.fileService.exists(this.imagesFolder);
|
|
98
|
+
if (!exists) {
|
|
99
|
+
await this.fileService.createFolder(this.imagesFolder);
|
|
100
|
+
}
|
|
101
|
+
const ext = mimeType.split('/')[1] || 'png';
|
|
102
|
+
const filename = `image-${Date.now()}.${ext}`;
|
|
103
|
+
const fileUri = joinPath(this.imagesFolder, filename);
|
|
104
|
+
const buffer = VSBuffer.wrap(dataTransfer);
|
|
105
|
+
await this.fileService.writeFile(fileUri, buffer);
|
|
106
|
+
return fileUri;
|
|
107
|
+
}
|
|
108
|
+
async cleanupOldImages() {
|
|
109
|
+
const exists = await this.fileService.exists(this.imagesFolder);
|
|
110
|
+
if (!exists) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const duration = 7 * 24 * 60 * 60 * 1000;
|
|
114
|
+
const files = await this.fileService.resolve(this.imagesFolder);
|
|
115
|
+
if (!files.children) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
await Promise.all(( files.children.map(async (file) => {
|
|
119
|
+
try {
|
|
120
|
+
const timestamp = this.getTimestampFromFilename(file.name);
|
|
121
|
+
if (timestamp && (Date.now() - timestamp > duration)) {
|
|
122
|
+
await this.fileService.del(file.resource);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
this.logService.error('Failed to clean up old images', err);
|
|
127
|
+
}
|
|
128
|
+
})));
|
|
129
|
+
}
|
|
130
|
+
getTimestampFromFilename(filename) {
|
|
131
|
+
const match = filename.match(/image-(\d+)\./);
|
|
132
|
+
if (match) {
|
|
133
|
+
return parseInt(match[1], 10);
|
|
134
|
+
}
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
PasteImageProvider = ( __decorate([
|
|
139
|
+
( __param(2, IFileService)),
|
|
140
|
+
( __param(3, IEnvironmentService)),
|
|
141
|
+
( __param(4, ILogService))
|
|
142
|
+
], PasteImageProvider));
|
|
143
|
+
async function getImageAttachContext(data, mimeType, token, displayName, resource) {
|
|
85
144
|
const imageHash = await imageToHash(data);
|
|
86
145
|
if (token.isCancellationRequested) {
|
|
87
146
|
return undefined;
|
|
88
147
|
}
|
|
89
148
|
return {
|
|
149
|
+
kind: 'image',
|
|
90
150
|
value: data,
|
|
91
151
|
id: imageHash,
|
|
92
152
|
name: displayName,
|
|
93
153
|
isImage: true,
|
|
94
154
|
icon: Codicon.fileMedia,
|
|
95
|
-
|
|
96
|
-
|
|
155
|
+
mimeType,
|
|
156
|
+
isPasted: true,
|
|
157
|
+
references: [{ reference: resource, kind: 'reference' }]
|
|
97
158
|
};
|
|
98
159
|
}
|
|
99
160
|
async function imageToHash(data) {
|
|
@@ -176,7 +237,7 @@ class PasteTextProvider {
|
|
|
176
237
|
if (( currentContextIds.has(copiedContext.id))) {
|
|
177
238
|
return;
|
|
178
239
|
}
|
|
179
|
-
const edit = createCustomPasteEdit(model, copiedContext, Mimes.text, this.kind, ( localize(
|
|
240
|
+
const edit = createCustomPasteEdit(model, copiedContext, Mimes.text, this.kind, ( localize(4669, 'Pasted Code Attachment')), this.chatWidgetService);
|
|
180
241
|
edit.yieldTo = [{ kind: HierarchicalKind.Empty.append('text', 'plain') }];
|
|
181
242
|
return createEditSession(edit);
|
|
182
243
|
}
|
|
@@ -186,14 +247,13 @@ function getCopiedContext(code, file, language, range) {
|
|
|
186
247
|
const start = range.startLineNumber;
|
|
187
248
|
const end = range.endLineNumber;
|
|
188
249
|
const resultText = `Copied Selection of Code: \n\n\n From the file: ${fileName} From lines ${start} to ${end} \n \`\`\`${code}\`\`\``;
|
|
189
|
-
const pastedLines = start === end ? ( localize(
|
|
250
|
+
const pastedLines = start === end ? ( localize(4670, '1 line')) : ( localize(4671, '{0} lines', end + 1 - start));
|
|
190
251
|
return {
|
|
191
252
|
kind: 'paste',
|
|
192
253
|
value: resultText,
|
|
193
254
|
id: `${fileName}${start}${end}${range.startColumn}${range.endColumn}`,
|
|
194
255
|
name: `${fileName} ${pastedLines}`,
|
|
195
256
|
icon: Codicon.code,
|
|
196
|
-
isDynamic: true,
|
|
197
257
|
pastedLines,
|
|
198
258
|
language,
|
|
199
259
|
fileName: ( file.toString()),
|
|
@@ -245,9 +305,15 @@ function createEditSession(edit) {
|
|
|
245
305
|
};
|
|
246
306
|
}
|
|
247
307
|
let ChatPasteProvidersFeature = class ChatPasteProvidersFeature extends Disposable {
|
|
248
|
-
constructor(languageFeaturesService, chatWidgetService, extensionService, modelService) {
|
|
308
|
+
constructor(languageFeaturesService, chatWidgetService, extensionService, fileService, modelService, environmentService, logService) {
|
|
249
309
|
super();
|
|
250
|
-
this._register(languageFeaturesService.documentPasteEditProvider.register({ scheme: ChatInputPart.INPUT_SCHEME, pattern: '*', hasAccessToAllModels: true }, ( new PasteImageProvider(
|
|
310
|
+
this._register(languageFeaturesService.documentPasteEditProvider.register({ scheme: ChatInputPart.INPUT_SCHEME, pattern: '*', hasAccessToAllModels: true }, ( new PasteImageProvider(
|
|
311
|
+
chatWidgetService,
|
|
312
|
+
extensionService,
|
|
313
|
+
fileService,
|
|
314
|
+
environmentService,
|
|
315
|
+
logService
|
|
316
|
+
))));
|
|
251
317
|
this._register(languageFeaturesService.documentPasteEditProvider.register({ scheme: ChatInputPart.INPUT_SCHEME, pattern: '*', hasAccessToAllModels: true }, ( new PasteTextProvider(chatWidgetService, modelService))));
|
|
252
318
|
this._register(languageFeaturesService.documentPasteEditProvider.register('*', ( new CopyTextProvider())));
|
|
253
319
|
}
|
|
@@ -256,7 +322,10 @@ ChatPasteProvidersFeature = ( __decorate([
|
|
|
256
322
|
( __param(0, ILanguageFeaturesService)),
|
|
257
323
|
( __param(1, IChatWidgetService)),
|
|
258
324
|
( __param(2, IExtensionService)),
|
|
259
|
-
( __param(3,
|
|
325
|
+
( __param(3, IFileService)),
|
|
326
|
+
( __param(4, IModelService)),
|
|
327
|
+
( __param(5, IEnvironmentService)),
|
|
328
|
+
( __param(6, ILogService))
|
|
260
329
|
], ChatPasteProvidersFeature));
|
|
261
330
|
|
|
262
331
|
export { ChatPasteProvidersFeature, CopyTextProvider, PasteImageProvider, PasteTextProvider, imageToHash, isImage };
|
|
@@ -2,7 +2,7 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
|
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
4
|
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
5
|
-
import { IQuickChatOpenOptions } from "@codingame/monaco-vscode-
|
|
5
|
+
import { IQuickChatOpenOptions } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
6
6
|
import { IQuickChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
7
7
|
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
8
8
|
export declare class QuickChatService extends Disposable implements IQuickChatService {
|
|
@@ -23,9 +23,10 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
|
|
|
23
23
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
|
|
24
24
|
import { quickInputBackground, quickInputForeground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
25
25
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
26
|
-
import { showChatView } from '@codingame/monaco-vscode-
|
|
27
|
-
import { ChatWidget } from '@codingame/monaco-vscode-
|
|
26
|
+
import { showChatView } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
27
|
+
import { ChatWidget } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
28
28
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
29
|
+
import { isCellTextEditOperation } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatModel';
|
|
29
30
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
30
31
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
31
32
|
import { EDITOR_DRAG_AND_DROP_BACKGROUND } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
@@ -252,6 +253,24 @@ let QuickChat = class QuickChat extends Disposable {
|
|
|
252
253
|
});
|
|
253
254
|
}
|
|
254
255
|
}
|
|
256
|
+
else if (item.kind === 'notebookEditGroup') {
|
|
257
|
+
for (const group of item.edits) {
|
|
258
|
+
if (isCellTextEditOperation(group)) {
|
|
259
|
+
message.push({
|
|
260
|
+
kind: 'textEdit',
|
|
261
|
+
edits: [group.edit],
|
|
262
|
+
uri: group.uri
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
message.push({
|
|
267
|
+
kind: 'notebookEdit',
|
|
268
|
+
edits: [group],
|
|
269
|
+
uri: item.uri
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
255
274
|
else {
|
|
256
275
|
message.push(item);
|
|
257
276
|
}
|
|
@@ -3,7 +3,7 @@ import { AccessibleViewProviderId, AccessibleViewType, IAccessibleViewContentPro
|
|
|
3
3
|
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
4
4
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
5
|
import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
|
|
6
|
-
import { ChatTreeItem, IChatWidget } from "@codingame/monaco-vscode-
|
|
6
|
+
import { ChatTreeItem, IChatWidget } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
7
7
|
export declare class ChatResponseAccessibleView implements IAccessibleViewImplementation {
|
|
8
8
|
readonly priority = 100;
|
|
9
9
|
readonly name = "panelChat";
|
|
@@ -5,7 +5,7 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
5
5
|
import { AccessibleViewType, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
6
6
|
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
7
7
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
8
|
-
import { isResponseVM } from '@codingame/monaco-vscode-
|
|
8
|
+
import { isResponseVM } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
|
|
9
9
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
10
10
|
|
|
11
11
|
class ChatResponseAccessibleView {
|