The agent directly outputs the results under the task model #9745 (#9746)

### 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:
balibabu
2025-08-28 11:43:40 +08:00
committed by GitHub
parent 2d101561f8
commit 7332f1d0f3
6 changed files with 153 additions and 73 deletions

View File

@ -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}