Feat: Replace the link of the old version of the agent module #3221 (#9130)

### What problem does this PR solve?
Feat: Automatically save agent canvas content
Feat: Replace the link of the old version of the agent module #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-31 12:14:00 +08:00
committed by GitHub
parent e9c5c7bc7c
commit 0327fd848e
13 changed files with 77 additions and 44 deletions

View File

@ -266,7 +266,7 @@ export const useResetAgent = () => {
return { data, loading, resetAgent: mutateAsync };
};
export const useSetAgent = () => {
export const useSetAgent = (showMessage: boolean = true) => {
const queryClient = useQueryClient();
const {
data,
@ -282,9 +282,11 @@ export const useSetAgent = () => {
}) => {
const { data = {} } = await agentService.setCanvas(params);
if (data.code === 0) {
message.success(
i18n.t(`message.${params?.id ? 'modified' : 'created'}`),
);
if (showMessage) {
message.success(
i18n.t(`message.${params?.id ? 'modified' : 'created'}`),
);
}
queryClient.invalidateQueries({
queryKey: [AgentApiAction.FetchAgentList],
});