mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 17:26:55 +08:00
feat: add chat log step detail
This commit is contained in:
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user