@@ -112,6 +112,7 @@ export interface ExtensionMessage {
112112 | "rooHistoryImportProgress"
113113 | "themeFixtureProbeRequest"
114114 | "viewStateClaim"
115+ | "diagnosticsRequest"
115116 text ?: string
116117 /** For fileContent: { path, content, error? } */
117118 fileContent ?: { path : string ; content : string | null ; error ?: string }
@@ -178,6 +179,7 @@ export interface ExtensionMessage {
178179 /** For `viewStateClaim`: the host-minted token the webview stores and echoes on launch. */
179180 viewStateClaim ?: string
180181 themeFixture ?: WebviewThemeFixture
182+ diagnostics ?: WebviewDiagnosticsSnapshot
181183 promptText ?: string
182184 results ?:
183185 | { path : string ; type : "file" | "folder" ; label ?: string } [ ]
@@ -475,6 +477,40 @@ export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "message
475477
476478export type AudioType = "notification" | "celebration" | "progress_loop"
477479
480+ export interface WebviewDiagnosticsSnapshot {
481+ capturedAt : string
482+ didHydrateState ?: boolean
483+ documentReadyState ?: "loading" | "interactive" | "complete"
484+ documentVisibilityState ?: "hidden" | "visible" | "prerender"
485+ activeView ?: string
486+ rootMounted ?: boolean
487+ rootChildCount ?: number
488+ lastReceivedStateSequence ?: number
489+ lastAppliedStateSequence ?: number
490+ staleStateRejectionCount ?: number
491+ unknownMessageUpdateCount ?: number
492+ currentTaskId ?: string
493+ chatMessageCount ?: number
494+ historyItemCount ?: number
495+ todoCount ?: number
496+ viewport ?: { width : number ; height : number ; devicePixelRatio : number }
497+ theme ?: {
498+ kind ?: number
499+ identifier ?: string
500+ bodyForeground ?: string
501+ bodyBackground ?: string
502+ rootForeground ?: string
503+ rootBackground ?: string
504+ variables ?: Record < string , string >
505+ }
506+ error ?: {
507+ name ?: string
508+ message ?: string
509+ fingerprint ?: string
510+ stackLocations ?: string [ ]
511+ }
512+ }
513+
478514export interface UpdateTodoListPayload {
479515 // eslint-disable-next-line @typescript-eslint/no-explicit-any
480516 todos : any [ ]
@@ -678,6 +714,7 @@ export interface WebviewMessage {
678714 | "openRuleFile"
679715 | "openRulesDirectory"
680716 | "themeFixtureProbeResponse"
717+ | "diagnosticsResponse"
681718 text ?: string
682719 viewStateId ?: string
683720 /** For `webviewDidLaunch`: the claim delivered for `viewStateId`, enforced by setViewStateId. */
@@ -728,6 +765,7 @@ export interface WebviewMessage {
728765 newSkillModeSlugs ?: string [ ] // For updateSkillModes (new mode restrictions)
729766 requestId ?: string
730767 themeFixture ?: WebviewThemeFixture
768+ diagnostics ?: WebviewDiagnosticsSnapshot
731769 ids ?: string [ ]
732770 terminalOperation ?: "continue" | "abort"
733771 messageTs ?: number
0 commit comments