Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
feat(settings): enable prompt syntax highlighting by default
Josh Corbettb347a0d3bf60
diff --git a/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsx b/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsxindex d9bd81d378..349c443d1c 100644--- a/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsx+++ b/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsx@@ -456,8 +456,8 @@ const BehaviorSection = () => {/><SettingTogglechecked={showPromptSyntaxHighlighting}- description="Experimental. Color prompt syntax in prompt fields without changing the prompt text or validation behavior."- label="Highlight prompt syntax (experimental)"+ description="Color prompt syntax in prompt fields without changing the prompt text or validation behavior."+ label="Highlight prompt syntax"onChange={updateShowPromptSyntaxHighlighting}/></SettingsSection>diff --git a/invokeai/frontend/webv2/src/workbench/settings/contracts.ts b/invokeai/frontend/webv2/src/workbench/settings/contracts.tsindex 9999cd3416..2d9ff79841 100644--- a/invokeai/frontend/webv2/src/workbench/settings/contracts.ts+++ b/invokeai/frontend/webv2/src/workbench/settings/contracts.ts@@ -67,7 +67,7 @@ export interface WorkbenchPreferences {notifyOnEnqueue: boolean;/** Write numeric attention weights (`(word)1.1`) when the attention hotkeys insert them. */preferNumericAttentionStyle: boolean;- /** Experimental. Color prompt syntax in prompt fields; changes rendering only. */+ /** Color prompt syntax in prompt fields; changes rendering only. */showPromptSyntaxHighlighting: boolean;developerLogEnabled: boolean;developerLogLevel: DeveloperLogLevel;diff --git a/invokeai/frontend/webv2/src/workbench/settings/store.test.ts b/invokeai/frontend/webv2/src/workbench/settings/store.test.tsindex 9737e5e8a2..a05501bc32 100644--- a/invokeai/frontend/webv2/src/workbench/settings/store.test.ts+++ b/invokeai/frontend/webv2/src/workbench/settings/store.test.ts@@ -357,18 +357,18 @@ describe('normalizeProjectSettings', () => {});describe('normalizeWorkbenchPreferences prompt editing', () => {- it('defaults prompt syntax highlighting and numeric attention style off', () => {- expect(store.normalizeWorkbenchPreferences({}).showPromptSyntaxHighlighting).toBe(false);+ it('defaults prompt syntax highlighting on and numeric attention style off', () => {+ expect(store.normalizeWorkbenchPreferences({}).showPromptSyntaxHighlighting).toBe(true);expect(store.normalizeWorkbenchPreferences({}).preferNumericAttentionStyle).toBe(false);});- it('round-trips both prompt preferences', () => {+ it('round-trips both prompt preferences past their defaults', () => {const normalized = store.normalizeWorkbenchPreferences({preferNumericAttentionStyle: true,- showPromptSyntaxHighlighting: true,+ showPromptSyntaxHighlighting: false,});- expect(normalized.showPromptSyntaxHighlighting).toBe(true);+ expect(normalized.showPromptSyntaxHighlighting).toBe(false);expect(normalized.preferNumericAttentionStyle).toBe(true);});});diff --git a/invokeai/frontend/webv2/src/workbench/settings/store.ts b/invokeai/frontend/webv2/src/workbench/settings/store.tsindex a08119fe61..5542b158a2 100644--- a/invokeai/frontend/webv2/src/workbench/settings/store.ts+++ b/invokeai/frontend/webv2/src/workbench/settings/store.ts@@ -73,7 +73,7 @@ export const DEFAULT_PREFERENCES: WorkbenchPreferences = {preferNumericAttentionStyle: false,queueJobsScope: 'all',reduceMotion: false,- showPromptSyntaxHighlighting: false,+ showPromptSyntaxHighlighting: true,showFocusRegionHighlight: true,themeId: DEFAULT_THEME_ID,workflowEdgeStyle: 'curved',