@codingame/monaco-vscode-chat-service-override 26.2.2 → 28.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 +35 -2
- package/package.json +5 -5
- package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +15 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.d.ts +53 -0
- package/vscode/src/vs/sessions/contrib/agentFeedback/browser/agentFeedbackService.js +219 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.d.ts +89 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/aiCustomizationWorkspaceService.js +251 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.d.ts +123 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/newSession.js +278 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.d.ts +76 -0
- package/vscode/src/vs/sessions/contrib/chat/browser/sessionsConfigurationService.js +299 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.d.ts +67 -0
- package/vscode/src/vs/sessions/contrib/fileTreeView/browser/githubFileSystemProvider.js +263 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.d.ts +85 -0
- package/vscode/src/vs/sessions/contrib/sessions/browser/sessionsManagementService.js +397 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +27 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +74 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +54 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +87 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +71 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +43 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +13 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatForkActions.js +154 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -8
- 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 +53 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatOpenAgentDebugPanelAction.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.js +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.js +18 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +49 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditor.js +537 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginEditorInput.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/agentPluginItems.js +9 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginEditor/media/agentPluginEditor.css +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.js +282 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +634 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +10 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +74 -67
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +27 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +4 -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.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +90 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +20 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +43 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +7 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +84 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.d.ts → localAgentSessionsController.d.ts} +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/{localAgentSessionsProvider.js → localAgentSessionsController.js} +24 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.js +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.d.ts +179 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +987 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +246 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.d.ts +130 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +878 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWorkspaceService.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.js +165 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +692 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +936 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.d.ts +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +702 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +30 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.js +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +36 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +622 -391
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +419 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCollapsible.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +198 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.js +314 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +84 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +611 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.d.ts +125 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +504 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowLayout.js +914 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +128 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.d.ts +61 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +467 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +113 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +126 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +279 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +122 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugTypes.js +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css +788 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.d.ts +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +32 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +6 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +16 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +63 -76
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +26 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatManagementEditor.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +40 -413
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +38 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +56 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +15 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +138 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +166 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +37 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +394 -0
- 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 +118 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/media/chatStatus.css +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.d.ts +66 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +245 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipEligibilityTracker.js +234 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +88 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +624 -68
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipStorageKeys.js +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +88 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +28 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/createSlashCommandsUsageTracker.js +62 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +110 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/exploreAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/planAgentDefaultModel.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +175 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.d.ts +99 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +489 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.d.ts +19 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +364 -279
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookUtils.js +69 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptsDebugContribution.js +76 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/sessionResourceMatching.js +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +67 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +20 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +187 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +242 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolHelpers.js +45 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +311 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +10 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatQueuePickerActionItem.js +29 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +126 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +9 -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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.d.ts +15 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +46 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +65 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +15 -6
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.js +28 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +190 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +11 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugServiceImpl.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +19 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +261 -105
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.d.ts +21 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +7 -2
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +16 -8
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +13 -4
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +144 -11
- package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +36 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.d.ts +119 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +748 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +146 -0
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +672 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +35 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +3 -16
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +7 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +4 -8
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +10 -9
- 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.d.ts +26 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +293 -94
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.d.ts +10 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +86 -30
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +121 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +1422 -0
- 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 +48 -14
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +404 -132
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +17 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +40 -28
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +13 -0
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.d.ts +14 -2
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +54 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +12 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +27 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +265 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +18 -81
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +2 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +10 -10
- 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 +6 -6
- 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 +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css +6 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +35 -26
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +1 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +6 -6
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +13 -11
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +3 -1
- 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/commandLineAutoApproveAnalyzer.js +12 -12
- 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/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 +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +302 -69
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +63 -21
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +31 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- 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 +7 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +46 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +0 -587
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +0 -293
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/utils.js +0 -31
package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
|
|
2
|
+
import { $ as $$1, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
+
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
+
import { renderCollapsibleSection } from './chatDebugCollapsible.js';
|
|
6
|
+
|
|
7
|
+
const $ = $$1;
|
|
8
|
+
function renderModelTurnContent(content) {
|
|
9
|
+
const disposables = ( new DisposableStore());
|
|
10
|
+
const container = $("div.chat-debug-message-content");
|
|
11
|
+
container.tabIndex = 0;
|
|
12
|
+
append(
|
|
13
|
+
container,
|
|
14
|
+
$("div.chat-debug-message-content-title", undefined, ( localize(5732, "Model Turn")))
|
|
15
|
+
);
|
|
16
|
+
const statusParts = [];
|
|
17
|
+
if (content.requestName) {
|
|
18
|
+
statusParts.push(content.requestName);
|
|
19
|
+
}
|
|
20
|
+
if (content.model) {
|
|
21
|
+
statusParts.push(content.model);
|
|
22
|
+
}
|
|
23
|
+
if (content.status) {
|
|
24
|
+
statusParts.push(content.status);
|
|
25
|
+
}
|
|
26
|
+
if (content.durationInMillis !== undefined) {
|
|
27
|
+
statusParts.push(( localize(5733, "{0}ms", content.durationInMillis)));
|
|
28
|
+
}
|
|
29
|
+
if (statusParts.length > 0) {
|
|
30
|
+
append(container, $(
|
|
31
|
+
"div.chat-debug-message-content-summary",
|
|
32
|
+
undefined,
|
|
33
|
+
statusParts.join(" · ")
|
|
34
|
+
));
|
|
35
|
+
}
|
|
36
|
+
const detailsContainer = append(container, $("div.chat-debug-model-turn-details"));
|
|
37
|
+
if (content.inputTokens !== undefined) {
|
|
38
|
+
append(detailsContainer, $("div", undefined, ( localize(5734, "Input tokens: {0}", content.inputTokens))));
|
|
39
|
+
}
|
|
40
|
+
if (content.outputTokens !== undefined) {
|
|
41
|
+
append(detailsContainer, $("div", undefined, ( localize(5735, "Output tokens: {0}", content.outputTokens))));
|
|
42
|
+
}
|
|
43
|
+
if (content.cachedTokens !== undefined) {
|
|
44
|
+
append(detailsContainer, $("div", undefined, ( localize(5736, "Cached tokens: {0}", content.cachedTokens))));
|
|
45
|
+
}
|
|
46
|
+
if (content.totalTokens !== undefined) {
|
|
47
|
+
append(detailsContainer, $("div", undefined, ( localize(5737, "Total tokens: {0}", content.totalTokens))));
|
|
48
|
+
}
|
|
49
|
+
if (content.timeToFirstTokenInMillis !== undefined) {
|
|
50
|
+
append(detailsContainer, $("div", undefined, ( localize(5738, "Time to first token: {0}ms", content.timeToFirstTokenInMillis))));
|
|
51
|
+
}
|
|
52
|
+
if (content.maxInputTokens !== undefined) {
|
|
53
|
+
append(detailsContainer, $("div", undefined, ( localize(5739, "Max input tokens: {0}", content.maxInputTokens))));
|
|
54
|
+
}
|
|
55
|
+
if (content.maxOutputTokens !== undefined) {
|
|
56
|
+
append(detailsContainer, $("div", undefined, ( localize(5740, "Max output tokens: {0}", content.maxOutputTokens))));
|
|
57
|
+
}
|
|
58
|
+
if (content.errorMessage) {
|
|
59
|
+
append(
|
|
60
|
+
detailsContainer,
|
|
61
|
+
$("div.chat-debug-model-turn-error", undefined, ( localize(5741, "Error: {0}", content.errorMessage)))
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
if (content.sections && content.sections.length > 0) {
|
|
65
|
+
const sectionsContainer = append(container, $("div.chat-debug-message-sections"));
|
|
66
|
+
append(
|
|
67
|
+
sectionsContainer,
|
|
68
|
+
$("div.chat-debug-message-sections-label", undefined, ( localize(5742, "Sections ({0})", content.sections.length)))
|
|
69
|
+
);
|
|
70
|
+
for (const section of content.sections) {
|
|
71
|
+
renderCollapsibleSection(sectionsContainer, section, disposables);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
element: container,
|
|
76
|
+
disposables
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function modelTurnContentToPlainText(content) {
|
|
80
|
+
const lines = [];
|
|
81
|
+
lines.push(( localize(5743, "Request: {0}", content.requestName)));
|
|
82
|
+
if (content.model) {
|
|
83
|
+
lines.push(( localize(5744, "Model: {0}", content.model)));
|
|
84
|
+
}
|
|
85
|
+
if (content.status) {
|
|
86
|
+
lines.push(( localize(5745, "Status: {0}", content.status)));
|
|
87
|
+
}
|
|
88
|
+
if (content.durationInMillis !== undefined) {
|
|
89
|
+
lines.push(( localize(5746, "Duration: {0}ms", content.durationInMillis)));
|
|
90
|
+
}
|
|
91
|
+
if (content.timeToFirstTokenInMillis !== undefined) {
|
|
92
|
+
lines.push(( localize(5747, "Time to first token: {0}ms", content.timeToFirstTokenInMillis)));
|
|
93
|
+
}
|
|
94
|
+
if (content.inputTokens !== undefined) {
|
|
95
|
+
lines.push(( localize(5748, "Input tokens: {0}", content.inputTokens)));
|
|
96
|
+
}
|
|
97
|
+
if (content.outputTokens !== undefined) {
|
|
98
|
+
lines.push(( localize(5749, "Output tokens: {0}", content.outputTokens)));
|
|
99
|
+
}
|
|
100
|
+
if (content.cachedTokens !== undefined) {
|
|
101
|
+
lines.push(( localize(5750, "Cached tokens: {0}", content.cachedTokens)));
|
|
102
|
+
}
|
|
103
|
+
if (content.totalTokens !== undefined) {
|
|
104
|
+
lines.push(( localize(5751, "Total tokens: {0}", content.totalTokens)));
|
|
105
|
+
}
|
|
106
|
+
if (content.maxInputTokens !== undefined) {
|
|
107
|
+
lines.push(( localize(5752, "Max input tokens: {0}", content.maxInputTokens)));
|
|
108
|
+
}
|
|
109
|
+
if (content.maxOutputTokens !== undefined) {
|
|
110
|
+
lines.push(( localize(5753, "Max output tokens: {0}", content.maxOutputTokens)));
|
|
111
|
+
}
|
|
112
|
+
if (content.errorMessage) {
|
|
113
|
+
lines.push(( localize(5754, "Error: {0}", content.errorMessage)));
|
|
114
|
+
}
|
|
115
|
+
if (content.sections && content.sections.length > 0) {
|
|
116
|
+
lines.push("");
|
|
117
|
+
for (const section of content.sections) {
|
|
118
|
+
lines.push(`--- ${section.name} ---`);
|
|
119
|
+
lines.push(section.content);
|
|
120
|
+
lines.push("");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return lines.join("\n");
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { modelTurnContentToPlainText, renderModelTurnContent };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { IChatDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service";
|
|
4
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
|
|
5
|
+
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
6
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
7
|
+
export declare enum OverviewNavigation {
|
|
8
|
+
Home = "home",
|
|
9
|
+
Logs = "logs",
|
|
10
|
+
FlowChart = "flowchart"
|
|
11
|
+
}
|
|
12
|
+
export declare class ChatDebugOverviewView extends Disposable {
|
|
13
|
+
private readonly chatService;
|
|
14
|
+
private readonly chatDebugService;
|
|
15
|
+
private readonly chatWidgetService;
|
|
16
|
+
private readonly chatSessionsService;
|
|
17
|
+
private readonly _onNavigate;
|
|
18
|
+
readonly onNavigate: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<OverviewNavigation>;
|
|
19
|
+
readonly container: HTMLElement;
|
|
20
|
+
private readonly content;
|
|
21
|
+
private readonly breadcrumbWidget;
|
|
22
|
+
private readonly loadDisposables;
|
|
23
|
+
private currentSessionResource;
|
|
24
|
+
private metricsContainer;
|
|
25
|
+
private isFirstLoad;
|
|
26
|
+
constructor(parent: HTMLElement, chatService: IChatService, chatDebugService: IChatDebugService, chatWidgetService: IChatWidgetService, chatSessionsService: IChatSessionsService);
|
|
27
|
+
setSession(sessionResource: URI): void;
|
|
28
|
+
show(): void;
|
|
29
|
+
hide(): void;
|
|
30
|
+
refresh(): void;
|
|
31
|
+
updateBreadcrumb(): void;
|
|
32
|
+
private load;
|
|
33
|
+
private renderSessionDetails;
|
|
34
|
+
private getLocationLabel;
|
|
35
|
+
private renderDerivedOverview;
|
|
36
|
+
private renderMetricsShimmer;
|
|
37
|
+
private renderMetricsContent;
|
|
38
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { $ as $$1, append, hide, show, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { BreadcrumbsWidget } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget';
|
|
5
|
+
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
6
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
7
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
+
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
10
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
|
+
import { defaultBreadcrumbsWidgetStyles, defaultButtonStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
12
|
+
import { ChatDebugLogLevel } from '../../common/chatDebugService.js';
|
|
13
|
+
import { IChatDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service';
|
|
14
|
+
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
15
|
+
import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
16
|
+
import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
|
|
17
|
+
import { LocalChatSessionUri, getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
|
|
18
|
+
import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
19
|
+
import { setupBreadcrumbKeyboardNavigation, TextBreadcrumbItem } from './chatDebugTypes.js';
|
|
20
|
+
|
|
21
|
+
const $ = $$1;
|
|
22
|
+
var OverviewNavigation;
|
|
23
|
+
(function(OverviewNavigation) {
|
|
24
|
+
OverviewNavigation["Home"] = "home";
|
|
25
|
+
OverviewNavigation["Logs"] = "logs";
|
|
26
|
+
OverviewNavigation["FlowChart"] = "flowchart";
|
|
27
|
+
})(OverviewNavigation || (OverviewNavigation = {}));
|
|
28
|
+
let ChatDebugOverviewView = class ChatDebugOverviewView extends Disposable {
|
|
29
|
+
constructor(
|
|
30
|
+
parent,
|
|
31
|
+
chatService,
|
|
32
|
+
chatDebugService,
|
|
33
|
+
chatWidgetService,
|
|
34
|
+
chatSessionsService
|
|
35
|
+
) {
|
|
36
|
+
super();
|
|
37
|
+
this.chatService = chatService;
|
|
38
|
+
this.chatDebugService = chatDebugService;
|
|
39
|
+
this.chatWidgetService = chatWidgetService;
|
|
40
|
+
this.chatSessionsService = chatSessionsService;
|
|
41
|
+
this._onNavigate = this._register(( new Emitter()));
|
|
42
|
+
this.onNavigate = this._onNavigate.event;
|
|
43
|
+
this.loadDisposables = this._register(( new DisposableStore()));
|
|
44
|
+
this.isFirstLoad = true;
|
|
45
|
+
this.container = append(parent, $(".chat-debug-overview"));
|
|
46
|
+
hide(this.container);
|
|
47
|
+
const breadcrumbContainer = append(this.container, $(".chat-debug-breadcrumb"));
|
|
48
|
+
this.breadcrumbWidget = this._register(( new BreadcrumbsWidget(
|
|
49
|
+
breadcrumbContainer,
|
|
50
|
+
3,
|
|
51
|
+
undefined,
|
|
52
|
+
Codicon.chevronRight,
|
|
53
|
+
defaultBreadcrumbsWidgetStyles
|
|
54
|
+
)));
|
|
55
|
+
this._register(
|
|
56
|
+
setupBreadcrumbKeyboardNavigation(breadcrumbContainer, this.breadcrumbWidget)
|
|
57
|
+
);
|
|
58
|
+
this._register(this.breadcrumbWidget.onDidSelectItem(e => {
|
|
59
|
+
if (e.type === "select" && e.item instanceof TextBreadcrumbItem) {
|
|
60
|
+
this.breadcrumbWidget.setSelection(undefined);
|
|
61
|
+
const items = this.breadcrumbWidget.getItems();
|
|
62
|
+
const idx = items.indexOf(e.item);
|
|
63
|
+
if (idx === 0) {
|
|
64
|
+
this._onNavigate.fire(OverviewNavigation.Home);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
this.content = append(this.container, $(".chat-debug-overview-content"));
|
|
69
|
+
}
|
|
70
|
+
setSession(sessionResource) {
|
|
71
|
+
this.currentSessionResource = sessionResource;
|
|
72
|
+
this.isFirstLoad = true;
|
|
73
|
+
}
|
|
74
|
+
show() {
|
|
75
|
+
show(this.container);
|
|
76
|
+
this.load();
|
|
77
|
+
}
|
|
78
|
+
hide() {
|
|
79
|
+
hide(this.container);
|
|
80
|
+
}
|
|
81
|
+
refresh() {
|
|
82
|
+
if (this.container.style.display !== "none") {
|
|
83
|
+
if (this.metricsContainer && this.currentSessionResource) {
|
|
84
|
+
clearNode(this.metricsContainer);
|
|
85
|
+
const events = this.chatDebugService.getEvents(this.currentSessionResource);
|
|
86
|
+
this.renderMetricsContent(this.metricsContainer, events);
|
|
87
|
+
this.isFirstLoad = false;
|
|
88
|
+
} else {
|
|
89
|
+
this.load();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
updateBreadcrumb() {
|
|
94
|
+
if (!this.currentSessionResource) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const sessionTitle = this.chatService.getSessionTitle(this.currentSessionResource) || LocalChatSessionUri.parseLocalSessionId(this.currentSessionResource) || ( this.currentSessionResource.toString());
|
|
98
|
+
this.breadcrumbWidget.setItems([( new TextBreadcrumbItem(( localize(5755, "Agent Debug Panel")), true)), ( new TextBreadcrumbItem(sessionTitle))]);
|
|
99
|
+
}
|
|
100
|
+
load() {
|
|
101
|
+
clearNode(this.content);
|
|
102
|
+
this.loadDisposables.clear();
|
|
103
|
+
this.updateBreadcrumb();
|
|
104
|
+
if (!this.currentSessionResource) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const sessionTitle = this.chatService.getSessionTitle(this.currentSessionResource) || LocalChatSessionUri.parseLocalSessionId(this.currentSessionResource) || ( this.currentSessionResource.toString());
|
|
108
|
+
const titleRow = append(this.content, $(".chat-debug-overview-title-row"));
|
|
109
|
+
const titleEl = append(titleRow, $("h2.chat-debug-overview-title"));
|
|
110
|
+
append(titleEl, $(`span${ThemeIcon.asCSSSelector(Codicon.comment)}`));
|
|
111
|
+
titleEl.append(sessionTitle);
|
|
112
|
+
const titleActions = append(titleRow, $(".chat-debug-overview-title-actions"));
|
|
113
|
+
const revealSessionBtn = this.loadDisposables.add(( new Button(titleActions, {
|
|
114
|
+
ariaLabel: ( localize(5756, "Reveal Chat Session")),
|
|
115
|
+
title: ( localize(5756, "Reveal Chat Session"))
|
|
116
|
+
})));
|
|
117
|
+
revealSessionBtn.element.classList.add("chat-debug-icon-button");
|
|
118
|
+
revealSessionBtn.icon = Codicon.goToFile;
|
|
119
|
+
this.loadDisposables.add(revealSessionBtn.onDidClick(() => {
|
|
120
|
+
if (this.currentSessionResource) {
|
|
121
|
+
this.chatWidgetService.openSession(this.currentSessionResource);
|
|
122
|
+
}
|
|
123
|
+
}));
|
|
124
|
+
this.renderSessionDetails(this.currentSessionResource);
|
|
125
|
+
const events = this.chatDebugService.getEvents(this.currentSessionResource);
|
|
126
|
+
this.renderDerivedOverview(events, this.isFirstLoad && events.length === 0);
|
|
127
|
+
this.isFirstLoad = false;
|
|
128
|
+
}
|
|
129
|
+
renderSessionDetails(sessionUri) {
|
|
130
|
+
const model = this.chatService.getSession(sessionUri);
|
|
131
|
+
const details = [];
|
|
132
|
+
const sessionType = getChatSessionType(sessionUri);
|
|
133
|
+
const contribution = this.chatSessionsService.getChatSessionContribution(sessionType);
|
|
134
|
+
const sessionTypeName = contribution?.displayName || (sessionType === "local" ? ( localize(5757, "Local")) : sessionType);
|
|
135
|
+
details.push({
|
|
136
|
+
label: ( localize(5758, "Session Type")),
|
|
137
|
+
value: sessionTypeName
|
|
138
|
+
});
|
|
139
|
+
if (model) {
|
|
140
|
+
const locationLabel = this.getLocationLabel(model.initialLocation);
|
|
141
|
+
details.push({
|
|
142
|
+
label: ( localize(5759, "Location")),
|
|
143
|
+
value: locationLabel
|
|
144
|
+
});
|
|
145
|
+
const inProgress = model.requestInProgress.get();
|
|
146
|
+
const statusLabel = inProgress ? ( localize(5760, "In Progress")) : ( localize(5761, "Idle"));
|
|
147
|
+
details.push({
|
|
148
|
+
label: ( localize(5762, "Status")),
|
|
149
|
+
value: statusLabel
|
|
150
|
+
});
|
|
151
|
+
const timing = model.timing;
|
|
152
|
+
details.push({
|
|
153
|
+
label: ( localize(5763, "Created")),
|
|
154
|
+
value: ( new Date(timing.created)).toLocaleString()
|
|
155
|
+
});
|
|
156
|
+
if (timing.lastRequestEnded) {
|
|
157
|
+
details.push({
|
|
158
|
+
label: ( localize(5764, "Last Activity")),
|
|
159
|
+
value: ( new Date(timing.lastRequestEnded)).toLocaleString()
|
|
160
|
+
});
|
|
161
|
+
} else if (timing.lastRequestStarted) {
|
|
162
|
+
details.push({
|
|
163
|
+
label: ( localize(5764, "Last Activity")),
|
|
164
|
+
value: ( new Date(timing.lastRequestStarted)).toLocaleString()
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (details.length > 0) {
|
|
169
|
+
const section = append(this.content, $(".chat-debug-overview-section"));
|
|
170
|
+
append(
|
|
171
|
+
section,
|
|
172
|
+
$("h3.chat-debug-overview-section-label", undefined, ( localize(5765, "Session Details")))
|
|
173
|
+
);
|
|
174
|
+
const detailsGrid = append(section, $(".chat-debug-overview-details"));
|
|
175
|
+
for (const detail of details) {
|
|
176
|
+
const row = append(detailsGrid, $(".chat-debug-overview-detail-row"));
|
|
177
|
+
append(row, $("span.chat-debug-overview-detail-label", undefined, detail.label));
|
|
178
|
+
append(row, $("span.chat-debug-overview-detail-value", undefined, detail.value));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
getLocationLabel(location) {
|
|
183
|
+
switch (location) {
|
|
184
|
+
case ChatAgentLocation.Chat:
|
|
185
|
+
return localize(5766, "Chat Panel");
|
|
186
|
+
case ChatAgentLocation.Terminal:
|
|
187
|
+
return localize(5767, "Terminal");
|
|
188
|
+
case ChatAgentLocation.Notebook:
|
|
189
|
+
return localize(5768, "Notebook");
|
|
190
|
+
case ChatAgentLocation.EditorInline:
|
|
191
|
+
return localize(5769, "Editor Inline");
|
|
192
|
+
default:
|
|
193
|
+
return String(location);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
renderDerivedOverview(events, showShimmer) {
|
|
197
|
+
const metricsSection = append(this.content, $(".chat-debug-overview-section"));
|
|
198
|
+
append(
|
|
199
|
+
metricsSection,
|
|
200
|
+
$("h3.chat-debug-overview-section-label", undefined, ( localize(5770, "Summary")))
|
|
201
|
+
);
|
|
202
|
+
this.metricsContainer = append(metricsSection, $(".chat-debug-overview-metrics"));
|
|
203
|
+
if (showShimmer) {
|
|
204
|
+
this.renderMetricsShimmer(this.metricsContainer);
|
|
205
|
+
} else {
|
|
206
|
+
this.renderMetricsContent(this.metricsContainer, events);
|
|
207
|
+
}
|
|
208
|
+
const actionsSection = append(this.content, $(".chat-debug-overview-section"));
|
|
209
|
+
append(
|
|
210
|
+
actionsSection,
|
|
211
|
+
$("h3.chat-debug-overview-section-label", undefined, ( localize(5771, "Explore Trace Data")))
|
|
212
|
+
);
|
|
213
|
+
const row = append(actionsSection, $(".chat-debug-overview-actions"));
|
|
214
|
+
const viewLogsBtn = this.loadDisposables.add(( new Button(row, {
|
|
215
|
+
...defaultButtonStyles,
|
|
216
|
+
secondary: true,
|
|
217
|
+
supportIcons: true,
|
|
218
|
+
title: ( localize(5772, "View Logs"))
|
|
219
|
+
})));
|
|
220
|
+
viewLogsBtn.element.classList.add("chat-debug-overview-action-button");
|
|
221
|
+
viewLogsBtn.label = `$(list-flat) ${( localize(5772, "View Logs"))}`;
|
|
222
|
+
this.loadDisposables.add(viewLogsBtn.onDidClick(() => {
|
|
223
|
+
this._onNavigate.fire(OverviewNavigation.Logs);
|
|
224
|
+
}));
|
|
225
|
+
const flowChartBtn = this.loadDisposables.add(( new Button(row, {
|
|
226
|
+
...defaultButtonStyles,
|
|
227
|
+
secondary: true,
|
|
228
|
+
supportIcons: true,
|
|
229
|
+
title: ( localize(5773, "Agent Flow Chart"))
|
|
230
|
+
})));
|
|
231
|
+
flowChartBtn.element.classList.add("chat-debug-overview-action-button");
|
|
232
|
+
flowChartBtn.label = `$(type-hierarchy) ${( localize(5773, "Agent Flow Chart"))}`;
|
|
233
|
+
this.loadDisposables.add(flowChartBtn.onDidClick(() => {
|
|
234
|
+
this._onNavigate.fire(OverviewNavigation.FlowChart);
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
renderMetricsShimmer(container) {
|
|
238
|
+
const placeholderLabels = [( localize(5774, "Model Turns")), ( localize(5775, "Tool Calls")), ( localize(5776, "Total Tokens")), ( localize(5777, "Errors")), ( localize(5778, "Total Events"))];
|
|
239
|
+
for (const label of placeholderLabels) {
|
|
240
|
+
const card = append(container, $(".chat-debug-overview-metric-card"));
|
|
241
|
+
append(card, $("div.chat-debug-overview-metric-label", undefined, label));
|
|
242
|
+
const valueEl = append(card, $("div.chat-debug-overview-metric-value"));
|
|
243
|
+
const shimmer = append(valueEl, $("span.chat-debug-overview-metric-shimmer"));
|
|
244
|
+
shimmer.textContent = " ";
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
renderMetricsContent(container, events) {
|
|
248
|
+
const modelTurns = events.filter(e => e.kind === "modelTurn");
|
|
249
|
+
const toolCalls = events.filter(e => e.kind === "toolCall");
|
|
250
|
+
const errors = events.filter(
|
|
251
|
+
e => (e.kind === "generic" && e.level === ChatDebugLogLevel.Error) || (e.kind === "toolCall" && e.result === "error")
|
|
252
|
+
);
|
|
253
|
+
const totalTokens = modelTurns.reduce((sum, e) => sum + (e.totalTokens ?? 0), 0);
|
|
254
|
+
const metrics = [{
|
|
255
|
+
label: ( localize(5774, "Model Turns")),
|
|
256
|
+
value: String(modelTurns.length)
|
|
257
|
+
}, {
|
|
258
|
+
label: ( localize(5775, "Tool Calls")),
|
|
259
|
+
value: String(toolCalls.length)
|
|
260
|
+
}, {
|
|
261
|
+
label: ( localize(5776, "Total Tokens")),
|
|
262
|
+
value: totalTokens.toLocaleString()
|
|
263
|
+
}, {
|
|
264
|
+
label: ( localize(5777, "Errors")),
|
|
265
|
+
value: String(errors.length)
|
|
266
|
+
}, {
|
|
267
|
+
label: ( localize(5778, "Total Events")),
|
|
268
|
+
value: String(events.length)
|
|
269
|
+
}];
|
|
270
|
+
for (const metric of metrics) {
|
|
271
|
+
const card = append(container, $(".chat-debug-overview-metric-card"));
|
|
272
|
+
append(card, $("div.chat-debug-overview-metric-label", undefined, metric.label));
|
|
273
|
+
append(card, $("div.chat-debug-overview-metric-value", undefined, metric.value));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
ChatDebugOverviewView = ( __decorate([( __param(1, IChatService)), ( __param(2, IChatDebugService)), ( __param(3, IChatWidgetService)), ( __param(4, IChatSessionsService))], ChatDebugOverviewView));
|
|
278
|
+
|
|
279
|
+
export { ChatDebugOverviewView, OverviewNavigation };
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
3
|
+
import { IChatDebugEventToolCallContent } from "../../common/chatDebugService.js";
|
|
4
|
+
/**
|
|
5
|
+
* Render a resolved tool call content with structured sections for
|
|
6
|
+
* tool name, status, duration, arguments, and output.
|
|
7
|
+
* Reuses the existing message content and collapsible section components.
|
|
8
|
+
* When JSON is detected in input/output, renders it with syntax highlighting
|
|
9
|
+
* using the editor's tokenization.
|
|
10
|
+
*/
|
|
11
|
+
export declare function renderToolCallContent(content: IChatDebugEventToolCallContent, languageService: ILanguageService): Promise<{
|
|
12
|
+
element: HTMLElement;
|
|
13
|
+
disposables: DisposableStore;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Convert a resolved tool call content to plain text for clipboard / editor output.
|
|
17
|
+
*/
|
|
18
|
+
export declare function toolCallContentToPlainText(content: IChatDebugEventToolCallContent): string;
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
|
|
2
|
+
import { $ as $$1, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
3
|
+
import { createTrustedTypesPolicy } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/trustedTypes';
|
|
4
|
+
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
+
import { tokenizeToString } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/textToHtmlTokenizer';
|
|
7
|
+
import { setupCollapsibleToggle } from './chatDebugCollapsible.js';
|
|
8
|
+
|
|
9
|
+
const $ = $$1;
|
|
10
|
+
const _ttpPolicy = createTrustedTypesPolicy("chatDebugTokenizer", {
|
|
11
|
+
createHTML(html) {
|
|
12
|
+
return html;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
function tryParseJSON(text) {
|
|
16
|
+
try {
|
|
17
|
+
return {
|
|
18
|
+
parsed: JSON.parse(text),
|
|
19
|
+
isJSON: true
|
|
20
|
+
};
|
|
21
|
+
} catch {
|
|
22
|
+
return {
|
|
23
|
+
isJSON: false
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function renderSection(
|
|
28
|
+
parent,
|
|
29
|
+
label,
|
|
30
|
+
plainText,
|
|
31
|
+
tokenizedHtml,
|
|
32
|
+
disposables,
|
|
33
|
+
initiallyCollapsed = false
|
|
34
|
+
) {
|
|
35
|
+
const sectionEl = append(parent, $("div.chat-debug-message-section"));
|
|
36
|
+
const header = append(sectionEl, $("div.chat-debug-message-section-header"));
|
|
37
|
+
const chevron = append(header, $("span.chat-debug-message-section-chevron"));
|
|
38
|
+
append(header, $("span.chat-debug-message-section-title", undefined, label));
|
|
39
|
+
const wrapper = append(sectionEl, $("div.chat-debug-message-section-content-wrapper"));
|
|
40
|
+
const contentEl = append(wrapper, $("pre.chat-debug-message-section-content"));
|
|
41
|
+
contentEl.tabIndex = 0;
|
|
42
|
+
if (tokenizedHtml) {
|
|
43
|
+
const trustedHtml = _ttpPolicy?.createHTML(tokenizedHtml) ?? tokenizedHtml;
|
|
44
|
+
contentEl.innerHTML = trustedHtml;
|
|
45
|
+
} else {
|
|
46
|
+
contentEl.textContent = plainText;
|
|
47
|
+
}
|
|
48
|
+
setupCollapsibleToggle(chevron, header, wrapper, disposables, initiallyCollapsed);
|
|
49
|
+
}
|
|
50
|
+
async function renderToolCallContent(content, languageService) {
|
|
51
|
+
const disposables = ( new DisposableStore());
|
|
52
|
+
const container = $("div.chat-debug-message-content");
|
|
53
|
+
container.tabIndex = 0;
|
|
54
|
+
append(
|
|
55
|
+
container,
|
|
56
|
+
$("div.chat-debug-message-content-title", undefined, content.toolName)
|
|
57
|
+
);
|
|
58
|
+
const statusParts = [];
|
|
59
|
+
if (content.result) {
|
|
60
|
+
statusParts.push(content.result === "success" ? ( localize(5779, "Success")) : ( localize(5780, "Error")));
|
|
61
|
+
}
|
|
62
|
+
if (content.durationInMillis !== undefined) {
|
|
63
|
+
statusParts.push(( localize(5781, "{0}ms", content.durationInMillis)));
|
|
64
|
+
}
|
|
65
|
+
if (statusParts.length > 0) {
|
|
66
|
+
append(container, $(
|
|
67
|
+
"div.chat-debug-message-content-summary",
|
|
68
|
+
undefined,
|
|
69
|
+
statusParts.join(" · ")
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
const sectionsContainer = append(container, $("div.chat-debug-message-sections"));
|
|
73
|
+
if (content.input) {
|
|
74
|
+
const result = tryParseJSON(content.input);
|
|
75
|
+
const plainText = result.isJSON ? JSON.stringify(result.parsed, null, 2) : content.input;
|
|
76
|
+
const tokenizedHtml = result.isJSON ? await tokenizeToString(languageService, plainText, "json") : undefined;
|
|
77
|
+
renderSection(sectionsContainer, ( localize(5782, "Arguments")), plainText, tokenizedHtml, disposables);
|
|
78
|
+
}
|
|
79
|
+
if (content.output) {
|
|
80
|
+
const result = tryParseJSON(content.output);
|
|
81
|
+
const plainText = result.isJSON ? JSON.stringify(result.parsed, null, 2) : content.output;
|
|
82
|
+
const tokenizedHtml = result.isJSON ? await tokenizeToString(languageService, plainText, "json") : undefined;
|
|
83
|
+
renderSection(sectionsContainer, ( localize(5783, "Output")), plainText, tokenizedHtml, disposables);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
element: container,
|
|
87
|
+
disposables
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function toolCallContentToPlainText(content) {
|
|
91
|
+
const lines = [];
|
|
92
|
+
lines.push(( localize(5784, "Tool: {0}", content.toolName)));
|
|
93
|
+
if (content.result) {
|
|
94
|
+
lines.push(( localize(5785, "Status: {0}", content.result)));
|
|
95
|
+
}
|
|
96
|
+
if (content.durationInMillis !== undefined) {
|
|
97
|
+
lines.push(( localize(5786, "Duration: {0}ms", content.durationInMillis)));
|
|
98
|
+
}
|
|
99
|
+
if (content.input) {
|
|
100
|
+
lines.push("");
|
|
101
|
+
lines.push(`[${( localize(5782, "Arguments"))}]`);
|
|
102
|
+
try {
|
|
103
|
+
const parsed = JSON.parse(content.input);
|
|
104
|
+
lines.push(JSON.stringify(parsed, null, 2));
|
|
105
|
+
} catch {
|
|
106
|
+
lines.push(content.input);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (content.output) {
|
|
110
|
+
lines.push("");
|
|
111
|
+
lines.push(`[${( localize(5783, "Output"))}]`);
|
|
112
|
+
try {
|
|
113
|
+
const parsed = JSON.parse(content.output);
|
|
114
|
+
lines.push(JSON.stringify(parsed, null, 2));
|
|
115
|
+
} catch {
|
|
116
|
+
lines.push(content.output);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return lines.join("\n");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { renderToolCallContent, toolCallContentToPlainText };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BreadcrumbsItem, BreadcrumbsWidget } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget";
|
|
2
|
+
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
+
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
5
|
+
import { IEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor";
|
|
6
|
+
/**
|
|
7
|
+
* Options passed to the chat debug editor pane to control
|
|
8
|
+
* which session and view to navigate to.
|
|
9
|
+
*/
|
|
10
|
+
export interface IChatDebugEditorOptions extends IEditorOptions {
|
|
11
|
+
readonly sessionResource?: URI;
|
|
12
|
+
readonly viewHint?: "home" | "overview" | "logs" | "flowchart";
|
|
13
|
+
/** When set, automatically applies this text as the log filter. */
|
|
14
|
+
readonly filter?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare enum ViewState {
|
|
17
|
+
Home = "home",
|
|
18
|
+
Overview = "overview",
|
|
19
|
+
Logs = "logs",
|
|
20
|
+
FlowChart = "flowchart"
|
|
21
|
+
}
|
|
22
|
+
export declare enum LogsViewMode {
|
|
23
|
+
List = "list",
|
|
24
|
+
Tree = "tree"
|
|
25
|
+
}
|
|
26
|
+
export declare const CHAT_DEBUG_FILTER_ACTIVE: RawContextKey<boolean>;
|
|
27
|
+
export declare const CHAT_DEBUG_KIND_TOOL_CALL: RawContextKey<boolean>;
|
|
28
|
+
export declare const CHAT_DEBUG_KIND_MODEL_TURN: RawContextKey<boolean>;
|
|
29
|
+
export declare const CHAT_DEBUG_KIND_PROMPT_DISCOVERY: RawContextKey<boolean>;
|
|
30
|
+
export declare const CHAT_DEBUG_KIND_SUBAGENT: RawContextKey<boolean>;
|
|
31
|
+
export declare const CHAT_DEBUG_CMD_TOGGLE_TOOL_CALL = "chatDebug.filter.toggleToolCall";
|
|
32
|
+
export declare const CHAT_DEBUG_CMD_TOGGLE_MODEL_TURN = "chatDebug.filter.toggleModelTurn";
|
|
33
|
+
export declare const CHAT_DEBUG_CMD_TOGGLE_PROMPT_DISCOVERY = "chatDebug.filter.togglePromptDiscovery";
|
|
34
|
+
export declare const CHAT_DEBUG_CMD_TOGGLE_SUBAGENT = "chatDebug.filter.toggleSubagent";
|
|
35
|
+
export declare class TextBreadcrumbItem extends BreadcrumbsItem {
|
|
36
|
+
private readonly _text;
|
|
37
|
+
private readonly _isLink;
|
|
38
|
+
constructor(_text: string, _isLink?: boolean);
|
|
39
|
+
equals(other: BreadcrumbsItem): boolean;
|
|
40
|
+
dispose(): void;
|
|
41
|
+
render(container: HTMLElement): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Wire up Left/Right arrow, Home/End, and Enter keyboard navigation
|
|
45
|
+
* on a BreadcrumbsWidget container.
|
|
46
|
+
*/
|
|
47
|
+
export declare function setupBreadcrumbKeyboardNavigation(container: HTMLElement, widget: BreadcrumbsWidget): IDisposable;
|