feat: add experimental Weibo context to AI insights

This commit is contained in:
Jason
2026-04-12 20:53:10 +08:00
parent 9c5426159d
commit 1be03734a4
9 changed files with 833 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import type { ChatSession, Message, Contact, ContactInfo, ChatRecordItem } from './models'
import type { ChatSession, Message, Contact, ContactInfo, ChatRecordItem } from './models'
export interface SessionChatWindowOpenOptions {
source?: 'chat' | 'export'
@@ -7,6 +7,20 @@ export interface SessionChatWindowOpenOptions {
initialContactType?: ContactInfo['type']
}
export interface SocialValidateWeiboUidResult {
success: boolean
uid?: string
screenName?: string
error?: string
}
export interface SocialSaveWeiboCookieResult {
success: boolean
normalized?: string
hasCookie?: boolean
error?: string
}
export interface ElectronAPI {
window: {
minimize: () => void
@@ -1075,6 +1089,10 @@ export interface ElectronAPI {
stop: () => Promise<{ success: boolean }>
status: () => Promise<{ running: boolean; port: number; mediaExportPath: string }>
}
social: {
saveWeiboCookie: (rawInput: string) => Promise<SocialSaveWeiboCookieResult>
validateWeiboUid: (uid: string) => Promise<SocialValidateWeiboUidResult>
}
insight: {
testConnection: () => Promise<{ success: boolean; message: string }>
getTodayStats: () => Promise<Array<{ sessionId: string; count: number; times: string[] }>>
@@ -1176,3 +1194,6 @@ declare global {
}
export { }