feat: add chat log step display

This commit is contained in:
ulleo
2026-02-04 11:46:06 +08:00
committed by ulleo
parent a466e05db9
commit 0a05a5da36
+20 -17
View File
@@ -934,23 +934,26 @@ async function clickAnalysis(id?: number) {
}
function getRecordUsage(recordId: any) {
chatApi
.get_chart_usage(recordId)
.then((res) => {
const logHistory = chatApi.toChatLogHistory(res)
if (logHistory) {
currentChat.value.records.forEach((record) => {
if (record.id === recordId) {
record.duration = logHistory.duration
record.finish_time = logHistory.finish_time
record.total_tokens = logHistory.total_tokens
}
})
}
})
.catch((e) => {
console.error(e)
})
console.debug('getRecordUsage id: ', recordId)
nextTick(() => {
chatApi
.get_chart_usage(recordId)
.then((res) => {
const logHistory = chatApi.toChatLogHistory(res)
if (logHistory) {
currentChat.value.records.forEach((record) => {
if (record.id === recordId) {
record.duration = logHistory.duration
record.finish_time = logHistory.finish_time
record.total_tokens = logHistory.total_tokens
}
})
}
})
.catch((e) => {
console.error(e)
})
})
}
const predictAnswerRef = ref()