@codingame/monaco-vscode-chat-service-override 32.0.0 → 32.0.1
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 +1 -0
- package/package.json +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginsView.js +637 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostPermissionUiContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +53 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +1 -1
- 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 +4 -4
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +22 -22
- 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/aiCustomization/aiCustomizationIcons.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.js +97 -97
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.js +43 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.js +58 -58
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedMcpServerDetail.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.js +51 -51
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +229 -229
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.view.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.view.contribution.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatCustomizationDiscoveryRenderer.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +99 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugDetailPanel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventDetailRenderer.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEventList.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFilters.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +22 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugMessageContentRenderer.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugModelTurnContentRenderer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugToolCallContentRenderer.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatImageCarouselService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +43 -43
- 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.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupGrowthSession.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommands.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +57 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatTipCatalog.js +19 -19
- 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.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/defaultModelContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/enablementStatusWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackEditorContribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginInstallService.js +25 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginSources.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/pluginUrlHandler.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.js +27 -27
- 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 +8 -8
- 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.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/renameTool.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/usagesTool.js +6 -6
- 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/editor/chatInputCompletions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
- 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.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +18 -18
- 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.js +150 -150
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +4 -4
- 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 +7 -7
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +3 -3
- 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/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sendToTerminalTool.js +10 -10
- 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/chat/browser/chatDebug/chatDebugEventDetailRenderer.js
CHANGED
|
@@ -7,54 +7,54 @@ function formatEventDetail(event) {
|
|
|
7
7
|
switch (event.kind) {
|
|
8
8
|
case "toolCall":
|
|
9
9
|
{
|
|
10
|
-
const parts = [( localize(
|
|
10
|
+
const parts = [( localize(6126, "Tool: {0}", event.toolName))];
|
|
11
11
|
if (event.toolCallId) {
|
|
12
|
-
parts.push(( localize(
|
|
12
|
+
parts.push(( localize(6127, "Call ID: {0}", event.toolCallId)));
|
|
13
13
|
}
|
|
14
14
|
if (event.result) {
|
|
15
|
-
parts.push(( localize(
|
|
15
|
+
parts.push(( localize(6128, "Result: {0}", event.result)));
|
|
16
16
|
}
|
|
17
17
|
if (event.durationInMillis !== undefined) {
|
|
18
18
|
parts.push(( localize(
|
|
19
|
-
|
|
19
|
+
6129,
|
|
20
20
|
"Duration: {0}ms",
|
|
21
21
|
numberFormatter.value.format(event.durationInMillis)
|
|
22
22
|
)));
|
|
23
23
|
}
|
|
24
24
|
if (event.input) {
|
|
25
|
-
parts.push(`\n${( localize(
|
|
25
|
+
parts.push(`\n${( localize(6130, "Input:"))}\n${event.input}`);
|
|
26
26
|
}
|
|
27
27
|
if (event.output) {
|
|
28
|
-
parts.push(`\n${( localize(
|
|
28
|
+
parts.push(`\n${( localize(6131, "Output:"))}\n${event.output}`);
|
|
29
29
|
}
|
|
30
30
|
return parts.join("\n");
|
|
31
31
|
}
|
|
32
32
|
case "modelTurn":
|
|
33
33
|
{
|
|
34
|
-
const parts = [event.model ?? ( localize(
|
|
34
|
+
const parts = [event.model ?? ( localize(6132, "Model Turn"))];
|
|
35
35
|
if (event.inputTokens !== undefined) {
|
|
36
|
-
parts.push(( localize(
|
|
36
|
+
parts.push(( localize(6133, "Input tokens: {0}", numberFormatter.value.format(event.inputTokens))));
|
|
37
37
|
}
|
|
38
38
|
if (event.outputTokens !== undefined) {
|
|
39
39
|
parts.push(( localize(
|
|
40
|
-
|
|
40
|
+
6134,
|
|
41
41
|
"Output tokens: {0}",
|
|
42
42
|
numberFormatter.value.format(event.outputTokens)
|
|
43
43
|
)));
|
|
44
44
|
}
|
|
45
45
|
if (event.cachedTokens !== undefined) {
|
|
46
46
|
parts.push(( localize(
|
|
47
|
-
|
|
47
|
+
6135,
|
|
48
48
|
"Cached tokens: {0}",
|
|
49
49
|
numberFormatter.value.format(event.cachedTokens)
|
|
50
50
|
)));
|
|
51
51
|
}
|
|
52
52
|
if (event.totalTokens !== undefined) {
|
|
53
|
-
parts.push(( localize(
|
|
53
|
+
parts.push(( localize(6136, "Total tokens: {0}", numberFormatter.value.format(event.totalTokens))));
|
|
54
54
|
}
|
|
55
55
|
if (event.durationInMillis !== undefined) {
|
|
56
56
|
parts.push(( localize(
|
|
57
|
-
|
|
57
|
+
6129,
|
|
58
58
|
"Duration: {0}ms",
|
|
59
59
|
numberFormatter.value.format(event.durationInMillis)
|
|
60
60
|
)));
|
|
@@ -65,26 +65,26 @@ function formatEventDetail(event) {
|
|
|
65
65
|
return `${event.name}\n${event.details ?? ""}`;
|
|
66
66
|
case "subagentInvocation":
|
|
67
67
|
{
|
|
68
|
-
const parts = [( localize(
|
|
68
|
+
const parts = [( localize(6137, "Agent: {0}", event.agentName))];
|
|
69
69
|
if (event.description) {
|
|
70
|
-
parts.push(( localize(
|
|
70
|
+
parts.push(( localize(6138, "Description: {0}", event.description)));
|
|
71
71
|
}
|
|
72
72
|
if (event.status) {
|
|
73
|
-
parts.push(( localize(
|
|
73
|
+
parts.push(( localize(6139, "Status: {0}", event.status)));
|
|
74
74
|
}
|
|
75
75
|
if (event.durationInMillis !== undefined) {
|
|
76
76
|
parts.push(( localize(
|
|
77
|
-
|
|
77
|
+
6129,
|
|
78
78
|
"Duration: {0}ms",
|
|
79
79
|
numberFormatter.value.format(event.durationInMillis)
|
|
80
80
|
)));
|
|
81
81
|
}
|
|
82
82
|
if (event.toolCallCount !== undefined) {
|
|
83
|
-
parts.push(( localize(
|
|
83
|
+
parts.push(( localize(6140, "Tool calls: {0}", numberFormatter.value.format(event.toolCallCount))));
|
|
84
84
|
}
|
|
85
85
|
if (event.modelTurnCount !== undefined) {
|
|
86
86
|
parts.push(( localize(
|
|
87
|
-
|
|
87
|
+
6141,
|
|
88
88
|
"Model turns: {0}",
|
|
89
89
|
numberFormatter.value.format(event.modelTurnCount)
|
|
90
90
|
)));
|
|
@@ -93,7 +93,7 @@ function formatEventDetail(event) {
|
|
|
93
93
|
}
|
|
94
94
|
case "userMessage":
|
|
95
95
|
{
|
|
96
|
-
const parts = [( localize(
|
|
96
|
+
const parts = [( localize(6142, "User Message: {0}", event.message))];
|
|
97
97
|
for (const section of event.sections) {
|
|
98
98
|
parts.push(`\n--- ${section.name} ---\n${section.content}`);
|
|
99
99
|
}
|
|
@@ -101,7 +101,7 @@ function formatEventDetail(event) {
|
|
|
101
101
|
}
|
|
102
102
|
case "agentResponse":
|
|
103
103
|
{
|
|
104
|
-
const parts = [( localize(
|
|
104
|
+
const parts = [( localize(6143, "Agent Response: {0}", event.message))];
|
|
105
105
|
for (const section of event.sections) {
|
|
106
106
|
parts.push(`\n--- ${section.name} ---\n${section.content}`);
|
|
107
107
|
}
|
|
@@ -25,17 +25,17 @@ function getEventCreatedText(element) {
|
|
|
25
25
|
function getEventNameText(element) {
|
|
26
26
|
switch (element.kind) {
|
|
27
27
|
case "toolCall":
|
|
28
|
-
return safeStr(element.toolName, ( localize(
|
|
28
|
+
return safeStr(element.toolName, ( localize(6144, "(unknown)")));
|
|
29
29
|
case "modelTurn":
|
|
30
|
-
return safeStr(element.model) || ( localize(
|
|
30
|
+
return safeStr(element.model) || ( localize(6145, "Model Turn"));
|
|
31
31
|
case "generic":
|
|
32
|
-
return safeStr(element.name, ( localize(
|
|
32
|
+
return safeStr(element.name, ( localize(6144, "(unknown)")));
|
|
33
33
|
case "subagentInvocation":
|
|
34
|
-
return safeStr(element.agentName, ( localize(
|
|
34
|
+
return safeStr(element.agentName, ( localize(6144, "(unknown)")));
|
|
35
35
|
case "userMessage":
|
|
36
|
-
return localize(
|
|
36
|
+
return localize(6146, "User Message");
|
|
37
37
|
case "agentResponse":
|
|
38
|
-
return localize(
|
|
38
|
+
return localize(6147, "Agent Response");
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
function getEventDetailsText(element) {
|
|
@@ -45,7 +45,7 @@ function getEventDetailsText(element) {
|
|
|
45
45
|
case "modelTurn":
|
|
46
46
|
return [
|
|
47
47
|
safeStr(element.requestName),
|
|
48
|
-
element.totalTokens !== undefined ? ( localize(
|
|
48
|
+
element.totalTokens !== undefined ? ( localize(6148, "{0} tokens", numberFormatter.value.format(element.totalTokens))) : ""
|
|
49
49
|
].filter(Boolean).join(" · ");
|
|
50
50
|
case "generic":
|
|
51
51
|
return safeStr(element.details);
|
|
@@ -96,16 +96,16 @@ function registerFilterMenuItems(state, scopedContextKeyService) {
|
|
|
96
96
|
when: CHAT_DEBUG_FILTER_ACTIVE
|
|
97
97
|
}));
|
|
98
98
|
};
|
|
99
|
-
registerToggle(CHAT_DEBUG_CMD_TOGGLE_TOOL_CALL, ( localize(
|
|
99
|
+
registerToggle(CHAT_DEBUG_CMD_TOGGLE_TOOL_CALL, ( localize(6149, "Tool Calls")), CHAT_DEBUG_KIND_TOOL_CALL, "1_kind", () => state.filterKindToolCall, v => {
|
|
100
100
|
state.filterKindToolCall = v;
|
|
101
101
|
}, kindToolCallKey);
|
|
102
|
-
registerToggle(CHAT_DEBUG_CMD_TOGGLE_MODEL_TURN, ( localize(
|
|
102
|
+
registerToggle(CHAT_DEBUG_CMD_TOGGLE_MODEL_TURN, ( localize(6150, "Model Turns")), CHAT_DEBUG_KIND_MODEL_TURN, "1_kind", () => state.filterKindModelTurn, v => {
|
|
103
103
|
state.filterKindModelTurn = v;
|
|
104
104
|
}, kindModelTurnKey);
|
|
105
|
-
registerToggle(CHAT_DEBUG_CMD_TOGGLE_PROMPT_DISCOVERY, ( localize(
|
|
105
|
+
registerToggle(CHAT_DEBUG_CMD_TOGGLE_PROMPT_DISCOVERY, ( localize(6151, "Chat Customization")), CHAT_DEBUG_KIND_PROMPT_DISCOVERY, "1_kind", () => state.filterKindPromptDiscovery, v => {
|
|
106
106
|
state.filterKindPromptDiscovery = v;
|
|
107
107
|
}, kindPromptDiscoveryKey);
|
|
108
|
-
registerToggle(CHAT_DEBUG_CMD_TOGGLE_SUBAGENT, ( localize(
|
|
108
|
+
registerToggle(CHAT_DEBUG_CMD_TOGGLE_SUBAGENT, ( localize(6152, "Subagent Invocations")), CHAT_DEBUG_KIND_SUBAGENT, "1_kind", () => state.filterKindSubagent, v => {
|
|
109
109
|
state.filterKindSubagent = v;
|
|
110
110
|
}, kindSubagentKey);
|
|
111
111
|
return store;
|
|
@@ -98,8 +98,8 @@ let ChatDebugFlowChartView = class ChatDebugFlowChartView extends Disposable {
|
|
|
98
98
|
syncContextKeys();
|
|
99
99
|
const childInstantiationService = this._register(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, scopedContextKeyService]))));
|
|
100
100
|
this.filterWidget = this._register(childInstantiationService.createInstance(FilterWidget, {
|
|
101
|
-
placeholder: ( localize(
|
|
102
|
-
ariaLabel: ( localize(
|
|
101
|
+
placeholder: ( localize(6153, "Filter nodes...")),
|
|
102
|
+
ariaLabel: ( localize(6154, "Filter flow chart nodes"))
|
|
103
103
|
}));
|
|
104
104
|
const filterContainer = append(headerContainer, $(".viewpane-filter-container"));
|
|
105
105
|
filterContainer.appendChild(this.filterWidget.element);
|
|
@@ -158,7 +158,7 @@ let ChatDebugFlowChartView = class ChatDebugFlowChartView extends Disposable {
|
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
160
|
const sessionTitle = this.chatService.getSessionTitle(this.currentSessionResource) || LocalChatSessionUri.parseLocalSessionId(this.currentSessionResource) || ( this.currentSessionResource.toString());
|
|
161
|
-
this.breadcrumbWidget.setItems([( new TextBreadcrumbItem(( localize(
|
|
161
|
+
this.breadcrumbWidget.setItems([( new TextBreadcrumbItem(( localize(6155, "Agent Debug Logs")), true)), ( new TextBreadcrumbItem(sessionTitle, true)), ( new TextBreadcrumbItem(( localize(6156, "Agent Flow Chart"))))]);
|
|
162
162
|
}
|
|
163
163
|
load() {
|
|
164
164
|
const hadFocus = isAncestorOfActiveElement(this.content);
|
|
@@ -176,7 +176,7 @@ let ChatDebugFlowChartView = class ChatDebugFlowChartView extends Disposable {
|
|
|
176
176
|
}
|
|
177
177
|
if (events.length === 0) {
|
|
178
178
|
const emptyMsg = append(this.content, $(".chat-debug-flowchart-empty"));
|
|
179
|
-
emptyMsg.textContent = ( localize(
|
|
179
|
+
emptyMsg.textContent = ( localize(6157, "No events recorded for this session."));
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
const flowNodes = buildFlowGraph(events);
|
|
@@ -186,7 +186,7 @@ let ChatDebugFlowChartView = class ChatDebugFlowChartView extends Disposable {
|
|
|
186
186
|
});
|
|
187
187
|
if (filtered.length === 0) {
|
|
188
188
|
const emptyMsg = append(this.content, $(".chat-debug-flowchart-empty"));
|
|
189
|
-
emptyMsg.textContent = ( localize(
|
|
189
|
+
emptyMsg.textContent = ( localize(6158, "No nodes match the current filter."));
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
const slice = sliceFlowNodes(filtered, this.visibleLimit);
|
|
@@ -205,9 +205,9 @@ let ChatDebugFlowChartView = class ChatDebugFlowChartView extends Disposable {
|
|
|
205
205
|
const showMoreBtn = this.loadDisposables.add(( new Button(showMoreContainer, {
|
|
206
206
|
...defaultButtonStyles,
|
|
207
207
|
secondary: true,
|
|
208
|
-
title: ( localize(
|
|
208
|
+
title: ( localize(6159, "Load more nodes"))
|
|
209
209
|
})));
|
|
210
|
-
showMoreBtn.label = ( localize(
|
|
210
|
+
showMoreBtn.label = ( localize(6160, "Show More ({0})", remaining));
|
|
211
211
|
this.loadDisposables.add(showMoreBtn.onDidClick(() => {
|
|
212
212
|
this.visibleLimit += PAGE_SIZE;
|
|
213
213
|
this.load();
|
|
@@ -87,7 +87,7 @@ function buildFlowGraph(events) {
|
|
|
87
87
|
if (effectiveKind === "subagentInvocation") {
|
|
88
88
|
description = getSubagentDescription(event);
|
|
89
89
|
const cleanDesc = description?.replace(/^Subagent:\s*/i, "");
|
|
90
|
-
label = cleanDesc ? ( localize(
|
|
90
|
+
label = cleanDesc ? ( localize(6161, "Subagent: {0}", truncateLabel(cleanDesc, 30))) : ( localize(6162, "Subagent"));
|
|
91
91
|
if (description) {
|
|
92
92
|
if (tooltip && !tooltip.includes(description)) {
|
|
93
93
|
const lines = tooltip.split("\n");
|
|
@@ -300,13 +300,13 @@ function mergeDiscoveryNodes(nodes) {
|
|
|
300
300
|
const mergedId = `merged-discovery:${run[0].id}`;
|
|
301
301
|
const labels = ( run.map(n => n.label));
|
|
302
302
|
const uniqueLabels = [...( new Set(labels))];
|
|
303
|
-
const summaryLabel = uniqueLabels.length <= 2 ? uniqueLabels.join(", ") : ( localize(
|
|
303
|
+
const summaryLabel = uniqueLabels.length <= 2 ? uniqueLabels.join(", ") : ( localize(6163, "{0} +{1} more", uniqueLabels[0], run.length - 1));
|
|
304
304
|
result.push({
|
|
305
305
|
id: mergedId,
|
|
306
306
|
kind: "generic",
|
|
307
307
|
category: "discovery",
|
|
308
308
|
label: summaryLabel,
|
|
309
|
-
sublabel: ( localize(
|
|
309
|
+
sublabel: ( localize(6164, "{0} discovery steps", run.length)),
|
|
310
310
|
tooltip: ( run.map(n => n.label + (n.sublabel ? `: ${n.sublabel}` : ""))).join("\n"),
|
|
311
311
|
created: run[0].created,
|
|
312
312
|
children: [],
|
|
@@ -357,7 +357,7 @@ function mergeToolCallNodes(nodes) {
|
|
|
357
357
|
id: mergedId,
|
|
358
358
|
kind: "toolCall",
|
|
359
359
|
label: toolName,
|
|
360
|
-
sublabel: ( localize(
|
|
360
|
+
sublabel: ( localize(6165, "{0} calls", run.length)),
|
|
361
361
|
tooltip: ( run.map(n => n.label + (n.sublabel ? `: ${n.sublabel}` : ""))).join("\n"),
|
|
362
362
|
created: run[0].created,
|
|
363
363
|
children: [],
|
|
@@ -390,17 +390,17 @@ function getEventLabel(event, effectiveKind) {
|
|
|
390
390
|
const kind = effectiveKind ?? event.kind;
|
|
391
391
|
switch (kind) {
|
|
392
392
|
case "userMessage":
|
|
393
|
-
return localize(
|
|
393
|
+
return localize(6166, "User Message");
|
|
394
394
|
case "modelTurn":
|
|
395
|
-
return event.kind === "modelTurn" ? (event.model ?? ( localize(
|
|
395
|
+
return event.kind === "modelTurn" ? (event.model ?? ( localize(6167, "Model Turn"))) : ( localize(6167, "Model Turn"));
|
|
396
396
|
case "toolCall":
|
|
397
|
-
return event.kind === "toolCall" ? event.toolName : event.kind === "generic" ? event.name : ( localize(
|
|
397
|
+
return event.kind === "toolCall" ? event.toolName : event.kind === "generic" ? event.name : ( localize(6168, "Tool Call"));
|
|
398
398
|
case "subagentInvocation":
|
|
399
|
-
return event.kind === "subagentInvocation" ? event.agentName : ( localize(
|
|
399
|
+
return event.kind === "subagentInvocation" ? event.agentName : ( localize(6169, "Subagent"));
|
|
400
400
|
case "agentResponse":
|
|
401
|
-
return localize(
|
|
401
|
+
return localize(6170, "Agent Response");
|
|
402
402
|
case "generic":
|
|
403
|
-
return event.kind === "generic" ? event.name : ( localize(
|
|
403
|
+
return event.kind === "generic" ? event.name : ( localize(6171, "Event"));
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
function getEventSublabel(event, effectiveKind) {
|
|
@@ -413,7 +413,7 @@ function getEventSublabel(event, effectiveKind) {
|
|
|
413
413
|
parts.push(event.requestName);
|
|
414
414
|
}
|
|
415
415
|
if (event.kind === "modelTurn" && event.totalTokens) {
|
|
416
|
-
parts.push(( localize(
|
|
416
|
+
parts.push(( localize(6172, "{0} tokens", event.totalTokens)));
|
|
417
417
|
}
|
|
418
418
|
if (event.kind === "modelTurn" && event.durationInMillis) {
|
|
419
419
|
parts.push(formatDuration(event.durationInMillis));
|
|
@@ -501,7 +501,7 @@ function getEventTooltip(event) {
|
|
|
501
501
|
if (event.input) {
|
|
502
502
|
const input = event.input.trim();
|
|
503
503
|
parts.push(( localize(
|
|
504
|
-
|
|
504
|
+
6173,
|
|
505
505
|
"Input: {0}",
|
|
506
506
|
input.length > TOOLTIP_MAX_LENGTH ? input.substring(0, TOOLTIP_MAX_LENGTH) + "…" : input
|
|
507
507
|
)));
|
|
@@ -509,13 +509,13 @@ function getEventTooltip(event) {
|
|
|
509
509
|
if (event.output) {
|
|
510
510
|
const output = event.output.trim();
|
|
511
511
|
parts.push(( localize(
|
|
512
|
-
|
|
512
|
+
6174,
|
|
513
513
|
"Output: {0}",
|
|
514
514
|
output.length > TOOLTIP_MAX_LENGTH ? output.substring(0, TOOLTIP_MAX_LENGTH) + "…" : output
|
|
515
515
|
)));
|
|
516
516
|
}
|
|
517
517
|
if (event.result) {
|
|
518
|
-
parts.push(( localize(
|
|
518
|
+
parts.push(( localize(6175, "Result: {0}", event.result)));
|
|
519
519
|
}
|
|
520
520
|
return parts.join("\n");
|
|
521
521
|
}
|
|
@@ -526,13 +526,13 @@ function getEventTooltip(event) {
|
|
|
526
526
|
parts.push(event.description);
|
|
527
527
|
}
|
|
528
528
|
if (event.status) {
|
|
529
|
-
parts.push(( localize(
|
|
529
|
+
parts.push(( localize(6176, "Status: {0}", event.status)));
|
|
530
530
|
}
|
|
531
531
|
if (event.toolCallCount !== undefined) {
|
|
532
|
-
parts.push(( localize(
|
|
532
|
+
parts.push(( localize(6177, "Tool calls: {0}", event.toolCallCount)));
|
|
533
533
|
}
|
|
534
534
|
if (event.modelTurnCount !== undefined) {
|
|
535
|
-
parts.push(( localize(
|
|
535
|
+
parts.push(( localize(6178, "Model turns: {0}", event.modelTurnCount)));
|
|
536
536
|
}
|
|
537
537
|
return parts.join("\n");
|
|
538
538
|
}
|
|
@@ -551,19 +551,19 @@ function getEventTooltip(event) {
|
|
|
551
551
|
parts.push(event.model);
|
|
552
552
|
}
|
|
553
553
|
if (event.totalTokens !== undefined) {
|
|
554
|
-
parts.push(( localize(
|
|
554
|
+
parts.push(( localize(6179, "Tokens: {0}", event.totalTokens)));
|
|
555
555
|
}
|
|
556
556
|
if (event.inputTokens !== undefined) {
|
|
557
|
-
parts.push(( localize(
|
|
557
|
+
parts.push(( localize(6180, "Input tokens: {0}", event.inputTokens)));
|
|
558
558
|
}
|
|
559
559
|
if (event.outputTokens !== undefined) {
|
|
560
|
-
parts.push(( localize(
|
|
560
|
+
parts.push(( localize(6181, "Output tokens: {0}", event.outputTokens)));
|
|
561
561
|
}
|
|
562
562
|
if (event.cachedTokens !== undefined) {
|
|
563
|
-
parts.push(( localize(
|
|
563
|
+
parts.push(( localize(6182, "Cached tokens: {0}", event.cachedTokens)));
|
|
564
564
|
}
|
|
565
565
|
if (event.durationInMillis !== undefined) {
|
|
566
|
-
parts.push(( localize(
|
|
566
|
+
parts.push(( localize(6183, "Duration: {0}", formatDuration(event.durationInMillis))));
|
|
567
567
|
}
|
|
568
568
|
return parts.length > 0 ? parts.join("\n") : undefined;
|
|
569
569
|
}
|
|
@@ -86,14 +86,14 @@ let ChatDebugHomeView = class ChatDebugHomeView extends Disposable {
|
|
|
86
86
|
this.renderDisposables.clear();
|
|
87
87
|
append(
|
|
88
88
|
this.scrollContent,
|
|
89
|
-
$("h2.chat-debug-home-title", undefined, ( localize(
|
|
89
|
+
$("h2.chat-debug-home-title", undefined, ( localize(6184, "Agent Debug Logs")))
|
|
90
90
|
);
|
|
91
91
|
const isEnabled = this.configurationService.getValue(AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING);
|
|
92
92
|
if (!isEnabled) {
|
|
93
93
|
append(
|
|
94
94
|
this.scrollContent,
|
|
95
95
|
$("p.chat-debug-home-subtitle", undefined, ( localize(
|
|
96
|
-
|
|
96
|
+
6185,
|
|
97
97
|
"Enable to view debug logs and investigate chat issues with /troubleshoot."
|
|
98
98
|
)))
|
|
99
99
|
);
|
|
@@ -102,7 +102,7 @@ let ChatDebugHomeView = class ChatDebugHomeView extends Disposable {
|
|
|
102
102
|
secondary: true
|
|
103
103
|
})));
|
|
104
104
|
enableButton.element.style.width = "auto";
|
|
105
|
-
enableButton.label = ( localize(
|
|
105
|
+
enableButton.label = ( localize(6186, "Enable in Settings"));
|
|
106
106
|
this.renderDisposables.add(enableButton.onDidClick(() => {
|
|
107
107
|
this.preferencesService.openSettings({
|
|
108
108
|
jsonEditor: false,
|
|
@@ -128,13 +128,13 @@ let ChatDebugHomeView = class ChatDebugHomeView extends Disposable {
|
|
|
128
128
|
append(this.scrollContent, $(
|
|
129
129
|
"p.chat-debug-home-subtitle",
|
|
130
130
|
undefined,
|
|
131
|
-
sessionResources.length > 0 ? ( localize(
|
|
131
|
+
sessionResources.length > 0 ? ( localize(6187, "Select a chat session to debug")) : ( localize(6188, "Send a chat message to get started"))
|
|
132
132
|
));
|
|
133
133
|
if (sessionResources.length > 0) {
|
|
134
134
|
const visibleSessions = sessionResources.slice(0, this._visibleCount);
|
|
135
135
|
const sessionList = append(this.scrollContent, $(".chat-debug-home-session-list"));
|
|
136
136
|
sessionList.setAttribute("role", "list");
|
|
137
|
-
sessionList.setAttribute("aria-label", ( localize(
|
|
137
|
+
sessionList.setAttribute("aria-label", ( localize(6189, "Chat sessions")));
|
|
138
138
|
const items = [];
|
|
139
139
|
for (const sessionResource of visibleSessions) {
|
|
140
140
|
const agentSession = this.agentSessionsService.model.getSession(sessionResource);
|
|
@@ -147,19 +147,19 @@ let ChatDebugHomeView = class ChatDebugHomeView extends Disposable {
|
|
|
147
147
|
} else if (historicalTitle) {
|
|
148
148
|
sessionTitle = historicalTitle;
|
|
149
149
|
} else if (importedTitle) {
|
|
150
|
-
sessionTitle = ( localize(
|
|
150
|
+
sessionTitle = ( localize(6190, "Imported: {0}", importedTitle));
|
|
151
151
|
} else if (LocalChatSessionUri.isLocalSession(sessionResource)) {
|
|
152
|
-
sessionTitle = ( localize(
|
|
152
|
+
sessionTitle = ( localize(6191, "New Chat"));
|
|
153
153
|
} else if (getChatSessionType(sessionResource) === "copilotcli") {
|
|
154
154
|
const pathId = sessionResource.path.replace(/^\//, "").split("-")[0];
|
|
155
155
|
const shortId = pathId || sessionResource.authority || ( sessionResource.toString());
|
|
156
|
-
sessionTitle = ( localize(
|
|
156
|
+
sessionTitle = ( localize(6192, "Copilot CLI: {0}", shortId));
|
|
157
157
|
} else if (getChatSessionType(sessionResource) === "claude-code") {
|
|
158
158
|
const pathId = sessionResource.path.replace(/^\//, "").split("-")[0];
|
|
159
159
|
const shortId = pathId || sessionResource.authority || ( sessionResource.toString());
|
|
160
|
-
sessionTitle = ( localize(
|
|
160
|
+
sessionTitle = ( localize(6193, "Claude Code: {0}", shortId));
|
|
161
161
|
} else {
|
|
162
|
-
sessionTitle = ( localize(
|
|
162
|
+
sessionTitle = ( localize(6191, "New Chat"));
|
|
163
163
|
}
|
|
164
164
|
const isActive = activeSessionResource !== undefined && ( sessionResource.toString()) === ( activeSessionResource.toString());
|
|
165
165
|
const item = append(sessionList, $("button.chat-debug-home-session-item"));
|
|
@@ -171,10 +171,10 @@ let ChatDebugHomeView = class ChatDebugHomeView extends Disposable {
|
|
|
171
171
|
append(item, $(`span${ThemeIcon.asCSSSelector(Codicon.comment)}`));
|
|
172
172
|
const titleSpan = append(item, $("span.chat-debug-home-session-item-title"));
|
|
173
173
|
titleSpan.textContent = sessionTitle;
|
|
174
|
-
const ariaLabel = isActive ? ( localize(
|
|
174
|
+
const ariaLabel = isActive ? ( localize(6194, "{0} (active)", sessionTitle)) : sessionTitle;
|
|
175
175
|
item.setAttribute("aria-label", ariaLabel);
|
|
176
176
|
if (isActive) {
|
|
177
|
-
append(item, $("span.chat-debug-home-session-badge", undefined, ( localize(
|
|
177
|
+
append(item, $("span.chat-debug-home-session-badge", undefined, ( localize(6195, "Active"))));
|
|
178
178
|
}
|
|
179
179
|
this.renderDisposables.add(addDisposableListener(item, EventType.CLICK, () => {
|
|
180
180
|
this._lastOpenedSessionResource = sessionResource;
|
|
@@ -189,7 +189,7 @@ let ChatDebugHomeView = class ChatDebugHomeView extends Disposable {
|
|
|
189
189
|
secondary: true
|
|
190
190
|
})));
|
|
191
191
|
showMoreButton.element.classList.add("chat-debug-home-show-more");
|
|
192
|
-
showMoreButton.label = ( localize(
|
|
192
|
+
showMoreButton.label = ( localize(6196, "Show More ({0})", remaining));
|
|
193
193
|
this.renderDisposables.add(showMoreButton.onDidClick(() => {
|
|
194
194
|
this._visibleCount += PAGE_SIZE;
|
|
195
195
|
this.render();
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHookContentRenderer.js
CHANGED
|
@@ -19,10 +19,10 @@ async function renderHookContent(content, languageService, clipboardService, scr
|
|
|
19
19
|
statusParts.push(formatHookResult(content.result));
|
|
20
20
|
}
|
|
21
21
|
if (content.exitCode !== undefined) {
|
|
22
|
-
statusParts.push(( localize(
|
|
22
|
+
statusParts.push(( localize(6197, "Exit Code: {0}", content.exitCode)));
|
|
23
23
|
}
|
|
24
24
|
if (content.durationInMillis !== undefined) {
|
|
25
|
-
statusParts.push(( localize(
|
|
25
|
+
statusParts.push(( localize(6198, "{0}ms", content.durationInMillis)));
|
|
26
26
|
}
|
|
27
27
|
if (statusParts.length > 0) {
|
|
28
28
|
append(container, $(
|
|
@@ -37,28 +37,28 @@ async function renderHookContent(content, languageService, clipboardService, scr
|
|
|
37
37
|
plainText,
|
|
38
38
|
tokenizedHtml
|
|
39
39
|
} = await tokenizeContent(content.command, languageService);
|
|
40
|
-
renderSection(sectionsContainer, ( localize(
|
|
40
|
+
renderSection(sectionsContainer, ( localize(6199, "Command")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
|
|
41
41
|
}
|
|
42
42
|
if (content.input) {
|
|
43
43
|
const {
|
|
44
44
|
plainText,
|
|
45
45
|
tokenizedHtml
|
|
46
46
|
} = await tokenizeContent(content.input, languageService);
|
|
47
|
-
renderSection(sectionsContainer, ( localize(
|
|
47
|
+
renderSection(sectionsContainer, ( localize(6200, "Input")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
|
|
48
48
|
}
|
|
49
49
|
if (content.output) {
|
|
50
50
|
const {
|
|
51
51
|
plainText,
|
|
52
52
|
tokenizedHtml
|
|
53
53
|
} = await tokenizeContent(content.output, languageService);
|
|
54
|
-
renderSection(sectionsContainer, ( localize(
|
|
54
|
+
renderSection(sectionsContainer, ( localize(6201, "Output")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
|
|
55
55
|
}
|
|
56
56
|
if (content.errorMessage) {
|
|
57
57
|
const {
|
|
58
58
|
plainText,
|
|
59
59
|
tokenizedHtml
|
|
60
60
|
} = await tokenizeContent(content.errorMessage, languageService);
|
|
61
|
-
renderSection(sectionsContainer, ( localize(
|
|
61
|
+
renderSection(sectionsContainer, ( localize(6202, "Error")), plainText, tokenizedHtml, disposables, false, clipboardService, scrollable);
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
64
|
element: container,
|
|
@@ -68,35 +68,35 @@ async function renderHookContent(content, languageService, clipboardService, scr
|
|
|
68
68
|
function formatHookResult(result) {
|
|
69
69
|
switch (result) {
|
|
70
70
|
case ChatDebugHookResult.Success:
|
|
71
|
-
return localize(
|
|
71
|
+
return localize(6203, "Success");
|
|
72
72
|
case ChatDebugHookResult.Error:
|
|
73
|
-
return localize(
|
|
73
|
+
return localize(6204, "Error");
|
|
74
74
|
case ChatDebugHookResult.NonBlockingError:
|
|
75
|
-
return localize(
|
|
75
|
+
return localize(6205, "Non-blocking Error");
|
|
76
76
|
default:
|
|
77
77
|
return String(result);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
function hookContentToPlainText(content) {
|
|
81
81
|
const lines = [];
|
|
82
|
-
lines.push(( localize(
|
|
82
|
+
lines.push(( localize(6206, "Hook Type: {0}", content.hookType)));
|
|
83
83
|
if (content.result !== undefined) {
|
|
84
|
-
lines.push(( localize(
|
|
84
|
+
lines.push(( localize(6207, "Result: {0}", formatHookResult(content.result))));
|
|
85
85
|
}
|
|
86
86
|
if (content.exitCode !== undefined) {
|
|
87
|
-
lines.push(( localize(
|
|
87
|
+
lines.push(( localize(6208, "Exit Code: {0}", content.exitCode)));
|
|
88
88
|
}
|
|
89
89
|
if (content.durationInMillis !== undefined) {
|
|
90
|
-
lines.push(( localize(
|
|
90
|
+
lines.push(( localize(6209, "Duration: {0}ms", content.durationInMillis)));
|
|
91
91
|
}
|
|
92
92
|
if (content.command) {
|
|
93
93
|
lines.push("");
|
|
94
|
-
lines.push(`[${( localize(
|
|
94
|
+
lines.push(`[${( localize(6199, "Command"))}]`);
|
|
95
95
|
lines.push(content.command);
|
|
96
96
|
}
|
|
97
97
|
if (content.input) {
|
|
98
98
|
lines.push("");
|
|
99
|
-
lines.push(`[${( localize(
|
|
99
|
+
lines.push(`[${( localize(6200, "Input"))}]`);
|
|
100
100
|
try {
|
|
101
101
|
const parsed = JSON.parse(content.input);
|
|
102
102
|
lines.push(JSON.stringify(parsed, null, 2));
|
|
@@ -106,7 +106,7 @@ function hookContentToPlainText(content) {
|
|
|
106
106
|
}
|
|
107
107
|
if (content.output) {
|
|
108
108
|
lines.push("");
|
|
109
|
-
lines.push(`[${( localize(
|
|
109
|
+
lines.push(`[${( localize(6201, "Output"))}]`);
|
|
110
110
|
try {
|
|
111
111
|
const parsed = JSON.parse(content.output);
|
|
112
112
|
lines.push(JSON.stringify(parsed, null, 2));
|
|
@@ -116,7 +116,7 @@ function hookContentToPlainText(content) {
|
|
|
116
116
|
}
|
|
117
117
|
if (content.errorMessage) {
|
|
118
118
|
lines.push("");
|
|
119
|
-
lines.push(`[${( localize(
|
|
119
|
+
lines.push(`[${( localize(6202, "Error"))}]`);
|
|
120
120
|
lines.push(content.errorMessage);
|
|
121
121
|
}
|
|
122
122
|
return lines.join("\n");
|