| | |
| | | import PromptEditor from '@/app/components/base/prompt-editor' |
| | | import { Variable02 } from '@/app/components/base/icons/src/vender/solid/development' |
| | | import Tooltip from '@/app/components/base/tooltip' |
| | | import { noop } from 'lodash-es' |
| | | |
| | | type Props = { |
| | | instanceId?: string |
| | |
| | | show: false, |
| | | selectable: false, |
| | | datasets: [], |
| | | onAddContext: noop, |
| | | onAddContext: () => { }, |
| | | }} |
| | | historyBlock={{ |
| | | show: false, |
| | |
| | | user: 'Human', |
| | | assistant: 'Assistant', |
| | | }, |
| | | onEditRole: noop, |
| | | onEditRole: () => { }, |
| | | }} |
| | | queryBlock={{ |
| | | show: false, |
| | |
| | | {/* to patch Editor not support dynamic change editable status */} |
| | | {readOnly && <div className='absolute inset-0 z-10'></div>} |
| | | {isFocus && ( |
| | | <div className={cn('absolute z-10', insertVarTipToLeft ? 'left-[-12px] top-1.5' : ' right-1 top-[-9px]')}> |
| | | <div className={cn('absolute z-10', insertVarTipToLeft ? 'top-1.5 left-[-12px]' : ' top-[-9px] right-1')}> |
| | | <Tooltip |
| | | popupContent={`${t('workflow.common.insertVarTip')}`} |
| | | > |
| | | <div className='cursor-pointer rounded-[5px] border-[0.5px] border-divider-regular bg-components-badge-white-to-dark p-0.5 shadow-lg'> |
| | | <Variable02 className='h-3.5 w-3.5 text-components-button-secondary-accent-text' /> |
| | | <div className='p-0.5 rounded-[5px] shadow-lg cursor-pointer bg-white hover:bg-gray-100 border-[0.5px] border-black/5'> |
| | | <Variable02 className='w-3.5 h-3.5 text-components-button-secondary-accent-text' /> |
| | | </div> |
| | | </Tooltip> |
| | | </div> |