Skip to content

LocalBridgeApi

Defined in: main/services/local-bridge-api.ts:38

Local HTTP API server that bridges the browser extension with the Electron app’s AI providers.

new LocalBridgeApi(): LocalBridgeApi

LocalBridgeApi

getExtensionState(): ExtensionState

Defined in: main/services/local-bridge-api.ts:58

Returns a copy of the current browser extension connection state.

ExtensionState

The current extension state.


getHintHistory(): BridgeHintEntry[]

Defined in: main/services/local-bridge-api.ts:66

Returns a copy of the hint history log.

BridgeHintEntry[]

An array of previously generated hint entries.


setActiveSession(sessionId): void

Defined in: main/services/local-bridge-api.ts:50

Sets the active interview session ID for contextual hint generation.

string | null

The session ID, or null to clear.

void


setOnExtensionUpdate(cb): void

Defined in: main/services/local-bridge-api.ts:74

Registers a callback to be invoked when the extension state changes.

(state) => void

The callback function receiving the updated extension state.

void


setOnHintGenerated(cb): void

Defined in: main/services/local-bridge-api.ts:82

Registers a callback to be invoked when a new hint is generated.

(entry) => void

The callback function receiving the generated hint entry.

void


start(): Promise<void>

Defined in: main/services/local-bridge-api.ts:89

Starts the local HTTP server on localhost:62544.

Promise<void>


stop(): Promise<void>

Defined in: main/services/local-bridge-api.ts:108

Stops the local HTTP server.

Promise<void>