mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 00:46:52 +08:00
Fix: Click the reset button on the agent page shared externally, and the greeting in conversation mode should not be deleted. #10567 (#10571)
### What problem does this PR solve? Fix: Click the reset button on the agent page shared externally, and the greeting in conversation mode should not be deleted. #10567 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -27,13 +27,16 @@ export function useSelectBeginNodeDataInputs() {
|
||||
);
|
||||
}
|
||||
|
||||
export function useIsTaskMode() {
|
||||
export function useIsTaskMode(isTask?: boolean) {
|
||||
const getNode = useGraphStore((state) => state.getNode);
|
||||
|
||||
return useMemo(() => {
|
||||
if (typeof isTask === 'boolean') {
|
||||
return isTask;
|
||||
}
|
||||
const node = getNode(BeginId);
|
||||
return node?.data?.form?.mode === AgentDialogueMode.Task;
|
||||
}, [getNode]);
|
||||
}, [getNode, isTask]);
|
||||
}
|
||||
|
||||
export const useGetBeginNodeDataQuery = () => {
|
||||
|
||||
@ -59,6 +59,7 @@ export const useSendNextSharedMessage = (
|
||||
addEventList,
|
||||
beginParams: params,
|
||||
isShared: true,
|
||||
isTaskMode,
|
||||
});
|
||||
|
||||
const ok = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user