import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IChatDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatDebugService.service"; import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service"; /** * Navigation events fired by the Cache Explorer breadcrumb. */ export declare enum CacheExplorerNavigation { Home = "home", Overview = "overview" } /** * Cache Explorer view — the third entry under "Explore Trace Data". Shows a * left rail of model turns with their cache hit %, plus a side-by-side prompt * signature diff that pinpoints where the prefix breaks. * * v1 reads {@link IChatDebugEventModelTurnContent} from the in-memory chat * debug service via {@link IChatDebugService.resolveEvent}. Content may be * truncated by the OTel attribute cap; the file-logger backed full-fidelity * provider is a follow-up. */ export declare class ChatDebugCacheExplorerView extends Disposable { private readonly chatService; private readonly chatDebugService; private readonly _onNavigate; readonly onNavigate: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event; readonly container: HTMLElement; private readonly breadcrumbWidget; private readonly rail; private readonly railList; private readonly content; private readonly sash; private railWidth; private readonly loadDisposables; private readonly refreshScheduler; private currentSessionResource; private modelTurns; /** Selected turn (B side). A is computed as `selectedIndex - 1`. -1 = no explicit selection yet. */ private selectedIndex; /** * Monotonically-increasing render token. Each call to {@link render} * captures the current value, then re-checks it after each await; if a * newer render has started in the meantime, the older one bails out * before mutating the DOM. Avoids races where a slow model-turn * resolve from one session writes into another's panel. */ private renderToken; /** Cache of resolved model-turn content keyed by event id. */ private readonly resolvedCache; /** Components currently expanded (by component name). */ private readonly openComponents; /** Rail groups currently collapsed (by group key — the parent event id). */ private readonly collapsedGroups; constructor(parent: HTMLElement, chatService: IChatService, chatDebugService: IChatDebugService); setSession(sessionResource: URI): void; show(): void; hide(): void; refresh(): void; updateBreadcrumb(): void; private render; private resolveSide; private renderRail; private renderTitleRow; private renderSummary; private renderSideCard; /** * Render the summary cards alone when there is no prior turn to diff * against (e.g. the first request in a brand-new session). The OTel- * reported cache hit is still useful here — the system prompt and tool * definitions can already be cached from previous sessions. */ private renderSingleSummary; private appendKv; private renderSignature; /** * Render the per-key request-options table. Shows every cache-keying * option captured from the model provider request body, with a column * for the previous turn and one for the current turn. Rows whose * values differ are highlighted. */ private renderRequestOptions; private renderComponents; private renderComponentDiff; }