Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion frontend/src/views/chat/answer/AnalysisAnswer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import BaseAnswer from './BaseAnswer.vue'
import { chatApi, ChatInfo, type ChatMessage, ChatRecord } from '@/api/chat.ts'
import { Chat, chatApi, ChatInfo, type ChatMessage, ChatRecord } from '@/api/chat.ts'
import { computed, nextTick, onBeforeUnmount, ref } from 'vue'
import MdComponent from '@/views/chat/component/MdComponent.vue'
const props = withDefaults(
Expand Down Expand Up @@ -95,6 +95,13 @@ const sendMessage = async () => {
if (error) return

try {
_currentChat.value.latest_record_time = new Date()
_chatList.value.forEach((c: Chat) => {
if (c.id === _currentChat.value.id) {
c.latest_record_time = _currentChat.value.latest_record_time
}
})

const controller: AbortController = new AbortController()
const response = await chatApi.analysis(currentRecord.analysis_record_id, controller)
const reader = response.body.getReader()
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/views/chat/answer/ChartAnswer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ const sendMessage = async () => {
if (error) return

try {
_currentChat.value.latest_record_time = new Date()
_chatList.value.forEach((c: Chat) => {
if (c.id === _currentChat.value.id) {
c.latest_record_time = _currentChat.value.latest_record_time
}
})

const controller: AbortController = new AbortController()
const param = {
question: currentRecord.question,
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/views/chat/answer/PredictAnswer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import BaseAnswer from './BaseAnswer.vue'
import { chatApi, ChatInfo, type ChatMessage, ChatRecord } from '@/api/chat.ts'
import { Chat, chatApi, ChatInfo, type ChatMessage, ChatRecord } from '@/api/chat.ts'
import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
import MdComponent from '@/views/chat/component/MdComponent.vue'
import ChartBlock from '@/views/chat/chat-block/ChartBlock.vue'
Expand Down Expand Up @@ -100,6 +100,13 @@ const sendMessage = async () => {
if (error) return

try {
_currentChat.value.latest_record_time = new Date()
_chatList.value.forEach((c: Chat) => {
if (c.id === _currentChat.value.id) {
c.latest_record_time = _currentChat.value.latest_record_time
}
})

const controller: AbortController = new AbortController()
const response = await chatApi.predict(currentRecord.predict_record_id, controller)
const reader = response.body.getReader()
Expand Down
Loading