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

View File

@@ -1113,6 +1113,7 @@
"skillEditor.authorizationBadge": "Auth",
"skillEditor.authorizationRequired": "Authorization required before use.",
"skillEditor.fileNotFound": "The file does not exist",
"skillEditor.folderNotFound": "The folder does not exist",
"skillEditor.openInSkillEditor": "Open in Skill Editor",
"skillEditor.previewUnavailable": "Preview unavailable",
"skillEditor.referenceFiles": "Reference files",

View File

@@ -1105,6 +1105,7 @@
"skillEditor.authorizationBadge": "Auth",
"skillEditor.authorizationRequired": "使用前需要授权。",
"skillEditor.fileNotFound": "文件不存在",
"skillEditor.folderNotFound": "文件夹不存在",
"skillEditor.openInSkillEditor": "在技能编辑器中打开",
"skillEditor.previewUnavailable": "无法预览",
"skillEditor.referenceFiles": "引用文件",