mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
fix(skill): clear file tree highlight when switching to start tab
The sync hook skipped deselectAll() when activeTabId was START_TAB_ID, leaving stale highlights after closing the last file tab.
This commit is contained in:
@ -25,14 +25,14 @@ export function useSyncTreeWithActiveTab({
|
||||
const storeApi = useWorkflowStore()
|
||||
|
||||
useEffect(() => {
|
||||
if (!activeTabId || activeTabId === START_TAB_ID)
|
||||
if (!activeTabId)
|
||||
return
|
||||
|
||||
const tree = treeRef.current
|
||||
if (!tree)
|
||||
return
|
||||
|
||||
if (isArtifactTab(activeTabId)) {
|
||||
if (activeTabId === START_TAB_ID || isArtifactTab(activeTabId)) {
|
||||
requestAnimationFrame(() => {
|
||||
tree.deselectAll()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user