get dynamic prompts working

This commit is contained in:
Mary Hipp 2024-08-08 15:07:23 -04:00
parent 3f9a674d4b
commit 3189ab6863

View File

@ -13,13 +13,16 @@ import {
import { getShouldProcessPrompt } from 'features/dynamicPrompts/util/getShouldProcessPrompt';
import { utilitiesApi } from 'services/api/endpoints/utilities';
import { socketConnected } from 'services/events/actions';
import { getPresetModifiedPrompts } from '../../../../../features/nodes/util/graph/graphBuilderUtils';
import { activeStylePresetChanged } from '../../../../../features/stylePresets/store/stylePresetSlice';
const matcher = isAnyOf(
positivePromptChanged,
combinatorialToggled,
maxPromptsChanged,
maxPromptsReset,
socketConnected
socketConnected,
activeStylePresetChanged
);
export const addDynamicPromptsListener = (startAppListening: AppStartListening) => {
@ -28,7 +31,7 @@ export const addDynamicPromptsListener = (startAppListening: AppStartListening)
effect: async (action, { dispatch, getState, cancelActiveListeners, delay }) => {
cancelActiveListeners();
const state = getState();
const { positivePrompt } = state.controlLayers.present;
const { positivePrompt } = getPresetModifiedPrompts(state)
const { maxPrompts } = state.dynamicPrompts;
if (state.config.disabledFeatures.includes('dynamicPrompting')) {