fix(browser): host agent browser in workbench

This commit is contained in:
xiaohan.yuan committed 2026-10-20 16:30:36 +08:00
1 parent 9a1f182397
commit efb44f9340
12 files changed
+136 -41

No files matched your search

+5
View File
@@ -10,6 +10,10 @@ export interface BrowserHostView {
visible: boolean
error?: string
}
export interface BrowserHostEvent {
type: 'opened'
view: BrowserHostView
}
export interface BrowserHostApi {
create(sessionId?: string, initialUrl?: string): Promise<BrowserHostView>
get(id: string, sessionId?: string): Promise<BrowserHostView>
@@ -20,6 +24,7 @@ export interface BrowserHostApi {
bounds(id: string, bounds: BrowserHostBounds | null, sessionId?: string): Promise<void>
close(id: string, sessionId?: string): Promise<void>
rebind(id: string, previousSessionId: string | undefined, nextSessionId: string): Promise<BrowserHostView>
onEvent(listener: (event: BrowserHostEvent) => void): () => void
}
export function normalizeBrowserHostUrl(value: string): string {