Просмотр исходного кода

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 год назад
Родитель
Сommit
7c98cb5075
Аккаунт пользователя с таким Email не найден
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 Просмотреть файл

import CreateAgentModal from './create-agent-modal'; import CreateAgentModal from './create-agent-modal';
import GraphAvatar from './graph-avatar'; import GraphAvatar from './graph-avatar';


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


const { Title, Text, Paragraph } = Typography; const { Title, Text, Paragraph } = Typography;
</Flex> </Flex>
<div className={styles.agentDescription}> <div className={styles.agentDescription}>
<Paragraph ellipsis={{ tooltip: x.description, rows: 5 }}> <Paragraph ellipsis={{ tooltip: x.description, rows: 5 }}>
{x.description}
<div
dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(x.description),
}}
></div>
</Paragraph> </Paragraph>
</div> </div>
{selectedId === x.id && ( {selectedId === x.id && (

Загрузка…
Отмена
Сохранить