feat: add chat log step detail

This commit is contained in:
ulleo
2026-02-12 17:51:02 +08:00
committed by ulleo
parent 40925e9649
commit 2f5736686f
13 changed files with 712 additions and 17 deletions
+10 -3
View File
@@ -300,8 +300,10 @@ export class ChatLogHistoryItem {
duration?: number | undefined
total_tokens?: number | undefined
operate?: string | undefined
operate_key?: string | undefined
local_operation?: boolean | undefined
error?: boolean | undefined
message?: any
constructor()
constructor(
@@ -311,7 +313,8 @@ export class ChatLogHistoryItem {
total_tokens: number | undefined,
operate: string | undefined,
local_operation: boolean | undefined,
error: boolean | undefined
error: boolean | undefined,
message: any | undefined
)
constructor(
start_time?: Date | string,
@@ -320,15 +323,18 @@ export class ChatLogHistoryItem {
total_tokens?: number | undefined,
operate?: string | undefined,
local_operation?: boolean | undefined,
error?: boolean | undefined
error?: boolean | undefined,
message?: any | undefined
) {
this.start_time = getDate(start_time)
this.finish_time = getDate(finish_time)
this.duration = duration
this.total_tokens = total_tokens
this.operate_key = operate
this.operate = t('chat.log.' + operate)
this.local_operation = !!local_operation
this.error = !!error
this.message = message
}
}
@@ -373,7 +379,8 @@ const toChatLogHistoryItem = (data?: any): any | undefined => {
data.total_tokens,
data.operate,
data.local_operation,
data.error
data.error,
data.message
)
}