feat(desktop): Add Export Logs (#26262)

This commit is contained in:
Luke Parker 2026-05-21 14:55:23 +10:00 committed by GitHub
commit bea3ca5b05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 508 additions and 21 deletions

View file

@ -67,6 +67,8 @@ const api: ElectronAPI = {
checkUpdate: () => ipcRenderer.invoke("check-update"),
installUpdate: () => ipcRenderer.invoke("install-update"),
setBackgroundColor: (color: string) => ipcRenderer.invoke("set-background-color", color),
exportDebugLogs: () => ipcRenderer.invoke("export-debug-logs"),
recordFatalRendererError: (error) => ipcRenderer.invoke("record-fatal-renderer-error", error),
}
contextBridge.exposeInMainWorld("api", api)

View file

@ -20,6 +20,14 @@ export type WindowConfig = {
updaterEnabled: boolean
}
export type FatalRendererError = {
error: string
url: string
version?: string
platform: string
os?: string
}
export type ElectronAPI = {
killSidecar: () => Promise<void>
installCli: () => Promise<string>
@ -78,4 +86,6 @@ export type ElectronAPI = {
checkUpdate: () => Promise<{ updateAvailable: boolean; version?: string }>
installUpdate: () => Promise<void>
setBackgroundColor: (color: string) => Promise<void>
exportDebugLogs: () => Promise<string>
recordFatalRendererError: (error: FatalRendererError) => Promise<void>
}