Browse Source

Update src/core/prompts/sections/modes.ts

Co-authored-by: Matt Rubens <[email protected]>
Hannes Rudolph 1 year ago
parent
commit
f6efa2b589
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/core/prompts/sections/modes.ts

+ 1 - 3
src/core/prompts/sections/modes.ts

@@ -12,9 +12,7 @@ export async function getModesSection(context: vscode.ExtensionContext): Promise
 	const allModes = await getAllModesWithPrompts(context)
 	const allModes = await getAllModesWithPrompts(context)
 
 
 	// Get enableCustomModeCreation setting from extension state
 	// Get enableCustomModeCreation setting from extension state
-	const enableCustomModeCreation = await context.globalState.get<boolean>("enableCustomModeCreation")
-	// Default to true if undefined
-	const shouldEnableCustomModeCreation = enableCustomModeCreation !== undefined ? enableCustomModeCreation : true
+	const shouldEnableCustomModeCreation = await context.globalState.get<boolean>("enableCustomModeCreation") ?? true
 
 
 	let modesContent = `====
 	let modesContent = `====