mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### 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:
@ -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],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user