@codingame/monaco-vscode-chat-service-override 28.4.0 → 29.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 +18 -12
- package/package.json +5 -5
- package/vscode/src/vs/platform/agentHost/common/agentService.d.ts +300 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.js +31 -0
- package/vscode/src/vs/platform/agentHost/common/agentService.service.d.ts +84 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/action-origin.generated.d.ts +16 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +488 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/commands.d.ts +424 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/errors.d.ts +50 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/messages.d.ts +202 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +114 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +723 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionActions.d.ts +33 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionProtocol.d.ts +40 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +22 -0
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +29 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +59 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +76 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +162 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +167 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +52 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +82 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +97 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +78 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +174 -170
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +118 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +23 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +341 -196
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +79 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.d.ts +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsController.js +22 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +85 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +668 -214
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +306 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +84 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +651 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +31 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +9 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +7 -142
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationGroupHeaderRenderer.js +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.js +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +25 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +297 -123
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +153 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +17 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +111 -171
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +5 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +277 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +31 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +3 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +4 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +18 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +112 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +16 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +41 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +1 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +8 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +13 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +29 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +14 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +79 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +113 -82
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +54 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +103 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +48 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +62 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +21 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +17 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +43 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +194 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +9 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +8 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +81 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +23 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +29 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +19 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +105 -172
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +80 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +56 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.js +70 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +53 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +33 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +362 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +146 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +10 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +33 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +200 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +90 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +21 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +22 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +28 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +20 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +68 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +57 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +21 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +171 -57
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +7 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +206 -35
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +44 -22
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +450 -301
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +34 -20
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +209 -144
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/workspacePluginSettingsService.js +205 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalCustomizations.js +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalSkill.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +191 -159
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +6 -7
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +210 -233
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +183 -193
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatArtifactsService.js +75 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +8 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +97 -35
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatHistoryService.js +67 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +62 -23
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +1 -1
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +23 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +50 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +21 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +124 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +20 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +46 -31
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +74 -37
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +24 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +5 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +66 -64
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +5 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +32 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +390 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +21 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +70 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +61 -51
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +94 -76
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +112 -21
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +0 -53
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +0 -219
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +0 -89
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +0 -251
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +0 -123
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +0 -278
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +0 -76
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +0 -299
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +0 -67
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +0 -263
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +0 -85
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +0 -397
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +0 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +0 -30
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +0 -28
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -190
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -20
package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as $$1, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
2
|
+
import { $ as $$1, append, addDisposableListener, EventType, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
+
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
4
|
+
import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
3
5
|
import { createTrustedTypesPolicy } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/trustedTypes';
|
|
6
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
7
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
8
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
9
|
import { tokenizeToString } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/textToHtmlTokenizer';
|
|
@@ -24,18 +27,55 @@ function tryParseJSON(text) {
|
|
|
24
27
|
};
|
|
25
28
|
}
|
|
26
29
|
}
|
|
30
|
+
async function tokenizeContent(text, languageService) {
|
|
31
|
+
const result = tryParseJSON(text);
|
|
32
|
+
const plainText = result.isJSON ? JSON.stringify(result.parsed, null, 2) : text;
|
|
33
|
+
const language = result.isJSON ? "json" : "markdown";
|
|
34
|
+
const tokenizedHtml = await tokenizeToString(languageService, plainText, language);
|
|
35
|
+
return {
|
|
36
|
+
plainText,
|
|
37
|
+
tokenizedHtml
|
|
38
|
+
};
|
|
39
|
+
}
|
|
27
40
|
function renderSection(
|
|
28
41
|
parent,
|
|
29
42
|
label,
|
|
30
43
|
plainText,
|
|
31
44
|
tokenizedHtml,
|
|
32
45
|
disposables,
|
|
33
|
-
initiallyCollapsed = false
|
|
46
|
+
initiallyCollapsed = false,
|
|
47
|
+
clipboardService,
|
|
48
|
+
scrollable
|
|
34
49
|
) {
|
|
35
50
|
const sectionEl = append(parent, $("div.chat-debug-message-section"));
|
|
36
51
|
const header = append(sectionEl, $("div.chat-debug-message-section-header"));
|
|
37
52
|
const chevron = append(header, $("span.chat-debug-message-section-chevron"));
|
|
38
53
|
append(header, $("span.chat-debug-message-section-title", undefined, label));
|
|
54
|
+
if (clipboardService) {
|
|
55
|
+
const copyBtn = disposables.add(( new Button(header, {
|
|
56
|
+
title: ( localize(5909, "Copy")),
|
|
57
|
+
ariaLabel: ( localize(5909, "Copy")),
|
|
58
|
+
hoverDelegate: getDefaultHoverDelegate("mouse")
|
|
59
|
+
})));
|
|
60
|
+
copyBtn.icon = Codicon.copy;
|
|
61
|
+
copyBtn.element.classList.add("chat-debug-section-copy-btn");
|
|
62
|
+
disposables.add(
|
|
63
|
+
addDisposableListener(copyBtn.element, EventType.MOUSE_ENTER, () => {
|
|
64
|
+
header.classList.add("chat-debug-section-copy-header-passthrough");
|
|
65
|
+
})
|
|
66
|
+
);
|
|
67
|
+
disposables.add(
|
|
68
|
+
addDisposableListener(copyBtn.element, EventType.MOUSE_LEAVE, () => {
|
|
69
|
+
header.classList.remove("chat-debug-section-copy-header-passthrough");
|
|
70
|
+
})
|
|
71
|
+
);
|
|
72
|
+
disposables.add(copyBtn.onDidClick(e => {
|
|
73
|
+
if (e) {
|
|
74
|
+
EventHelper.stop(e, true);
|
|
75
|
+
}
|
|
76
|
+
clipboardService.writeText(plainText);
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
39
79
|
const wrapper = append(sectionEl, $("div.chat-debug-message-section-content-wrapper"));
|
|
40
80
|
const contentEl = append(wrapper, $("pre.chat-debug-message-section-content"));
|
|
41
81
|
contentEl.tabIndex = 0;
|
|
@@ -45,9 +85,9 @@ function renderSection(
|
|
|
45
85
|
} else {
|
|
46
86
|
contentEl.textContent = plainText;
|
|
47
87
|
}
|
|
48
|
-
setupCollapsibleToggle(chevron, header, wrapper, disposables, initiallyCollapsed);
|
|
88
|
+
setupCollapsibleToggle(chevron, header, wrapper, disposables, initiallyCollapsed, scrollable);
|
|
49
89
|
}
|
|
50
|
-
async function renderToolCallContent(content, languageService) {
|
|
90
|
+
async function renderToolCallContent(content, languageService, clipboardService, scrollable) {
|
|
51
91
|
const disposables = ( new DisposableStore());
|
|
52
92
|
const container = $("div.chat-debug-message-content");
|
|
53
93
|
container.tabIndex = 0;
|
|
@@ -57,10 +97,10 @@ async function renderToolCallContent(content, languageService) {
|
|
|
57
97
|
);
|
|
58
98
|
const statusParts = [];
|
|
59
99
|
if (content.result) {
|
|
60
|
-
statusParts.push(content.result === "success" ? ( localize(
|
|
100
|
+
statusParts.push(content.result === "success" ? ( localize(5910, "Success")) : ( localize(5911, "Error")));
|
|
61
101
|
}
|
|
62
102
|
if (content.durationInMillis !== undefined) {
|
|
63
|
-
statusParts.push(( localize(
|
|
103
|
+
statusParts.push(( localize(5912, "{0}ms", content.durationInMillis)));
|
|
64
104
|
}
|
|
65
105
|
if (statusParts.length > 0) {
|
|
66
106
|
append(container, $(
|
|
@@ -71,16 +111,18 @@ async function renderToolCallContent(content, languageService) {
|
|
|
71
111
|
}
|
|
72
112
|
const sectionsContainer = append(container, $("div.chat-debug-message-sections"));
|
|
73
113
|
if (content.input) {
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
114
|
+
const {
|
|
115
|
+
plainText,
|
|
116
|
+
tokenizedHtml
|
|
117
|
+
} = await tokenizeContent(content.input, languageService);
|
|
118
|
+
renderSection(sectionsContainer, ( localize(5913, "Arguments")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
|
|
78
119
|
}
|
|
79
120
|
if (content.output) {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
121
|
+
const {
|
|
122
|
+
plainText,
|
|
123
|
+
tokenizedHtml
|
|
124
|
+
} = await tokenizeContent(content.output, languageService);
|
|
125
|
+
renderSection(sectionsContainer, ( localize(5914, "Output")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
|
|
84
126
|
}
|
|
85
127
|
return {
|
|
86
128
|
element: container,
|
|
@@ -89,16 +131,16 @@ async function renderToolCallContent(content, languageService) {
|
|
|
89
131
|
}
|
|
90
132
|
function toolCallContentToPlainText(content) {
|
|
91
133
|
const lines = [];
|
|
92
|
-
lines.push(( localize(
|
|
134
|
+
lines.push(( localize(5915, "Tool: {0}", content.toolName)));
|
|
93
135
|
if (content.result) {
|
|
94
|
-
lines.push(( localize(
|
|
136
|
+
lines.push(( localize(5916, "Status: {0}", content.result)));
|
|
95
137
|
}
|
|
96
138
|
if (content.durationInMillis !== undefined) {
|
|
97
|
-
lines.push(( localize(
|
|
139
|
+
lines.push(( localize(5917, "Duration: {0}ms", content.durationInMillis)));
|
|
98
140
|
}
|
|
99
141
|
if (content.input) {
|
|
100
142
|
lines.push("");
|
|
101
|
-
lines.push(`[${( localize(
|
|
143
|
+
lines.push(`[${( localize(5913, "Arguments"))}]`);
|
|
102
144
|
try {
|
|
103
145
|
const parsed = JSON.parse(content.input);
|
|
104
146
|
lines.push(JSON.stringify(parsed, null, 2));
|
|
@@ -108,7 +150,7 @@ function toolCallContentToPlainText(content) {
|
|
|
108
150
|
}
|
|
109
151
|
if (content.output) {
|
|
110
152
|
lines.push("");
|
|
111
|
-
lines.push(`[${( localize(
|
|
153
|
+
lines.push(`[${( localize(5914, "Output"))}]`);
|
|
112
154
|
try {
|
|
113
155
|
const parsed = JSON.parse(content.output);
|
|
114
156
|
lines.push(JSON.stringify(parsed, null, 2));
|
|
@@ -119,4 +161,4 @@ function toolCallContentToPlainText(content) {
|
|
|
119
161
|
return lines.join("\n");
|
|
120
162
|
}
|
|
121
163
|
|
|
122
|
-
export { renderToolCallContent, toolCallContentToPlainText };
|
|
164
|
+
export { renderSection, renderToolCallContent, tokenizeContent, toolCallContentToPlainText, tryParseJSON };
|
|
@@ -331,11 +331,16 @@
|
|
|
331
331
|
.chat-debug-table-header .chat-debug-col-details {
|
|
332
332
|
flex: 1;
|
|
333
333
|
}
|
|
334
|
+
.chat-debug-logs-main > .monaco-progress-container {
|
|
335
|
+
height: 2px;
|
|
336
|
+
flex-shrink: 0;
|
|
337
|
+
}
|
|
334
338
|
.chat-debug-logs-content {
|
|
335
339
|
display: flex;
|
|
336
340
|
flex-direction: row;
|
|
337
341
|
flex: 1;
|
|
338
342
|
overflow: hidden;
|
|
343
|
+
position: relative;
|
|
339
344
|
}
|
|
340
345
|
.chat-debug-logs-main {
|
|
341
346
|
display: flex;
|
|
@@ -401,34 +406,8 @@
|
|
|
401
406
|
.chat-debug-log-row.chat-debug-log-trace {
|
|
402
407
|
opacity: 0.7;
|
|
403
408
|
}
|
|
404
|
-
.chat-debug-logs-shimmer-row {
|
|
405
|
-
position: absolute;
|
|
406
|
-
left: 0;
|
|
407
|
-
right: 0;
|
|
408
|
-
display: flex;
|
|
409
|
-
align-items: center;
|
|
410
|
-
padding: 0 16px;
|
|
411
|
-
height: 28px;
|
|
412
|
-
gap: 40px;
|
|
413
|
-
pointer-events: none;
|
|
414
|
-
}
|
|
415
|
-
.chat-debug-logs-shimmer-bar {
|
|
416
|
-
flex: 1;
|
|
417
|
-
height: 10px;
|
|
418
|
-
border-radius: 3px;
|
|
419
|
-
background: linear-gradient(
|
|
420
|
-
90deg,
|
|
421
|
-
var(--vscode-descriptionForeground) 25%,
|
|
422
|
-
var(--vscode-chat-thinkingShimmer, rgba(255, 255, 255, 0.3)) 50%,
|
|
423
|
-
var(--vscode-descriptionForeground) 75%
|
|
424
|
-
);
|
|
425
|
-
background-size: 200% 100%;
|
|
426
|
-
animation: chat-debug-shimmer 2s linear infinite;
|
|
427
|
-
opacity: 0.15;
|
|
428
|
-
}
|
|
429
409
|
.chat-debug-detail-panel {
|
|
430
410
|
flex-shrink: 0;
|
|
431
|
-
width: 350px;
|
|
432
411
|
display: flex;
|
|
433
412
|
flex-direction: column;
|
|
434
413
|
border-left: 1px solid var(--vscode-widget-border, var(--vscode-panel-border));
|
|
@@ -461,11 +440,6 @@
|
|
|
461
440
|
opacity: 1;
|
|
462
441
|
background: var(--vscode-toolbar-hoverBackground);
|
|
463
442
|
}
|
|
464
|
-
.chat-debug-detail-content {
|
|
465
|
-
flex: 1;
|
|
466
|
-
min-height: 0;
|
|
467
|
-
overflow-y: auto;
|
|
468
|
-
}
|
|
469
443
|
.chat-debug-detail-panel pre {
|
|
470
444
|
margin: 0;
|
|
471
445
|
padding: 8px 16px;
|
|
@@ -643,8 +617,6 @@
|
|
|
643
617
|
}
|
|
644
618
|
.chat-debug-message-section-content-wrapper {
|
|
645
619
|
border-top: 1px solid var(--vscode-widget-border, transparent);
|
|
646
|
-
max-height: 300px;
|
|
647
|
-
overflow-y: auto;
|
|
648
620
|
}
|
|
649
621
|
.chat-debug-message-section-content {
|
|
650
622
|
margin: 0;
|
|
@@ -666,7 +638,8 @@
|
|
|
666
638
|
}
|
|
667
639
|
|
|
668
640
|
/* ---- File list: settings gear button ---- */
|
|
669
|
-
.chat-debug-settings-gear.monaco-button
|
|
641
|
+
.chat-debug-settings-gear.monaco-button,
|
|
642
|
+
.chat-debug-section-copy-btn.monaco-button {
|
|
670
643
|
flex-shrink: 0;
|
|
671
644
|
opacity: 0.7;
|
|
672
645
|
border-radius: 3px;
|
|
@@ -676,14 +649,17 @@
|
|
|
676
649
|
color: inherit;
|
|
677
650
|
min-width: auto;
|
|
678
651
|
}
|
|
679
|
-
.chat-debug-settings-gear.monaco-button:hover
|
|
652
|
+
.chat-debug-settings-gear.monaco-button:hover,
|
|
653
|
+
.chat-debug-section-copy-btn.monaco-button:hover {
|
|
680
654
|
opacity: 1;
|
|
681
655
|
background: var(--vscode-toolbar-hoverBackground);
|
|
682
656
|
}
|
|
683
|
-
.chat-debug-settings-gear-header-passthrough
|
|
657
|
+
.chat-debug-settings-gear-header-passthrough,
|
|
658
|
+
.chat-debug-section-copy-header-passthrough {
|
|
684
659
|
pointer-events: none;
|
|
685
660
|
}
|
|
686
|
-
.chat-debug-settings-gear-header-passthrough .chat-debug-settings-gear
|
|
661
|
+
.chat-debug-settings-gear-header-passthrough .chat-debug-settings-gear,
|
|
662
|
+
.chat-debug-section-copy-header-passthrough .chat-debug-section-copy-btn {
|
|
687
663
|
pointer-events: auto;
|
|
688
664
|
}
|
|
689
665
|
|
|
@@ -727,6 +703,14 @@
|
|
|
727
703
|
display: flex;
|
|
728
704
|
flex: 1;
|
|
729
705
|
overflow: hidden;
|
|
706
|
+
position: relative;
|
|
707
|
+
}
|
|
708
|
+
.chat-debug-flowchart-content-wrapper > .chat-debug-detail-panel {
|
|
709
|
+
position: absolute;
|
|
710
|
+
top: 0;
|
|
711
|
+
right: 0;
|
|
712
|
+
bottom: 0;
|
|
713
|
+
z-index: 10;
|
|
730
714
|
}
|
|
731
715
|
.chat-debug-flowchart-content {
|
|
732
716
|
flex: 1;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js
CHANGED
|
@@ -620,7 +620,7 @@ let ChatEditingCodeEditorIntegration = class ChatEditingCodeEditorIntegration {
|
|
|
620
620
|
options: {
|
|
621
621
|
selection
|
|
622
622
|
},
|
|
623
|
-
label: ( localize(
|
|
623
|
+
label: ( localize(5953, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
|
|
624
624
|
});
|
|
625
625
|
if (diffEditor && diffEditor.input) {
|
|
626
626
|
diffEditor.getControl()?.setSelection(selection);
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
4
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
5
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
5
6
|
import { LineRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/lineRange';
|
|
6
7
|
import { DetailedLineRangeMapping } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/diff/rangeMapping';
|
|
7
8
|
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
@@ -110,7 +111,7 @@ let ChatEditingDeletedFileEntry = class ChatEditingDeletedFileEntry extends Abst
|
|
|
110
111
|
return Promise.resolve(this._diffInfo());
|
|
111
112
|
}
|
|
112
113
|
equalsSnapshot(snapshot) {
|
|
113
|
-
return !!snapshot && (
|
|
114
|
+
return !!snapshot && isEqual(this.modifiedURI, snapshot.resource) && this._languageId === snapshot.languageId && this._originalContent === snapshot.original && snapshot.current === "" && this.state.get() === snapshot.state;
|
|
114
115
|
}
|
|
115
116
|
createSnapshot(chatSessionResource, requestId, undoStop) {
|
|
116
117
|
return {
|
|
@@ -129,7 +129,7 @@ let ChatEditingExplanationModelManager = class ChatEditingExplanationModelManage
|
|
|
129
129
|
this._updateUriStatePartial(fileData.uri, {
|
|
130
130
|
progress: "error",
|
|
131
131
|
explanations: [],
|
|
132
|
-
errorMessage: ( localize(
|
|
132
|
+
errorMessage: ( localize(5989, "No language model available"))
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
return;
|
|
@@ -200,7 +200,7 @@ Example response format:
|
|
|
200
200
|
for (const fileData of fileChanges) {
|
|
201
201
|
const explanations = [];
|
|
202
202
|
for (const data of fileData.changes) {
|
|
203
|
-
const parsedExplanation = parsed[parsedIndex]?.explanation?.trim() || ( localize(
|
|
203
|
+
const parsedExplanation = parsed[parsedIndex]?.explanation?.trim() || ( localize(5990, "Code was modified."));
|
|
204
204
|
explanations.push({
|
|
205
205
|
uri: fileData.uri,
|
|
206
206
|
startLineNumber: data.startLineNumber,
|
|
@@ -218,7 +218,7 @@ Example response format:
|
|
|
218
218
|
}
|
|
219
219
|
} catch (e) {
|
|
220
220
|
if (!cancellationToken.isCancellationRequested) {
|
|
221
|
-
const errorMessage = e instanceof Error ? e.message : ( localize(
|
|
221
|
+
const errorMessage = e instanceof Error ? e.message : ( localize(5991, "Failed to generate explanations"));
|
|
222
222
|
for (const fileData of fileChanges) {
|
|
223
223
|
this._updateUriStatePartial(fileData.uri, {
|
|
224
224
|
progress: "error",
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js
CHANGED
|
@@ -3,6 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
5
5
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
6
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
7
|
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
7
8
|
import { getCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
|
|
8
9
|
import { TextEdit } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/edits/textEdit';
|
|
@@ -141,7 +142,7 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
|
|
|
141
142
|
if (inProgress) {
|
|
142
143
|
const res = this._lastModifyingResponseObs.read(r);
|
|
143
144
|
const req = res && res.session.getRequests().find(value => value.id === res.requestId);
|
|
144
|
-
resourceFilter.value = markerService.installResourceFilter(this.modifiedURI, req?.message.text || ( localize(
|
|
145
|
+
resourceFilter.value = markerService.installResourceFilter(this.modifiedURI, req?.message.text || ( localize(6004, "Chat Edits")));
|
|
145
146
|
} else {
|
|
146
147
|
resourceFilter.clear();
|
|
147
148
|
}
|
|
@@ -151,7 +152,7 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
|
|
|
151
152
|
return this._textModelChangeService.getDiffInfo();
|
|
152
153
|
}
|
|
153
154
|
equalsSnapshot(snapshot) {
|
|
154
|
-
return !!snapshot && (
|
|
155
|
+
return !!snapshot && isEqual(this.modifiedURI, snapshot.resource) && this.modifiedModel.getLanguageId() === snapshot.languageId && this.originalModel.getValue() === snapshot.original && this.modifiedModel.getValue() === snapshot.current && this.state.get() === snapshot.state;
|
|
155
156
|
}
|
|
156
157
|
createSnapshot(chatSessionResource, requestId, undoStop) {
|
|
157
158
|
return {
|
|
@@ -183,7 +184,7 @@ let ChatEditingModifiedDocumentEntry = class ChatEditingModifiedDocumentEntry ex
|
|
|
183
184
|
}
|
|
184
185
|
_createUndoRedoElement(response) {
|
|
185
186
|
const request = response.session.getRequests().find(req => req.id === response.requestId);
|
|
186
|
-
const label = request?.message.text ? ( localize(
|
|
187
|
+
const label = request?.message.text ? ( localize(6005, "Chat Edit: '{0}'", request.message.text)) : ( localize(6006, "Chat Edit"));
|
|
187
188
|
return ( new SingleModelEditStackElement(label, "chat.edit", this.modifiedModel, null));
|
|
188
189
|
}
|
|
189
190
|
async acceptAgentEdits(resource, textEdits, isLastEdits, responseModel) {
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export declare abstract class AbstractChatEditingModifiedFileEntry extends Dispo
|
|
|
70
70
|
get lastModifyingRequestId(): string;
|
|
71
71
|
private _refCounter;
|
|
72
72
|
readonly abstract originalURI: URI;
|
|
73
|
-
protected readonly _userEditScheduler: RunOnceScheduler
|
|
73
|
+
protected readonly _userEditScheduler: RunOnceScheduler<() => void>;
|
|
74
74
|
constructor(modifiedURI: URI, _telemetryInfo: IModifiedEntryTelemetryInfo, kind: ChatEditKind, configService: IConfigurationService, _fileConfigService: IFilesConfigurationService, _chatService: IChatService, _fileService: IFileService, _undoRedoService: IUndoRedoService, _instantiationService: IInstantiationService, _aiEditTelemetryService: IAiEditTelemetryService);
|
|
75
75
|
dispose(): void;
|
|
76
76
|
acquire(): this;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js
CHANGED
|
@@ -42,7 +42,7 @@ class AutoAcceptControl {
|
|
|
42
42
|
this.cancel = cancel;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const pendingRewriteMinimap = registerColor("minimap.chatEditHighlight", ( transparent(editorBackground, 0.6)), ( localize(
|
|
45
|
+
const pendingRewriteMinimap = registerColor("minimap.chatEditHighlight", ( transparent(editorBackground, 0.6)), ( localize(6007, "Color of pending edit regions in the minimap")));
|
|
46
46
|
let AbstractChatEditingModifiedFileEntry = class AbstractChatEditingModifiedFileEntry extends Disposable {
|
|
47
47
|
static {
|
|
48
48
|
AbstractChatEditingModifiedFileEntry_1 = this;
|
|
@@ -104,6 +104,7 @@ export declare class ChatEditingModifiedNotebookEntry extends AbstractChatEditin
|
|
|
104
104
|
private keepPreviouslyDeletedCell;
|
|
105
105
|
private _applyEdits;
|
|
106
106
|
private _applyEditsSync;
|
|
107
|
+
private _safeCreateSnapshot;
|
|
107
108
|
getCurrentSnapshot(): string;
|
|
108
109
|
createSnapshot(chatSessionResource: URI, requestId: string | undefined, undoStop: string | undefined): ISnapshotEntry;
|
|
109
110
|
equalsSnapshot(snapshot: ISnapshotEntry | undefined): boolean;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js
CHANGED
|
@@ -485,7 +485,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
485
485
|
}
|
|
486
486
|
_createUndoRedoElement(response) {
|
|
487
487
|
const request = response.session.getRequests().find(req => req.id === response.requestId);
|
|
488
|
-
const label = request?.message.text ? ( localize(
|
|
488
|
+
const label = request?.message.text ? ( localize(6008, "Chat Edit: '{0}'", request.message.text)) : ( localize(6009, "Chat Edit"));
|
|
489
489
|
const transientOptions = this.transientOptions;
|
|
490
490
|
const outputSizeLimit = this.configurationService.getValue(NotebookSetting.outputBackupSizeLimit) * 1024;
|
|
491
491
|
let initial = createSnapshot(this.modifiedModel, transientOptions, outputSizeLimit);
|
|
@@ -883,10 +883,23 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
883
883
|
this._isEditFromUs = false;
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
+
_safeCreateSnapshot(model) {
|
|
887
|
+
try {
|
|
888
|
+
return createSnapshot(model, this.transientOptions, this.configurationService);
|
|
889
|
+
} catch (e) {
|
|
890
|
+
this.loggingService.error(
|
|
891
|
+
"Notebook Chat",
|
|
892
|
+
`Error creating snapshot: ${e instanceof Error ? e.message : e}`
|
|
893
|
+
);
|
|
894
|
+
return this.initialContent;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
886
897
|
getCurrentSnapshot() {
|
|
887
|
-
return
|
|
898
|
+
return this._safeCreateSnapshot(this.modifiedModel);
|
|
888
899
|
}
|
|
889
900
|
createSnapshot(chatSessionResource, requestId, undoStop) {
|
|
901
|
+
const original = this._safeCreateSnapshot(this.originalModel);
|
|
902
|
+
const current = this.getCurrentSnapshot();
|
|
890
903
|
return {
|
|
891
904
|
resource: this.modifiedURI,
|
|
892
905
|
languageId: SnapshotLanguageId,
|
|
@@ -897,8 +910,8 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
|
|
|
897
910
|
this.modifiedURI.path,
|
|
898
911
|
this.modifiedModel.viewType
|
|
899
912
|
),
|
|
900
|
-
original
|
|
901
|
-
current
|
|
913
|
+
original,
|
|
914
|
+
current,
|
|
902
915
|
state: this.state.get(),
|
|
903
916
|
telemetryInfo: this.telemetryInfo
|
|
904
917
|
};
|
|
@@ -124,7 +124,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
124
124
|
}
|
|
125
125
|
e.join(storageTask, {
|
|
126
126
|
id: "join.chatEditingSession",
|
|
127
|
-
label: ( localize(
|
|
127
|
+
label: ( localize(6010, "Saving chat edits history"))
|
|
128
128
|
});
|
|
129
129
|
}));
|
|
130
130
|
}
|
|
@@ -346,7 +346,7 @@ class ChatDecorationsProvider extends Disposable {
|
|
|
346
346
|
constructor(_sessions) {
|
|
347
347
|
super();
|
|
348
348
|
this._sessions = _sessions;
|
|
349
|
-
this.label = ( localize(
|
|
349
|
+
this.label = ( localize(6011, "Chat Editing"));
|
|
350
350
|
this._currentEntries = derived(this, r => {
|
|
351
351
|
const sessions = this._sessions.read(r);
|
|
352
352
|
if (!sessions) {
|
|
@@ -377,7 +377,7 @@ class ChatDecorationsProvider extends Disposable {
|
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
379
|
provideDecorations(uri, _token) {
|
|
380
|
-
const isCurrentlyBeingModified = ( this._currentlyEditingUris.get().some(e => (
|
|
380
|
+
const isCurrentlyBeingModified = ( this._currentlyEditingUris.get().some(e => isEqual(e, uri)));
|
|
381
381
|
if (isCurrentlyBeingModified) {
|
|
382
382
|
return {
|
|
383
383
|
weight: 1000,
|
|
@@ -385,12 +385,12 @@ class ChatDecorationsProvider extends Disposable {
|
|
|
385
385
|
bubble: false
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
const isModified = ( this._modifiedUris.get().some(e => (
|
|
388
|
+
const isModified = ( this._modifiedUris.get().some(e => isEqual(e, uri)));
|
|
389
389
|
if (isModified) {
|
|
390
390
|
return {
|
|
391
391
|
weight: 1000,
|
|
392
392
|
letter: Codicon.diffModified,
|
|
393
|
-
tooltip: ( localize(
|
|
393
|
+
tooltip: ( localize(6012, "Pending changes from chat")),
|
|
394
394
|
bubble: true
|
|
395
395
|
};
|
|
396
396
|
}
|
|
@@ -12,6 +12,7 @@ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
12
12
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
13
13
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
14
14
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
15
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
15
16
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
16
17
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
17
18
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
@@ -37,6 +38,7 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
37
38
|
private readonly configurationService;
|
|
38
39
|
private readonly _fileService;
|
|
39
40
|
private readonly _explanationModelManager;
|
|
41
|
+
private readonly _telemetryService;
|
|
40
42
|
private readonly _state;
|
|
41
43
|
private readonly _timeline;
|
|
42
44
|
/**
|
|
@@ -60,7 +62,7 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
60
62
|
get requestDisablement(): IObservable<import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel").IChatRequestDisablement[]>;
|
|
61
63
|
private readonly _onDidDispose;
|
|
62
64
|
get onDidDispose(): import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
63
|
-
constructor(chatSessionResource: URI, isGlobalEditingSession: boolean, _lookupExternalEntry: (uri: URI) => AbstractChatEditingModifiedFileEntry | undefined, transferFrom: IChatEditingSession | undefined, _instantiationService: IInstantiationService, _modelService: IModelService, _languageService: ILanguageService, _textModelService: ITextModelService, _bulkEditService: IBulkEditService, _editorGroupsService: IEditorGroupsService, _editorService: IEditorService, _notebookService: INotebookService, _accessibilitySignalService: IAccessibilitySignalService, _logService: ILogService, configurationService: IConfigurationService, _fileService: IFileService, _explanationModelManager: IChatEditingExplanationModelManager);
|
|
65
|
+
constructor(chatSessionResource: URI, isGlobalEditingSession: boolean, _lookupExternalEntry: (uri: URI) => AbstractChatEditingModifiedFileEntry | undefined, transferFrom: IChatEditingSession | undefined, _instantiationService: IInstantiationService, _modelService: IModelService, _languageService: ILanguageService, _textModelService: ITextModelService, _bulkEditService: IBulkEditService, _editorGroupsService: IEditorGroupsService, _editorService: IEditorService, _notebookService: INotebookService, _accessibilitySignalService: IAccessibilitySignalService, _logService: ILogService, configurationService: IConfigurationService, _fileService: IFileService, _explanationModelManager: IChatEditingExplanationModelManager, _telemetryService: ITelemetryService);
|
|
64
66
|
private _getTimelineDelegate;
|
|
65
67
|
private _init;
|
|
66
68
|
private _getEntry;
|
|
@@ -105,6 +107,7 @@ export declare class ChatEditingSession extends Disposable implements IChatEditi
|
|
|
105
107
|
private _initEntries;
|
|
106
108
|
private _acceptEdits;
|
|
107
109
|
private _getTelemetryInfoForModel;
|
|
110
|
+
private _countEntryStates;
|
|
108
111
|
private _resolve;
|
|
109
112
|
/**
|
|
110
113
|
* Retrieves or creates a modified file entry.
|
|
@@ -26,6 +26,7 @@ import { EditorActivation } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
26
26
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
27
27
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
28
28
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
29
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
29
30
|
import { DiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/diffEditorInput';
|
|
30
31
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
31
32
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -39,7 +40,7 @@ import { ChatEditingDeletedFileEntry } from './chatEditingDeletedFileEntry.js';
|
|
|
39
40
|
import { ChatEditingModifiedDocumentEntry } from './chatEditingModifiedDocumentEntry.js';
|
|
40
41
|
import { AbstractChatEditingModifiedFileEntry } from './chatEditingModifiedFileEntry.js';
|
|
41
42
|
import { ChatEditingModifiedNotebookEntry } from './chatEditingModifiedNotebookEntry.js';
|
|
42
|
-
import { FileOperationType } from './chatEditingOperations.js';
|
|
43
|
+
import { getKeyForChatSessionResource, FileOperationType } from './chatEditingOperations.js';
|
|
43
44
|
import { IChatEditingExplanationModelManager } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.service';
|
|
44
45
|
import { ChatEditingSessionStorage } from './chatEditingSessionStorage.js';
|
|
45
46
|
import { ChatEditingTextModelContentProvider } from './chatEditingTextModelContentProviders.js';
|
|
@@ -131,7 +132,8 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
131
132
|
_logService,
|
|
132
133
|
configurationService,
|
|
133
134
|
_fileService,
|
|
134
|
-
_explanationModelManager
|
|
135
|
+
_explanationModelManager,
|
|
136
|
+
_telemetryService
|
|
135
137
|
) {
|
|
136
138
|
super();
|
|
137
139
|
this.chatSessionResource = chatSessionResource;
|
|
@@ -150,6 +152,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
150
152
|
this.configurationService = configurationService;
|
|
151
153
|
this._fileService = _fileService;
|
|
152
154
|
this._explanationModelManager = _explanationModelManager;
|
|
155
|
+
this._telemetryService = _telemetryService;
|
|
153
156
|
this._state = observableValue(this, ChatEditingSessionState.Initial);
|
|
154
157
|
this._initialFileContents = ( new ResourceMap());
|
|
155
158
|
this._baselineCreationLocks = ( new SequencerByKey());
|
|
@@ -275,7 +278,12 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
275
278
|
}
|
|
276
279
|
storeState() {
|
|
277
280
|
const storage = this._instantiationService.createInstance(ChatEditingSessionStorage, this.chatSessionResource);
|
|
278
|
-
|
|
281
|
+
const storedState = this._getStoredState();
|
|
282
|
+
this._telemetryService.publicLog2("chatEditing/sessionStore", {
|
|
283
|
+
editSessionId: getKeyForChatSessionResource(this.chatSessionResource),
|
|
284
|
+
...this._countEntryStates(this._entriesObs.get())
|
|
285
|
+
});
|
|
286
|
+
return storage.storeState(storedState);
|
|
279
287
|
}
|
|
280
288
|
_getStoredState(sessionResource = this.chatSessionResource) {
|
|
281
289
|
const entries = ( new ResourceMap());
|
|
@@ -399,7 +407,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
399
407
|
}
|
|
400
408
|
const input = MultiDiffEditorInput.fromResourceMultiDiffEditorInput({
|
|
401
409
|
multiDiffSource: getMultiDiffSourceUri(this, previousChanges),
|
|
402
|
-
label: ( localize(
|
|
410
|
+
label: ( localize(6013, "Suggested Edits"))
|
|
403
411
|
}, this._instantiationService);
|
|
404
412
|
this._editorPane = await this._editorService.openEditor(input, {
|
|
405
413
|
pinned: true,
|
|
@@ -805,6 +813,10 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
805
813
|
}
|
|
806
814
|
}
|
|
807
815
|
this._entriesObs.set(entriesArr, undefined);
|
|
816
|
+
this._telemetryService.publicLog2("chatEditing/sessionRestore", {
|
|
817
|
+
editSessionId: getKeyForChatSessionResource(this.chatSessionResource),
|
|
818
|
+
...this._countEntryStates(entriesArr)
|
|
819
|
+
});
|
|
808
820
|
}
|
|
809
821
|
async _acceptEdits(resource, textEdits, isLastEdits, responseModel) {
|
|
810
822
|
const entry = await this._getOrCreateModifiedFileEntry(
|
|
@@ -853,6 +865,32 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
853
865
|
}
|
|
854
866
|
}();
|
|
855
867
|
}
|
|
868
|
+
_countEntryStates(entries) {
|
|
869
|
+
let entryCount = 0;
|
|
870
|
+
let modifiedCount = 0;
|
|
871
|
+
let acceptedCount = 0;
|
|
872
|
+
let rejectedCount = 0;
|
|
873
|
+
for (const entry of entries) {
|
|
874
|
+
entryCount += 1;
|
|
875
|
+
switch (entry.state.get()) {
|
|
876
|
+
case ModifiedFileEntryState.Modified:
|
|
877
|
+
modifiedCount += 1;
|
|
878
|
+
break;
|
|
879
|
+
case ModifiedFileEntryState.Accepted:
|
|
880
|
+
acceptedCount += 1;
|
|
881
|
+
break;
|
|
882
|
+
case ModifiedFileEntryState.Rejected:
|
|
883
|
+
rejectedCount += 1;
|
|
884
|
+
break;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
return {
|
|
888
|
+
entryCount,
|
|
889
|
+
modifiedCount,
|
|
890
|
+
acceptedCount,
|
|
891
|
+
rejectedCount
|
|
892
|
+
};
|
|
893
|
+
}
|
|
856
894
|
async _resolve(requestId, undoStop, resource) {
|
|
857
895
|
const hasOtherTasks = ( Iterable.some(( this._streamingEditLocks.keys()), k => k !== ( resource.toString())));
|
|
858
896
|
if (!hasOtherTasks) {
|
|
@@ -1000,6 +1038,6 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
|
|
|
1000
1038
|
}
|
|
1001
1039
|
}
|
|
1002
1040
|
};
|
|
1003
|
-
ChatEditingSession = ChatEditingSession_1 = ( __decorate([( __param(4, IInstantiationService)), ( __param(5, IModelService)), ( __param(6, ILanguageService)), ( __param(7, ITextModelService)), ( __param(8, IBulkEditService)), ( __param(9, IEditorGroupsService)), ( __param(10, IEditorService)), ( __param(11, INotebookService)), ( __param(12, IAccessibilitySignalService)), ( __param(13, ILogService)), ( __param(14, IConfigurationService)), ( __param(15, IFileService)), ( __param(16, IChatEditingExplanationModelManager))], ChatEditingSession));
|
|
1041
|
+
ChatEditingSession = ChatEditingSession_1 = ( __decorate([( __param(4, IInstantiationService)), ( __param(5, IModelService)), ( __param(6, ILanguageService)), ( __param(7, ITextModelService)), ( __param(8, IBulkEditService)), ( __param(9, IEditorGroupsService)), ( __param(10, IEditorService)), ( __param(11, INotebookService)), ( __param(12, IAccessibilitySignalService)), ( __param(13, ILogService)), ( __param(14, IConfigurationService)), ( __param(15, IFileService)), ( __param(16, IChatEditingExplanationModelManager)), ( __param(17, ITelemetryService))], ChatEditingSession));
|
|
1004
1042
|
|
|
1005
1043
|
export { ChatEditingSession };
|
|
@@ -630,7 +630,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
|
|
|
630
630
|
modified: {
|
|
631
631
|
resource: this._entry.modifiedURI
|
|
632
632
|
},
|
|
633
|
-
label: ( localize(
|
|
633
|
+
label: ( localize(6014, "{0} (changes from chat)", basename(this._entry.modifiedURI)))
|
|
634
634
|
};
|
|
635
635
|
await this._editorService.openEditor(diffInput);
|
|
636
636
|
}
|