瀏覽代碼

feat: Make agent template support HTML #1842 (#2259)

### What problem does this PR solve?

feat: Make agent template support HTML #1842
### Type of change

- [x] New Feature (non-breaking change which adds functionality)
tags/v0.11.0
balibabu 1 年之前
父節點
當前提交
7c98cb5075
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. 6
    1
      web/src/pages/flow/list/agent-template-modal.tsx

+ 6
- 1
web/src/pages/flow/list/agent-template-modal.tsx 查看文件

@@ -7,6 +7,7 @@ import { useCallback, useState } from 'react';
import CreateAgentModal from './create-agent-modal';
import GraphAvatar from './graph-avatar';

import DOMPurify from 'dompurify';
import styles from './index.less';

const { Title, Text, Paragraph } = Typography;
@@ -83,7 +84,11 @@ const AgentTemplateModal = ({ visible, hideModal, loading, onOk }: IProps) => {
</Flex>
<div className={styles.agentDescription}>
<Paragraph ellipsis={{ tooltip: x.description, rows: 5 }}>
{x.description}
<div
dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(x.description),
}}
></div>
</Paragraph>
</div>
{selectedId === x.id && (

Loading…
取消
儲存