mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 17:16:52 +08:00
Feat: Enables the message operator form to reference the data defined by the begin operator #3221 (#8108)
### What problem does this PR solve? Feat: Enables the message operator form to reference the data defined by the begin operator #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -9,7 +9,7 @@ import { useSendNextMessage } from './hooks';
|
||||
import MessageInput from '@/components/message-input';
|
||||
import PdfDrawer from '@/components/pdf-drawer';
|
||||
import { useClickDrawer } from '@/components/pdf-drawer/hooks';
|
||||
import { useFetchFlow } from '@/hooks/flow-hooks';
|
||||
import { useFetchAgent } from '@/hooks/use-agent-request';
|
||||
import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
|
||||
import { buildMessageUuidWithRole } from '@/utils/chat';
|
||||
|
||||
@ -30,7 +30,7 @@ const AgentChatBox = () => {
|
||||
useClickDrawer();
|
||||
useGetFileIcon();
|
||||
const { data: userInfo } = useFetchUserInfo();
|
||||
const { data: canvasInfo } = useFetchFlow();
|
||||
const { data: canvasInfo } = useFetchAgent();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { MessageType } from '@/constants/chat';
|
||||
import { useFetchFlow } from '@/hooks/flow-hooks';
|
||||
import {
|
||||
useHandleMessageInputChange,
|
||||
useSelectDerivedMessages,
|
||||
} from '@/hooks/logic-hooks';
|
||||
import { useFetchAgent } from '@/hooks/use-agent-request';
|
||||
import {
|
||||
IEventList,
|
||||
IMessageEvent,
|
||||
@ -23,7 +23,7 @@ import { receiveMessageError } from '../utils';
|
||||
const antMessage = message;
|
||||
|
||||
export const useSelectNextMessages = () => {
|
||||
const { data: flowDetail, loading } = useFetchFlow();
|
||||
const { data: flowDetail, loading } = useFetchAgent();
|
||||
const reference = flowDetail.dsl.reference;
|
||||
const {
|
||||
derivedMessages,
|
||||
@ -69,7 +69,7 @@ export const useSendNextMessage = () => {
|
||||
} = useSelectNextMessages();
|
||||
const { id: agentId } = useParams();
|
||||
const { handleInputChange, value, setValue } = useHandleMessageInputChange();
|
||||
const { refetch } = useFetchFlow();
|
||||
const { refetch } = useFetchAgent();
|
||||
|
||||
const { send, answerList, done, stopOutputMessage } = useSendMessageBySSE(
|
||||
api.runCanvas,
|
||||
|
||||
Reference in New Issue
Block a user