diff --git a/packages/fx-core/resource/package.nls.json b/packages/fx-core/resource/package.nls.json index 2ef6152de0..94788be91f 100644 --- a/packages/fx-core/resource/package.nls.json +++ b/packages/fx-core/resource/package.nls.json @@ -321,7 +321,8 @@ "core.createProjectQuestion.projectType.copilotHelp.label": "Don't know how to start? Use GitHub Copilot Chat", "core.createProjectQuestion.projectType.copilotHelp.detail": "Chat with GitHub Copilot to get started on your Teams app and agent", "core.createProjectQuestion.projectType.copilotGroup.title": "Use GitHub Copilot", - "core.createProjectQuestion.projectType.createGroup.title": "Create", + "core.createProjectQuestion.projectType.createGroup.aiAgent": "AI Agent", + "core.createProjectQuestion.projectType.createGroup.m365Apps": "Apps for Microsoft 365", "core.createProjectQuestion.projectType.declarativeAgent.label": "Declarative Agent", "core.createProjectQuestion.projectType.declarativeAgent.detail": "Create your own agent by declaring instructions, actions, & knowledge to suit your needs.", "core.createProjectQuestion.title": "New Project", @@ -399,10 +400,10 @@ "core.createProjectQuestion.declarativeCopilot.placeholder": "Add API plugin to your declarative agent", "core.createProjectQuestion.createApiPlugin.title": "Create API Plugin", "core.createProjectQuestion.addApiPlugin.title": "Add API Plugin", - "core.createProjectQuestion.addApiPlugin.placeholder": "Select how to add plugin", + "core.createProjectQuestion.addApiPlugin.placeholder": "Select how to add action", "core.createProjectQuestion.noPlugin.label": "No plugin", "core.createProjectQuestion.noPlugin.detail": "Create declarative agent only", - "core.createProjectQuestion.addPlugin.label": "Add plugin", + "core.createProjectQuestion.addPlugin.label": "Add action", "core.createProjectQuestion.addPlugin.detail": "Create declarative agent with API plugin", "core.createProjectQuestion.addExistingPlugin.pluginManifest.title": "Import Manifest File", "core.createProjectQuestion.addExistingPlugin.apiSpec.title": "Import OpenAPI Description Document", diff --git a/packages/fx-core/src/question/constants.ts b/packages/fx-core/src/question/constants.ts index 5ede1545b6..3f13bcc5da 100644 --- a/packages/fx-core/src/question/constants.ts +++ b/packages/fx-core/src/question/constants.ts @@ -108,6 +108,11 @@ export enum QuestionNames { PluginOpenApiSpecFilePath = "plugin-opeanapi-spec-path", } +export enum ProjectTypeGroup { + AIAgent = "AI Agent", + M365Apps = "Apps for Microsoft 365", +} + export const AppNamePattern = '^(?=(.*[\\da-zA-Z]){2})[a-zA-Z][^"<>:\\?/*&|\u0000-\u001F]*[^"\\s.<>:\\?/*&|\u0000-\u001F]$'; @@ -182,10 +187,13 @@ export class ScratchOptions { } export class ProjectTypeOptions { - static getCreateGroupName(): string | undefined { - return featureFlagManager.getBooleanValue(FeatureFlags.ChatParticipantUIEntries) - ? getLocalizedString("core.createProjectQuestion.projectType.createGroup.title") - : undefined; + static getCreateGroupName(group: ProjectTypeGroup): string | undefined { + switch (group) { + case ProjectTypeGroup.AIAgent: + return getLocalizedString("core.createProjectQuestion.projectType.createGroup.aiAgent"); + case ProjectTypeGroup.M365Apps: + return getLocalizedString("core.createProjectQuestion.projectType.createGroup.m365Apps"); + } } static tab(platform?: Platform): OptionItem { return { @@ -194,7 +202,7 @@ export class ProjectTypeOptions { "core.TabOption.label" )}`, detail: getLocalizedString("core.createProjectQuestion.projectType.tab.detail"), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.M365Apps), }; } @@ -205,7 +213,7 @@ export class ProjectTypeOptions { "core.createProjectQuestion.projectType.bot.label" )}`, detail: getLocalizedString("core.createProjectQuestion.projectType.bot.detail"), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.M365Apps), }; } @@ -218,7 +226,7 @@ export class ProjectTypeOptions { detail: getLocalizedString( "core.createProjectQuestion.projectType.messageExtension.copilotEnabled.detail" ), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.M365Apps), }; } @@ -229,7 +237,7 @@ export class ProjectTypeOptions { "core.createProjectQuestion.projectType.outlookAddin.label" )}`, detail: getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.M365Apps), }; } @@ -240,7 +248,7 @@ export class ProjectTypeOptions { "core.createProjectQuestion.projectType.officeAddin.label" )}`, detail: getLocalizedString("core.createProjectQuestion.projectType.officeAddin.detail"), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.M365Apps), }; } @@ -251,7 +259,7 @@ export class ProjectTypeOptions { "core.createProjectQuestion.projectType.officeAddin.label" )}`, detail: getLocalizedString("core.createProjectQuestion.projectType.officeAddin.detail"), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.M365Apps), }; } @@ -270,7 +278,7 @@ export class ProjectTypeOptions { "core.createProjectQuestion.projectType.declarativeAgent.label" )}`, detail: getLocalizedString("core.createProjectQuestion.projectType.declarativeAgent.detail"), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.AIAgent), }; } @@ -281,7 +289,7 @@ export class ProjectTypeOptions { platform === Platform.VSCode ? "$(teamsfx-custom-copilot) " : "" }${getLocalizedString("core.createProjectQuestion.projectType.customCopilot.label")}`, detail: getLocalizedString("core.createProjectQuestion.projectType.customCopilot.detail"), - groupName: ProjectTypeOptions.getCreateGroupName(), + groupName: ProjectTypeOptions.getCreateGroupName(ProjectTypeGroup.AIAgent), }; } diff --git a/packages/fx-core/tests/question/create.test.ts b/packages/fx-core/tests/question/create.test.ts index 6ab17d7507..0ce58a522f 100644 --- a/packages/fx-core/tests/question/create.test.ts +++ b/packages/fx-core/tests/question/create.test.ts @@ -162,7 +162,7 @@ describe("scaffold question", () => { const select = question as SingleSelectQuestion; const options = await select.dynamicOptions!(inputs); assert.isTrue(options.length === 6); - assert.isUndefined((options as OptionItem[])[0].groupName); + assert.isNotEmpty((options as OptionItem[])[0].groupName); return ok({ type: "success", result: ProjectTypeOptions.bot().id }); } else if (question.name === QuestionNames.Capabilities) { const select = question as SingleSelectQuestion; @@ -3594,7 +3594,7 @@ describe("scaffold question", () => { const options = await select.dynamicOptions!(inputs); assert.isTrue(options.length === 7); assert.equal( - getLocalizedString("core.createProjectQuestion.projectType.createGroup.title"), + getLocalizedString("core.createProjectQuestion.projectType.createGroup.aiAgent"), (options as OptionItem[])[0].groupName ); return ok({ type: "success", result: ProjectTypeOptions.bot().id }); diff --git a/packages/vscode-extension/package.nls.json b/packages/vscode-extension/package.nls.json index f411cabde8..1b1f636dcd 100644 --- a/packages/vscode-extension/package.nls.json +++ b/packages/vscode-extension/package.nls.json @@ -169,9 +169,9 @@ "teamstoolkit.commandsTreeViewProvider.guideTitle": "View How-to Guides", "teamstoolkit.commandsTreeViewProvider.manageCollaboratorTitle": "Manage Collaborator", "teamstoolkit.commandsTreeViewProvider.manageCollaboratorDescription": "Manage M365 Teams App (with Microsoft Entra app) Collaborators", - "teamstoolkit.commandsTreeViewProvider.addPluginTitle": "Add Plugin", - "teamstoolkit.commandsTreeViewProvider.addPluginDescription": "Add plugin in declarative agent", - "teamstoolkit.commandsTreeViewProvider.addPlugin.running": "Adding plugin...", + "teamstoolkit.commandsTreeViewProvider.addPluginTitle": "Add Action", + "teamstoolkit.commandsTreeViewProvider.addPluginDescription": "Add action in declarative agent", + "teamstoolkit.commandsTreeViewProvider.addPlugin.running": "Adding action...", "teamstoolkit.commandsTreeViewProvider.addWebpartTitle": "Add SPFx Web Part", "teamstoolkit.commandsTreeViewProvider.officeDevDeployTitle": "Deploy", "teamstoolkit.commandsTreeViewProvider.officeDevDeployDescription": "Deploy",