fix(web): agent copy
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 16:29:21
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-03-24 11:02:34
|
||||
* @Last Modified time: 2026-03-24 15:27:30
|
||||
*/
|
||||
import { useEffect, useRef, useState, forwardRef, useImperativeHandle } from 'react';
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@@ -62,8 +62,6 @@ const Agent = forwardRef<AgentRef, { onFeaturesLoad?: (features: FeaturesConfigF
|
||||
const values = Form.useWatch<Config>([], form)
|
||||
const [isSave, setIsSave] = useState(false)
|
||||
const initialized = useRef(false)
|
||||
|
||||
console.log('chatList', chatList)
|
||||
|
||||
// Initialization flag
|
||||
useEffect(() => {
|
||||
@@ -81,7 +79,7 @@ const Agent = forwardRef<AgentRef, { onFeaturesLoad?: (features: FeaturesConfigF
|
||||
useEffect(() => {
|
||||
getModels()
|
||||
getData()
|
||||
}, [])
|
||||
}, [id])
|
||||
|
||||
/**
|
||||
* Fetch agent configuration data
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 16:27:56
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-02-03 16:27:56
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-03-24 15:28:20
|
||||
*/
|
||||
/**
|
||||
* Copy Application Modal
|
||||
@@ -60,7 +60,8 @@ const CopyModal = forwardRef<CopyModalRef, CopyModalProps>(({
|
||||
copyApplication(data.id, values.new_name)
|
||||
.then((res) => {
|
||||
const resData = res as Application
|
||||
navigate(`/application/config/${resData.id}`)
|
||||
navigate(`/application/config/${resData.id}`, { replace: true })
|
||||
handleClose()
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false)
|
||||
|
||||
Reference in New Issue
Block a user