mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
feat: 一些适配
This commit is contained in:
@@ -41,11 +41,12 @@ export const MESSAGE_TYPE_LABELS: Record<number, string> = {
|
||||
244813135921: '文本',
|
||||
3: '图片',
|
||||
34: '语音',
|
||||
42: '名片',
|
||||
43: '视频',
|
||||
47: '表情',
|
||||
48: '位置',
|
||||
49: '链接/文件',
|
||||
42: '名片',
|
||||
50: '通话',
|
||||
10000: '系统消息',
|
||||
}
|
||||
|
||||
|
||||
2
src/types/electron.d.ts
vendored
2
src/types/electron.d.ts
vendored
@@ -11,6 +11,7 @@ export interface ElectronAPI {
|
||||
setTitleBarOverlay: (options: { symbolColor: string }) => void
|
||||
openVideoPlayerWindow: (videoPath: string, videoWidth?: number, videoHeight?: number) => Promise<void>
|
||||
resizeToFitVideo: (videoWidth: number, videoHeight: number) => Promise<void>
|
||||
openChatHistoryWindow: (sessionId: string, messageId: number) => Promise<boolean>
|
||||
}
|
||||
config: {
|
||||
get: (key: string) => Promise<unknown>
|
||||
@@ -106,6 +107,7 @@ export interface ElectronAPI {
|
||||
getVoiceTranscript: (sessionId: string, msgId: string, createTime?: number) => Promise<{ success: boolean; transcript?: string; error?: string }>
|
||||
onVoiceTranscriptPartial: (callback: (payload: { msgId: string; text: string }) => void) => () => void
|
||||
execQuery: (kind: string, path: string | null, sql: string) => Promise<{ success: boolean; rows?: any[]; error?: string }>
|
||||
getMessage: (sessionId: string, localId: number) => Promise<{ success: boolean; message?: Message; error?: string }>
|
||||
}
|
||||
|
||||
image: {
|
||||
|
||||
@@ -53,8 +53,44 @@ export interface Message {
|
||||
// 引用消息
|
||||
quotedContent?: string
|
||||
quotedSender?: string
|
||||
// Type 49 细分字段
|
||||
linkTitle?: string // 链接/文件标题
|
||||
linkUrl?: string // 链接 URL
|
||||
linkThumb?: string // 链接缩略图
|
||||
fileName?: string // 文件名
|
||||
fileSize?: number // 文件大小
|
||||
fileExt?: string // 文件扩展名
|
||||
xmlType?: string // XML 中的 type 字段
|
||||
// 名片消息
|
||||
cardUsername?: string // 名片的微信ID
|
||||
cardNickname?: string // 名片的昵称
|
||||
// 聊天记录
|
||||
chatRecordTitle?: string // 聊天记录标题
|
||||
chatRecordList?: ChatRecordItem[] // 聊天记录列表
|
||||
}
|
||||
|
||||
// 聊天记录项
|
||||
export interface ChatRecordItem {
|
||||
datatype: number // 消息类型
|
||||
sourcename: string // 发送者
|
||||
sourcetime: string // 时间
|
||||
sourceheadurl?: string // 发送者头像
|
||||
datadesc?: string // 内容描述
|
||||
datatitle?: string // 标题
|
||||
fileext?: string // 文件扩展名
|
||||
datasize?: number // 文件大小
|
||||
messageuuid?: string // 消息UUID
|
||||
dataurl?: string // 数据URL
|
||||
datathumburl?: string // 缩略图URL
|
||||
datacdnurl?: string // CDN URL
|
||||
aeskey?: string // AES密钥
|
||||
md5?: string // MD5
|
||||
imgheight?: number // 图片高度
|
||||
imgwidth?: number // 图片宽度
|
||||
duration?: number // 时长(毫秒)
|
||||
}
|
||||
|
||||
|
||||
// 分析数据
|
||||
export interface AnalyticsData {
|
||||
totalMessages: number
|
||||
|
||||
Reference in New Issue
Block a user