feat(ui): store node templates in separate slice

Flattens the `nodes` slice. May offer minor perf improvements in addition to just being cleaner.
This commit is contained in:
psychedelicious
2024-01-01 12:27:05 +11:00
committed by Kent Keirsey
parent 7c548c5bf3
commit 5d4610d981
33 changed files with 200 additions and 167 deletions

View File

@@ -33,7 +33,7 @@ const zWorkflowMetaVersion = z.object({
* - Workflow schema version bumped to 2.0.0
*/
const migrateV1toV2 = (workflowToMigrate: WorkflowV1): WorkflowV2 => {
const invocationTemplates = $store.get()?.getState().nodes.nodeTemplates;
const invocationTemplates = $store.get()?.getState().nodeTemplates.templates;
if (!invocationTemplates) {
throw new Error(t('app.storeNotInitialized'));