fix(agent app): moderation feature can't work as expected (#16794)

This commit is contained in:
Novice 2025-03-27 11:41:14 +08:00 committed by GitHub
parent 8b89447549
commit 0722beeb0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -11,10 +11,12 @@ import { getProcessedFilesFromResponse } from '@/app/components/base/file-upload
type AgentContentProps = {
item: ChatItem
responding?: boolean
content?: string
}
const AgentContent: FC<AgentContentProps> = ({
item,
responding,
content,
}) => {
const {
annotation,
@ -26,7 +28,7 @@ const AgentContent: FC<AgentContentProps> = ({
return (
<div>
{agent_thoughts?.map((thought, index) => (
{content ? <Markdown content={content} /> : agent_thoughts?.map((thought, index) => (
<div key={index} className='px-2 py-1'>
{thought.thought && (
<Markdown content={thought.thought} />

View File

@ -164,10 +164,11 @@ const Answer: FC<AnswerProps> = ({
)
}
{
hasAgentThoughts && (
(hasAgentThoughts || content) && (
<AgentContent
item={item}
responding={responding}
content={content}
/>
)
}