@codingame/monaco-vscode-chat-service-override 17.2.1 → 18.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 +7 -4
- package/package.json +36 -30
- package/vscode/src/vs/base/common/objectCache.d.ts +2 -2
- package/vscode/src/vs/base/common/objectCache.js +3 -3
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +10 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +40 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +158 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +256 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +234 -572
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +29 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +107 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +344 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +84 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.d.ts +18 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.js +137 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatModeActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatModeActions.js +54 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js +40 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.d.ts +15 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.js +171 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +176 -69
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +15 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +35 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +80 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +11 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +12 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +15 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +18 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +118 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +46 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +379 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +31 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +382 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +99 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +9 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +10 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +18 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +95 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +92 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/media/github.svg +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/google.svg +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +10 -4
- 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 +111 -111
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +36 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +5 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +91 -17
- 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 +1 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +4 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +95 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +348 -0
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +93 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +46 -36
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.js +21 -11
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.js +12 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptPathAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.js +12 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +21 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +111 -124
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +22 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +159 -97
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.d.ts +15 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.js +2 -14
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +198 -33
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +28 -18
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.js +0 -73
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.js +0 -74
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.d.ts +0 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.js +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.js +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.js +0 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.js +0 -68
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/types.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.js +0 -121
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.js +0 -13
|
@@ -1,34 +1,62 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { ChatViewId } from '@codingame/monaco-vscode-7adbeffb-8051-54a9-8c9b-b62ce9e5836f-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
4
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
5
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
3
6
|
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
7
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
5
8
|
import { assertDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
6
9
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service';
|
|
7
|
-
import { PromptsConfig } from '@codingame/monaco-vscode-
|
|
10
|
+
import { PromptsConfig } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/config';
|
|
8
11
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
9
12
|
import { PromptFilePickers } from './dialogs/askToSelectPrompt/promptFilePickers.js';
|
|
10
13
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
11
14
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
12
|
-
import { Action2, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
15
|
+
import { Action2, MenuId, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
13
16
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
17
|
import { attachInstructionsFiles } from './dialogs/askToSelectPrompt/utils/attachInstructions.js';
|
|
18
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
19
|
+
import { PromptsType, getCleanPromptName } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/prompts';
|
|
20
|
+
import { compare } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
21
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
22
|
+
import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
23
|
+
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
24
|
+
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
25
|
+
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
26
|
+
import { INSTRUCTIONS_LANGUAGE_ID } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/constants';
|
|
27
|
+
import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
28
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
15
29
|
|
|
16
30
|
const ATTACH_INSTRUCTIONS_ACTION_ID = 'workbench.action.chat.attach.instructions';
|
|
31
|
+
const CONFIGURE_INSTRUCTIONS_ACTION_ID = 'workbench.action.chat.configure.instructions';
|
|
17
32
|
class AttachInstructionsAction extends Action2 {
|
|
18
33
|
constructor() {
|
|
19
34
|
super({
|
|
20
35
|
id: ATTACH_INSTRUCTIONS_ACTION_ID,
|
|
21
|
-
title: ( localize2(
|
|
36
|
+
title: ( localize2(4525, "Attach Instructions...")),
|
|
22
37
|
f1: false,
|
|
23
38
|
precondition: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
24
39
|
category: CHAT_CATEGORY,
|
|
40
|
+
keybinding: {
|
|
41
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Slash,
|
|
42
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
43
|
+
},
|
|
44
|
+
menu: {
|
|
45
|
+
id: MenuId.CommandPalette,
|
|
46
|
+
when: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled))
|
|
47
|
+
}
|
|
25
48
|
});
|
|
26
49
|
}
|
|
27
50
|
async run(accessor, options) {
|
|
28
51
|
const viewsService = accessor.get(IViewsService);
|
|
29
|
-
const promptsService = accessor.get(IPromptsService);
|
|
30
52
|
const commandService = accessor.get(ICommandService);
|
|
31
53
|
const instaService = accessor.get(IInstantiationService);
|
|
54
|
+
if (!options) {
|
|
55
|
+
options = {
|
|
56
|
+
resource: getActiveInstructionsFileUri(accessor),
|
|
57
|
+
widget: getFocusedChatWidget(accessor),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
32
60
|
const pickers = instaService.createInstance(PromptFilePickers);
|
|
33
61
|
const { skipSelectionDialog, resource } = options;
|
|
34
62
|
const attachOptions = {
|
|
@@ -36,26 +64,121 @@ class AttachInstructionsAction extends Action2 {
|
|
|
36
64
|
viewsService,
|
|
37
65
|
commandService,
|
|
38
66
|
};
|
|
39
|
-
if (skipSelectionDialog
|
|
67
|
+
if (skipSelectionDialog) {
|
|
40
68
|
assertDefined(resource, 'Resource must be defined when skipping prompt selection dialog.');
|
|
41
69
|
const widget = await attachInstructionsFiles([resource], attachOptions);
|
|
42
70
|
widget.focusInput();
|
|
43
71
|
return;
|
|
44
72
|
}
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const widget = await attachInstructionsFiles(instructions, attachOptions);
|
|
73
|
+
const placeholder = ( localize(4526, 'Select instructions files to attach'));
|
|
74
|
+
const result = await pickers.selectPromptFile({ resource, placeholder, type: PromptsType.instructions });
|
|
75
|
+
if (result !== undefined) {
|
|
76
|
+
const widget = await attachInstructionsFiles([result.promptFile], attachOptions);
|
|
50
77
|
widget.focusInput();
|
|
51
78
|
}
|
|
52
79
|
}
|
|
53
80
|
}
|
|
54
|
-
|
|
55
|
-
|
|
81
|
+
class ManageInstructionsFilesAction extends Action2 {
|
|
82
|
+
constructor() {
|
|
83
|
+
super({
|
|
84
|
+
id: CONFIGURE_INSTRUCTIONS_ACTION_ID,
|
|
85
|
+
title: ( localize2(4527, "Configure Instructions")),
|
|
86
|
+
icon: Codicon.bookmark,
|
|
87
|
+
f1: true,
|
|
88
|
+
precondition: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
89
|
+
category: CHAT_CATEGORY,
|
|
90
|
+
menu: {
|
|
91
|
+
id: MenuId.ViewTitle,
|
|
92
|
+
when: ( ContextKeyExpr.equals('view', ChatViewId)),
|
|
93
|
+
order: 11,
|
|
94
|
+
group: '2_manage'
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async run(accessor) {
|
|
99
|
+
const openerService = accessor.get(IOpenerService);
|
|
100
|
+
const instaService = accessor.get(IInstantiationService);
|
|
101
|
+
const pickers = instaService.createInstance(PromptFilePickers);
|
|
102
|
+
const placeholder = ( localize(4528, 'Select the instructions file to open'));
|
|
103
|
+
const result = await pickers.selectPromptFile({ placeholder, type: PromptsType.instructions, optionEdit: false });
|
|
104
|
+
if (result !== undefined) {
|
|
105
|
+
await openerService.open(result.promptFile);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function getFocusedChatWidget(accessor) {
|
|
110
|
+
const chatWidgetService = accessor.get(IChatWidgetService);
|
|
111
|
+
const { lastFocusedWidget } = chatWidgetService;
|
|
112
|
+
if (!lastFocusedWidget) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
if (!lastFocusedWidget.hasInputFocus()) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
return lastFocusedWidget;
|
|
119
|
+
}
|
|
120
|
+
const getActiveInstructionsFileUri = (accessor) => {
|
|
121
|
+
const codeEditorService = accessor.get(ICodeEditorService);
|
|
122
|
+
const model = codeEditorService.getActiveCodeEditor()?.getModel();
|
|
123
|
+
if (model?.getLanguageId() === INSTRUCTIONS_LANGUAGE_ID) {
|
|
124
|
+
return model.uri;
|
|
125
|
+
}
|
|
126
|
+
return undefined;
|
|
56
127
|
};
|
|
57
128
|
const registerAttachPromptActions = () => {
|
|
58
129
|
registerAction2(AttachInstructionsAction);
|
|
130
|
+
registerAction2(ManageInstructionsFilesAction);
|
|
131
|
+
};
|
|
132
|
+
let ChatInstructionsPickerPick = class ChatInstructionsPickerPick {
|
|
133
|
+
constructor(promptsService, labelService) {
|
|
134
|
+
this.promptsService = promptsService;
|
|
135
|
+
this.labelService = labelService;
|
|
136
|
+
this.type = 'pickerPick';
|
|
137
|
+
this.label = ( localize(4529, 'Instructions...'));
|
|
138
|
+
this.icon = Codicon.bookmark;
|
|
139
|
+
this.commandId = ATTACH_INSTRUCTIONS_ACTION_ID;
|
|
140
|
+
}
|
|
141
|
+
isEnabled(widget) {
|
|
142
|
+
return widget.attachmentModel.promptInstructions.featureEnabled;
|
|
143
|
+
}
|
|
144
|
+
asPicker() {
|
|
145
|
+
const picks = this.promptsService.listPromptFiles(PromptsType.instructions, CancellationToken.None).then(value => {
|
|
146
|
+
const result = [];
|
|
147
|
+
value = value.slice(0).sort((a, b) => compare(a.storage, b.storage));
|
|
148
|
+
let storageType;
|
|
149
|
+
for (const { uri, storage } of value) {
|
|
150
|
+
if (storageType !== storage) {
|
|
151
|
+
storageType = storage;
|
|
152
|
+
result.push({
|
|
153
|
+
type: 'separator',
|
|
154
|
+
label: storage === 'user'
|
|
155
|
+
? ( localize(4530, 'User data folder'))
|
|
156
|
+
: this.labelService.getUriLabel(dirname(uri), { relative: true })
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
result.push({
|
|
160
|
+
label: getCleanPromptName(uri),
|
|
161
|
+
asAttachment: () => {
|
|
162
|
+
return {
|
|
163
|
+
kind: 'promptFile',
|
|
164
|
+
id: ( uri.toString()),
|
|
165
|
+
value: uri,
|
|
166
|
+
name: this.labelService.getUriBasenameLabel(uri),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
placeholder: ( localize(4531, 'Select instructions files to attach')),
|
|
175
|
+
picks
|
|
176
|
+
};
|
|
177
|
+
}
|
|
59
178
|
};
|
|
179
|
+
ChatInstructionsPickerPick = ( __decorate([
|
|
180
|
+
( __param(0, IPromptsService)),
|
|
181
|
+
( __param(1, ILabelService))
|
|
182
|
+
], ChatInstructionsPickerPick));
|
|
60
183
|
|
|
61
|
-
export {
|
|
184
|
+
export { ChatInstructionsPickerPick, registerAttachPromptActions };
|
package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatModeActions.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const registerChatModeActions: () => void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
3
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
+
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
5
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { PromptsConfig } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/config';
|
|
7
|
+
import { PromptFilePickers } from './dialogs/askToSelectPrompt/promptFilePickers.js';
|
|
8
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
|
+
import { Action2, MenuId, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
10
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
+
import { PromptsType } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/prompts';
|
|
12
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
13
|
+
import { ChatViewId } from '@codingame/monaco-vscode-7adbeffb-8051-54a9-8c9b-b62ce9e5836f-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
14
|
+
|
|
15
|
+
const COMFIGURE_MODES_ACTION_ID = 'workbench.action.chat.manage.mode';
|
|
16
|
+
class ManageModeAction extends Action2 {
|
|
17
|
+
constructor() {
|
|
18
|
+
super({
|
|
19
|
+
id: COMFIGURE_MODES_ACTION_ID,
|
|
20
|
+
title: ( localize2(4532, "Configure Chat Modes")),
|
|
21
|
+
shortTitle: ( localize(4533, "Configure Modes")),
|
|
22
|
+
icon: Codicon.bookmark,
|
|
23
|
+
f1: true,
|
|
24
|
+
precondition: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
25
|
+
category: CHAT_CATEGORY,
|
|
26
|
+
menu: [
|
|
27
|
+
{
|
|
28
|
+
id: MenuId.ChatModePicker,
|
|
29
|
+
when: ChatContextKeys.Modes.hasCustomChatModes
|
|
30
|
+
}, {
|
|
31
|
+
id: MenuId.ViewTitle,
|
|
32
|
+
when: ( ContextKeyExpr.equals('view', ChatViewId)),
|
|
33
|
+
order: 12,
|
|
34
|
+
group: '2_manage'
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async run(accessor) {
|
|
40
|
+
const openerService = accessor.get(IOpenerService);
|
|
41
|
+
const instaService = accessor.get(IInstantiationService);
|
|
42
|
+
const pickers = instaService.createInstance(PromptFilePickers);
|
|
43
|
+
const placeholder = ( localize(4534, 'Select the chat mode file to open'));
|
|
44
|
+
const result = await pickers.selectPromptFile({ placeholder, type: PromptsType.mode, optionEdit: false });
|
|
45
|
+
if (result !== undefined) {
|
|
46
|
+
await openerService.open(result.promptFile);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const registerChatModeActions = () => {
|
|
51
|
+
registerAction2(ManageModeAction);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { registerChatModeActions };
|
package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { ChatViewId } from '@codingame/monaco-vscode-7adbeffb-8051-54a9-8c9b-b62ce9e5836f-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
3
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
3
4
|
import { OS } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
4
5
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
6
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
@@ -7,10 +8,9 @@ import { assertDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/commo
|
|
|
7
8
|
import { ResourceContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
8
9
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
9
10
|
import { PROMPT_LANGUAGE_ID } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/constants';
|
|
10
|
-
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service';
|
|
11
11
|
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
12
|
import { UILabelProvider } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keybindingLabels';
|
|
13
|
-
import { PromptsConfig } from '@codingame/monaco-vscode-
|
|
13
|
+
import { PromptsConfig } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/config';
|
|
14
14
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
15
15
|
import { PromptFilePickers } from './dialogs/askToSelectPrompt/promptFilePickers.js';
|
|
16
16
|
import { EditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/editorContextKeys';
|
|
@@ -21,11 +21,14 @@ import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/edito
|
|
|
21
21
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
22
22
|
import { Action2, MenuId, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
23
23
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
24
|
+
import { PromptsType } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/prompts';
|
|
25
|
+
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
24
26
|
|
|
25
27
|
const EDITOR_ACTIONS_CONDITION = ( ContextKeyExpr.and(( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)), ResourceContextKey.HasResource, ( ResourceContextKey.LangId.isEqualTo(PROMPT_LANGUAGE_ID))));
|
|
26
28
|
const COMMAND_KEY_BINDING = KeyMod.WinCtrl | KeyCode.Slash | KeyMod.Alt;
|
|
27
29
|
const RUN_CURRENT_PROMPT_ACTION_ID = 'workbench.action.chat.run.prompt.current';
|
|
28
30
|
const RUN_SELECTED_PROMPT_ACTION_ID = 'workbench.action.chat.run.prompt';
|
|
31
|
+
const CONFIGURE_PROMPTS_ACTION_ID = 'workbench.action.chat.configure.prompts';
|
|
29
32
|
class RunPromptBaseAction extends Action2 {
|
|
30
33
|
constructor(options) {
|
|
31
34
|
super({
|
|
@@ -64,7 +67,7 @@ class RunPromptBaseAction extends Action2 {
|
|
|
64
67
|
return widget;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
|
-
const RUN_CURRENT_PROMPT_ACTION_TITLE = ( localize2(
|
|
70
|
+
const RUN_CURRENT_PROMPT_ACTION_TITLE = ( localize2(4535, "Run Prompt in Current Chat"));
|
|
68
71
|
const RUN_CURRENT_PROMPT_ACTION_ICON = Codicon.playCircle;
|
|
69
72
|
class RunCurrentPromptAction extends RunPromptBaseAction {
|
|
70
73
|
constructor() {
|
|
@@ -83,7 +86,7 @@ class RunSelectedPromptAction extends Action2 {
|
|
|
83
86
|
constructor() {
|
|
84
87
|
super({
|
|
85
88
|
id: RUN_SELECTED_PROMPT_ACTION_ID,
|
|
86
|
-
title: ( localize2(
|
|
89
|
+
title: ( localize2(4536, "Run Prompt...")),
|
|
87
90
|
icon: Codicon.bookmark,
|
|
88
91
|
f1: true,
|
|
89
92
|
precondition: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
@@ -97,17 +100,15 @@ class RunSelectedPromptAction extends Action2 {
|
|
|
97
100
|
}
|
|
98
101
|
async run(accessor) {
|
|
99
102
|
const viewsService = accessor.get(IViewsService);
|
|
100
|
-
const promptsService = accessor.get(IPromptsService);
|
|
101
103
|
const commandService = accessor.get(ICommandService);
|
|
102
104
|
const instaService = accessor.get(IInstantiationService);
|
|
103
105
|
const pickers = instaService.createInstance(PromptFilePickers);
|
|
104
|
-
const promptFiles = await promptsService.listPromptFiles('prompt');
|
|
105
106
|
const placeholder = ( localize(
|
|
106
|
-
|
|
107
|
+
4537,
|
|
107
108
|
'Select the prompt file to run (hold {0}-key to use in new chat)',
|
|
108
109
|
UILabelProvider.modifierLabels[OS].ctrlKey
|
|
109
110
|
));
|
|
110
|
-
const result = await pickers.selectPromptFile({
|
|
111
|
+
const result = await pickers.selectPromptFile({ placeholder, type: PromptsType.prompt });
|
|
111
112
|
if (result === undefined) {
|
|
112
113
|
return;
|
|
113
114
|
}
|
|
@@ -121,6 +122,34 @@ class RunSelectedPromptAction extends Action2 {
|
|
|
121
122
|
widget.focusInput();
|
|
122
123
|
}
|
|
123
124
|
}
|
|
125
|
+
class ManagePromptFilesAction extends Action2 {
|
|
126
|
+
constructor() {
|
|
127
|
+
super({
|
|
128
|
+
id: CONFIGURE_PROMPTS_ACTION_ID,
|
|
129
|
+
title: ( localize2(4538, "Configure Prompt Files")),
|
|
130
|
+
icon: Codicon.bookmark,
|
|
131
|
+
f1: true,
|
|
132
|
+
precondition: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
133
|
+
category: CHAT_CATEGORY,
|
|
134
|
+
menu: {
|
|
135
|
+
id: MenuId.ViewTitle,
|
|
136
|
+
when: ( ContextKeyExpr.equals('view', ChatViewId)),
|
|
137
|
+
order: 10,
|
|
138
|
+
group: '2_manage'
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
async run(accessor) {
|
|
143
|
+
const openerService = accessor.get(IOpenerService);
|
|
144
|
+
const instaService = accessor.get(IInstantiationService);
|
|
145
|
+
const pickers = instaService.createInstance(PromptFilePickers);
|
|
146
|
+
const placeholder = ( localize(4539, 'Select the prompt file to open'));
|
|
147
|
+
const result = await pickers.selectPromptFile({ placeholder, type: PromptsType.prompt, optionEdit: false });
|
|
148
|
+
if (result !== undefined) {
|
|
149
|
+
await openerService.open(result.promptFile);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
124
153
|
const getActivePromptFileUri = (accessor) => {
|
|
125
154
|
const codeEditorService = accessor.get(ICodeEditorService);
|
|
126
155
|
const model = codeEditorService.getActiveCodeEditor()?.getModel();
|
|
@@ -130,7 +159,7 @@ const getActivePromptFileUri = (accessor) => {
|
|
|
130
159
|
return undefined;
|
|
131
160
|
};
|
|
132
161
|
const RUN_CURRENT_PROMPT_IN_NEW_CHAT_ACTION_ID = 'workbench.action.chat.run-in-new-chat.prompt.current';
|
|
133
|
-
const RUN_IN_NEW_CHAT_ACTION_TITLE = ( localize2(
|
|
162
|
+
const RUN_IN_NEW_CHAT_ACTION_TITLE = ( localize2(4540, "Run Prompt In New Chat"));
|
|
134
163
|
const RUN_IN_NEW_CHAT_ACTION_ICON = Codicon.play;
|
|
135
164
|
class RunCurrentPromptInNewChatAction extends RunPromptBaseAction {
|
|
136
165
|
constructor() {
|
|
@@ -154,6 +183,7 @@ const registerRunPromptActions = () => {
|
|
|
154
183
|
registerAction2(RunCurrentPromptInNewChatAction);
|
|
155
184
|
registerAction2(RunCurrentPromptAction);
|
|
156
185
|
registerAction2(RunSelectedPromptAction);
|
|
186
|
+
registerAction2(ManagePromptFilesAction);
|
|
157
187
|
};
|
|
158
188
|
|
|
159
189
|
export { getActivePromptFileUri, registerRunPromptActions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IChatWidget } from "@codingame/monaco-vscode-
|
|
1
|
+
import { IChatWidget } from "@codingame/monaco-vscode-7adbeffb-8051-54a9-8c9b-b62ce9e5836f-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
2
2
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
3
3
|
export declare const SAVE_TO_PROMPT_SLASH_COMMAND_NAME = "save";
|
|
4
4
|
interface ISaveToPromptActionOptions {
|
package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-
|
|
2
|
+
import { CHAT_CATEGORY } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
3
3
|
import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
4
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
5
5
|
import { assertDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
6
6
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
7
7
|
import { PROMPT_LANGUAGE_ID } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/constants';
|
|
8
|
-
import { PromptsConfig } from '@codingame/monaco-vscode-
|
|
8
|
+
import { PromptsConfig } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/config';
|
|
9
9
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
10
10
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
11
11
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -18,7 +18,7 @@ class SaveToPromptAction extends Action2 {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super({
|
|
20
20
|
id: SAVE_TO_PROMPT_ACTION_ID,
|
|
21
|
-
title: ( localize2(
|
|
21
|
+
title: ( localize2(4541, "Save chat session to a prompt file")),
|
|
22
22
|
f1: false,
|
|
23
23
|
precondition: ( ContextKeyExpr.and(PromptsConfig.enabledCtx, ChatContextKeys.enabled)),
|
|
24
24
|
category: CHAT_CATEGORY,
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import {
|
|
2
|
+
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service";
|
|
3
3
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
4
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
5
5
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
6
6
|
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
7
|
+
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
8
|
+
import { PromptsType } from "@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common/vscode/vs/platform/prompts/common/prompts";
|
|
7
9
|
import { IKeyMods } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
|
|
8
10
|
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
9
|
-
import {
|
|
11
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
10
12
|
export interface ISelectOptions {
|
|
11
13
|
readonly placeholder: string;
|
|
12
14
|
readonly resource?: URI;
|
|
13
|
-
readonly
|
|
15
|
+
readonly type: PromptsType;
|
|
16
|
+
readonly optionNew?: boolean;
|
|
17
|
+
readonly optionEdit?: boolean;
|
|
18
|
+
readonly optionDelete?: boolean;
|
|
19
|
+
readonly optionRename?: boolean;
|
|
20
|
+
readonly optionCopy?: boolean;
|
|
14
21
|
}
|
|
15
22
|
export interface ISelectPromptResult {
|
|
16
23
|
readonly promptFile: URI;
|
|
@@ -23,10 +30,13 @@ export declare class PromptFilePickers {
|
|
|
23
30
|
private readonly _fileService;
|
|
24
31
|
private readonly _dialogService;
|
|
25
32
|
private readonly _commandService;
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
private readonly _instaService;
|
|
34
|
+
private readonly _promptsService;
|
|
35
|
+
constructor(_labelService: ILabelService, _quickInputService: IQuickInputService, _openerService: IOpenerService, _fileService: IFileService, _dialogService: IDialogService, _commandService: ICommandService, _instaService: IInstantiationService, _promptsService: IPromptsService);
|
|
28
36
|
selectPromptFile(options: ISelectOptions): Promise<ISelectPromptResult | undefined>;
|
|
29
37
|
private _createPromptPickItems;
|
|
38
|
+
private _getNewItem;
|
|
30
39
|
private _createPromptPickItem;
|
|
40
|
+
private keepQuickPickOpen;
|
|
31
41
|
private _handleButtonClick;
|
|
32
42
|
}
|