mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
fix: address network command review feedback
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -34,7 +34,7 @@ import {
|
||||
handleNavigateForward,
|
||||
handleReload,
|
||||
} from "./navigation";
|
||||
import { handleNetwork } from "./network";
|
||||
import { handleNetwork, type NetworkCdpRunner } from "./network";
|
||||
import {
|
||||
type CdpRunner,
|
||||
chromeTabsCaptureApi,
|
||||
@@ -66,12 +66,15 @@ import {
|
||||
} from "./tabs";
|
||||
import { handleWaitForNavigation } from "./waits";
|
||||
|
||||
type DispatcherCdpRunner = CdpRunner &
|
||||
NetworkCdpRunner & {
|
||||
detachSession(sessionId: string): Promise<void>;
|
||||
};
|
||||
|
||||
export interface DispatcherDeps {
|
||||
transport: Transport;
|
||||
sessions: SessionManager;
|
||||
cdp?: CdpRunner & {
|
||||
detachSession(sessionId: string): Promise<void>;
|
||||
};
|
||||
cdp?: DispatcherCdpRunner;
|
||||
/**
|
||||
* Invoked whenever a dispatched RPC may have changed the live
|
||||
* session set (currently `tool.session_start` and
|
||||
@@ -105,9 +108,7 @@ export interface DispatcherDeps {
|
||||
export class ToolDispatcher {
|
||||
private readonly transport: Transport;
|
||||
private readonly sessions: SessionManager;
|
||||
private readonly cdp?: CdpRunner & {
|
||||
detachSession(sessionId: string): Promise<void>;
|
||||
};
|
||||
private readonly cdp?: DispatcherCdpRunner;
|
||||
private readonly onSessionsChanged?: () => void;
|
||||
private readonly approveBorrow?: BorrowConfirmationApprover;
|
||||
private readonly helpNotificationCopy?: () => { title: string; body: string };
|
||||
|
||||
Reference in New Issue
Block a user