refactor(skill): move skill editor slice to core workflow store

Move SkillEditorSlice from injection pattern to core workflow store,
making it available to all workflow contexts (workflow-app, chatflow,
and future rag-pipeline).

- Add createSkillEditorSlice to core createWorkflowStore
- Remove complex type conversion logic from workflow-app/index.tsx
- Remove optional chaining (?.) and non-null assertions (!) from components
- Simplify slice composition with type assertions via unknown
This commit is contained in:
yyh
2026-01-16 13:22:10 +08:00
parent 7022e4b9ca
commit 7093962f30
10 changed files with 46 additions and 59 deletions

View File

@ -22,7 +22,7 @@ const TreeContextMenu: FC<TreeContextMenuProps> = ({ treeRef }) => {
const { data: treeData } = useSkillAssetTreeData()
const handleClose = useCallback(() => {
storeApi.getState().setContextMenu?.(null)
storeApi.getState().setContextMenu(null)
}, [storeApi])
useClickAway(() => {