@codingame/monaco-vscode-chat-service-override 16.1.0 → 17.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 +6 -6
- package/package.json +30 -27
- 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 +41 -41
- 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 +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +410 -443
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- 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 +1 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +3 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +32 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.js +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js +159 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.js +244 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.js +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -168
- 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.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +48 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +46 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +118 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +5 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +45 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +48 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +53 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +9 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +80 -268
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +214 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +26 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +186 -106
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +129 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +313 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +12 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -181
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +484 -384
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +187 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +8 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +264 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +28 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +41 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +8 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +2 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +20 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +67 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.js +73 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +82 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +44 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +24 -14
- 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.js +2 -2
- 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/chatProgressTypes/chatToolInvocation.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +8 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +84 -80
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +27 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.js +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.js +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.js +74 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/types.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.js +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.js +65 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.js +3 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.js +14 -19
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +17 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +223 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +28 -22
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.js +25 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +20 -31
- 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 +15 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +12 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +0 -2
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +1 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +0 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +0 -79
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +0 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +0 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +0 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +0 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +0 -80
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +0 -117
- /package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerEditorContribution, EditorContributionInstantiation } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
|
|
3
3
|
import { registerAction2, MenuRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
4
|
-
import { InlineChatController2, InlineChatController1, InlineChatController } from '@codingame/monaco-vscode-
|
|
5
|
-
import {
|
|
6
|
-
import { INLINE_CHAT_ID, CTX_INLINE_CHAT_REQUEST_IN_PROGRESS, CTX_INLINE_CHAT_EDITING, MENU_INLINE_CHAT_WIDGET_STATUS } from '@codingame/monaco-vscode-
|
|
4
|
+
import { InlineChatController2, InlineChatController1, InlineChatController } from '@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
5
|
+
import { KeepSessionAction2, UndoSessionAction2, CloseSessionAction2, RevealWidget, CancelRequestAction, StartSessionAction, CloseAction, ConfigureInlineChatAction, UnstashSessionAction, DiscardHunkAction, RerunAction, MoveToNextHunk, MoveToPreviousHunk, ArrowOutUpAction, ArrowOutDownAction, FocusInlineChat, ViewInChatAction, ToggleDiffForChange, AcceptChanges } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatActions';
|
|
6
|
+
import { INLINE_CHAT_ID, CTX_INLINE_CHAT_REQUEST_IN_PROGRESS, CTX_INLINE_CHAT_EDITING, CTX_INLINE_CHAT_HAS_AGENT, MENU_INLINE_CHAT_WIDGET_STATUS } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
7
7
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
8
8
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
9
9
|
import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
@@ -11,9 +11,9 @@ import { InlineChatNotebookContribution } from './inlineChatNotebook.js';
|
|
|
11
11
|
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
12
12
|
import { InlineChatAccessibleView } from './inlineChatAccessibleView.js';
|
|
13
13
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
-
import { InlineChatEnabler } from '@codingame/monaco-vscode-
|
|
14
|
+
import { InlineChatEnabler } from '@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl';
|
|
15
15
|
import { AccessibleViewRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
16
|
-
import { ChatSubmitAction, CancelAction } from '@codingame/monaco-vscode-
|
|
16
|
+
import { ChatSubmitAction, CancelAction } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatExecuteActions';
|
|
17
17
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
18
18
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
19
19
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -23,8 +23,11 @@ import { InlineChatExpandLineAction, ShowInlineChatHintAction, HideInlineChatHin
|
|
|
23
23
|
registerEditorContribution(InlineChatController2.ID, InlineChatController2, EditorContributionInstantiation.Eager);
|
|
24
24
|
registerEditorContribution(INLINE_CHAT_ID, InlineChatController1, EditorContributionInstantiation.Eager);
|
|
25
25
|
registerEditorContribution(InlineChatController.ID, InlineChatController, EditorContributionInstantiation.Eager);
|
|
26
|
-
registerAction2(
|
|
26
|
+
registerAction2(KeepSessionAction2);
|
|
27
|
+
registerAction2(UndoSessionAction2);
|
|
28
|
+
registerAction2(CloseSessionAction2);
|
|
27
29
|
registerAction2(RevealWidget);
|
|
30
|
+
registerAction2(CancelRequestAction);
|
|
28
31
|
registerAction2(InlineChatExpandLineAction);
|
|
29
32
|
registerAction2(ShowInlineChatHintAction);
|
|
30
33
|
registerAction2(HideInlineChatHintAction);
|
|
@@ -34,18 +37,18 @@ const editActionMenuItem = {
|
|
|
34
37
|
order: 0,
|
|
35
38
|
command: {
|
|
36
39
|
id: ChatSubmitAction.ID,
|
|
37
|
-
title: ( localize(
|
|
40
|
+
title: ( localize(7227, "Edit Code")),
|
|
38
41
|
},
|
|
39
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.inputHasText, ( CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()), CTX_INLINE_CHAT_EDITING)),
|
|
42
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inputHasText, ( CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()), CTX_INLINE_CHAT_EDITING, CTX_INLINE_CHAT_HAS_AGENT)),
|
|
40
43
|
};
|
|
41
44
|
const generateActionMenuItem = {
|
|
42
45
|
group: '0_main',
|
|
43
46
|
order: 0,
|
|
44
47
|
command: {
|
|
45
48
|
id: ChatSubmitAction.ID,
|
|
46
|
-
title: ( localize(
|
|
49
|
+
title: ( localize(7228, "Generate")),
|
|
47
50
|
},
|
|
48
|
-
when: ( ContextKeyExpr.and(ChatContextKeys.inputHasText, ( CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()), ( CTX_INLINE_CHAT_EDITING.toNegated()))),
|
|
51
|
+
when: ( ContextKeyExpr.and(ChatContextKeys.inputHasText, ( CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()), ( CTX_INLINE_CHAT_EDITING.toNegated()), CTX_INLINE_CHAT_HAS_AGENT)),
|
|
49
52
|
};
|
|
50
53
|
MenuRegistry.appendMenuItem(MENU_INLINE_CHAT_WIDGET_STATUS, editActionMenuItem);
|
|
51
54
|
MenuRegistry.appendMenuItem(MENU_INLINE_CHAT_WIDGET_STATUS, generateActionMenuItem);
|
|
@@ -54,8 +57,8 @@ const cancelActionMenuItem = {
|
|
|
54
57
|
order: 0,
|
|
55
58
|
command: {
|
|
56
59
|
id: CancelAction.ID,
|
|
57
|
-
title: ( localize(
|
|
58
|
-
shortTitle: ( localize(
|
|
60
|
+
title: ( localize(7229, "Cancel Request")),
|
|
61
|
+
shortTitle: ( localize(7230, "Cancel")),
|
|
59
62
|
},
|
|
60
63
|
when: ( ContextKeyExpr.and(CTX_INLINE_CHAT_REQUEST_IN_PROGRESS)),
|
|
61
64
|
};
|
|
@@ -4,7 +4,7 @@ import { AccessibleViewType } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
4
4
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
5
|
import { getChatAccessibilityHelpProvider } from '../../chat/browser/actions/chatAccessibilityHelp.js';
|
|
6
6
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
7
|
-
import { CTX_INLINE_CHAT_RESPONSE_FOCUSED } from '@codingame/monaco-vscode-
|
|
7
|
+
import { CTX_INLINE_CHAT_RESPONSE_FOCUSED } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
8
8
|
|
|
9
9
|
class InlineChatAccessibilityHelp {
|
|
10
10
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { InlineChatController } from '@codingame/monaco-vscode-
|
|
3
|
-
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_RESPONSE_FOCUSED } from '@codingame/monaco-vscode-
|
|
2
|
+
import { InlineChatController } from '@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
3
|
+
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_RESPONSE_FOCUSED } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
4
4
|
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
5
5
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
6
|
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
@@ -6,8 +6,8 @@ import { MouseTargetType } from '@codingame/monaco-vscode-api/vscode/vs/editor/b
|
|
|
6
6
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
7
7
|
import { RawContextKey, ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
8
8
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
9
|
-
import { InlineChatController } from '@codingame/monaco-vscode-
|
|
10
|
-
import { CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_HAS_AGENT, ACTION_START, InlineChatConfigKeys } from '@codingame/monaco-vscode-
|
|
9
|
+
import { InlineChatController } from '@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
10
|
+
import { CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_HAS_AGENT, ACTION_START, InlineChatConfigKeys } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
11
11
|
import { EditorAction2 } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
|
|
12
12
|
import { EditOperation } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/editOperation';
|
|
13
13
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
@@ -21,7 +21,7 @@ import { StandardTokenType } from '@codingame/monaco-vscode-api/vscode/vs/editor
|
|
|
21
21
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
22
22
|
import { KeyChord, KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
23
23
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
24
|
-
import * as inlineChat from '@codingame/monaco-vscode-
|
|
24
|
+
import * as inlineChat from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css';
|
|
25
25
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
26
26
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
27
27
|
import { InlineCompletionsController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController';
|
|
@@ -44,14 +44,14 @@ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/obse
|
|
|
44
44
|
|
|
45
45
|
var InlineChatHintsController_1;
|
|
46
46
|
registerCss(inlineChat);
|
|
47
|
-
const CTX_INLINE_CHAT_SHOWING_HINT = ( new RawContextKey('inlineChatShowingHint', false, ( localize(
|
|
47
|
+
const CTX_INLINE_CHAT_SHOWING_HINT = ( new RawContextKey('inlineChatShowingHint', false, ( localize(7259, "Whether inline chat shows a contextual hint"))));
|
|
48
48
|
const _inlineChatActionId = 'inlineChat.startWithCurrentLine';
|
|
49
49
|
class InlineChatExpandLineAction extends EditorAction2 {
|
|
50
50
|
constructor() {
|
|
51
51
|
super({
|
|
52
52
|
id: _inlineChatActionId,
|
|
53
53
|
category: AbstractInline1ChatAction.category,
|
|
54
|
-
title: ( localize2(
|
|
54
|
+
title: ( localize2(7260, "Start in Editor with Current Line")),
|
|
55
55
|
f1: true,
|
|
56
56
|
precondition: ( ContextKeyExpr.and(( CTX_INLINE_CHAT_VISIBLE.negate()), CTX_INLINE_CHAT_HAS_AGENT, EditorContextKeys.writable)),
|
|
57
57
|
keybinding: [{
|
|
@@ -94,7 +94,7 @@ class ShowInlineChatHintAction extends EditorAction2 {
|
|
|
94
94
|
super({
|
|
95
95
|
id: 'inlineChat.showHint',
|
|
96
96
|
category: AbstractInline1ChatAction.category,
|
|
97
|
-
title: ( localize2(
|
|
97
|
+
title: ( localize2(7261, "Show Inline Chat Hint")),
|
|
98
98
|
f1: false,
|
|
99
99
|
precondition: ( ContextKeyExpr.and(( CTX_INLINE_CHAT_VISIBLE.negate()), CTX_INLINE_CHAT_HAS_AGENT, EditorContextKeys.writable)),
|
|
100
100
|
});
|
|
@@ -195,7 +195,7 @@ let InlineChatHintsController = class InlineChatHintsController extends Disposab
|
|
|
195
195
|
if (ghostState !== undefined || !kb || !position || !model || !textFocus) {
|
|
196
196
|
return undefined;
|
|
197
197
|
}
|
|
198
|
-
if (model.getLanguageId() === PLAINTEXT_LANGUAGE_ID || model.getLanguageId() === 'markdown') {
|
|
198
|
+
if (model.getLanguageId() === PLAINTEXT_LANGUAGE_ID || model.getLanguageId() === 'markdown' || model.getLanguageId() === 'search-result') {
|
|
199
199
|
return undefined;
|
|
200
200
|
}
|
|
201
201
|
const emitter = store.add(( new Emitter()));
|
|
@@ -225,15 +225,15 @@ let InlineChatHintsController = class InlineChatHintsController extends Disposab
|
|
|
225
225
|
this._ctxShowingHint.reset();
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
|
-
const agentName = chatAgentService.getDefaultAgent(ChatAgentLocation.Editor)?.name ?? ( localize(
|
|
228
|
+
const agentName = chatAgentService.getDefaultAgent(ChatAgentLocation.Editor)?.name ?? ( localize(7262, "Chat"));
|
|
229
229
|
const { position, isEol, isWhitespace, kb, model } = showData;
|
|
230
230
|
const inlineClassName = ['a' , 'inline-chat-hint', 'inline-chat-hint-text'];
|
|
231
231
|
let content;
|
|
232
232
|
if (isWhitespace) {
|
|
233
|
-
content = '\u00a0' + ( localize(
|
|
233
|
+
content = '\u00a0' + ( localize(7263, "{0} to edit with {1}", kb, agentName));
|
|
234
234
|
}
|
|
235
235
|
else if (isEol) {
|
|
236
|
-
content = '\u00a0' + ( localize(
|
|
236
|
+
content = '\u00a0' + ( localize(7264, "{0} to continue with {1}", kb, agentName));
|
|
237
237
|
}
|
|
238
238
|
else {
|
|
239
239
|
content = '\u200a' + kb + '\u200a';
|
|
@@ -262,7 +262,7 @@ let InlineChatHintsController = class InlineChatHintsController extends Disposab
|
|
|
262
262
|
getActions: () => [
|
|
263
263
|
toAction({
|
|
264
264
|
id: 'inlineChat.disableHint',
|
|
265
|
-
label: ( localize(
|
|
265
|
+
label: ( localize(7265, "Disable Inline Chat Hint")),
|
|
266
266
|
run: async () => {
|
|
267
267
|
await this._configurationService.updateValue(setting, false);
|
|
268
268
|
}
|
|
@@ -290,7 +290,7 @@ class HideInlineChatHintAction extends EditorAction2 {
|
|
|
290
290
|
constructor() {
|
|
291
291
|
super({
|
|
292
292
|
id: 'inlineChat.hideHint',
|
|
293
|
-
title: ( localize2(
|
|
293
|
+
title: ( localize2(7266, "Hide Inline Chat Hint")),
|
|
294
294
|
precondition: CTX_INLINE_CHAT_SHOWING_HINT,
|
|
295
295
|
keybinding: {
|
|
296
296
|
weight: KeybindingWeight.EditorContrib - 10,
|
|
@@ -4,13 +4,13 @@ import { illegalState } from '@codingame/monaco-vscode-api/vscode/vs/base/common
|
|
|
4
4
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
6
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { InlineChatController } from '@codingame/monaco-vscode-
|
|
7
|
+
import { InlineChatController } from '@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
8
8
|
import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
9
9
|
import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
10
10
|
import { CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
11
11
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
12
|
-
import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-
|
|
13
|
-
import { NotebookMultiTextDiffEditor } from '@codingame/monaco-vscode-
|
|
12
|
+
import { NotebookTextDiffEditor } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor';
|
|
13
|
+
import { NotebookMultiTextDiffEditor } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor';
|
|
14
14
|
|
|
15
15
|
let InlineChatNotebookContribution = class InlineChatNotebookContribution {
|
|
16
16
|
constructor(sessionService, editorService, notebookEditorService) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { CellDiffInfo } from "@codingame/monaco-vscode-
|
|
3
|
-
import { INotebookEditor } from "@codingame/monaco-vscode-
|
|
2
|
+
import { CellDiffInfo } from "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel";
|
|
3
|
+
import { INotebookEditor } from "@codingame/monaco-vscode-324f9a6e-6231-5bfc-af17-e147abd2dfd2-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
4
4
|
export declare class NotebookModifiedCellDecorator extends Disposable {
|
|
5
5
|
private readonly notebookEditor;
|
|
6
6
|
private readonly decorators;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { NotebookOverviewRulerLane } from '@codingame/monaco-vscode-
|
|
4
|
-
import { overviewRulerModifiedForeground } from '@codingame/monaco-vscode-
|
|
3
|
+
import { NotebookOverviewRulerLane } from '@codingame/monaco-vscode-324f9a6e-6231-5bfc-af17-e147abd2dfd2-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
4
|
+
import { overviewRulerModifiedForeground } from '@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
5
5
|
|
|
6
6
|
class NotebookModifiedCellDecorator extends Disposable {
|
|
7
7
|
constructor(notebookEditor) {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { IWorkspace } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
|
|
2
2
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
3
|
-
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
4
|
-
export declare function isChatTransferredWorkspace(workspace: IWorkspace, storageService: IStorageService): boolean;
|
|
5
3
|
export declare function areWorkspaceFoldersEmpty(workspace: IWorkspace, fileService: IFileService): Promise<boolean>;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
3
|
-
import { StorageScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
4
2
|
|
|
5
|
-
function isChatTransferredWorkspace(workspace, storageService) {
|
|
6
|
-
const workspaceUri = workspace.folders[0]?.uri;
|
|
7
|
-
if (!workspaceUri) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
const chatWorkspaceTransfer = storageService.getObject('chat.workspaceTransfer', StorageScope.PROFILE, []);
|
|
11
|
-
const toWorkspace = ( chatWorkspaceTransfer.map((item) => {
|
|
12
|
-
return { toWorkspace: ( URI.from(item.toWorkspace)) };
|
|
13
|
-
}));
|
|
14
|
-
return ( toWorkspace.some(item => ( item.toWorkspace.toString()) === ( workspaceUri.toString())));
|
|
15
|
-
}
|
|
16
3
|
async function areWorkspaceFoldersEmpty(workspace, fileService) {
|
|
17
4
|
for (const folder of workspace.folders) {
|
|
18
5
|
const folderStat = await fileService.resolve(folder.uri);
|
|
@@ -23,4 +10,4 @@ async function areWorkspaceFoldersEmpty(workspace, fileService) {
|
|
|
23
10
|
return true;
|
|
24
11
|
}
|
|
25
12
|
|
|
26
|
-
export { areWorkspaceFoldersEmpty
|
|
13
|
+
export { areWorkspaceFoldersEmpty };
|
|
@@ -1,10 +0,0 @@
|
|
|
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/askToSelectPrompt.js";
|
|
4
|
-
export declare const ATTACH_PROMPT_ACTION_ID = "workbench.action.chat.attach.prompt";
|
|
5
|
-
export interface IChatAttachPromptActionOptions extends Pick<ISelectPromptOptions, "resource" | "widget"> {
|
|
6
|
-
}
|
|
7
|
-
export declare class AttachPromptAction extends Action2 {
|
|
8
|
-
constructor();
|
|
9
|
-
run(accessor: ServicesAccessor, options: IChatAttachPromptActionOptions): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
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 { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
5
|
-
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
6
|
-
import { Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
7
|
-
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service';
|
|
8
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
9
|
-
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
10
|
-
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
11
|
-
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
12
|
-
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
13
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
14
|
-
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
15
|
-
import { askToSelectPrompt } from './dialogs/askToSelectPrompt/askToSelectPrompt.js';
|
|
16
|
-
|
|
17
|
-
const ATTACH_PROMPT_ACTION_ID = 'workbench.action.chat.attach.prompt';
|
|
18
|
-
class AttachPromptAction extends Action2 {
|
|
19
|
-
constructor() {
|
|
20
|
-
super({
|
|
21
|
-
id: ATTACH_PROMPT_ACTION_ID,
|
|
22
|
-
title: ( localize2(4356, "Use Prompt")),
|
|
23
|
-
f1: false,
|
|
24
|
-
precondition: ChatContextKeys.enabled,
|
|
25
|
-
category: CHAT_CATEGORY,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
async run(accessor, options) {
|
|
29
|
-
const fileService = accessor.get(IFileService);
|
|
30
|
-
const chatService = accessor.get(IChatService);
|
|
31
|
-
const labelService = accessor.get(ILabelService);
|
|
32
|
-
const viewsService = accessor.get(IViewsService);
|
|
33
|
-
const openerService = accessor.get(IOpenerService);
|
|
34
|
-
const dialogService = accessor.get(IDialogService);
|
|
35
|
-
const promptsService = accessor.get(IPromptsService);
|
|
36
|
-
const commandService = accessor.get(ICommandService);
|
|
37
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
38
|
-
const promptFiles = await promptsService.listPromptFiles();
|
|
39
|
-
await askToSelectPrompt({
|
|
40
|
-
...options,
|
|
41
|
-
promptFiles,
|
|
42
|
-
chatService,
|
|
43
|
-
fileService,
|
|
44
|
-
viewsService,
|
|
45
|
-
labelService,
|
|
46
|
-
dialogService,
|
|
47
|
-
openerService,
|
|
48
|
-
commandService,
|
|
49
|
-
quickInputService,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { ATTACH_PROMPT_ACTION_ID, AttachPromptAction };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { IChatWidget } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
2
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
-
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
4
|
-
import { IPromptPath } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types";
|
|
5
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.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 { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
10
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
11
|
-
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
12
|
-
export interface ISelectPromptOptions {
|
|
13
|
-
readonly resource?: URI;
|
|
14
|
-
readonly widget?: IChatWidget;
|
|
15
|
-
readonly promptFiles: readonly IPromptPath[];
|
|
16
|
-
readonly fileService: IFileService;
|
|
17
|
-
readonly chatService: IChatService;
|
|
18
|
-
readonly labelService: ILabelService;
|
|
19
|
-
readonly viewsService: IViewsService;
|
|
20
|
-
readonly openerService: IOpenerService;
|
|
21
|
-
readonly dialogService: IDialogService;
|
|
22
|
-
readonly commandService: ICommandService;
|
|
23
|
-
readonly quickInputService: IQuickInputService;
|
|
24
|
-
}
|
|
25
|
-
export declare const askToSelectPrompt: (options: ISelectPromptOptions) => Promise<void>;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DOCS_OPTION } from './constants.js';
|
|
3
|
-
import { attachPrompts } from './utils/attachPrompts.js';
|
|
4
|
-
import { handleButtonClick } from './utils/handleButtonClick.js';
|
|
5
|
-
import { assert } from '@codingame/monaco-vscode-api/vscode/vs/base/common/assert';
|
|
6
|
-
import { createPromptPickItem } from './utils/createPromptPickItem.js';
|
|
7
|
-
import { createPlaceholderText } from './utils/createPlaceholderText.js';
|
|
8
|
-
import { extUri } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
-
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
|
-
|
|
11
|
-
const askToSelectPrompt = async (options) => {
|
|
12
|
-
const { promptFiles, resource, quickInputService, labelService } = options;
|
|
13
|
-
const fileOptions = ( promptFiles.map((promptFile) => {
|
|
14
|
-
return createPromptPickItem(promptFile, labelService);
|
|
15
|
-
}));
|
|
16
|
-
fileOptions.push(DOCS_OPTION);
|
|
17
|
-
let activeItem;
|
|
18
|
-
if (resource) {
|
|
19
|
-
activeItem = fileOptions.find((file) => {
|
|
20
|
-
return extUri.isEqual(file.value, resource);
|
|
21
|
-
});
|
|
22
|
-
if (!activeItem) {
|
|
23
|
-
activeItem = createPromptPickItem({
|
|
24
|
-
uri: resource,
|
|
25
|
-
type: 'local',
|
|
26
|
-
}, labelService);
|
|
27
|
-
fileOptions.push(activeItem);
|
|
28
|
-
}
|
|
29
|
-
fileOptions.sort((file1, file2) => {
|
|
30
|
-
if (extUri.isEqual(file1.value, resource)) {
|
|
31
|
-
return -1;
|
|
32
|
-
}
|
|
33
|
-
if (extUri.isEqual(file2.value, resource)) {
|
|
34
|
-
return 1;
|
|
35
|
-
}
|
|
36
|
-
return 0;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
if (!activeItem) {
|
|
40
|
-
activeItem = fileOptions[0];
|
|
41
|
-
}
|
|
42
|
-
const quickPick = quickInputService.createQuickPick();
|
|
43
|
-
quickPick.activeItems = activeItem ? [activeItem] : [];
|
|
44
|
-
quickPick.placeholder = createPlaceholderText(options);
|
|
45
|
-
quickPick.canAcceptInBackground = true;
|
|
46
|
-
quickPick.matchOnDescription = true;
|
|
47
|
-
quickPick.items = fileOptions;
|
|
48
|
-
const { openerService } = options;
|
|
49
|
-
return await ( new Promise(resolve => {
|
|
50
|
-
const disposables = ( new DisposableStore());
|
|
51
|
-
let lastActiveWidget = options.widget;
|
|
52
|
-
disposables.add({
|
|
53
|
-
dispose() {
|
|
54
|
-
quickPick.dispose();
|
|
55
|
-
resolve();
|
|
56
|
-
lastActiveWidget?.focusInput();
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
disposables.add(quickPick.onDidAccept(async (event) => {
|
|
60
|
-
const { selectedItems } = quickPick;
|
|
61
|
-
assert(selectedItems.length === 1, `Only one item can be accepted, got '${selectedItems.length}'.`);
|
|
62
|
-
const selectedOption = selectedItems[0];
|
|
63
|
-
const docsSelected = (selectedOption === DOCS_OPTION);
|
|
64
|
-
if (docsSelected) {
|
|
65
|
-
await openerService.open(selectedOption.value);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
lastActiveWidget = await attachPrompts(selectedItems, options, quickPick.keyMods);
|
|
69
|
-
if (!event.inBackground) {
|
|
70
|
-
disposables.dispose();
|
|
71
|
-
}
|
|
72
|
-
}));
|
|
73
|
-
disposables.add(quickPick.onDidTriggerItemButton(handleButtonClick.bind(null, { quickPick, ...options })));
|
|
74
|
-
disposables.add(quickPick.onDidHide(disposables.dispose.bind(disposables)));
|
|
75
|
-
quickPick.show();
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export { askToSelectPrompt };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WithUriValue } from "@codingame/monaco-vscode-api/vscode/vs/base/common/types";
|
|
2
|
-
import { IQuickInputButton, IQuickPickItem } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
|
|
3
|
-
export declare const SUPER_KEY_NAME: string;
|
|
4
|
-
export declare const ALT_KEY_NAME: string;
|
|
5
|
-
export declare const DOCS_OPTION: WithUriValue<IQuickPickItem>;
|
|
6
|
-
export declare const EDIT_BUTTON: IQuickInputButton;
|
|
7
|
-
export declare const DELETE_BUTTON: IQuickInputButton;
|
|
@@ -1,27 +0,0 @@
|
|
|
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 { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
5
|
-
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
6
|
-
import { DOCUMENTATION_URL } from '../../../../../common/promptSyntax/constants.js';
|
|
7
|
-
import { isWindows, isLinux } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
8
|
-
|
|
9
|
-
const SUPER_KEY_NAME = (isWindows || isLinux) ? 'Ctrl' : '⌘';
|
|
10
|
-
const ALT_KEY_NAME = (isWindows || isLinux) ? 'Alt' : '⌥';
|
|
11
|
-
const DOCS_OPTION = ( Object.freeze({
|
|
12
|
-
type: 'item',
|
|
13
|
-
label: ( localize(4357, 'Learn how to create reusable prompts')),
|
|
14
|
-
description: DOCUMENTATION_URL,
|
|
15
|
-
tooltip: DOCUMENTATION_URL,
|
|
16
|
-
value: ( URI.parse(DOCUMENTATION_URL)),
|
|
17
|
-
}));
|
|
18
|
-
const EDIT_BUTTON = ( Object.freeze({
|
|
19
|
-
tooltip: ( localize(4358, "edit ({0}-key + enter)", SUPER_KEY_NAME)),
|
|
20
|
-
iconClass: ThemeIcon.asClassName(Codicon.edit),
|
|
21
|
-
}));
|
|
22
|
-
const DELETE_BUTTON = ( Object.freeze({
|
|
23
|
-
tooltip: ( localize(4359, "delete")),
|
|
24
|
-
iconClass: ThemeIcon.asClassName(Codicon.trash),
|
|
25
|
-
}));
|
|
26
|
-
|
|
27
|
-
export { ALT_KEY_NAME, DELETE_BUTTON, DOCS_OPTION, EDIT_BUTTON, SUPER_KEY_NAME };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ISelectPromptOptions } from "../askToSelectPrompt.js";
|
|
2
|
-
import { IChatWidget } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
3
|
-
import { WithUriValue } from "@codingame/monaco-vscode-api/vscode/vs/base/common/types";
|
|
4
|
-
import { IKeyMods, IQuickPickItem } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
|
|
5
|
-
export declare const attachPrompts: (files: readonly WithUriValue<IQuickPickItem>[], options: ISelectPromptOptions, keyMods: IKeyMods) => Promise<IChatWidget>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { showChatView, showEditsView } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
3
|
-
import { assertDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
4
|
-
import { ACTION_ID_NEW_CHAT, ACTION_ID_NEW_EDIT_SESSION } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatClearActions';
|
|
5
|
-
|
|
6
|
-
const attachPrompts = async (files, options, keyMods) => {
|
|
7
|
-
const widget = await getChatWidgetObject(options, keyMods);
|
|
8
|
-
for (const file of files) {
|
|
9
|
-
widget
|
|
10
|
-
.attachmentModel
|
|
11
|
-
.promptInstructions
|
|
12
|
-
.add(file.value);
|
|
13
|
-
}
|
|
14
|
-
return widget;
|
|
15
|
-
};
|
|
16
|
-
const getChatWidgetObject = async (options, keyMods) => {
|
|
17
|
-
const { widget } = options;
|
|
18
|
-
const { alt, ctrlCmd } = keyMods;
|
|
19
|
-
if (ctrlCmd) {
|
|
20
|
-
return await openNewChat(options, alt);
|
|
21
|
-
}
|
|
22
|
-
if (!widget) {
|
|
23
|
-
return await showExistingChat(options, alt);
|
|
24
|
-
}
|
|
25
|
-
return widget;
|
|
26
|
-
};
|
|
27
|
-
const openNewChat = async (options, edits) => {
|
|
28
|
-
const { commandService, chatService, viewsService } = options;
|
|
29
|
-
if (chatService.unifiedViewEnabled === true) {
|
|
30
|
-
await commandService.executeCommand(ACTION_ID_NEW_CHAT);
|
|
31
|
-
const widget = await showChatView(viewsService);
|
|
32
|
-
assertDefined(widget, 'Chat widget must be defined.');
|
|
33
|
-
return widget;
|
|
34
|
-
}
|
|
35
|
-
(edits === true)
|
|
36
|
-
? await commandService.executeCommand(ACTION_ID_NEW_EDIT_SESSION)
|
|
37
|
-
: await commandService.executeCommand(ACTION_ID_NEW_CHAT);
|
|
38
|
-
const widget = (edits === true)
|
|
39
|
-
? await showEditsView(viewsService)
|
|
40
|
-
: await showChatView(viewsService);
|
|
41
|
-
assertDefined(widget, 'Chat widget must be defined.');
|
|
42
|
-
return widget;
|
|
43
|
-
};
|
|
44
|
-
const showExistingChat = async (options, edits) => {
|
|
45
|
-
const { chatService, viewsService } = options;
|
|
46
|
-
const widget = (edits && (chatService.unifiedViewEnabled === false))
|
|
47
|
-
? await showEditsView(viewsService)
|
|
48
|
-
: await showChatView(viewsService);
|
|
49
|
-
assertDefined(widget, 'Revealed chat widget must be defined.');
|
|
50
|
-
return widget;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export { attachPrompts };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
-
import { SUPER_KEY_NAME, ALT_KEY_NAME } from '../constants.js';
|
|
4
|
-
|
|
5
|
-
const createPlaceholderText = (options) => {
|
|
6
|
-
const { widget, chatService } = options;
|
|
7
|
-
let text = ( localize(4360, 'Select a prompt to use'));
|
|
8
|
-
if (widget === undefined) {
|
|
9
|
-
const superModifierNote = ( localize(4361, '{0}-key to use in new chat', SUPER_KEY_NAME));
|
|
10
|
-
const altOptionModifierNote = ( localize(4362, ' or {0}-key to use in Copilot Edits', ALT_KEY_NAME));
|
|
11
|
-
const openInEditsNote = (chatService.unifiedViewEnabled === true)
|
|
12
|
-
? ''
|
|
13
|
-
: altOptionModifierNote;
|
|
14
|
-
text += ( localize(4363, ' (hold {0}{1})', superModifierNote, openInEditsNote));
|
|
15
|
-
}
|
|
16
|
-
return text;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { createPlaceholderText };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { WithUriValue } from "@codingame/monaco-vscode-api/vscode/vs/base/common/types";
|
|
2
|
-
import { IPromptPath } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types";
|
|
3
|
-
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
4
|
-
import { IQuickPickItem } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
|
|
5
|
-
export declare const createPromptPickItem: (promptFile: IPromptPath, labelService: ILabelService) => WithUriValue<IQuickPickItem>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
-
import { EDIT_BUTTON, DELETE_BUTTON } from '../constants.js';
|
|
4
|
-
import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
5
|
-
import { getCleanPromptName } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/constants';
|
|
6
|
-
|
|
7
|
-
const createPromptPickItem = (promptFile, labelService) => {
|
|
8
|
-
const { uri, type } = promptFile;
|
|
9
|
-
const fileWithoutExtension = getCleanPromptName(uri);
|
|
10
|
-
const description = (type === 'user')
|
|
11
|
-
? ( localize(4364, 'User prompt'))
|
|
12
|
-
: labelService.getUriLabel(dirname(uri), { relative: true });
|
|
13
|
-
const tooltip = (type === 'user')
|
|
14
|
-
? description
|
|
15
|
-
: uri.fsPath;
|
|
16
|
-
return {
|
|
17
|
-
id: ( uri.toString()),
|
|
18
|
-
type: 'item',
|
|
19
|
-
label: fileWithoutExtension,
|
|
20
|
-
description,
|
|
21
|
-
tooltip,
|
|
22
|
-
value: uri,
|
|
23
|
-
buttons: [EDIT_BUTTON, DELETE_BUTTON],
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { createPromptPickItem };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WithUriValue } from "@codingame/monaco-vscode-api/vscode/vs/base/common/types";
|
|
2
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
3
|
-
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
4
|
-
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
5
|
-
import { IQuickPick, IQuickPickItem, IQuickPickItemButtonEvent } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
|
|
6
|
-
interface IHandleButtonClickOptions {
|
|
7
|
-
quickPick: IQuickPick<WithUriValue<IQuickPickItem>>;
|
|
8
|
-
fileService: IFileService;
|
|
9
|
-
openerService: IOpenerService;
|
|
10
|
-
dialogService: IDialogService;
|
|
11
|
-
}
|
|
12
|
-
export declare function handleButtonClick(options: IHandleButtonClickOptions, context: IQuickPickItemButtonEvent<WithUriValue<IQuickPickItem>>): Promise<boolean | undefined>;
|
|
13
|
-
export {};
|