chore: add frontend console log

This commit is contained in:
ulleo
2026-02-04 11:27:45 +08:00
parent 0891ab2f6e
commit 6f17f98754
+17 -12
View File
@@ -934,18 +934,23 @@ 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
}
})
}
})
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()