mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
refactor: extract skill save context, stabilize mutation dependency, and deduplicate cache updates
Split SkillSaveContext and useSkillSaveManager into a separate file to fix react-refresh/only-export-components lint error. Destructure mutateAsync from useUpdateAppAssetFileContent for a stable callback reference, preventing unnecessary useCallback cascade rebuilds. Extract shared patchFileContentCache helper to unify setQueryData logic between updateCachedContent and the collaboration event handler.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { useEventListener, useUnmount } from 'ahooks'
|
||||
import { useSkillSaveManager } from './use-skill-save-manager'
|
||||
import { useSkillSaveManager } from './skill-save-context'
|
||||
|
||||
export function useSkillAutoSave(): void {
|
||||
const { saveAllDirty } = useSkillSaveManager()
|
||||
|
||||
Reference in New Issue
Block a user