Skip to content

Commit 6f17f98

Browse files
committed
chore: add frontend console log
1 parent 0891ab2 commit 6f17f98

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

frontend/src/views/chat/index.vue

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -934,18 +934,23 @@ async function clickAnalysis(id?: number) {
934934
}
935935
936936
function getRecordUsage(recordId: any) {
937-
chatApi.get_chart_usage(recordId).then((res) => {
938-
const logHistory = chatApi.toChatLogHistory(res)
939-
if (logHistory) {
940-
currentChat.value.records.forEach((record) => {
941-
if (record.id === recordId) {
942-
record.duration = logHistory.duration
943-
record.finish_time = logHistory.finish_time
944-
record.total_tokens = logHistory.total_tokens
945-
}
946-
})
947-
}
948-
})
937+
chatApi
938+
.get_chart_usage(recordId)
939+
.then((res) => {
940+
const logHistory = chatApi.toChatLogHistory(res)
941+
if (logHistory) {
942+
currentChat.value.records.forEach((record) => {
943+
if (record.id === recordId) {
944+
record.duration = logHistory.duration
945+
record.finish_time = logHistory.finish_time
946+
record.total_tokens = logHistory.total_tokens
947+
}
948+
})
949+
}
950+
})
951+
.catch((e) => {
952+
console.error(e)
953+
})
949954
}
950955
951956
const predictAnswerRef = ref()

0 commit comments

Comments
 (0)