feat: 消息会话的调整和增加时间戳

This commit is contained in:
zoujing
2026-03-04 16:59:47 +08:00
parent 011c28d945
commit 3f2a4a506b
3 changed files with 82 additions and 10 deletions

View File

@@ -24,6 +24,8 @@ export class ChatMessage {
toolCall?: any;
// 问题信息
question?: string;
// 时间戳
timestamp?: number;
constructor(
messageId: string,
@@ -32,7 +34,8 @@ export class ChatMessage {
isLoading: boolean = false,
finished: boolean = false,
toolCall?: any,
question?: any
question?: any,
timestamp?: number
) {
this.messageId = messageId;
this.messageRole = messageRole;
@@ -41,5 +44,6 @@ export class ChatMessage {
this.finished = finished;
this.toolCall = toolCall;
this.question = question;
this.timestamp = timestamp || Date.now();
}
}