File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
src/commands/createNewProject Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 12911291 "type" : " boolean" ,
12921292 "description" : " %azureFunctions.showMarkdownPreview%" ,
12931293 "default" : true
1294+ },
1295+ "azureFunctions.allowProgrammingModelSelection" : {
1296+ "type" : " boolean" ,
1297+ "description" : " %azureFunctions.allowProgrammingModelSelection%" ,
1298+ "default" : false
12941299 }
12951300 }
12961301 }
Original file line number Diff line number Diff line change 11{
22 "azureFunctions.addBinding" : " Add binding..." ,
3+ "azureFunctions.allowProgrammingModelSelection" : " Allow the user to select a programming model when creating a new function project." ,
34 "azureFunctions.appSettings.add" : " Add New Setting..." ,
45 "azureFunctions.appSettings.decrypt" : " Decrypt Settings" ,
56 "azureFunctions.appSettings.delete" : " Delete Setting..." ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { FuncVersion } from '../../FuncVersion';
88import { recommendedDescription } from '../../constants-nls' ;
99import { localize } from '../../localize' ;
1010import { getTemplateVersionFromLanguageAndModel } from '../../utils/templateVersionUtils' ;
11+ import { getWorkspaceSetting } from '../../vsCodeConfig/settings' ;
1112import { type IProjectWizardContext } from './IProjectWizardContext' ;
1213
1314export class ProgrammingModelStep extends AzureWizardPromptStep < IProjectWizardContext > {
@@ -59,7 +60,7 @@ export class ProgrammingModelStep extends AzureWizardPromptStep<IProjectWizardCo
5960 // auto-select the default model if there is only one
6061 if ( this . _options . models . length === 1 ) {
6162 context . languageModel = this . _options . models [ 0 ] . data ;
62- } else if ( this . _options . defaultModel !== undefined ) {
63+ } else if ( this . _options . defaultModel !== undefined && ! getWorkspaceSetting ( "allowProgrammingModelSelection" ) ) {
6364 context . languageModel = this . _options . defaultModel ;
6465 }
6566 }
You can’t perform that action at this time.
0 commit comments