mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): improved dynamic prompts behaviour
- Bump `@invoke-ai/ui` for updated styles - Update regex to parse prompts with newlines - Update styling of overlay button when prompt has an error - Fix bug where loading and error state sometimes weren't cleared
This commit is contained in:
committed by
Kent Keirsey
parent
2aed6e2dba
commit
a0e68705dd
@@ -46,14 +46,14 @@ export const addDynamicPromptsListener = () => {
|
||||
|
||||
if (cachedPrompts) {
|
||||
dispatch(promptsChanged(cachedPrompts.prompts));
|
||||
dispatch(parsingErrorChanged(cachedPrompts.error));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!getShouldProcessPrompt(state.generation.positivePrompt)) {
|
||||
if (state.dynamicPrompts.isLoading) {
|
||||
dispatch(isLoadingChanged(false));
|
||||
}
|
||||
dispatch(promptsChanged([state.generation.positivePrompt]));
|
||||
dispatch(parsingErrorChanged(undefined));
|
||||
dispatch(isErrorChanged(false));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ export const addDynamicPromptsListener = () => {
|
||||
dispatch(promptsChanged(res.prompts));
|
||||
dispatch(parsingErrorChanged(res.error));
|
||||
dispatch(isErrorChanged(false));
|
||||
dispatch(isLoadingChanged(false));
|
||||
} catch {
|
||||
dispatch(isErrorChanged(true));
|
||||
dispatch(isLoadingChanged(false));
|
||||
|
||||
Reference in New Issue
Block a user