Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'beta' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AruSeito committed Apr 10, 2024
2 parents 14e4169 + 066502b commit 15e87f5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions apps/agent/src/page/WorkSpace/AI/AIAgent/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const useSubmitSaveAgent = () => {
),
},
}).unwrap()
changeCreateToEdit(currentData.cacheID, serverAgent.aiAgentID)
await changeCreateToEdit(currentData.cacheID, serverAgent.aiAgentID)
agentInfo = serverAgent
} else {
const serverAgent = await putAgentDetail({
Expand Down Expand Up @@ -107,12 +107,14 @@ export const useSubmitSaveAgent = () => {
? agentInfo.knowledge
: [],
}
reset({
...newFormData,
cacheID: newFormData.aiAgentID,
formIsDirty: false,
})
updateTabInfo(data.cacheID, {
if (!currentData.aiAgentID) {
reset({
...newFormData,
cacheID: newFormData.aiAgentID,
formIsDirty: false,
})
}
await updateTabInfo(data.cacheID, {
tabName: newFormData.name,
tabIcon: newFormData.icon,
tabType: TAB_TYPE.EDIT_TIPIS,
Expand All @@ -121,7 +123,7 @@ export const useSubmitSaveAgent = () => {

await updateUiHistoryData(
currentTeamInfo.id,
data.cacheID,
newFormData.aiAgentID,
newFormData.aiAgentID,
{
formData: {
Expand Down

0 comments on commit 15e87f5

Please sign in to comment.