@codingame/monaco-vscode-chat-service-override 23.3.0 → 24.1.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 +13 -10
- package/package.json +5 -41
- package/vscode/src/vs/platform/domWidget/browser/domWidget.d.ts +52 -0
- package/vscode/src/vs/platform/domWidget/browser/domWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +61 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +152 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +37 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +9 -9
- 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 +3 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +7 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +12 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +21 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +4 -4
- 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/chatSessionActions.d.ts +6 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +44 -208
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +23 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +358 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +222 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +241 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.d.ts +11 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +67 -230
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +65 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +186 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsview.css +2 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +115 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +389 -166
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextService.js +63 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimeline.d.ts +7 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +14 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +173 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +66 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +32 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +9 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +8 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +15 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +66 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +6 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +15 -4
- 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 +3 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +30 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +13 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +23 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +20 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +47 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +270 -143
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +310 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +12 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +35 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.d.ts +1 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +22 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.d.ts +18 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +80 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.d.ts +2 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +48 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.d.ts +16 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +257 -77
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSetup.d.ts → chatSetup/chatSetupContributions.d.ts} +4 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +622 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +359 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +89 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +667 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +260 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/chatSetup.css +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.js → chatStatus/chatStatusDashboard.js} +193 -325
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatus.d.ts → chatStatus/chatStatusEntry.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +190 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.d.ts → chatStatus/chatStatusItemService.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatStatus/media}/chatStatus.css +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusWidget.js +108 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTerminalOutputAccessibleView.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +57 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +478 -146
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewTitleControl.js +204 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidgetService.js +187 -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 +108 -62
- 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/languageModelToolsConfirmationService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +37 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +37 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +232 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatusWidget.css +57 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewPane.css +142 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewTitleControl.css +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +51 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +19 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.d.ts +49 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModelStore.js +100 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +3 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +41 -15
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +208 -162
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceTelemetry.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +15 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +61 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatTodoListService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +60 -43
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +27 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +37 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +120 -87
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +49 -42
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +293 -187
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +43 -9
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +48 -29
- 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 +8 -13
- 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/inlineChatActions.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +36 -41
- 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/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminal.chat.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +142 -38
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +3 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +19 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +78 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.d.ts +7 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +26 -44
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +9 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +23 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +4 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +26 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +32 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +15 -29
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +38 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +32 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +5 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +4 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +128 -62
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +12 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +68 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +20 -22
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +13 -12
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +20 -19
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +72 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +5 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.d.ts +0 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +0 -154
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionTracker.js +0 -135
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +0 -216
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +0 -1617
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.d.ts +0 -44
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +0 -313
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-dark.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/apple-light.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/github.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatSetup/media}/google.svg +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatStatusItemService.js → chatStatus/chatStatusItemService.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
4
|
-
import { Disposable, MutableDisposable
|
|
4
|
+
import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
6
|
import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
7
7
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
@@ -23,14 +23,18 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quic
|
|
|
23
23
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
24
24
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
25
25
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
26
|
-
import { chatSlashCommandBackground, chatSlashCommandForeground } from '@codingame/monaco-vscode-
|
|
27
|
-
import { ChatRequestTextPart, ChatRequestSlashPromptPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, ChatRequestToolPart, ChatRequestToolSetPart, ChatRequestDynamicVariablePart, chatAgentLeader, chatSubcommandLeader } from '@codingame/monaco-vscode-
|
|
28
|
-
import { ChatRequestParser } from '@codingame/monaco-vscode-
|
|
26
|
+
import { chatSlashCommandBackground, chatSlashCommandForeground } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/common/chatColors';
|
|
27
|
+
import { ChatRequestTextPart, ChatRequestSlashPromptPart, ChatRequestAgentPart, ChatRequestAgentSubcommandPart, ChatRequestSlashCommandPart, ChatRequestToolPart, ChatRequestToolSetPart, ChatRequestDynamicVariablePart, chatAgentLeader, chatSubcommandLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
28
|
+
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
|
|
29
29
|
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
30
|
-
import { ChatWidget } from '@codingame/monaco-vscode-
|
|
31
|
-
import { dynamicVariableDecorationType } from '@codingame/monaco-vscode-
|
|
30
|
+
import { ChatWidget } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
|
|
31
|
+
import { dynamicVariableDecorationType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables';
|
|
32
|
+
import { NativeEditContextRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/controller/editContext/native/nativeEditContextRegistry';
|
|
33
|
+
import { TextAreaEditContextRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry';
|
|
34
|
+
import { ThrottledDelayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
32
35
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
33
36
|
|
|
37
|
+
var InputEditorDecorations_1;
|
|
34
38
|
const decorationDescription = 'chat';
|
|
35
39
|
const placeholderDecorationType = 'chat-session-detail';
|
|
36
40
|
const slashCommandTextDecorationType = 'chat-session-text';
|
|
@@ -41,7 +45,25 @@ function agentAndCommandToKey(agent, subcommand) {
|
|
|
41
45
|
function isWhitespaceOrPromptPart(p) {
|
|
42
46
|
return (p instanceof ChatRequestTextPart && !p.text.trim().length) || (p instanceof ChatRequestSlashPromptPart);
|
|
43
47
|
}
|
|
48
|
+
function exactlyOneSpaceAfterPart(parsedRequest, part) {
|
|
49
|
+
const partIdx = parsedRequest.indexOf(part);
|
|
50
|
+
if (parsedRequest.length > partIdx + 2) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const nextPart = parsedRequest[partIdx + 1];
|
|
54
|
+
return nextPart && nextPart instanceof ChatRequestTextPart && nextPart.text === ' ';
|
|
55
|
+
}
|
|
56
|
+
function getRangeForPlaceholder(part) {
|
|
57
|
+
return {
|
|
58
|
+
startLineNumber: part.editorRange.startLineNumber,
|
|
59
|
+
endLineNumber: part.editorRange.endLineNumber,
|
|
60
|
+
startColumn: part.editorRange.endColumn + 1,
|
|
61
|
+
endColumn: 1000
|
|
62
|
+
};
|
|
63
|
+
}
|
|
44
64
|
let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
65
|
+
static { InputEditorDecorations_1 = this; }
|
|
66
|
+
static { this.UPDATE_DELAY = 200; }
|
|
45
67
|
constructor(widget, codeEditorService, themeService, chatAgentService, labelService, promptsService) {
|
|
46
68
|
super();
|
|
47
69
|
this.widget = widget;
|
|
@@ -53,58 +75,54 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
53
75
|
this.id = 'inputEditorDecorations';
|
|
54
76
|
this.previouslyUsedAgents = ( new Set());
|
|
55
77
|
this.viewModelDisposables = this._register(( new MutableDisposable()));
|
|
56
|
-
this.
|
|
78
|
+
this.updateThrottle = this._register(( new ThrottledDelayer(InputEditorDecorations_1.UPDATE_DELAY)));
|
|
57
79
|
this.registeredDecorationTypes();
|
|
58
|
-
this.
|
|
59
|
-
this._register(this.widget.inputEditor.onDidChangeModelContent(() => this.
|
|
60
|
-
this._register(this.widget.onDidChangeParsedInput(() => this.
|
|
80
|
+
this.triggerInputEditorDecorationsUpdate();
|
|
81
|
+
this._register(this.widget.inputEditor.onDidChangeModelContent(() => this.triggerInputEditorDecorationsUpdate()));
|
|
82
|
+
this._register(this.widget.onDidChangeParsedInput(() => this.triggerInputEditorDecorationsUpdate()));
|
|
61
83
|
this._register(this.widget.onDidChangeViewModel(() => {
|
|
62
84
|
this.registerViewModelListeners();
|
|
63
85
|
this.previouslyUsedAgents.clear();
|
|
64
|
-
this.
|
|
86
|
+
this.triggerInputEditorDecorationsUpdate();
|
|
65
87
|
}));
|
|
66
88
|
this._register(this.widget.onDidSubmitAgent((e) => {
|
|
67
89
|
this.previouslyUsedAgents.add(agentAndCommandToKey(e.agent, e.slashCommand?.name));
|
|
68
90
|
}));
|
|
69
|
-
this._register(this.chatAgentService.onDidChangeAgents(() => this.
|
|
70
|
-
this._register(this.promptsService.
|
|
91
|
+
this._register(this.chatAgentService.onDidChangeAgents(() => this.triggerInputEditorDecorationsUpdate()));
|
|
92
|
+
this._register(this.promptsService.onDidChangeSlashCommands(() => this.triggerInputEditorDecorationsUpdate()));
|
|
71
93
|
this._register(autorun(reader => {
|
|
72
94
|
const currentMode = this.widget.input.currentModeObs.read(reader);
|
|
73
95
|
if (currentMode) {
|
|
74
96
|
currentMode.description.read(reader);
|
|
75
97
|
}
|
|
76
|
-
this.
|
|
98
|
+
this.triggerInputEditorDecorationsUpdate();
|
|
77
99
|
}));
|
|
78
100
|
this.registerViewModelListeners();
|
|
79
101
|
}
|
|
80
102
|
registerViewModelListeners() {
|
|
81
103
|
this.viewModelDisposables.value = this.widget.viewModel?.onDidChange(e => {
|
|
82
104
|
if (e?.kind === 'changePlaceholder' || e?.kind === 'initialize') {
|
|
83
|
-
this.
|
|
105
|
+
this.triggerInputEditorDecorationsUpdate();
|
|
84
106
|
}
|
|
85
107
|
});
|
|
86
108
|
}
|
|
87
109
|
registeredDecorationTypes() {
|
|
88
|
-
this.codeEditorService.registerDecorationType(decorationDescription,
|
|
110
|
+
this._register(this.codeEditorService.registerDecorationType(decorationDescription, placeholderDecorationType, {}));
|
|
111
|
+
this._register(this.codeEditorService.registerDecorationType(decorationDescription, slashCommandTextDecorationType, {
|
|
89
112
|
color: themeColorFromId(chatSlashCommandForeground),
|
|
90
113
|
backgroundColor: themeColorFromId(chatSlashCommandBackground),
|
|
91
114
|
borderRadius: '3px'
|
|
92
|
-
});
|
|
93
|
-
this.codeEditorService.registerDecorationType(decorationDescription, variableTextDecorationType, {
|
|
115
|
+
}));
|
|
116
|
+
this._register(this.codeEditorService.registerDecorationType(decorationDescription, variableTextDecorationType, {
|
|
94
117
|
color: themeColorFromId(chatSlashCommandForeground),
|
|
95
118
|
backgroundColor: themeColorFromId(chatSlashCommandBackground),
|
|
96
119
|
borderRadius: '3px'
|
|
97
|
-
});
|
|
98
|
-
this.codeEditorService.registerDecorationType(decorationDescription, dynamicVariableDecorationType, {
|
|
120
|
+
}));
|
|
121
|
+
this._register(this.codeEditorService.registerDecorationType(decorationDescription, dynamicVariableDecorationType, {
|
|
99
122
|
color: themeColorFromId(chatSlashCommandForeground),
|
|
100
123
|
backgroundColor: themeColorFromId(chatSlashCommandBackground),
|
|
101
124
|
borderRadius: '3px',
|
|
102
125
|
rangeBehavior: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges
|
|
103
|
-
});
|
|
104
|
-
this._register(toDisposable(() => {
|
|
105
|
-
this.codeEditorService.removeDecorationType(variableTextDecorationType);
|
|
106
|
-
this.codeEditorService.removeDecorationType(dynamicVariableDecorationType);
|
|
107
|
-
this.codeEditorService.removeDecorationType(slashCommandTextDecorationType);
|
|
108
126
|
}));
|
|
109
127
|
}
|
|
110
128
|
getPlaceholderColor() {
|
|
@@ -112,15 +130,21 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
112
130
|
const transparentForeground = theme.getColor(inputPlaceholderForeground);
|
|
113
131
|
return transparentForeground?.toString();
|
|
114
132
|
}
|
|
115
|
-
|
|
133
|
+
triggerInputEditorDecorationsUpdate() {
|
|
134
|
+
this.updateInputPlaceholderDecoration();
|
|
135
|
+
this.updateThrottle.trigger(token => this.updateAsyncInputEditorDecorations(token));
|
|
136
|
+
}
|
|
137
|
+
updateInputPlaceholderDecoration() {
|
|
116
138
|
const inputValue = this.widget.inputEditor.getValue();
|
|
117
139
|
const viewModel = this.widget.viewModel;
|
|
118
140
|
if (!viewModel) {
|
|
141
|
+
this.updateAriaPlaceholder(undefined);
|
|
119
142
|
return;
|
|
120
143
|
}
|
|
121
144
|
if (!inputValue) {
|
|
122
145
|
const mode = this.widget.input.currentModeObs.get();
|
|
123
146
|
const placeholder = mode.argumentHint?.get() ?? mode.description.get() ?? '';
|
|
147
|
+
const displayPlaceholder = viewModel.inputPlaceholder || placeholder;
|
|
124
148
|
const decoration = [
|
|
125
149
|
{
|
|
126
150
|
range: {
|
|
@@ -131,40 +155,26 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
131
155
|
},
|
|
132
156
|
renderOptions: {
|
|
133
157
|
after: {
|
|
134
|
-
contentText:
|
|
158
|
+
contentText: displayPlaceholder,
|
|
135
159
|
color: this.getPlaceholderColor()
|
|
136
160
|
}
|
|
137
161
|
}
|
|
138
162
|
}
|
|
139
163
|
];
|
|
164
|
+
this.updateAriaPlaceholder(displayPlaceholder || undefined);
|
|
140
165
|
this.widget.inputEditor.setDecorationsByType(decorationDescription, placeholderDecorationType, decoration);
|
|
141
166
|
return;
|
|
142
167
|
}
|
|
168
|
+
this.updateAriaPlaceholder(undefined);
|
|
143
169
|
const parsedRequest = this.widget.parsedInput.parts;
|
|
144
170
|
let placeholderDecoration;
|
|
145
171
|
const agentPart = parsedRequest.find((p) => p instanceof ChatRequestAgentPart);
|
|
146
172
|
const agentSubcommandPart = parsedRequest.find((p) => p instanceof ChatRequestAgentSubcommandPart);
|
|
147
|
-
const slashCommandPart = parsedRequest.find((p) => p instanceof ChatRequestSlashCommandPart);
|
|
148
|
-
const slashPromptPart = parsedRequest.find((p) => p instanceof ChatRequestSlashPromptPart);
|
|
149
|
-
const exactlyOneSpaceAfterPart = (part) => {
|
|
150
|
-
const partIdx = parsedRequest.indexOf(part);
|
|
151
|
-
if (parsedRequest.length > partIdx + 2) {
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
const nextPart = parsedRequest[partIdx + 1];
|
|
155
|
-
return nextPart && nextPart instanceof ChatRequestTextPart && nextPart.text === ' ';
|
|
156
|
-
};
|
|
157
|
-
const getRangeForPlaceholder = (part) => ({
|
|
158
|
-
startLineNumber: part.editorRange.startLineNumber,
|
|
159
|
-
endLineNumber: part.editorRange.endLineNumber,
|
|
160
|
-
startColumn: part.editorRange.endColumn + 1,
|
|
161
|
-
endColumn: 1000
|
|
162
|
-
});
|
|
163
173
|
const onlyAgentAndWhitespace = agentPart && parsedRequest.every(p => p instanceof ChatRequestTextPart && !p.text.trim().length || p instanceof ChatRequestAgentPart);
|
|
164
174
|
if (onlyAgentAndWhitespace) {
|
|
165
175
|
const isFollowupSlashCommand = ( this.previouslyUsedAgents.has(agentAndCommandToKey(agentPart.agent, undefined)));
|
|
166
176
|
const shouldRenderFollowupPlaceholder = isFollowupSlashCommand && agentPart.agent.metadata.followupPlaceholder;
|
|
167
|
-
if (agentPart.agent.description && exactlyOneSpaceAfterPart(agentPart)) {
|
|
177
|
+
if (agentPart.agent.description && exactlyOneSpaceAfterPart(parsedRequest, agentPart)) {
|
|
168
178
|
placeholderDecoration = [{
|
|
169
179
|
range: getRangeForPlaceholder(agentPart),
|
|
170
180
|
renderOptions: {
|
|
@@ -180,7 +190,7 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
180
190
|
if (onlyAgentAndAgentCommandAndWhitespace) {
|
|
181
191
|
const isFollowupSlashCommand = ( this.previouslyUsedAgents.has(agentAndCommandToKey(agentPart.agent, agentSubcommandPart.command.name)));
|
|
182
192
|
const shouldRenderFollowupPlaceholder = isFollowupSlashCommand && agentSubcommandPart.command.followupPlaceholder;
|
|
183
|
-
if (agentSubcommandPart?.command.description && exactlyOneSpaceAfterPart(agentSubcommandPart)) {
|
|
193
|
+
if (agentSubcommandPart?.command.description && exactlyOneSpaceAfterPart(parsedRequest, agentSubcommandPart)) {
|
|
184
194
|
placeholderDecoration = [{
|
|
185
195
|
range: getRangeForPlaceholder(agentSubcommandPart),
|
|
186
196
|
renderOptions: {
|
|
@@ -194,7 +204,7 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
194
204
|
}
|
|
195
205
|
const onlyAgentCommandAndWhitespace = agentSubcommandPart && parsedRequest.every(p => p instanceof ChatRequestTextPart && !p.text.trim().length || p instanceof ChatRequestAgentSubcommandPart);
|
|
196
206
|
if (onlyAgentCommandAndWhitespace) {
|
|
197
|
-
if (agentSubcommandPart?.command.description && exactlyOneSpaceAfterPart(agentSubcommandPart)) {
|
|
207
|
+
if (agentSubcommandPart?.command.description && exactlyOneSpaceAfterPart(parsedRequest, agentSubcommandPart)) {
|
|
198
208
|
placeholderDecoration = [{
|
|
199
209
|
range: getRangeForPlaceholder(agentSubcommandPart),
|
|
200
210
|
renderOptions: {
|
|
@@ -206,23 +216,35 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
206
216
|
}];
|
|
207
217
|
}
|
|
208
218
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
this.widget.inputEditor.setDecorationsByType(decorationDescription, placeholderDecorationType, placeholderDecoration ?? []);
|
|
220
|
+
}
|
|
221
|
+
async updateAsyncInputEditorDecorations(token) {
|
|
222
|
+
const parsedRequest = this.widget.parsedInput.parts;
|
|
223
|
+
const agentPart = parsedRequest.find((p) => p instanceof ChatRequestAgentPart);
|
|
224
|
+
const agentSubcommandPart = parsedRequest.find((p) => p instanceof ChatRequestAgentSubcommandPart);
|
|
225
|
+
const slashCommandPart = parsedRequest.find((p) => p instanceof ChatRequestSlashCommandPart);
|
|
226
|
+
const slashPromptPart = parsedRequest.find((p) => p instanceof ChatRequestSlashPromptPart);
|
|
227
|
+
const promptSlashCommand = slashPromptPart ? await this.promptsService.resolvePromptSlashCommand(slashPromptPart.name, token) : undefined;
|
|
228
|
+
if (token.isCancellationRequested) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
if (slashPromptPart && promptSlashCommand) {
|
|
232
|
+
const onlyPromptCommandAndWhitespace = slashPromptPart && parsedRequest.every(isWhitespaceOrPromptPart);
|
|
233
|
+
if (onlyPromptCommandAndWhitespace && exactlyOneSpaceAfterPart(parsedRequest, slashPromptPart) && promptSlashCommand) {
|
|
234
|
+
const description = promptSlashCommand.argumentHint ?? promptSlashCommand.description;
|
|
235
|
+
if (description) {
|
|
236
|
+
this.widget.inputEditor.setDecorationsByType(decorationDescription, placeholderDecorationType, [{
|
|
237
|
+
range: getRangeForPlaceholder(slashPromptPart),
|
|
238
|
+
renderOptions: {
|
|
239
|
+
after: {
|
|
240
|
+
contentText: description,
|
|
241
|
+
color: this.getPlaceholderColor(),
|
|
242
|
+
}
|
|
220
243
|
}
|
|
221
|
-
}
|
|
222
|
-
|
|
244
|
+
}]);
|
|
245
|
+
}
|
|
223
246
|
}
|
|
224
247
|
}
|
|
225
|
-
this.widget.inputEditor.setDecorationsByType(decorationDescription, placeholderDecorationType, placeholderDecoration ?? []);
|
|
226
248
|
const textDecorations = [];
|
|
227
249
|
if (agentPart) {
|
|
228
250
|
textDecorations.push({ range: agentPart.editorRange });
|
|
@@ -233,7 +255,7 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
233
255
|
if (slashCommandPart) {
|
|
234
256
|
textDecorations.push({ range: slashCommandPart.editorRange });
|
|
235
257
|
}
|
|
236
|
-
if (slashPromptPart) {
|
|
258
|
+
if (slashPromptPart && promptSlashCommand) {
|
|
237
259
|
textDecorations.push({ range: slashPromptPart.editorRange });
|
|
238
260
|
}
|
|
239
261
|
this.widget.inputEditor.setDecorationsByType(decorationDescription, slashCommandTextDecorationType, textDecorations);
|
|
@@ -251,8 +273,32 @@ let InputEditorDecorations = class InputEditorDecorations extends Disposable {
|
|
|
251
273
|
}
|
|
252
274
|
this.widget.inputEditor.setDecorationsByType(decorationDescription, variableTextDecorationType, varDecorations);
|
|
253
275
|
}
|
|
276
|
+
updateAriaPlaceholder(value) {
|
|
277
|
+
const nativeEditContext = NativeEditContextRegistry.get(this.widget.inputEditor.getId());
|
|
278
|
+
if (nativeEditContext) {
|
|
279
|
+
const domNode = nativeEditContext.domNode.domNode;
|
|
280
|
+
if (value && value.trim().length) {
|
|
281
|
+
domNode.setAttribute('aria-placeholder', value);
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
domNode.removeAttribute('aria-placeholder');
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
const textAreaEditContext = TextAreaEditContextRegistry.get(this.widget.inputEditor.getId());
|
|
289
|
+
if (textAreaEditContext) {
|
|
290
|
+
const textArea = textAreaEditContext.textArea.domNode;
|
|
291
|
+
if (value && value.trim().length) {
|
|
292
|
+
textArea.setAttribute('aria-placeholder', value);
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
textArea.removeAttribute('aria-placeholder');
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
254
300
|
};
|
|
255
|
-
InputEditorDecorations = ( __decorate([
|
|
301
|
+
InputEditorDecorations = InputEditorDecorations_1 = ( __decorate([
|
|
256
302
|
( __param(1, ICodeEditorService)),
|
|
257
303
|
( __param(2, IThemeService)),
|
|
258
304
|
( __param(3, IChatAgentService)),
|
|
@@ -5,7 +5,7 @@ import { HoverAnchor, IEditorHoverParticipant, IEditorHoverRenderContext, IHover
|
|
|
5
5
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
6
6
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
7
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
8
|
-
import { IChatAgentData } from "@codingame/monaco-vscode-
|
|
8
|
+
import { IChatAgentData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents";
|
|
9
9
|
export declare class ChatAgentHoverParticipant implements IEditorHoverParticipant<ChatAgentHoverPart> {
|
|
10
10
|
private readonly editor;
|
|
11
11
|
private readonly instantiationService;
|
|
@@ -6,9 +6,9 @@ import { RenderedHoverParts, HoverAnchorType, HoverParticipantRegistry } from '@
|
|
|
6
6
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
7
7
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
9
|
-
import { ChatAgentHover, getChatAgentHoverOptions } from '@codingame/monaco-vscode-
|
|
9
|
+
import { ChatAgentHover, getChatAgentHoverOptions } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/chatAgentHover';
|
|
10
10
|
import { ChatEditorHoverWrapper } from './editorHoverWrapper.js';
|
|
11
|
-
import { extractAgentAndCommand } from '@codingame/monaco-vscode-
|
|
11
|
+
import { extractAgentAndCommand } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
12
12
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
13
13
|
|
|
14
14
|
let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
@@ -58,7 +58,7 @@ let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
|
58
58
|
return ( new RenderedHoverParts([renderedHoverPart]));
|
|
59
59
|
}
|
|
60
60
|
getAccessibleContent(hoverPart) {
|
|
61
|
-
return localize(
|
|
61
|
+
return localize(5694, 'There is a chat agent hover part here.');
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
ChatAgentHoverParticipant = ( __decorate([
|
package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class LanguageModelToolsConfirmationService extends Disposable im
|
|
|
20
20
|
getPreConfirmActions(ref: ILanguageModelToolConfirmationRef): ILanguageModelToolConfirmationActions[];
|
|
21
21
|
getPostConfirmActions(ref: ILanguageModelToolConfirmationRef): ILanguageModelToolConfirmationActions[];
|
|
22
22
|
registerConfirmationContribution(toolName: string, contribution: ILanguageModelToolConfirmationContribution): IDisposable;
|
|
23
|
-
manageConfirmationPreferences(tools:
|
|
23
|
+
manageConfirmationPreferences(tools: readonly IToolData[], options?: {
|
|
24
24
|
defaultScope?: "workspace" | "profile" | "session";
|
|
25
25
|
}): void;
|
|
26
26
|
resetToolAutoConfirmation(): void;
|
package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js
CHANGED
|
@@ -24,8 +24,8 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quic
|
|
|
24
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
25
25
|
import { ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
26
26
|
|
|
27
|
-
const RUN_WITHOUT_APPROVAL = ( localize(
|
|
28
|
-
const CONTINUE_WITHOUT_REVIEWING_RESULTS = ( localize(
|
|
27
|
+
const RUN_WITHOUT_APPROVAL = ( localize(5697, "without approval"));
|
|
28
|
+
const CONTINUE_WITHOUT_REVIEWING_RESULTS = ( localize(5698, "without reviewing result"));
|
|
29
29
|
class GenericConfirmStore extends Disposable {
|
|
30
30
|
constructor(_storageKey, _instantiationService) {
|
|
31
31
|
super();
|
|
@@ -222,23 +222,23 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
222
222
|
return actions;
|
|
223
223
|
}
|
|
224
224
|
actions.push({
|
|
225
|
-
label: ( localize(
|
|
226
|
-
detail: ( localize(
|
|
225
|
+
label: ( localize(5699, 'Allow in this Session')),
|
|
226
|
+
detail: ( localize(5700, 'Allow this tool to run in this session without confirmation.')),
|
|
227
227
|
divider: !!actions.length,
|
|
228
228
|
select: async () => {
|
|
229
229
|
this._preExecutionToolConfirmStore.setAutoConfirmation(ref.toolId, 'session');
|
|
230
230
|
return true;
|
|
231
231
|
}
|
|
232
232
|
}, {
|
|
233
|
-
label: ( localize(
|
|
234
|
-
detail: ( localize(
|
|
233
|
+
label: ( localize(5701, 'Allow in this Workspace')),
|
|
234
|
+
detail: ( localize(5702, 'Allow this tool to run in this workspace without confirmation.')),
|
|
235
235
|
select: async () => {
|
|
236
236
|
this._preExecutionToolConfirmStore.setAutoConfirmation(ref.toolId, 'workspace');
|
|
237
237
|
return true;
|
|
238
238
|
}
|
|
239
239
|
}, {
|
|
240
|
-
label: ( localize(
|
|
241
|
-
detail: ( localize(
|
|
240
|
+
label: ( localize(5703, 'Always Allow')),
|
|
241
|
+
detail: ( localize(5704, 'Always allow this tool to run without confirmation.')),
|
|
242
242
|
select: async () => {
|
|
243
243
|
this._preExecutionToolConfirmStore.setAutoConfirmation(ref.toolId, 'profile');
|
|
244
244
|
return true;
|
|
@@ -247,9 +247,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
247
247
|
if (ref.source.type === 'mcp') {
|
|
248
248
|
const { serverLabel, definitionId } = ref.source;
|
|
249
249
|
actions.push({
|
|
250
|
-
label: ( localize(
|
|
250
|
+
label: ( localize(5705, 'Allow Tools from {0} in this Session', serverLabel)),
|
|
251
251
|
detail: ( localize(
|
|
252
|
-
|
|
252
|
+
5706,
|
|
253
253
|
'Allow all tools from this server to run in this session without confirmation.'
|
|
254
254
|
)),
|
|
255
255
|
divider: true,
|
|
@@ -258,9 +258,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
258
258
|
return true;
|
|
259
259
|
}
|
|
260
260
|
}, {
|
|
261
|
-
label: ( localize(
|
|
261
|
+
label: ( localize(5707, 'Allow Tools from {0} in this Workspace', serverLabel)),
|
|
262
262
|
detail: ( localize(
|
|
263
|
-
|
|
263
|
+
5708,
|
|
264
264
|
'Allow all tools from this server to run in this workspace without confirmation.'
|
|
265
265
|
)),
|
|
266
266
|
select: async () => {
|
|
@@ -268,9 +268,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
268
268
|
return true;
|
|
269
269
|
}
|
|
270
270
|
}, {
|
|
271
|
-
label: ( localize(
|
|
271
|
+
label: ( localize(5709, 'Always Allow Tools from {0}', serverLabel)),
|
|
272
272
|
detail: ( localize(
|
|
273
|
-
|
|
273
|
+
5710,
|
|
274
274
|
'Always allow all tools from this server to run without confirmation.'
|
|
275
275
|
)),
|
|
276
276
|
select: async () => {
|
|
@@ -291,9 +291,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
291
291
|
return actions;
|
|
292
292
|
}
|
|
293
293
|
actions.push({
|
|
294
|
-
label: ( localize(
|
|
294
|
+
label: ( localize(5711, 'Allow Without Review in this Session')),
|
|
295
295
|
detail: ( localize(
|
|
296
|
-
|
|
296
|
+
5712,
|
|
297
297
|
'Allow results from this tool to be sent without confirmation in this session.'
|
|
298
298
|
)),
|
|
299
299
|
divider: !!actions.length,
|
|
@@ -302,9 +302,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
302
302
|
return true;
|
|
303
303
|
}
|
|
304
304
|
}, {
|
|
305
|
-
label: ( localize(
|
|
305
|
+
label: ( localize(5713, 'Allow Without Review in this Workspace')),
|
|
306
306
|
detail: ( localize(
|
|
307
|
-
|
|
307
|
+
5714,
|
|
308
308
|
'Allow results from this tool to be sent without confirmation in this workspace.'
|
|
309
309
|
)),
|
|
310
310
|
select: async () => {
|
|
@@ -312,9 +312,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
312
312
|
return true;
|
|
313
313
|
}
|
|
314
314
|
}, {
|
|
315
|
-
label: ( localize(
|
|
315
|
+
label: ( localize(5715, 'Always Allow Without Review')),
|
|
316
316
|
detail: ( localize(
|
|
317
|
-
|
|
317
|
+
5716,
|
|
318
318
|
'Always allow results from this tool to be sent without confirmation.'
|
|
319
319
|
)),
|
|
320
320
|
select: async () => {
|
|
@@ -325,9 +325,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
325
325
|
if (ref.source.type === 'mcp') {
|
|
326
326
|
const { serverLabel, definitionId } = ref.source;
|
|
327
327
|
actions.push({
|
|
328
|
-
label: ( localize(
|
|
328
|
+
label: ( localize(5717, 'Allow Tools from {0} Without Review in this Session', serverLabel)),
|
|
329
329
|
detail: ( localize(
|
|
330
|
-
|
|
330
|
+
5718,
|
|
331
331
|
'Allow results from all tools from this server to be sent without confirmation in this session.'
|
|
332
332
|
)),
|
|
333
333
|
divider: true,
|
|
@@ -336,9 +336,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
336
336
|
return true;
|
|
337
337
|
}
|
|
338
338
|
}, {
|
|
339
|
-
label: ( localize(
|
|
339
|
+
label: ( localize(5719, 'Allow Tools from {0} Without Review in this Workspace', serverLabel)),
|
|
340
340
|
detail: ( localize(
|
|
341
|
-
|
|
341
|
+
5720,
|
|
342
342
|
'Allow results from all tools from this server to be sent without confirmation in this workspace.'
|
|
343
343
|
)),
|
|
344
344
|
select: async () => {
|
|
@@ -346,9 +346,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
346
346
|
return true;
|
|
347
347
|
}
|
|
348
348
|
}, {
|
|
349
|
-
label: ( localize(
|
|
349
|
+
label: ( localize(5721, 'Always Allow Tools from {0} Without Review', serverLabel)),
|
|
350
350
|
detail: ( localize(
|
|
351
|
-
|
|
351
|
+
5722,
|
|
352
352
|
'Always allow results from all tools from this server to be sent without confirmation.'
|
|
353
353
|
)),
|
|
354
354
|
select: async () => {
|
|
@@ -482,7 +482,7 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
482
482
|
type: 'server-post',
|
|
483
483
|
serverId,
|
|
484
484
|
iconClass: ThemeIcon.asClassName(Codicon.play),
|
|
485
|
-
label: ( localize(
|
|
485
|
+
label: ( localize(5723, "Continue without reviewing any tool results")),
|
|
486
486
|
checked: serverPostConfirmed
|
|
487
487
|
});
|
|
488
488
|
}
|
|
@@ -491,7 +491,7 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
491
491
|
type: 'server-pre',
|
|
492
492
|
serverId,
|
|
493
493
|
iconClass: ThemeIcon.asClassName(Codicon.play),
|
|
494
|
-
label: ( localize(
|
|
494
|
+
label: ( localize(5724, "Run any tool without approval")),
|
|
495
495
|
checked: serverPreConfirmed
|
|
496
496
|
});
|
|
497
497
|
}
|
|
@@ -595,7 +595,7 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
595
595
|
quickTree.sortByLabel = false;
|
|
596
596
|
if (currentScope !== 'session') {
|
|
597
597
|
const scopeToggle = disposables.add(( new Toggle({
|
|
598
|
-
title: ( localize(
|
|
598
|
+
title: ( localize(5725, "Configure for this workspace only")),
|
|
599
599
|
icon: Codicon.folder,
|
|
600
600
|
isChecked: currentScope === 'workspace',
|
|
601
601
|
inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),
|
|
@@ -611,12 +611,12 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
611
611
|
}
|
|
612
612
|
const updatePlaceholder = () => {
|
|
613
613
|
if (currentScope === 'session') {
|
|
614
|
-
quickTree.placeholder = ( localize(
|
|
614
|
+
quickTree.placeholder = ( localize(5726, "Configure session tool approvals"));
|
|
615
615
|
}
|
|
616
616
|
else {
|
|
617
617
|
quickTree.placeholder = currentScope === 'workspace'
|
|
618
|
-
? ( localize(
|
|
619
|
-
: ( localize(
|
|
618
|
+
? ( localize(5727, "Configure workspace tool approvals"))
|
|
619
|
+
: ( localize(5728, "Configure global tool approvals"));
|
|
620
620
|
}
|
|
621
621
|
};
|
|
622
622
|
updatePlaceholder();
|
|
@@ -663,6 +663,11 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
663
663
|
}
|
|
664
664
|
}));
|
|
665
665
|
disposables.add(quickTree.onDidAccept(() => {
|
|
666
|
+
for (const item of quickTree.activeItems) {
|
|
667
|
+
if (item.type === 'manage') {
|
|
668
|
+
item.onDidOpen?.();
|
|
669
|
+
}
|
|
670
|
+
}
|
|
666
671
|
quickTree.hide();
|
|
667
672
|
}));
|
|
668
673
|
disposables.add(quickTree.onDidHide(() => {
|