统一前端错误读取和调试日志

This commit is contained in:
yml2213
2026-06-10 15:52:49 +08:00
parent df7d6a2675
commit 70a35204b3
40 changed files with 110 additions and 233 deletions
@@ -1,6 +1,7 @@
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import type { ChatEvent } from './useChatSSE'
import { debugError } from '@/shared/utils/debug'
export type NotificationPermission = 'default' | 'granted' | 'denied'
@@ -119,7 +120,7 @@ export function useDesktopNotification(scope: 'user' | 'admin') {
notification.close()
}, 5000)
} catch (error) {
console.error('Failed to show notification:', error)
debugError('桌面通知发送失败', error)
}
}
@@ -205,6 +206,6 @@ function speakText(text: string) {
utterance.volume = 1
window.speechSynthesis.speak(utterance)
} catch (error) {
console.error('Failed to speak notification:', error)
debugError('语音提醒播放失败', error)
}
}