feat: add desktop bug report collection
This commit is contained in:
@@ -33,6 +33,11 @@ import {
|
||||
type DesktopAppSettingKey,
|
||||
} from './app-settings'
|
||||
import { getDesktopAppVersion, getDesktopReleaseChannel } from './app-version'
|
||||
import {
|
||||
initDesktopBugReporter,
|
||||
submitManualDesktopBugReport,
|
||||
syncDesktopBugReporterSession,
|
||||
} from './bug-reporter'
|
||||
import {
|
||||
defaultDesktopUpdateChannel,
|
||||
startDesktopClientUpdate,
|
||||
@@ -131,6 +136,7 @@ function silencePackagedConsole(): void {
|
||||
}
|
||||
|
||||
silencePackagedConsole()
|
||||
initDesktopBugReporter()
|
||||
if (isDevelopmentRuntime) {
|
||||
installObservedGlobalFetch()
|
||||
}
|
||||
@@ -957,6 +963,17 @@ function registerBridgeHandlers(): void {
|
||||
ipcMain.handle('desktop:runtime-account-snapshot', (_event, accountId: string) =>
|
||||
captureRuntimeAccountSnapshot(accountId),
|
||||
)
|
||||
safeHandle(
|
||||
'desktop:submit-bug-report',
|
||||
async (
|
||||
_event,
|
||||
input: {
|
||||
title?: string
|
||||
description?: string
|
||||
severity?: string
|
||||
},
|
||||
) => submitManualDesktopBugReport(input ?? {}),
|
||||
)
|
||||
safeHandle('desktop:bind-publish-account', async (_event, platformId: string) => {
|
||||
const account = (await bindPublishAccount(platformId)) as DesktopAccountInfo
|
||||
noteRuntimeAccountBound(account)
|
||||
@@ -1052,6 +1069,7 @@ function registerBridgeHandlers(): void {
|
||||
'desktop:runtime-session-sync',
|
||||
(_event, session: DesktopRuntimeSessionSyncRequest | null) => {
|
||||
syncRuntimeSession(session)
|
||||
syncDesktopBugReporterSession(session)
|
||||
return null
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user