mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-15 02:49:16 +08:00
feat: 支持平台消息id和回复id,同时进行表迁移
This commit is contained in:
@@ -73,6 +73,7 @@ interface JsonlMessage {
|
||||
timestamp: number
|
||||
type: number
|
||||
content: string | null
|
||||
replyToMessageId?: string
|
||||
}
|
||||
|
||||
/** 任意 JSONL 行 */
|
||||
@@ -215,6 +216,7 @@ async function* parseChatLabJsonl(options: ParseOptions): AsyncGenerator<ParseEv
|
||||
timestamp: parsed.timestamp,
|
||||
type: parsed.type as MessageType,
|
||||
content: parsed.content,
|
||||
replyToMessageId: parsed.replyToMessageId,
|
||||
})
|
||||
messagesProcessed++
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ interface ChatLabMessage {
|
||||
timestamp: number // 秒级时间戳
|
||||
type: number // MessageType
|
||||
content: string | null
|
||||
replyToMessageId?: string // 回复的目标消息 ID(平台原始 ID)
|
||||
}
|
||||
|
||||
interface ChatLabMember {
|
||||
@@ -204,6 +205,7 @@ async function* parseChatLab(options: ParseOptions): AsyncGenerator<ParseEvent,
|
||||
timestamp: msg.timestamp,
|
||||
type: msg.type,
|
||||
content: msg.content,
|
||||
replyToMessageId: msg.replyToMessageId,
|
||||
})
|
||||
|
||||
messagesProcessed++
|
||||
|
||||
@@ -387,6 +387,7 @@ async function* parseDiscordExporter(options: ParseOptions): AsyncGenerator<Pars
|
||||
timestamp: parseTimestamp(msg.timestamp),
|
||||
type: messageType,
|
||||
content: content || null,
|
||||
replyToMessageId: msg.reference?.messageId || undefined,
|
||||
})
|
||||
|
||||
messagesProcessed++
|
||||
|
||||
Reference in New Issue
Block a user