fix: fold not exist not same with file

This commit is contained in:
Joel
2026-02-06 14:52:03 +08:00
parent 768bfa8a7e
commit c5d1b2a02e
3 changed files with 6 additions and 1 deletions

View File

@ -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>
)}