feat: add doctor diagnostics and bump to 0.15.2-fork.1
This commit is contained in:
@@ -877,6 +877,10 @@ export interface CloseCommand extends BaseCommand {
|
||||
action: 'close';
|
||||
}
|
||||
|
||||
export interface DoctorCommand extends BaseCommand {
|
||||
action: 'doctor';
|
||||
}
|
||||
|
||||
// Tab/Window commands
|
||||
export interface TabNewCommand extends BaseCommand {
|
||||
action: 'tab_new';
|
||||
@@ -931,6 +935,7 @@ export type Command =
|
||||
| HoverCommand
|
||||
| ContentCommand
|
||||
| CloseCommand
|
||||
| DoctorCommand
|
||||
| TabNewCommand
|
||||
| TabListCommand
|
||||
| TabSwitchCommand
|
||||
@@ -1297,6 +1302,49 @@ export interface DiffUrlData {
|
||||
screenshot?: DiffScreenshotData;
|
||||
}
|
||||
|
||||
export type DoctorCheckStatus = 'pass' | 'warn' | 'fail' | 'skip';
|
||||
|
||||
export interface DoctorCheck {
|
||||
name: string;
|
||||
status: DoctorCheckStatus;
|
||||
message: string;
|
||||
details?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface DoctorData {
|
||||
ok: boolean;
|
||||
checks: DoctorCheck[];
|
||||
context: {
|
||||
launched: boolean;
|
||||
connectionKind: string;
|
||||
cdpEndpoint?: string | null;
|
||||
session: string;
|
||||
};
|
||||
cdp: {
|
||||
preferredPort: number;
|
||||
discovered: Array<{
|
||||
port: number;
|
||||
status: DoctorCheckStatus;
|
||||
wsUrl?: string | null;
|
||||
source: 'preferred-port' | 'common-port' | 'devtools-active-port';
|
||||
note?: string;
|
||||
}>;
|
||||
devToolsActivePort: Array<{
|
||||
userDataDir: string;
|
||||
status: DoctorCheckStatus;
|
||||
port?: number;
|
||||
wsPath?: string;
|
||||
}>;
|
||||
};
|
||||
plugin: {
|
||||
configuredPluginId: string;
|
||||
status: DoctorCheckStatus;
|
||||
mode: 'cdp' | 'non-cdp' | 'not-launched';
|
||||
message: string;
|
||||
extensionId?: string;
|
||||
};
|
||||
}
|
||||
|
||||
// Browser state
|
||||
export interface BrowserState {
|
||||
browser: Browser | null;
|
||||
|
||||
Reference in New Issue
Block a user