mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 06:46:40 +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:
@ -18,6 +18,7 @@ import { memo, useCallback } from 'react';
|
||||
import { useParams } from 'umi';
|
||||
import DebugContent from '../debug-content';
|
||||
import { useAwaitCompentData } from '../hooks/use-chat-logic';
|
||||
import { useIsTaskMode } from '../hooks/use-get-begin-query';
|
||||
|
||||
function AgentChatBox() {
|
||||
const {
|
||||
@ -48,6 +49,8 @@ function AgentChatBox() {
|
||||
canvasId: canvasId as string,
|
||||
});
|
||||
|
||||
const isTaskMode = useIsTaskMode();
|
||||
|
||||
const handleUploadFile: NonNullable<FileUploadProps['onUpload']> =
|
||||
useCallback(
|
||||
async (files, options) => {
|
||||
@ -109,18 +112,20 @@ function AgentChatBox() {
|
||||
</div>
|
||||
<div ref={scrollRef} />
|
||||
</div>
|
||||
<NextMessageInput
|
||||
value={value}
|
||||
sendLoading={sendLoading}
|
||||
disabled={isWaitting}
|
||||
sendDisabled={sendLoading || isWaitting}
|
||||
isUploading={loading || isWaitting}
|
||||
onPressEnter={handlePressEnter}
|
||||
onInputChange={handleInputChange}
|
||||
stopOutputMessage={stopOutputMessage}
|
||||
onUpload={handleUploadFile}
|
||||
conversationId=""
|
||||
/>
|
||||
{isTaskMode || (
|
||||
<NextMessageInput
|
||||
value={value}
|
||||
sendLoading={sendLoading}
|
||||
disabled={isWaitting}
|
||||
sendDisabled={sendLoading || isWaitting}
|
||||
isUploading={loading || isWaitting}
|
||||
onPressEnter={handlePressEnter}
|
||||
onInputChange={handleInputChange}
|
||||
stopOutputMessage={stopOutputMessage}
|
||||
onUpload={handleUploadFile}
|
||||
conversationId=""
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
<PdfDrawer
|
||||
visible={visible}
|
||||
|
||||
Reference in New Issue
Block a user