소스 검색

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

tags/1.2.0
Novice 7 달 전
부모
커밋
0722beeb0b
No account linked to committer's email address
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 3
    1
      web/app/components/base/chat/chat/answer/agent-content.tsx
  2. 2
    1
      web/app/components/base/chat/chat/answer/index.tsx

+ 3
- 1
web/app/components/base/chat/chat/answer/agent-content.tsx 파일 보기

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

+ 2
- 1
web/app/components/base/chat/chat/answer/index.tsx 파일 보기

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

Loading…
취소
저장