refactor: remove redundant skill file sync ref guard

This commit is contained in:
yyh
2026-03-26 16:10:58 +08:00
parent d3c8af6aa9
commit a1a527902b

View File

@ -35,12 +35,10 @@ const SkillMain = () => {
const appId = appDetail?.id || ''
const [queryFileId] = useQueryState('fileId', parseAsString)
const storeApi = useWorkflowStore()
const openedFileRef = React.useRef<string | null>(null)
React.useEffect(() => {
if (!queryFileId || openedFileRef.current === queryFileId)
if (!queryFileId)
return
openedFileRef.current = queryFileId
storeApi.getState().openTab(queryFileId, { pinned: true })
}, [queryFileId, storeApi])