fix: 完善 AI 日报详情状态与解析容错

This commit is contained in:
电摇小子
2026-07-14 11:07:35 +08:00
committed by 电摇小子
parent d28b579cb4
commit 519c10223d
15 changed files with 777 additions and 197 deletions
+29 -11
View File
@@ -70,7 +70,17 @@ declare global {
aiChat: (
messages: { role: string; content: string }[],
options?: { apiKey?: string; model?: string; baseURL?: string }
) => Promise<{ success: boolean; data?: string; error?: string }>
) => Promise<{
success: boolean
data?: string
usage?: {
input?: number
output?: number
total?: number
estimated?: boolean
}
error?: string
}>
copyImage: (base64String: string) => Promise<{ success: boolean; error?: string }>
getVoiceData: (
sessionId: string,
@@ -84,7 +94,13 @@ declare global {
imageDatNameOrThumb?: string | boolean,
sessionId?: string,
options?: { force?: boolean }
) => Promise<{ success: boolean; data?: string; error?: string; isThumb?: boolean; filePath?: string }>
) => Promise<{
success: boolean
data?: string
error?: string
isThumb?: boolean
filePath?: string
}>
getSticker: (
cdnUrl?: string,
md5?: string
@@ -141,15 +157,17 @@ declare global {
}
settingsPath: string
}>
setSettings: (patch: Partial<{
dbRoot: string
apiEnabled: boolean
apiHost: string
apiPort: number
imageKeyRoot: string
imageXorKey: string
imageAesKey: string
}>) => Promise<{
setSettings: (
patch: Partial<{
dbRoot: string
apiEnabled: boolean
apiHost: string
apiPort: number
imageKeyRoot: string
imageXorKey: string
imageAesKey: string
}>
) => Promise<{
settings: {
dbRoot: string
apiEnabled: boolean