mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-14 02:55:11 -05:00
feat: add user_label to FieldIdentifier (#8126)
Co-authored-by: Mary Hipp Rogers <maryhipp@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import { buildWorkflowWithValidation } from 'features/nodes/util/workflow/buildW
|
||||
import { groupBy } from 'lodash-es';
|
||||
import { useCallback } from 'react';
|
||||
import { enqueueMutationFixedCacheKeyOptions, queueApi } from 'services/api/endpoints/queue';
|
||||
import type { Batch, EnqueueBatchArg } from 'services/api/types';
|
||||
import type { Batch, EnqueueBatchArg, S } from 'services/api/types';
|
||||
import { assert } from 'tsafe';
|
||||
|
||||
const enqueueRequestedWorkflows = createAction('app/enqueueRequestedWorkflows');
|
||||
@@ -106,12 +106,13 @@ export const useEnqueueWorkflows = () => {
|
||||
// Derive the input fields from the builder's selected node field elements
|
||||
const fieldIdentifiers = selectFieldIdentifiersWithInvocationTypes(state);
|
||||
const inputs = getPublishInputs(fieldIdentifiers, templates);
|
||||
const api_input_fields = inputs.publishable.map(({ nodeId, fieldName }) => {
|
||||
const api_input_fields = inputs.publishable.map(({ nodeId, fieldName, label }) => {
|
||||
return {
|
||||
kind: 'input',
|
||||
node_id: nodeId,
|
||||
field_name: fieldName,
|
||||
} as const;
|
||||
user_label: label,
|
||||
} satisfies S['FieldIdentifier'];
|
||||
});
|
||||
|
||||
// Derive the output fields from the builder's selected output node
|
||||
@@ -126,7 +127,8 @@ export const useEnqueueWorkflows = () => {
|
||||
kind: 'output',
|
||||
node_id: outputNodeId,
|
||||
field_name: fieldName,
|
||||
} as const;
|
||||
user_label: null,
|
||||
} satisfies S['FieldIdentifier'];
|
||||
});
|
||||
|
||||
assert(nodesState.id, 'Workflow without ID cannot be used for API validation run');
|
||||
|
||||
Reference in New Issue
Block a user