mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
Shows CI result lines in the chat that opened or pushed to a pull request. They're hidden in the terminal overlay and on the phone until the phone app gets the setting.
23 lines
734 B
TypeScript
23 lines
734 B
TypeScript
/** The desktop renderers PR refresh serves. A Node host (orcad) has none: no window reports
|
|
* visible PRs there, and refresh events go nowhere. Electron installs its own at startup. */
|
|
export type PRRefreshRendererPort = {
|
|
/** Whether the renderer that reported visible PRs is still open. */
|
|
isRendererOpen(webContentsId: number): boolean
|
|
sendToTrustedUI(channel: string, payload: unknown): void
|
|
}
|
|
|
|
const headless: PRRefreshRendererPort = {
|
|
isRendererOpen: () => false,
|
|
sendToTrustedUI: () => {}
|
|
}
|
|
|
|
let current = headless
|
|
|
|
export function setPRRefreshRendererPort(port: PRRefreshRendererPort | null): void {
|
|
current = port ?? headless
|
|
}
|
|
|
|
export function prRefreshRenderers(): PRRefreshRendererPort {
|
|
return current
|
|
}
|