@codingame/monaco-vscode-chat-service-override 32.0.0 → 32.0.2
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/chatDebugCacheExplorerView.js
CHANGED
|
@@ -132,7 +132,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
const sessionTitle = this.chatService.getSessionTitle(this.currentSessionResource) || LocalChatSessionUri.parseLocalSessionId(this.currentSessionResource) || ( this.currentSessionResource.toString());
|
|
135
|
-
this.breadcrumbWidget.setItems([( new TextBreadcrumbItem(( localize(
|
|
135
|
+
this.breadcrumbWidget.setItems([( new TextBreadcrumbItem(( localize(6018, "Agent Debug Logs")), true)), ( new TextBreadcrumbItem(sessionTitle, true)), ( new TextBreadcrumbItem(( localize(6019, "Cache Explorer"))))]);
|
|
136
136
|
}
|
|
137
137
|
async render() {
|
|
138
138
|
const token = ++this.renderToken;
|
|
@@ -149,7 +149,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
149
149
|
const userMessages = events.filter(e => e.kind === "userMessage");
|
|
150
150
|
if (this.modelTurns.length === 0) {
|
|
151
151
|
const empty = append(this.content, $(".chat-debug-cache-empty"));
|
|
152
|
-
empty.textContent = ( localize(
|
|
152
|
+
empty.textContent = ( localize(6020, "No model turns recorded for this session yet."));
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
if (this.selectedIndex < 0 || this.selectedIndex >= this.modelTurns.length) {
|
|
@@ -221,16 +221,16 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
221
221
|
header.tabIndex = 0;
|
|
222
222
|
header.setAttribute("role", "button");
|
|
223
223
|
header.setAttribute("aria-expanded", collapsed ? "false" : "true");
|
|
224
|
-
header.title = ( localize(
|
|
224
|
+
header.title = ( localize(6021, "Toggle group"));
|
|
225
225
|
const topLine = append(header, $(".chat-debug-cache-group-top"));
|
|
226
226
|
append(topLine, $("span.chat-debug-cache-group-chev"));
|
|
227
227
|
const headerLine = append(topLine, $(".chat-debug-cache-group-prompt"));
|
|
228
|
-
headerLine.textContent = group.userMessage?.message?.trim() || ( localize(
|
|
228
|
+
headerLine.textContent = group.userMessage?.message?.trim() || ( localize(6022, "(no prompt captured)"));
|
|
229
229
|
const countBadge = append(topLine, $("span.chat-debug-cache-group-count"));
|
|
230
230
|
countBadge.textContent = String(group.turns.length);
|
|
231
231
|
const headerMeta = append(header, $(".chat-debug-cache-group-meta"));
|
|
232
232
|
headerMeta.textContent = group.key;
|
|
233
|
-
headerMeta.title = ( localize(
|
|
233
|
+
headerMeta.title = ( localize(6023, "Request id: {0}", group.key));
|
|
234
234
|
const toggle = () => {
|
|
235
235
|
if (( this.collapsedGroups.has(group.key))) {
|
|
236
236
|
this.collapsedGroups.delete(group.key);
|
|
@@ -262,13 +262,13 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
262
262
|
const main = append(row, $(".chat-debug-cache-turn-main"));
|
|
263
263
|
const top = append(main, $(".chat-debug-cache-turn-top"));
|
|
264
264
|
const source = append(top, $("span.chat-debug-cache-turn-source"));
|
|
265
|
-
source.textContent = evt.requestName || ( localize(
|
|
265
|
+
source.textContent = evt.requestName || ( localize(6024, "Model Turn"));
|
|
266
266
|
if (evt.cachedTokens !== undefined && evt.inputTokens) {
|
|
267
267
|
const hit = computeCacheHit(evt);
|
|
268
268
|
const hitChip = append(top, $(
|
|
269
269
|
"span.chat-debug-cache-turn-chip.chat-debug-cache-turn-hit",
|
|
270
270
|
undefined,
|
|
271
|
-
( localize(
|
|
271
|
+
( localize(6025, "[cache {0}%]", formatCachePctInt(hit)))
|
|
272
272
|
));
|
|
273
273
|
if (hit < 90) {
|
|
274
274
|
hitChip.classList.add("is-bad");
|
|
@@ -276,7 +276,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
276
276
|
}
|
|
277
277
|
if (evt.durationInMillis !== undefined) {
|
|
278
278
|
append(top, $("span.chat-debug-cache-turn-chip", undefined, ( localize(
|
|
279
|
-
|
|
279
|
+
6026,
|
|
280
280
|
"[{0}ms]",
|
|
281
281
|
numberFormatter.value.format(Math.round(evt.durationInMillis))
|
|
282
282
|
))));
|
|
@@ -290,15 +290,15 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
290
290
|
const sub = append(main, $(".chat-debug-cache-turn-sub"));
|
|
291
291
|
sub.textContent = evt.model;
|
|
292
292
|
}
|
|
293
|
-
row.title = ( localize(
|
|
293
|
+
row.title = ( localize(6027, "Click to compare this request against the previous one"));
|
|
294
294
|
row.tabIndex = 0;
|
|
295
295
|
row.setAttribute("role", "button");
|
|
296
296
|
row.setAttribute("aria-selected", i === this.selectedIndex ? "true" : "false");
|
|
297
297
|
row.setAttribute("aria-label", ( localize(
|
|
298
|
-
|
|
298
|
+
6028,
|
|
299
299
|
"Turn {0}: {1}",
|
|
300
300
|
i,
|
|
301
|
-
evt.requestName ?? evt.model ?? ( localize(
|
|
301
|
+
evt.requestName ?? evt.model ?? ( localize(6024, "Model Turn"))
|
|
302
302
|
)));
|
|
303
303
|
const select = () => {
|
|
304
304
|
if (this.selectedIndex !== i) {
|
|
@@ -319,14 +319,14 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
319
319
|
renderTitleRow() {
|
|
320
320
|
const titleRow = append(this.content, $(".chat-debug-cache-title-row"));
|
|
321
321
|
const title = append(titleRow, $("h2.chat-debug-cache-title"));
|
|
322
|
-
title.textContent = ( localize(
|
|
322
|
+
title.textContent = ( localize(6029, "Cache Explorer — Prefix Diff"));
|
|
323
323
|
}
|
|
324
324
|
renderSummary(a, b, diff) {
|
|
325
325
|
const row = append(this.content, $(".chat-debug-cache-summary"));
|
|
326
|
-
row.appendChild(this.renderSideCard(a, ( localize(
|
|
327
|
-
row.appendChild(this.renderSideCard(b, ( localize(
|
|
326
|
+
row.appendChild(this.renderSideCard(a, ( localize(6030, "Previous request"))));
|
|
327
|
+
row.appendChild(this.renderSideCard(b, ( localize(6031, "Request"))));
|
|
328
328
|
const breakCard = append(row, $(".chat-debug-cache-card.break"));
|
|
329
|
-
append(breakCard, $(".chat-debug-cache-card-h", undefined, ( localize(
|
|
329
|
+
append(breakCard, $(".chat-debug-cache-card-h", undefined, ( localize(6032, "Cache performance"))));
|
|
330
330
|
const hit = computeCacheHit(b.event);
|
|
331
331
|
const inputTokens = b.event.inputTokens ?? 0;
|
|
332
332
|
const cachedTokens = b.event.cachedTokens ?? 0;
|
|
@@ -338,13 +338,13 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
338
338
|
const expiration = !continuationComparison && isLikelyCacheExpiration(hit, diff, optionsDiff, systemChanged, toolsChanged);
|
|
339
339
|
const headline = append(breakCard, $(".chat-debug-cache-card-headline"));
|
|
340
340
|
if (expiration) {
|
|
341
|
-
headline.textContent = ( localize(
|
|
341
|
+
headline.textContent = ( localize(6033, "{0}% cache hit — likely cache expiration", formatCachePct(hit)));
|
|
342
342
|
} else {
|
|
343
|
-
headline.textContent = ( localize(
|
|
343
|
+
headline.textContent = ( localize(6034, "{0}% cache hit", formatCachePct(hit)));
|
|
344
344
|
}
|
|
345
345
|
const counts = append(breakCard, $(".chat-debug-cache-card-sub"));
|
|
346
346
|
counts.textContent = ( localize(
|
|
347
|
-
|
|
347
|
+
6035,
|
|
348
348
|
"{0} of {1} input tokens reused",
|
|
349
349
|
numberFormatter.value.format(cachedTokens),
|
|
350
350
|
numberFormatter.value.format(inputTokens)
|
|
@@ -360,37 +360,37 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
360
360
|
append(breakCard, $(
|
|
361
361
|
".chat-debug-cache-perf-section-h",
|
|
362
362
|
undefined,
|
|
363
|
-
continuationComparison ? ( localize(
|
|
363
|
+
continuationComparison ? ( localize(6036, "Visible wire input")) : ( localize(6037, "Where the cache broke"))
|
|
364
364
|
));
|
|
365
365
|
const breakLine = append(breakCard, $(".chat-debug-cache-perf-line"));
|
|
366
366
|
if (expiration) {
|
|
367
367
|
breakLine.textContent = ( localize(
|
|
368
|
-
|
|
368
|
+
6038,
|
|
369
369
|
"The prompt prefix matches but the model still treated this as a fresh request. Most likely the cached entry expired between requests."
|
|
370
370
|
));
|
|
371
371
|
} else if (systemChanged) {
|
|
372
372
|
breakLine.textContent = ( localize(
|
|
373
|
-
|
|
373
|
+
6039,
|
|
374
374
|
"System instructions changed — the cache was invalidated even though the message prefix matches."
|
|
375
375
|
));
|
|
376
376
|
} else if (toolsChanged) {
|
|
377
377
|
breakLine.textContent = ( localize(
|
|
378
|
-
|
|
378
|
+
6040,
|
|
379
379
|
"Tool definitions changed — the catalog of available tools differs between requests, which invalidates the cache even though the message prefix matches."
|
|
380
380
|
));
|
|
381
381
|
if (continuationComparison && diff.break) {
|
|
382
|
-
const deltaName = diff.break.index === 0 ? ( localize(
|
|
382
|
+
const deltaName = diff.break.index === 0 ? ( localize(6041, "the first message")) : `messages[${diff.break.index}]`;
|
|
383
383
|
const deltaLine = append(breakCard, $(".chat-debug-cache-perf-line"));
|
|
384
384
|
deltaLine.textContent = ( localize(
|
|
385
|
-
|
|
385
|
+
6042,
|
|
386
386
|
"The visible wire delta also changed at {0}. That is expected when comparing consecutive continuation requests of different kinds, such as tool_search_output followed by a new user input.",
|
|
387
387
|
deltaName
|
|
388
388
|
));
|
|
389
389
|
}
|
|
390
390
|
} else if (continuationComparison && diff.break) {
|
|
391
|
-
const componentName = diff.break.index === 0 ? ( localize(
|
|
391
|
+
const componentName = diff.break.index === 0 ? ( localize(6041, "the first message")) : `messages[${diff.break.index}]`;
|
|
392
392
|
breakLine.textContent = ( localize(
|
|
393
|
-
|
|
393
|
+
6043,
|
|
394
394
|
"The captured wire delta changed at {0} — {1}. This is a delta-to-delta comparison between consecutive Responses API requests, not the full reconstructed prompt prefix.",
|
|
395
395
|
componentName,
|
|
396
396
|
describeBreakKind(diff.break.kind, diff, b)
|
|
@@ -399,16 +399,16 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
399
399
|
const lostPct = (lostTokens / inputTokens) * 100;
|
|
400
400
|
const lossLine = append(breakCard, $(".chat-debug-cache-perf-line"));
|
|
401
401
|
lossLine.textContent = ( localize(
|
|
402
|
-
|
|
402
|
+
6044,
|
|
403
403
|
"Uncached in this request: {0} tokens ({1}% of this request)",
|
|
404
404
|
numberFormatter.value.format(lostTokens),
|
|
405
405
|
formatCachePct(lostPct)
|
|
406
406
|
));
|
|
407
407
|
}
|
|
408
408
|
} else if (diff.break) {
|
|
409
|
-
const componentName = diff.break.index === 0 ? ( localize(
|
|
409
|
+
const componentName = diff.break.index === 0 ? ( localize(6041, "the first message")) : `messages[${diff.break.index}]`;
|
|
410
410
|
breakLine.textContent = ( localize(
|
|
411
|
-
|
|
411
|
+
6045,
|
|
412
412
|
"At {0} — {1}",
|
|
413
413
|
componentName,
|
|
414
414
|
describeBreakKind(diff.break.kind, diff, b)
|
|
@@ -417,7 +417,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
417
417
|
const lostPct = (lostTokens / inputTokens) * 100;
|
|
418
418
|
const lossLine = append(breakCard, $(".chat-debug-cache-perf-line"));
|
|
419
419
|
lossLine.textContent = ( localize(
|
|
420
|
-
|
|
420
|
+
6046,
|
|
421
421
|
"Lost: {0} tokens ({1}% of this request)",
|
|
422
422
|
numberFormatter.value.format(lostTokens),
|
|
423
423
|
formatCachePct(lostPct)
|
|
@@ -425,34 +425,34 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
425
425
|
}
|
|
426
426
|
} else if (optionsDiff.length > 0) {
|
|
427
427
|
breakLine.textContent = ( localize(
|
|
428
|
-
|
|
428
|
+
6047,
|
|
429
429
|
"Request options changed — the cache was invalidated even though the message prefix matches."
|
|
430
430
|
));
|
|
431
431
|
} else if (continuationComparison) {
|
|
432
432
|
breakLine.textContent = ( localize(
|
|
433
|
-
|
|
433
|
+
6048,
|
|
434
434
|
"No divergence detected in the captured wire delta. The full reconstructed prompt prefix is provider-side for this continuation request."
|
|
435
435
|
));
|
|
436
436
|
} else {
|
|
437
|
-
breakLine.textContent = ( localize(
|
|
437
|
+
breakLine.textContent = ( localize(6049, "No prefix divergence detected."));
|
|
438
438
|
}
|
|
439
439
|
append(breakCard, $(".chat-debug-cache-perf-rule"));
|
|
440
|
-
append(breakCard, $(".chat-debug-cache-perf-section-h", undefined, ( localize(
|
|
440
|
+
append(breakCard, $(".chat-debug-cache-perf-section-h", undefined, ( localize(6050, "Diff summary"))));
|
|
441
441
|
const summaryLine = append(breakCard, $(".chat-debug-cache-perf-line"));
|
|
442
442
|
const inPlaceChanged = diff.counts.contentDrift + diff.counts.lengthChange;
|
|
443
443
|
const addedInB = diff.counts.onlyInB;
|
|
444
444
|
const droppedFromA = diff.counts.onlyInA;
|
|
445
|
-
const parts = [( localize(
|
|
445
|
+
const parts = [( localize(6051, "{0} identical", diff.counts.identical)), ( localize(6052, "{0} in-place changed", inPlaceChanged))];
|
|
446
446
|
if (addedInB > 0) {
|
|
447
|
-
parts.push(( localize(
|
|
447
|
+
parts.push(( localize(6053, "{0} added in this request", addedInB)));
|
|
448
448
|
}
|
|
449
449
|
if (droppedFromA > 0) {
|
|
450
|
-
parts.push(( localize(
|
|
450
|
+
parts.push(( localize(6054, "{0} dropped from previous", droppedFromA)));
|
|
451
451
|
}
|
|
452
452
|
summaryLine.textContent = parts.join(" · ");
|
|
453
453
|
if (optionsDiff.length > 0) {
|
|
454
454
|
const optsLine = append(this.content, $(".chat-debug-cache-options-banner"));
|
|
455
|
-
optsLine.textContent = ( localize(
|
|
455
|
+
optsLine.textContent = ( localize(6055, "Options changed: {0}", ( optionsDiff.map(
|
|
456
456
|
d => `${d.key} (${formatOptionValue(d.previous)} \u2192 ${formatOptionValue(d.current)})`
|
|
457
457
|
)).join(", ")));
|
|
458
458
|
}
|
|
@@ -462,40 +462,40 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
462
462
|
if (title) {
|
|
463
463
|
append(card, $(".chat-debug-cache-card-h", undefined, title));
|
|
464
464
|
}
|
|
465
|
-
this.appendKv(card, ( localize(
|
|
466
|
-
this.appendKv(card, ( localize(
|
|
467
|
-
this.appendKv(card, ( localize(
|
|
468
|
-
this.appendKv(card, ( localize(
|
|
469
|
-
this.appendKv(card, ( localize(
|
|
465
|
+
this.appendKv(card, ( localize(6056, "model")), data.event.model ?? "—");
|
|
466
|
+
this.appendKv(card, ( localize(6057, "input tok")), formatTokens(data.event.inputTokens));
|
|
467
|
+
this.appendKv(card, ( localize(6058, "cached tok")), formatTokens(data.event.cachedTokens));
|
|
468
|
+
this.appendKv(card, ( localize(6059, "cache hit")), `${formatCachePct(computeCacheHit(data.event))}%`);
|
|
469
|
+
this.appendKv(card, ( localize(6060, "shape")), data.requestShape.label);
|
|
470
470
|
const startTime = data.event.created;
|
|
471
471
|
const endTime = data.event.durationInMillis !== undefined ? ( new Date(startTime.getTime() + data.event.durationInMillis)) : undefined;
|
|
472
|
-
this.appendKv(card, ( localize(
|
|
472
|
+
this.appendKv(card, ( localize(6061, "startTime")), startTime.toISOString(), true);
|
|
473
473
|
if (endTime) {
|
|
474
|
-
this.appendKv(card, ( localize(
|
|
474
|
+
this.appendKv(card, ( localize(6062, "endTime")), endTime.toISOString(), true);
|
|
475
475
|
}
|
|
476
476
|
if (data.event.durationInMillis !== undefined) {
|
|
477
|
-
this.appendKv(card, ( localize(
|
|
477
|
+
this.appendKv(card, ( localize(6063, "duration")), `${numberFormatter.value.format(Math.round(data.event.durationInMillis))}ms`);
|
|
478
478
|
}
|
|
479
479
|
const ttft = data.content?.timeToFirstTokenInMillis;
|
|
480
480
|
if (ttft !== undefined) {
|
|
481
|
-
this.appendKv(card, ( localize(
|
|
481
|
+
this.appendKv(card, ( localize(6064, "timeToFirstToken")), `${numberFormatter.value.format(Math.round(ttft))}ms`);
|
|
482
482
|
}
|
|
483
483
|
const requestId = data.content?.requestId ?? data.event.parentEventId ?? data.event.id;
|
|
484
484
|
if (requestId) {
|
|
485
|
-
this.appendKv(card, ( localize(
|
|
485
|
+
this.appendKv(card, ( localize(6065, "requestId")), requestId, true);
|
|
486
486
|
}
|
|
487
487
|
return card;
|
|
488
488
|
}
|
|
489
489
|
renderSingleSummary(b) {
|
|
490
490
|
const row = append(this.content, $(".chat-debug-cache-summary"));
|
|
491
|
-
row.appendChild(this.renderSideCard(b, ( localize(
|
|
491
|
+
row.appendChild(this.renderSideCard(b, ( localize(6031, "Request"))));
|
|
492
492
|
const note = append(row, $(".chat-debug-cache-card.break"));
|
|
493
|
-
append(note, $(".chat-debug-cache-card-h", undefined, ( localize(
|
|
493
|
+
append(note, $(".chat-debug-cache-card-h", undefined, ( localize(6066, "First request in session"))));
|
|
494
494
|
const headline = append(note, $(".chat-debug-cache-card-headline"));
|
|
495
495
|
headline.textContent = `${formatCachePct(computeCacheHit(b.event))}%`;
|
|
496
496
|
const sub = append(note, $(".chat-debug-cache-card-sub"));
|
|
497
497
|
sub.textContent = ( localize(
|
|
498
|
-
|
|
498
|
+
6067,
|
|
499
499
|
"OTel-reported cache hit. Nothing earlier in this session to diff against — the system prompt and tools may still match a previous session's cache."
|
|
500
500
|
));
|
|
501
501
|
if (b.requestShape.description) {
|
|
@@ -516,14 +516,14 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
516
516
|
const continuationComparison = b.requestShape.isContinuation;
|
|
517
517
|
const section = append(this.content, $(".chat-debug-cache-section"));
|
|
518
518
|
const heading = append(section, $("h3.chat-debug-cache-section-h"));
|
|
519
|
-
heading.textContent = continuationComparison ? ( localize(
|
|
519
|
+
heading.textContent = continuationComparison ? ( localize(6068, "Visible Request Signature")) : ( localize(6069, "Prompt Signature"));
|
|
520
520
|
if (continuationComparison) {
|
|
521
521
|
const note = append(
|
|
522
522
|
section,
|
|
523
523
|
$(".chat-debug-cache-sig-summary.chat-debug-cache-request-shape-note")
|
|
524
524
|
);
|
|
525
525
|
note.textContent = ( localize(
|
|
526
|
-
|
|
526
|
+
6070,
|
|
527
527
|
"For Responses API continuations, this shows the captured request inputs: system instructions, tools sent on this request, and the visible input delta. Earlier conversation state is referenced by previous response id and is not expanded here."
|
|
528
528
|
));
|
|
529
529
|
}
|
|
@@ -531,11 +531,11 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
531
531
|
for (const role of ["system", "user", "assistant", "tool", "tool_search", "tools"]) {
|
|
532
532
|
const entry = append(legend, $("span.chat-debug-cache-sig-legend-entry"));
|
|
533
533
|
append(entry, $(`span.chat-debug-cache-sig-swatch.role-${roleClass(role)}`));
|
|
534
|
-
append(entry, $$1("span", undefined, role === "tools" ? ( localize(
|
|
534
|
+
append(entry, $$1("span", undefined, role === "tools" ? ( localize(6071, "tools (catalog)")) : role === "tool_search" ? ( localize(6072, "tool search")) : role));
|
|
535
535
|
}
|
|
536
536
|
const driftEntry = append(legend, $("span.chat-debug-cache-sig-legend-entry"));
|
|
537
537
|
append(driftEntry, $("span.chat-debug-cache-sig-swatch.role-drift"));
|
|
538
|
-
append(driftEntry, $$1("span", undefined, ( localize(
|
|
538
|
+
append(driftEntry, $$1("span", undefined, ( localize(6073, "drift"))));
|
|
539
539
|
const toSegments = (side, isA) => {
|
|
540
540
|
const segs = [];
|
|
541
541
|
const sys = side.system;
|
|
@@ -627,28 +627,28 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
627
627
|
if (breakPos !== undefined && diff.break) {
|
|
628
628
|
const line = append(bar, $(".chat-debug-cache-sig-break"));
|
|
629
629
|
line.style.left = `${(breakPos / max) * 100}%`;
|
|
630
|
-
line.title = ( localize(
|
|
630
|
+
line.title = ( localize(6074, "Cache break at messages[{0}]", diff.break.index));
|
|
631
631
|
}
|
|
632
|
-
append(row, $(".chat-debug-cache-sig-lane-total", undefined, ( localize(
|
|
632
|
+
append(row, $(".chat-debug-cache-sig-lane-total", undefined, ( localize(6075, "{0} chars", numberFormatter.value.format(sideTotal)))));
|
|
633
633
|
return row;
|
|
634
634
|
};
|
|
635
635
|
const lanes = append(section, $(".chat-debug-cache-sig-lanes"));
|
|
636
|
-
lanes.appendChild(buildLane(( localize(
|
|
637
|
-
lanes.appendChild(buildLane(( localize(
|
|
636
|
+
lanes.appendChild(buildLane(( localize(6076, "Previous")), aSegs, breakCharPos(aSegs)));
|
|
637
|
+
lanes.appendChild(buildLane(( localize(6077, "Current")), bSegs, breakCharPos(bSegs)));
|
|
638
638
|
let shared = 0;
|
|
639
639
|
let firstDrift;
|
|
640
640
|
if (a.system || b.system) {
|
|
641
641
|
if ((a.system ?? "") === (b.system ?? "")) {
|
|
642
642
|
shared += b.system?.length ?? 0;
|
|
643
643
|
} else {
|
|
644
|
-
firstDrift = ( localize(
|
|
644
|
+
firstDrift = ( localize(6078, "system"));
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
if (!firstDrift && (a.tools || b.tools)) {
|
|
648
648
|
if ((a.tools ?? "") === (b.tools ?? "")) {
|
|
649
649
|
shared += b.tools?.length ?? 0;
|
|
650
650
|
} else {
|
|
651
|
-
firstDrift = ( localize(
|
|
651
|
+
firstDrift = ( localize(6079, "tools catalog"));
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
654
|
if (!firstDrift) {
|
|
@@ -664,13 +664,13 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
664
664
|
const summary = append(section, $(".chat-debug-cache-sig-summary"));
|
|
665
665
|
if (firstDrift) {
|
|
666
666
|
summary.textContent = continuationComparison ? ( localize(
|
|
667
|
-
|
|
667
|
+
6080,
|
|
668
668
|
"{0} of {1} captured request chars match before first captured drift: {2}",
|
|
669
669
|
numberFormatter.value.format(shared),
|
|
670
670
|
numberFormatter.value.format(totalB),
|
|
671
671
|
firstDrift
|
|
672
672
|
)) : ( localize(
|
|
673
|
-
|
|
673
|
+
6081,
|
|
674
674
|
"{0} of {1} chars reused · break at {2}",
|
|
675
675
|
numberFormatter.value.format(shared),
|
|
676
676
|
numberFormatter.value.format(totalB),
|
|
@@ -678,12 +678,12 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
678
678
|
));
|
|
679
679
|
} else {
|
|
680
680
|
summary.textContent = continuationComparison ? ( localize(
|
|
681
|
-
|
|
681
|
+
6082,
|
|
682
682
|
"{0} of {1} captured request chars match · no captured divergence detected",
|
|
683
683
|
numberFormatter.value.format(shared),
|
|
684
684
|
numberFormatter.value.format(totalB)
|
|
685
685
|
)) : ( localize(
|
|
686
|
-
|
|
686
|
+
6083,
|
|
687
687
|
"{0} of {1} chars reused · no divergence detected",
|
|
688
688
|
numberFormatter.value.format(shared),
|
|
689
689
|
numberFormatter.value.format(totalB)
|
|
@@ -698,12 +698,12 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
698
698
|
return;
|
|
699
699
|
}
|
|
700
700
|
const section = append(this.content, $(".chat-debug-cache-section"));
|
|
701
|
-
append(section, $("h3.chat-debug-cache-section-h", undefined, ( localize(
|
|
701
|
+
append(section, $("h3.chat-debug-cache-section-h", undefined, ( localize(6084, "Request Options"))));
|
|
702
702
|
const table = append(section, $(".chat-debug-cache-options-table"));
|
|
703
703
|
const head = append(table, $(".chat-debug-cache-options-row.head"));
|
|
704
|
-
append(head, $(".chat-debug-cache-options-cell.key", undefined, ( localize(
|
|
705
|
-
append(head, $(".chat-debug-cache-options-cell", undefined, ( localize(
|
|
706
|
-
append(head, $(".chat-debug-cache-options-cell", undefined, ( localize(
|
|
704
|
+
append(head, $(".chat-debug-cache-options-cell.key", undefined, ( localize(6085, "Option"))));
|
|
705
|
+
append(head, $(".chat-debug-cache-options-cell", undefined, ( localize(6086, "Previous"))));
|
|
706
|
+
append(head, $(".chat-debug-cache-options-cell", undefined, ( localize(6087, "Current"))));
|
|
707
707
|
const sortedKeys = [...keys].sort((x, y) => x.localeCompare(y));
|
|
708
708
|
for (const key of sortedKeys) {
|
|
709
709
|
const row = append(table, $(".chat-debug-cache-options-row"));
|
|
@@ -720,14 +720,14 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
720
720
|
}
|
|
721
721
|
renderComponents(drift, a, b, compareInputMessages) {
|
|
722
722
|
const section = append(this.content, $(".chat-debug-cache-section"));
|
|
723
|
-
append(section, $("h3.chat-debug-cache-section-h", undefined, ( localize(
|
|
723
|
+
append(section, $("h3.chat-debug-cache-section-h", undefined, ( localize(6088, "Components"))));
|
|
724
724
|
if (!compareInputMessages && b.requestShape.isContinuation) {
|
|
725
725
|
const note = append(
|
|
726
726
|
section,
|
|
727
727
|
$(".chat-debug-cache-sig-summary.chat-debug-cache-request-shape-note")
|
|
728
728
|
);
|
|
729
729
|
note.textContent = ( localize(
|
|
730
|
-
|
|
730
|
+
6089,
|
|
731
731
|
"This request uses previous_response_id, so input messages are not positionally diffed against the previous request. Components below show cache-key shape changes; the current continuation delta is shown separately."
|
|
732
732
|
));
|
|
733
733
|
}
|
|
@@ -735,7 +735,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
735
735
|
const effectiveDrift = !compareInputMessages && b.requestShape.isContinuation && b.inputMessages.length > 0 ? [...drift, currentDeltaComponent(b)] : drift;
|
|
736
736
|
if (effectiveDrift.length === 0) {
|
|
737
737
|
const empty = append(acc, $(".chat-debug-cache-acc-empty"));
|
|
738
|
-
empty.textContent = ( localize(
|
|
738
|
+
empty.textContent = ( localize(6090, "All components are identical between A and B."));
|
|
739
739
|
return;
|
|
740
740
|
}
|
|
741
741
|
for (const c of effectiveDrift) {
|
|
@@ -754,7 +754,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
754
754
|
const badge = append(head, $(`span.chat-debug-cache-acc-badge.${c.status}`));
|
|
755
755
|
badge.textContent = badgeLabel(c.status);
|
|
756
756
|
const sizes = append(head, $("span.chat-debug-cache-acc-sizes"));
|
|
757
|
-
sizes.textContent = ( localize(
|
|
757
|
+
sizes.textContent = ( localize(6091, "{0} → {1} chars", formatTokens(c.aSize), formatTokens(c.bSize)));
|
|
758
758
|
const body = append(item, $(".chat-debug-cache-acc-body"));
|
|
759
759
|
const aText = c.name === CURRENT_CONTINUATION_DELTA_COMPONENT ? "" : textForComponent(c, a);
|
|
760
760
|
const bText = c.name === CURRENT_CONTINUATION_DELTA_COMPONENT ? continuationDeltaText(b) : textForComponent(c, b);
|
|
@@ -780,14 +780,14 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
|
|
|
780
780
|
renderComponentDiff(aText, bText, aSize, bSize) {
|
|
781
781
|
const grid = $(".chat-debug-cache-diff");
|
|
782
782
|
const colA = append(grid, $(".chat-debug-cache-diff-col"));
|
|
783
|
-
append(colA, $("h4", undefined, ( localize(
|
|
783
|
+
append(colA, $("h4", undefined, ( localize(6092, "Previous · {0} chars", numberFormatter.value.format(aSize)))));
|
|
784
784
|
const aBody = append(colA, $(".chat-debug-cache-diff-body"));
|
|
785
785
|
const colB = append(grid, $(".chat-debug-cache-diff-col"));
|
|
786
|
-
append(colB, $("h4", undefined, ( localize(
|
|
786
|
+
append(colB, $("h4", undefined, ( localize(6093, "Current · {0} chars", numberFormatter.value.format(bSize)))));
|
|
787
787
|
const bBody = append(colB, $(".chat-debug-cache-diff-body"));
|
|
788
788
|
if (!aText && !bText) {
|
|
789
|
-
aBody.textContent = ( localize(
|
|
790
|
-
bBody.textContent = ( localize(
|
|
789
|
+
aBody.textContent = ( localize(6094, "(not present)"));
|
|
790
|
+
bBody.textContent = ( localize(6094, "(not present)"));
|
|
791
791
|
return grid;
|
|
792
792
|
}
|
|
793
793
|
renderInlineDiff(aBody, bBody, aText, bText);
|
|
@@ -873,15 +873,15 @@ function currentDeltaComponent(side) {
|
|
|
873
873
|
function badgeLabel(status) {
|
|
874
874
|
switch (status) {
|
|
875
875
|
case CacheDiffKind.Identical:
|
|
876
|
-
return localize(
|
|
876
|
+
return localize(6095, "identical");
|
|
877
877
|
case CacheDiffKind.ContentDrift:
|
|
878
|
-
return localize(
|
|
878
|
+
return localize(6096, "content drift");
|
|
879
879
|
case CacheDiffKind.LengthChange:
|
|
880
|
-
return localize(
|
|
880
|
+
return localize(6097, "length change");
|
|
881
881
|
case CacheDiffKind.OnlyInA:
|
|
882
|
-
return localize(
|
|
882
|
+
return localize(6098, "only in A");
|
|
883
883
|
case CacheDiffKind.OnlyInB:
|
|
884
|
-
return localize(
|
|
884
|
+
return localize(6099, "only in B");
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
887
|
function describeTruncation(aText, bText) {
|
|
@@ -893,16 +893,16 @@ function describeTruncation(aText, bText) {
|
|
|
893
893
|
}
|
|
894
894
|
if (aMatch && bMatch) {
|
|
895
895
|
return localize(
|
|
896
|
-
|
|
896
|
+
6100,
|
|
897
897
|
"Both sides truncated by the OTel attribute cap (originals were {0} and {1} chars) — diff may be partial.",
|
|
898
898
|
numberFormatter.value.format(parseInt(aMatch[1], 10)),
|
|
899
899
|
numberFormatter.value.format(parseInt(bMatch[1], 10))
|
|
900
900
|
);
|
|
901
901
|
}
|
|
902
902
|
const match = (aMatch ?? bMatch);
|
|
903
|
-
const side = aMatch ? ( localize(
|
|
903
|
+
const side = aMatch ? ( localize(6101, "Previous")) : ( localize(6102, "Current"));
|
|
904
904
|
return localize(
|
|
905
|
-
|
|
905
|
+
6103,
|
|
906
906
|
"{0} side truncated by the OTel attribute cap (original was {1} chars) — diff may be partial.",
|
|
907
907
|
side,
|
|
908
908
|
numberFormatter.value.format(parseInt(match[1], 10))
|
|
@@ -915,13 +915,13 @@ function describeBreakKind(kind, diff, b) {
|
|
|
915
915
|
const charsB = bMsg ? numberFormatter.value.format(bMsg.charLength) : undefined;
|
|
916
916
|
switch (kind) {
|
|
917
917
|
case CacheDiffKind.OnlyInB:
|
|
918
|
-
return charsB ? ( localize(
|
|
918
|
+
return charsB ? ( localize(6104, "added {0} message ({1} chars)", role, charsB)) : ( localize(6105, "added {0} message", role));
|
|
919
919
|
case CacheDiffKind.OnlyInA:
|
|
920
|
-
return localize(
|
|
920
|
+
return localize(6106, "previous {0} message dropped", role);
|
|
921
921
|
case CacheDiffKind.ContentDrift:
|
|
922
|
-
return charsB ? ( localize(
|
|
922
|
+
return charsB ? ( localize(6107, "{0} message body changed ({1} chars)", role, charsB)) : ( localize(6108, "{0} message body changed", role));
|
|
923
923
|
case CacheDiffKind.LengthChange:
|
|
924
|
-
return charsB ? ( localize(
|
|
924
|
+
return charsB ? ( localize(6109, "{0} message resized to {1} chars", role, charsB)) : ( localize(6110, "{0} message size changed", role));
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
function computeCacheHit(event) {
|
|
@@ -945,9 +945,9 @@ function describeRequestShape(inputMessages, requestShapeJson) {
|
|
|
945
945
|
const hasOnlyToolOutput = inputMessages.length > 0 && inputMessages.every(m => m.role === "tool");
|
|
946
946
|
if (hasPreviousResponseId && hasToolSearchOutput) {
|
|
947
947
|
return {
|
|
948
|
-
label: ( localize(
|
|
948
|
+
label: ( localize(6111, "tool_search_output continuation")),
|
|
949
949
|
description: ( localize(
|
|
950
|
-
|
|
950
|
+
6112,
|
|
951
951
|
"Responses API continuation: the displayed input is only the tool-search delta sent over the wire. The provider reconstructs prior context from the previous response id."
|
|
952
952
|
)),
|
|
953
953
|
isContinuation: true,
|
|
@@ -956,9 +956,9 @@ function describeRequestShape(inputMessages, requestShapeJson) {
|
|
|
956
956
|
}
|
|
957
957
|
if (hasPreviousResponseId && hasOnlyToolOutput) {
|
|
958
958
|
return {
|
|
959
|
-
label: ( localize(
|
|
959
|
+
label: ( localize(6113, "tool output continuation")),
|
|
960
960
|
description: ( localize(
|
|
961
|
-
|
|
961
|
+
6114,
|
|
962
962
|
"Responses API continuation: the displayed input is only the tool-output delta sent over the wire. The provider reconstructs prior context from the previous response id."
|
|
963
963
|
)),
|
|
964
964
|
isContinuation: true,
|
|
@@ -967,9 +967,9 @@ function describeRequestShape(inputMessages, requestShapeJson) {
|
|
|
967
967
|
}
|
|
968
968
|
if (hasPreviousResponseId) {
|
|
969
969
|
return {
|
|
970
|
-
label: ( localize(
|
|
970
|
+
label: ( localize(6115, "Responses API continuation")),
|
|
971
971
|
description: ( localize(
|
|
972
|
-
|
|
972
|
+
6116,
|
|
973
973
|
"Responses API continuation: the displayed input is only the delta sent over the wire. The provider reconstructs prior context from the previous response id."
|
|
974
974
|
)),
|
|
975
975
|
isContinuation: true,
|
|
@@ -978,9 +978,9 @@ function describeRequestShape(inputMessages, requestShapeJson) {
|
|
|
978
978
|
}
|
|
979
979
|
if (hasToolSearchOutput) {
|
|
980
980
|
return {
|
|
981
|
-
label: ( localize(
|
|
981
|
+
label: ( localize(6117, "tool_search_output request")),
|
|
982
982
|
description: ( localize(
|
|
983
|
-
|
|
983
|
+
6118,
|
|
984
984
|
"This request contains a Responses API tool_search_output item. No previous-response continuation marker was captured, so the displayed input may be a full or history-sliced request rather than only a continuation delta."
|
|
985
985
|
)),
|
|
986
986
|
isContinuation: false,
|
|
@@ -989,14 +989,14 @@ function describeRequestShape(inputMessages, requestShapeJson) {
|
|
|
989
989
|
}
|
|
990
990
|
if (hasOnlyToolOutput) {
|
|
991
991
|
return {
|
|
992
|
-
label: ( localize(
|
|
992
|
+
label: ( localize(6119, "tool output request")),
|
|
993
993
|
description: undefined,
|
|
994
994
|
isContinuation: false,
|
|
995
995
|
...common
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
998
|
return {
|
|
999
|
-
label: ( localize(
|
|
999
|
+
label: ( localize(6120, "full input request")),
|
|
1000
1000
|
description: undefined,
|
|
1001
1001
|
isContinuation: false,
|
|
1002
1002
|
...common
|
|
@@ -125,8 +125,8 @@ let ChatDebugDetailPanel = class ChatDebugDetailPanel extends Disposable {
|
|
|
125
125
|
this.headerElement = header;
|
|
126
126
|
this.element.appendChild(this.scrollable.getDomNode());
|
|
127
127
|
const fullScreenButton = this.detailDisposables.add(( new Button(header, {
|
|
128
|
-
ariaLabel: ( localize(
|
|
129
|
-
title: ( localize(
|
|
128
|
+
ariaLabel: ( localize(6121, "Open in Editor")),
|
|
129
|
+
title: ( localize(6121, "Open in Editor"))
|
|
130
130
|
})));
|
|
131
131
|
fullScreenButton.element.classList.add("chat-debug-detail-button");
|
|
132
132
|
fullScreenButton.icon = Codicon.goToFile;
|
|
@@ -138,8 +138,8 @@ let ChatDebugDetailPanel = class ChatDebugDetailPanel extends Disposable {
|
|
|
138
138
|
});
|
|
139
139
|
}));
|
|
140
140
|
const copyButton = this.detailDisposables.add(( new Button(header, {
|
|
141
|
-
ariaLabel: ( localize(
|
|
142
|
-
title: ( localize(
|
|
141
|
+
ariaLabel: ( localize(6122, "Copy")),
|
|
142
|
+
title: ( localize(6122, "Copy"))
|
|
143
143
|
})));
|
|
144
144
|
copyButton.element.classList.add("chat-debug-detail-button");
|
|
145
145
|
copyButton.icon = Codicon.copy;
|
|
@@ -147,8 +147,8 @@ let ChatDebugDetailPanel = class ChatDebugDetailPanel extends Disposable {
|
|
|
147
147
|
this.clipboardService.writeText(this.currentDetailText);
|
|
148
148
|
}));
|
|
149
149
|
const closeButton = this.detailDisposables.add(( new Button(header, {
|
|
150
|
-
ariaLabel: ( localize(
|
|
151
|
-
title: ( localize(
|
|
150
|
+
ariaLabel: ( localize(6123, "Close")),
|
|
151
|
+
title: ( localize(6123, "Close"))
|
|
152
152
|
})));
|
|
153
153
|
closeButton.element.classList.add("chat-debug-detail-button");
|
|
154
154
|
closeButton.icon = Codicon.close;
|
|
@@ -6,7 +6,7 @@ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/th
|
|
|
6
6
|
import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
7
7
|
import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput';
|
|
8
8
|
|
|
9
|
-
const chatDebugEditorIcon = registerIcon("chat-debug-editor-label-icon", Codicon.bug, ( localize(
|
|
9
|
+
const chatDebugEditorIcon = registerIcon("chat-debug-editor-label-icon", Codicon.bug, ( localize(6124, "Icon of the chat debug editor label.")));
|
|
10
10
|
class ChatDebugEditorInput extends EditorInput {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
@@ -37,7 +37,7 @@ class ChatDebugEditorInput extends EditorInput {
|
|
|
37
37
|
return EditorInputCapabilities.Readonly | EditorInputCapabilities.Singleton;
|
|
38
38
|
}
|
|
39
39
|
getName() {
|
|
40
|
-
return localize(
|
|
40
|
+
return localize(6125, "Agent Debug Logs");
|
|
41
41
|
}
|
|
42
42
|
getIcon() {
|
|
43
43
|
return chatDebugEditorIcon;
|