feat: add chat log step display

#324
#742
This commit is contained in:
ulleo
2026-01-28 18:54:25 +08:00
committed by ulleo
parent 6bb748a8b7
commit f8240acfcf
13 changed files with 141 additions and 39 deletions
+7 -1
View File
@@ -1,5 +1,8 @@
import { request } from '@/utils/request'
import { getDate } from '@/utils/utils.ts'
import { i18n } from '@/i18n'
const { t } = i18n.global
export const questionApi = {
pager: (pageNumber: number, pageSize: number) =>
@@ -320,7 +323,7 @@ export class ChatLogHistoryItem {
this.finish_time = getDate(finish_time)
this.duration = duration
this.total_tokens = total_tokens
this.operate = operate
this.operate = t('chat.log.' + operate)
this.local_operation = !!local_operation
}
}
@@ -441,6 +444,9 @@ export const chatApi = {
get_chart_log_history: (record_id?: number): Promise<any> => {
return request.get(`/chat/record/${record_id}/log`)
},
get_chart_usage: (record_id?: number): Promise<any> => {
return request.get(`/chat/record/${record_id}/usage`)
},
startChat: (data: any): Promise<ChatInfo> => {
return request.post('/chat/start', data)
},