Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122232425262728293031323334import type { Browser } from "@opencode/plugin-browser/rpc"
export type BrowserPaneEndpoint = Readonly<{ url: string; username?: string; password?: string }>export type BrowserPaneTarget = Readonly<{ serverKey: string sessionID: string endpoint: BrowserPaneEndpoint restore?: Browser.State}>export type BrowserPaneLayout = { tabID: Browser.TabID visible: boolean bounds?: { x: number; y: number; width: number; height: number } background?: readonly [number, number, number, number] radius?: number}
export type BrowserPaneCommand = Browser.Actionexport type BrowserPaneState = Browser.State | nullexport type BrowserPaneEvent = | { type: "focus"; tabID: Browser.TabID } | { type: "preview"; path: string } | { type: "state"; state: BrowserPaneState; error?: string }
export type BrowserPaneRegistration = { setLayout(layout?: BrowserPaneLayout): void command(command: BrowserPaneCommand): Promise<void> close(): void}
export type BrowserPanePlatform = { register(target: BrowserPaneTarget, listener: (event: BrowserPaneEvent) => void): BrowserPaneRegistration}