| | |
| | | import type { FC } from 'react' |
| | | import { RiFileList3Line } from '@remixicon/react' |
| | | import { useTranslation } from 'react-i18next' |
| | | import { File02 } from '@/app/components/base/icons/src/vender/line/files' |
| | | import type { IChatItem } from '@/app/components/base/chat/chat/type' |
| | | import { useStore as useAppStore } from '@/app/components/app/store' |
| | | import ActionButton from '@/app/components/base/action-button' |
| | | |
| | | type LogProps = { |
| | | logItem: IChatItem |
| | |
| | | const Log: FC<LogProps> = ({ |
| | | logItem, |
| | | }) => { |
| | | const { t } = useTranslation() |
| | | const setCurrentLogItem = useAppStore(s => s.setCurrentLogItem) |
| | | const setShowPromptLogModal = useAppStore(s => s.setShowPromptLogModal) |
| | | const setShowAgentLogModal = useAppStore(s => s.setShowAgentLogModal) |
| | |
| | | |
| | | return ( |
| | | <div |
| | | className='ml-1 flex items-center gap-0.5 rounded-[10px] border-[0.5px] border-components-actionbar-border bg-components-actionbar-bg p-0.5 shadow-md backdrop-blur-sm' |
| | | className='shrink-0 p-1 flex items-center justify-center rounded-[6px] font-medium text-gray-500 hover:bg-gray-50 cursor-pointer hover:text-gray-700' |
| | | onClick={(e) => { |
| | | e.stopPropagation() |
| | | e.nativeEvent.stopImmediatePropagation() |
| | |
| | | setShowPromptLogModal(true) |
| | | }} |
| | | > |
| | | <ActionButton> |
| | | <RiFileList3Line className='h-4 w-4' /> |
| | | </ActionButton> |
| | | <File02 className='mr-1 w-4 h-4' /> |
| | | <div className='text-xs leading-4'>{runID ? t('appLog.viewLog') : isAgent ? t('appLog.agentLog') : t('appLog.promptLog')}</div> |
| | | </div> |
| | | ) |
| | | } |