mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
fix: fold not exist not same with file
This commit is contained in:
@ -75,10 +75,13 @@ const FileReferenceBlock = ({ nodeKey, resourceId }: FileReferenceBlockProps) =>
|
||||
? getFileIconType(currentNode?.name || '', currentNode?.extension)
|
||||
: null
|
||||
const pathForTooltip = (currentNode?.path ?? (resourceId.includes('/') ? resourceId : undefined))?.slice(1) // remove leading slash for better display
|
||||
const missingMessage = isFolder
|
||||
? t('skillEditor.folderNotFound', { ns: 'workflow' })
|
||||
: t('skillEditor.fileNotFound', { ns: 'workflow' })
|
||||
const tooltipContent = isMissing
|
||||
? (
|
||||
<div className="space-y-1">
|
||||
<div className="system-xs-medium text-text-secondary">{t('skillEditor.fileNotFound', { ns: 'workflow' })}</div>
|
||||
<div className="system-xs-medium text-text-secondary">{missingMessage}</div>
|
||||
{pathForTooltip && (
|
||||
<div>{pathForTooltip}</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user