mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-03 00:55:10 +08:00
### What problem does this PR solve? The agent directly outputs the results under the task model #9745 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -7,7 +7,13 @@ import { t } from 'i18next';
|
||||
import { isEmpty } from 'lodash';
|
||||
import get from 'lodash/get';
|
||||
import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
||||
import { BeginId, BeginQueryType, Operator, VariableType } from '../constant';
|
||||
import {
|
||||
AgentDialogueMode,
|
||||
BeginId,
|
||||
BeginQueryType,
|
||||
Operator,
|
||||
VariableType,
|
||||
} from '../constant';
|
||||
import { AgentFormContext } from '../context';
|
||||
import { buildBeginInputListFromObject } from '../form/begin-form/utils';
|
||||
import { BeginQuery } from '../interface';
|
||||
@ -21,6 +27,15 @@ export function useSelectBeginNodeDataInputs() {
|
||||
);
|
||||
}
|
||||
|
||||
export function useIsTaskMode() {
|
||||
const getNode = useGraphStore((state) => state.getNode);
|
||||
|
||||
return useMemo(() => {
|
||||
const node = getNode(BeginId);
|
||||
return node?.data?.form?.mode === AgentDialogueMode.Task;
|
||||
}, [getNode]);
|
||||
}
|
||||
|
||||
export const useGetBeginNodeDataQuery = () => {
|
||||
const getNode = useGraphStore((state) => state.getNode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user