import React, { useCallback, useState, useRef, useMemo } from 'react'; import Button from '../../button'; import AIChatInput from '../index'; import Configure from '../configure'; import { IconFixedStroked, IconBookOpenStroked, IconClose, IconUpload } from '@douyinfe/semi-icons'; import { modelOptions, mcpOptions, radioButtonProps1, radioButtonProps2, skills, template, reference, uploadProps, suggestionTemplate, customReferences, refTypeToIconMap } from './constant'; import './stories.scss'; import { getAttachmentType, isImageType } from '@douyinfe/semi-foundation/aiChatInput/utils'; import suggestion from './suggestion'; import Mention from '@tiptap/extension-mention'; import ReferSlot from './referSlot'; import { RadioGroup, Radio, Cascader } from '../../index'; import getConfigureItem from '../configure/getConfigureItem'; export default { title: 'AIChatInput', } const outerStyle = { margin: 12, maxHeight: 300 }; export const Basic = () => { const [generating, setGenerating] = useState(false); const onContentChange = useCallback((content) => { console.log('onContentChange', content); }, []); const onUploadChange = useCallback((fileList) => { console.log('onUploadChange', fileList); }, []); const toggleGenerate = useCallback((props) => { setGenerating(value => !value); }, []); return (