fix(web): app bugfix

This commit is contained in:
zhaoying
2026-03-18 14:36:23 +08:00
parent 969d428320
commit 4bb2ccfba7
4 changed files with 25 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 16:29:41
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-11 17:44:24
* @Last Modified time: 2026-03-18 14:30:41
*/
import { type FC, useState, useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
@@ -70,7 +70,8 @@ const ReleasePage: FC<{data: Application; refresh: () => void}> = ({data, refres
})
}
const handleExport = () => {
appExport(data.id, data.name)
if (!selectedVersion) return
appExport(data.id, data.name, {release_version: selectedVersion.id})
}
return (
<div className="rb:flex rb:h-[calc(100vh-64px)]">

View File

@@ -193,7 +193,10 @@ const TestChat: FC<TestChatProps> = ({
formatParams(message, conversationId, files, params),
handleStreamMessage
)
.catch(() => setLoading(false))
.catch(() => {
updateErrorAssistantMessage(0)
setLoading(false)
})
.finally(() => {
setLoading(false)
setStreamLoading(false)
@@ -243,11 +246,12 @@ const TestChat: FC<TestChatProps> = ({
handleWorkflowStreamMessage
)
.catch((error) => {
const errorInfo = JSON.parse(error.message)
setChatList(prev => {
const newList = [...prev]
const lastIndex = newList.length - 1
if (lastIndex >= 0) {
newList[lastIndex] = { ...newList[lastIndex], status: 'failed', content: null, subContent: error.error }
newList[lastIndex] = { ...newList[lastIndex], status: 'failed', content: null, subContent: errorInfo.error }
}
return newList
})