@codingame/monaco-vscode-chat-service-override 14.0.6 → 15.0.1
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
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { IChatCodeBlockContextProviderService, IChatAccessibilityService, IQuick
|
|
|
5
5
|
import { ChatAccessibilityService } from './vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js';
|
|
6
6
|
import { QuickChatService } from './vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js';
|
|
7
7
|
import { ChatVariablesService } from './vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js';
|
|
8
|
-
import { ChatWidgetService } from '@codingame/monaco-vscode-
|
|
8
|
+
import { ChatWidgetService } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
9
9
|
import { ChatCodeBlockContextProviderService } from './vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.js';
|
|
10
10
|
import { ChatAgentNameService, ChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
11
11
|
import { IChatAgentNameService, IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
@@ -14,26 +14,30 @@ import { ChatService } from './vscode/src/vs/workbench/contrib/chat/common/chatS
|
|
|
14
14
|
import { ChatSlashCommandService } from './vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js';
|
|
15
15
|
import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSlashCommands.service';
|
|
16
16
|
import { IChatVariablesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariables.service';
|
|
17
|
-
import { ChatWidgetHistoryService } from '@codingame/monaco-vscode-
|
|
17
|
+
import { ChatWidgetHistoryService } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService';
|
|
18
18
|
import { IChatWidgetHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service';
|
|
19
19
|
import { ILanguageModelStatsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelStats.service';
|
|
20
20
|
import { LanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
21
21
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
22
22
|
import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
23
|
-
import { InlineChatSessionServiceImpl } from '@codingame/monaco-vscode-
|
|
24
|
-
import { LanguageModelStatsService } from '@codingame/monaco-vscode-
|
|
23
|
+
import { InlineChatSessionServiceImpl } from '@codingame/monaco-vscode-29bc1406-2925-5b8f-b25e-d04a7772d896-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl';
|
|
24
|
+
import { LanguageModelStatsService } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/languageModelStats';
|
|
25
25
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
26
26
|
import { LanguageModelToolsService } from './vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js';
|
|
27
27
|
import { ICodeMapperService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service';
|
|
28
28
|
import { CodeMapperService } from './vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.js';
|
|
29
29
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
30
|
-
import { ChatEditingService } from './vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js';
|
|
31
30
|
import { LanguageModelIgnoredFilesService } from './vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js';
|
|
32
31
|
import { ILanguageModelIgnoredFilesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service';
|
|
33
|
-
import { IChatQuotasService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatQuotasService.service';
|
|
34
|
-
import { ChatQuotasService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatQuotasService';
|
|
35
32
|
import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service';
|
|
36
33
|
import { ChatMarkdownAnchorService } from './vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.js';
|
|
34
|
+
import { IChatQuotasService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatQuotasService.service';
|
|
35
|
+
import { ChatQuotasService } from './vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.js';
|
|
36
|
+
import { ChatEditingService } from './vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js';
|
|
37
|
+
import { ChatEntitlementsService } from './vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js';
|
|
38
|
+
import { PromptsService } from './vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js';
|
|
39
|
+
import { IChatEntitlementsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEntitlementsService.service';
|
|
40
|
+
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service';
|
|
37
41
|
import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
|
|
38
42
|
import './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js';
|
|
39
43
|
|
|
@@ -57,7 +61,9 @@ function getServiceOverride() {
|
|
|
57
61
|
[ICodeMapperService.toString()]: new SyncDescriptor(CodeMapperService, [], true),
|
|
58
62
|
[IChatEditingService.toString()]: new SyncDescriptor(ChatEditingService, [], true),
|
|
59
63
|
[IChatQuotasService.toString()]: new SyncDescriptor(ChatQuotasService, [], true),
|
|
60
|
-
[IChatMarkdownAnchorService.toString()]: new SyncDescriptor(ChatMarkdownAnchorService, [], true)
|
|
64
|
+
[IChatMarkdownAnchorService.toString()]: new SyncDescriptor(ChatMarkdownAnchorService, [], true),
|
|
65
|
+
[IChatEntitlementsService.toString()]: new SyncDescriptor(ChatEntitlementsService, [], true),
|
|
66
|
+
[IPromptsService.toString()]: new SyncDescriptor(PromptsService, [], true)
|
|
61
67
|
};
|
|
62
68
|
}
|
|
63
69
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-chat-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - chat service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-
|
|
26
|
-
"@codingame/monaco-vscode-
|
|
27
|
-
"@codingame/monaco-vscode-
|
|
28
|
-
"@codingame/monaco-vscode-
|
|
29
|
-
"@codingame/monaco-vscode-
|
|
30
|
-
"@codingame/monaco-vscode-
|
|
31
|
-
"@codingame/monaco-vscode-
|
|
32
|
-
"@codingame/monaco-vscode-
|
|
33
|
-
"@codingame/monaco-vscode-
|
|
34
|
-
"@codingame/monaco-vscode-
|
|
35
|
-
"@codingame/monaco-vscode-
|
|
36
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "15.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common": "15.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-1bb39316-6fbf-572e-ab6a-818a2496c14f-common": "15.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-29bc1406-2925-5b8f-b25e-d04a7772d896-common": "15.0.1",
|
|
22
|
+
"@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common": "15.0.1",
|
|
23
|
+
"@codingame/monaco-vscode-52bb4d5b-ba1a-57fd-9bee-b28824214eac-common": "15.0.1",
|
|
24
|
+
"@codingame/monaco-vscode-805e9c2f-56b6-5a43-8b5b-d2dc2d3805fc-common": "15.0.1",
|
|
25
|
+
"@codingame/monaco-vscode-81f603ca-d6ea-5402-90dd-3014dffc63b4-common": "15.0.1",
|
|
26
|
+
"@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "15.0.1",
|
|
27
|
+
"@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common": "15.0.1",
|
|
28
|
+
"@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common": "15.0.1",
|
|
29
|
+
"@codingame/monaco-vscode-a4c2011e-8775-52bd-abf0-4a3c07a9696b-common": "15.0.1",
|
|
30
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "15.0.1",
|
|
31
|
+
"@codingame/monaco-vscode-ad89fae6-94f0-5ac2-a185-22dea4b68ee0-common": "15.0.1",
|
|
32
|
+
"@codingame/monaco-vscode-api": "15.0.1",
|
|
33
|
+
"@codingame/monaco-vscode-c4e2825a-b5b1-5f0e-b547-068c32e06d50-common": "15.0.1",
|
|
34
|
+
"@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "15.0.1",
|
|
35
|
+
"@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "15.0.1",
|
|
36
|
+
"@codingame/monaco-vscode-fdf643f9-94dd-5510-b97a-408abf26ad92-common": "15.0.1"
|
|
37
37
|
},
|
|
38
38
|
"main": "index.js",
|
|
39
39
|
"module": "index.js",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { ObservableDisposable } from "@codingame/monaco-vscode-
|
|
2
|
+
import { ObservableDisposable } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/base/common/observableDisposable";
|
|
3
3
|
export declare class ObjectCache<TValue extends ObservableDisposable, TKey extends NonNullable<unknown> = string> extends Disposable {
|
|
4
4
|
private readonly factory;
|
|
5
5
|
private readonly cache;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { assertNotDisposed } from '@codingame/monaco-vscode-
|
|
3
|
+
import { assertNotDisposed } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/base/common/observableDisposable';
|
|
4
4
|
|
|
5
5
|
class ObjectCache extends Disposable {
|
|
6
6
|
constructor(factory) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService';
|
|
2
|
+
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
3
3
|
import { AccessibleDiffViewerNext } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/diffEditor/commands';
|
|
4
4
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
5
|
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
@@ -7,7 +7,7 @@ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
7
7
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
8
8
|
import { ActiveAuxiliaryContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
9
9
|
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
10
|
-
import { INLINE_CHAT_ID } from '@codingame/monaco-vscode-
|
|
10
|
+
import { INLINE_CHAT_ID } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
11
11
|
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
12
12
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
13
13
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
@@ -61,160 +61,161 @@ function getAccessibilityHelpText(type, keybindingService) {
|
|
|
61
61
|
if (type === 'panelChat' || type === 'quickChat') {
|
|
62
62
|
if (type === 'quickChat') {
|
|
63
63
|
content.push(( localize(
|
|
64
|
-
|
|
64
|
+
4225,
|
|
65
65
|
'The quick chat view is comprised of an input box and a request/response list. The input box is used to make requests and the list is used to display responses.'
|
|
66
66
|
)));
|
|
67
67
|
content.push(( localize(
|
|
68
|
-
|
|
68
|
+
4226,
|
|
69
69
|
'The quick chat view is a transient interface for making and viewing requests, while the panel chat view is a persistent interface that also supports navigating suggested follow-up questions.'
|
|
70
70
|
)));
|
|
71
71
|
}
|
|
72
72
|
if (type === 'panelChat') {
|
|
73
73
|
content.push(( localize(
|
|
74
|
-
|
|
74
|
+
4227,
|
|
75
75
|
'The panel chat view is a persistent interface that also supports navigating suggested follow-up questions, while the quick chat view is a transient interface for making and viewing requests.'
|
|
76
76
|
)));
|
|
77
77
|
content.push(( localize(
|
|
78
|
-
|
|
78
|
+
4228,
|
|
79
79
|
'In the input box, navigate to the suggested follow up question (Shift+Tab) and press Enter to run it.'
|
|
80
80
|
)));
|
|
81
81
|
}
|
|
82
82
|
content.push(( localize(
|
|
83
|
-
|
|
83
|
+
4229,
|
|
84
84
|
'In the input box, use up and down arrows to navigate your request history. Edit input and use enter or the submit button to run a new request.'
|
|
85
85
|
)));
|
|
86
86
|
content.push(( localize(
|
|
87
|
-
|
|
87
|
+
4230,
|
|
88
88
|
'In the input box, inspect the last response in the accessible view{0}.',
|
|
89
89
|
'<keybinding:editor.action.accessibleView>'
|
|
90
90
|
)));
|
|
91
91
|
content.push(( localize(
|
|
92
|
-
|
|
92
|
+
4231,
|
|
93
93
|
'Chat responses will be announced as they come in. A response will indicate the number of code blocks, if any, and then the rest of the response.'
|
|
94
94
|
)));
|
|
95
95
|
content.push(( localize(
|
|
96
|
-
|
|
96
|
+
4232,
|
|
97
97
|
'To focus the chat request/response list, which can be navigated with up and down arrows, invoke the Focus Chat command{0}.',
|
|
98
98
|
getChatFocusKeybindingLabel(keybindingService, type, false)
|
|
99
99
|
)));
|
|
100
100
|
content.push(( localize(
|
|
101
|
-
|
|
101
|
+
4233,
|
|
102
102
|
'To focus the input box for chat requests, invoke the Focus Chat Input command{0}.',
|
|
103
103
|
getChatFocusKeybindingLabel(keybindingService, type, true)
|
|
104
104
|
)));
|
|
105
105
|
content.push(( localize(
|
|
106
|
-
|
|
106
|
+
4234,
|
|
107
107
|
'To focus the next code block within a response, invoke the Chat: Next Code Block command{0}.',
|
|
108
108
|
'<keybinding:workbench.action.chat.nextCodeBlock>'
|
|
109
109
|
)));
|
|
110
110
|
if (type === 'panelChat') {
|
|
111
111
|
content.push(( localize(
|
|
112
|
-
|
|
112
|
+
4235,
|
|
113
113
|
'To create a new chat session, invoke the New Chat command{0}.',
|
|
114
114
|
'<keybinding:workbench.action.chat.new>'
|
|
115
115
|
)));
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
if (type === 'editsView') {
|
|
119
|
-
content.push(( localize(
|
|
119
|
+
content.push(( localize(4236, 'The chat editing view is used to apply edits across files.')));
|
|
120
120
|
content.push(( localize(
|
|
121
|
-
|
|
121
|
+
4237,
|
|
122
122
|
'It is comprised of an input box and a file working set (Shift+Tab).'
|
|
123
123
|
)));
|
|
124
124
|
content.push(( localize(
|
|
125
|
-
|
|
125
|
+
4238,
|
|
126
126
|
'When a request is made, a progress indicator will play while the edits are being applied.'
|
|
127
127
|
)));
|
|
128
128
|
content.push(( localize(
|
|
129
|
-
|
|
130
|
-
'Once the edits are applied,
|
|
129
|
+
4239,
|
|
130
|
+
'Once the edits are applied, a sound will play to indicate the document has been opened and is ready for review. The sound can be disabled with accessibility.signals.chatEditModifiedFile.'
|
|
131
131
|
)));
|
|
132
132
|
content.push(( localize(
|
|
133
|
-
|
|
133
|
+
4240,
|
|
134
134
|
'Navigate between edits in the editor with navigate previous{0} and next{1}',
|
|
135
135
|
'<keybinding:chatEditor.action.navigatePrevious>',
|
|
136
136
|
'<keybinding:chatEditor.action.navigateNext>'
|
|
137
137
|
)));
|
|
138
138
|
content.push(( localize(
|
|
139
|
-
|
|
140
|
-
'In the editor, Accept{0}
|
|
139
|
+
4241,
|
|
140
|
+
'In the editor, Accept{0}, Reject{1}, or Toggle the Diff{2} for the current Change.',
|
|
141
141
|
'<keybinding:chatEditor.action.acceptHunk>',
|
|
142
|
-
'<keybinding:chatEditor.action.
|
|
142
|
+
'<keybinding:chatEditor.action.undoHunk>',
|
|
143
|
+
'<keybinding:chatEditor.action.toggleDiff>'
|
|
143
144
|
)));
|
|
144
|
-
content.push(( localize(
|
|
145
|
-
content.push(( localize(
|
|
145
|
+
content.push(( localize(4242, 'When in the edits view, some helpful commands include:')));
|
|
146
|
+
content.push(( localize(4243, '- Undo Edits{0}.', '<keybinding:workbench.action.chat.undoEdits>')));
|
|
146
147
|
content.push(( localize(
|
|
147
|
-
|
|
148
|
+
4244,
|
|
148
149
|
'- Attach Files{0}.',
|
|
149
150
|
'<keybinding:workbench.action.chat.editing.attachFiles>'
|
|
150
151
|
)));
|
|
151
152
|
content.push(( localize(
|
|
152
|
-
|
|
153
|
+
4245,
|
|
153
154
|
'- Remove File from Working Set{0}.',
|
|
154
155
|
'<keybinding:chatEditing.removeFileFromWorkingSet>'
|
|
155
156
|
)));
|
|
156
157
|
content.push(( localize(
|
|
157
|
-
|
|
158
|
+
4246,
|
|
158
159
|
'- Accept{0} and Discard File{1}.',
|
|
159
160
|
'<keybinding:chatEditing.acceptFile>',
|
|
160
161
|
'<keybinding:chatEditing.discardFile>'
|
|
161
162
|
)));
|
|
162
|
-
content.push(( localize(
|
|
163
|
-
content.push(( localize(
|
|
163
|
+
content.push(( localize(4247, '- Save All Files{0}.', '<keybinding:chatEditing.saveAllFiles>')));
|
|
164
|
+
content.push(( localize(4248, '- Accept All Edits{0}.', '<keybinding:chatEditing.acceptAllFiles>')));
|
|
164
165
|
content.push(( localize(
|
|
165
|
-
|
|
166
|
+
4249,
|
|
166
167
|
'- Discard All Edits{0}.',
|
|
167
168
|
'<keybinding:chatEditing.discardAllFiles>'
|
|
168
169
|
)));
|
|
169
|
-
content.push(( localize(
|
|
170
|
+
content.push(( localize(4250, '- Open File in Diff{0}.', '<keybinding:chatEditing.openFileInDiff>')));
|
|
170
171
|
content.push(( localize(
|
|
171
|
-
|
|
172
|
+
4251,
|
|
172
173
|
'- Add File to Working Set{0}.',
|
|
173
174
|
'<keybinding:chatEditing.addFileToWorkingSet>'
|
|
174
175
|
)));
|
|
175
|
-
content.push(( localize(
|
|
176
|
+
content.push(( localize(4252, '- View Changes{0}.', '<keybinding:chatEditing.viewChanges>')));
|
|
176
177
|
}
|
|
177
178
|
else {
|
|
178
179
|
content.push(( localize(
|
|
179
|
-
|
|
180
|
+
4253,
|
|
180
181
|
"Inline chat occurs within a code editor and takes into account the current selection. It is useful for making changes to the current editor. For example, fixing diagnostics, documenting or refactoring code. Keep in mind that AI generated code may be incorrect."
|
|
181
182
|
)));
|
|
182
183
|
content.push(( localize(
|
|
183
|
-
|
|
184
|
+
4254,
|
|
184
185
|
"It can be activated via code actions or directly using the command: Inline Chat: Start Inline Chat{0}.",
|
|
185
186
|
'<keybinding:inlineChat.start>'
|
|
186
187
|
)));
|
|
187
188
|
content.push(( localize(
|
|
188
|
-
|
|
189
|
+
4255,
|
|
189
190
|
'In the input box, use Show Previous{0} and Show Next{1} to navigate your request history. Edit input and use enter or the submit button to run a new request.',
|
|
190
191
|
'<keybinding:history.showPrevious>',
|
|
191
192
|
'<keybinding:history.showNext>'
|
|
192
193
|
)));
|
|
193
194
|
content.push(( localize(
|
|
194
|
-
|
|
195
|
+
4256,
|
|
195
196
|
'In the input box, inspect the response in the accessible view{0}.',
|
|
196
197
|
'<keybinding:editor.action.accessibleView>'
|
|
197
198
|
)));
|
|
198
199
|
content.push(( localize(
|
|
199
|
-
|
|
200
|
+
4257,
|
|
200
201
|
"Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."
|
|
201
202
|
)));
|
|
202
203
|
content.push(( localize(
|
|
203
|
-
|
|
204
|
+
4258,
|
|
204
205
|
"If a fix action is invoked, a response will indicate the problem with the current code. A diff editor will be rendered and can be reached by tabbing."
|
|
205
206
|
)));
|
|
206
207
|
content.push(( localize(
|
|
207
|
-
|
|
208
|
+
4259,
|
|
208
209
|
"Once in the diff editor, enter review mode with{0}. Use up and down arrows to navigate lines with the proposed changes.",
|
|
209
210
|
AccessibleDiffViewerNext.id
|
|
210
211
|
)));
|
|
211
212
|
content.push(( localize(
|
|
212
|
-
|
|
213
|
+
4260,
|
|
213
214
|
"Use tab to reach conditional parts like commands, status, message responses and more."
|
|
214
215
|
)));
|
|
215
216
|
}
|
|
216
217
|
content.push(( localize(
|
|
217
|
-
|
|
218
|
+
4261,
|
|
218
219
|
"Accessibility Signals can be changed via settings with a prefix of signals.chat. By default, if a request takes more than 4 seconds, you will hear a sound indicating that progress is still occurring."
|
|
219
220
|
)));
|
|
220
221
|
return content.join('\n');
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Action2 } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
2
|
+
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions";
|
|
3
|
+
import { ISelectPromptOptions } from "./dialogs/askToSelectPrompt.js";
|
|
4
|
+
export declare const ATTACH_PROMPT_ACTION_ID = "workbench.action.chat.attach.prompt";
|
|
5
|
+
export interface IChatAttachPromptActionOptions extends Pick<ISelectPromptOptions, "resource" | "widget" | "viewsService"> {
|
|
6
|
+
}
|
|
7
|
+
export declare class AttachPromptAction extends Action2 {
|
|
8
|
+
constructor();
|
|
9
|
+
run(accessor: ServicesAccessor, options: IChatAttachPromptActionOptions): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
3
|
+
import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
import { Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
5
|
+
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service';
|
|
6
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
7
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
8
|
+
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
9
|
+
import { askToSelectPrompt } from './dialogs/askToSelectPrompt.js';
|
|
10
|
+
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
11
|
+
|
|
12
|
+
const ATTACH_PROMPT_ACTION_ID = 'workbench.action.chat.attach.prompt';
|
|
13
|
+
class AttachPromptAction extends Action2 {
|
|
14
|
+
constructor() {
|
|
15
|
+
super({
|
|
16
|
+
id: ATTACH_PROMPT_ACTION_ID,
|
|
17
|
+
title: ( localize2(4299, "Use Prompt")),
|
|
18
|
+
f1: false,
|
|
19
|
+
category: CHAT_CATEGORY,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async run(accessor, options) {
|
|
23
|
+
const labelService = accessor.get(ILabelService);
|
|
24
|
+
const viewsService = accessor.get(IViewsService);
|
|
25
|
+
const openerService = accessor.get(IOpenerService);
|
|
26
|
+
const promptsService = accessor.get(IPromptsService);
|
|
27
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
28
|
+
const promptFiles = await promptsService.listPromptFiles();
|
|
29
|
+
await askToSelectPrompt({
|
|
30
|
+
...options,
|
|
31
|
+
promptFiles,
|
|
32
|
+
labelService,
|
|
33
|
+
viewsService,
|
|
34
|
+
openerService,
|
|
35
|
+
quickInputService,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { ATTACH_PROMPT_ACTION_ID, AttachPromptAction };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IChatWidget } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
3
|
+
import { IPromptPath } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types";
|
|
4
|
+
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
5
|
+
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
6
|
+
import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
7
|
+
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
8
|
+
export interface ISelectPromptOptions {
|
|
9
|
+
readonly resource?: URI;
|
|
10
|
+
readonly widget?: IChatWidget;
|
|
11
|
+
readonly promptFiles: readonly IPromptPath[];
|
|
12
|
+
readonly labelService: ILabelService;
|
|
13
|
+
readonly viewsService: IViewsService;
|
|
14
|
+
readonly openerService: IOpenerService;
|
|
15
|
+
readonly quickInputService: IQuickInputService;
|
|
16
|
+
}
|
|
17
|
+
export declare const askToSelectPrompt: (options: ISelectPromptOptions) => Promise<void>;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
|
|
2
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
|
+
import { assert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
5
|
+
import { showEditsView, showChatView } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
6
|
+
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { extUri, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
8
|
+
import { DOCUMENTATION_URL } from '../../../../common/promptSyntax/constants.js';
|
|
9
|
+
import { isWindows, isLinux } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
10
|
+
import { assertDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
11
|
+
import { getCleanPromptName } from '@codingame/monaco-vscode-52bb4d5b-ba1a-57fd-9bee-b28824214eac-common/vscode/vs/platform/prompts/common/constants';
|
|
12
|
+
|
|
13
|
+
const DOCS_OPTION = {
|
|
14
|
+
type: 'item',
|
|
15
|
+
label: ( localize(4300, 'Learn how to create reusable prompts')),
|
|
16
|
+
description: DOCUMENTATION_URL,
|
|
17
|
+
tooltip: DOCUMENTATION_URL,
|
|
18
|
+
value: ( URI.parse(DOCUMENTATION_URL)),
|
|
19
|
+
};
|
|
20
|
+
const askToSelectPrompt = async (options) => {
|
|
21
|
+
const { promptFiles, resource, quickInputService, labelService } = options;
|
|
22
|
+
const fileOptions = ( promptFiles.map((promptFile) => {
|
|
23
|
+
return createPickItem(promptFile, labelService);
|
|
24
|
+
}));
|
|
25
|
+
fileOptions.push(DOCS_OPTION);
|
|
26
|
+
let activeItem;
|
|
27
|
+
if (resource) {
|
|
28
|
+
activeItem = fileOptions.find((file) => {
|
|
29
|
+
return extUri.isEqual(file.value, resource);
|
|
30
|
+
});
|
|
31
|
+
if (!activeItem) {
|
|
32
|
+
activeItem = createPickItem({
|
|
33
|
+
uri: resource,
|
|
34
|
+
type: 'local',
|
|
35
|
+
}, labelService);
|
|
36
|
+
fileOptions.push(activeItem);
|
|
37
|
+
}
|
|
38
|
+
fileOptions.sort((file1, file2) => {
|
|
39
|
+
if (extUri.isEqual(file1.value, resource)) {
|
|
40
|
+
return -1;
|
|
41
|
+
}
|
|
42
|
+
if (extUri.isEqual(file2.value, resource)) {
|
|
43
|
+
return 1;
|
|
44
|
+
}
|
|
45
|
+
return 0;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (!activeItem) {
|
|
49
|
+
activeItem = fileOptions[0];
|
|
50
|
+
}
|
|
51
|
+
const { openerService } = options;
|
|
52
|
+
const quickPick = quickInputService.createQuickPick();
|
|
53
|
+
quickPick.activeItems = activeItem ? [activeItem] : [];
|
|
54
|
+
quickPick.placeholder = createPlaceholderText(options);
|
|
55
|
+
quickPick.canAcceptInBackground = true;
|
|
56
|
+
quickPick.matchOnDescription = true;
|
|
57
|
+
quickPick.items = fileOptions;
|
|
58
|
+
return await ( new Promise(resolve => {
|
|
59
|
+
const disposables = ( new DisposableStore());
|
|
60
|
+
let lastActiveWidget = options.widget;
|
|
61
|
+
disposables.add({
|
|
62
|
+
dispose() {
|
|
63
|
+
quickPick.dispose();
|
|
64
|
+
resolve();
|
|
65
|
+
lastActiveWidget?.focusInput();
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
disposables.add(quickPick.onDidAccept(async (event) => {
|
|
69
|
+
const { selectedItems } = quickPick;
|
|
70
|
+
const { alt, ctrlCmd } = quickPick.keyMods;
|
|
71
|
+
assert(selectedItems.length === 1, `Only one item can be accepted, got '${selectedItems.length}'.`);
|
|
72
|
+
const docsSelected = (selectedItems[0] === DOCS_OPTION);
|
|
73
|
+
if (ctrlCmd || docsSelected) {
|
|
74
|
+
return await openFiles(selectedItems, openerService);
|
|
75
|
+
}
|
|
76
|
+
lastActiveWidget = await attachFiles(selectedItems, options, alt);
|
|
77
|
+
if (!event.inBackground) {
|
|
78
|
+
disposables.dispose();
|
|
79
|
+
}
|
|
80
|
+
}));
|
|
81
|
+
disposables.add(quickPick.onDidHide(disposables.dispose.bind(disposables)));
|
|
82
|
+
quickPick.show();
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
85
|
+
const createPickItem = (promptFile, labelService) => {
|
|
86
|
+
const { uri, type } = promptFile;
|
|
87
|
+
const fileWithoutExtension = getCleanPromptName(uri);
|
|
88
|
+
const description = (type === 'user')
|
|
89
|
+
? ( localize(4301, 'User prompt'))
|
|
90
|
+
: labelService.getUriLabel(dirname(uri), { relative: true });
|
|
91
|
+
const tooltip = (type === 'user')
|
|
92
|
+
? description
|
|
93
|
+
: uri.fsPath;
|
|
94
|
+
return {
|
|
95
|
+
type: 'item',
|
|
96
|
+
label: fileWithoutExtension,
|
|
97
|
+
description,
|
|
98
|
+
tooltip,
|
|
99
|
+
value: uri,
|
|
100
|
+
id: ( uri.toString()),
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
const createPlaceholderText = (options) => {
|
|
104
|
+
const { widget } = options;
|
|
105
|
+
let text = ( localize(4302, 'Select a prompt to use'));
|
|
106
|
+
if (!widget) {
|
|
107
|
+
const altOptionkey = (isWindows || isLinux) ? 'Alt' : 'Option';
|
|
108
|
+
const altOptionModifierNote = ( localize(4303, '{0}-key to use in Edits', altOptionkey));
|
|
109
|
+
const cmdCtrlkey = (isWindows || isLinux) ? 'Ctrl' : 'Cmd';
|
|
110
|
+
const superModifierNote = ( localize(4304, '{0}-key to open in editor', cmdCtrlkey));
|
|
111
|
+
text += ( localize(4305, ' (hold {0} or {1})', altOptionModifierNote, superModifierNote));
|
|
112
|
+
}
|
|
113
|
+
return text;
|
|
114
|
+
};
|
|
115
|
+
const openFiles = async (files, openerService) => {
|
|
116
|
+
for (const file of files) {
|
|
117
|
+
await openerService.open(file.value);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const attachFiles = async (files, options, altOption) => {
|
|
121
|
+
const widget = await getChatWidgetObject(options, altOption);
|
|
122
|
+
for (const file of files) {
|
|
123
|
+
widget
|
|
124
|
+
.attachmentModel
|
|
125
|
+
.promptInstructions
|
|
126
|
+
.add(file.value);
|
|
127
|
+
}
|
|
128
|
+
return widget;
|
|
129
|
+
};
|
|
130
|
+
const getChatWidgetObject = async (options, altOption) => {
|
|
131
|
+
const { widget, viewsService } = options;
|
|
132
|
+
if (!widget) {
|
|
133
|
+
const widget = (altOption)
|
|
134
|
+
? await showEditsView(viewsService)
|
|
135
|
+
: await showChatView(viewsService);
|
|
136
|
+
assertDefined(widget, 'Revealed chat widget must be defined.');
|
|
137
|
+
return widget;
|
|
138
|
+
}
|
|
139
|
+
return widget;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export { askToSelectPrompt };
|
|
@@ -3,8 +3,8 @@ import { IActionViewItemService } from "@codingame/monaco-vscode-api/vscode/vs/p
|
|
|
3
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
4
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
5
5
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
6
|
-
import { IChatResponseViewModel } from "@codingame/monaco-vscode-
|
|
7
|
-
import { ICodeBlockActionContext, ICodeCompareBlockActionContext } from "@codingame/monaco-vscode-
|
|
6
|
+
import { IChatResponseViewModel } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatViewModel";
|
|
7
|
+
import { ICodeBlockActionContext, ICodeCompareBlockActionContext } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
|
|
8
8
|
export interface IChatCodeBlockActionContext extends ICodeBlockActionContext {
|
|
9
9
|
element: IChatResponseViewModel;
|
|
10
10
|
}
|