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