浏览代码

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

tags/1.2.0
Novice 7 个月前
父节点
当前提交
0722beeb0b
没有帐户链接到提交者的电子邮件

+ 3
- 1
web/app/components/base/chat/chat/answer/agent-content.tsx 查看文件

type AgentContentProps = { type AgentContentProps = {
item: ChatItem item: ChatItem
responding?: boolean responding?: boolean
content?: string
} }
const AgentContent: FC<AgentContentProps> = ({ const AgentContent: FC<AgentContentProps> = ({
item, item,
responding, responding,
content,
}) => { }) => {
const { const {
annotation, annotation,


return ( return (
<div> <div>
{agent_thoughts?.map((thought, index) => (
{content ? <Markdown content={content} /> : agent_thoughts?.map((thought, index) => (
<div key={index} className='px-2 py-1'> <div key={index} className='px-2 py-1'>
{thought.thought && ( {thought.thought && (
<Markdown content={thought.thought} /> <Markdown content={thought.thought} />

+ 2
- 1
web/app/components/base/chat/chat/answer/index.tsx 查看文件

) )
} }
{ {
hasAgentThoughts && (
(hasAgentThoughts || content) && (
<AgentContent <AgentContent
item={item} item={item}
responding={responding} responding={responding}
content={content}
/> />
) )
} }

正在加载...
取消
保存