Skip to content

Commit c246024

Browse files
authored
fix: remove bot-plugin option from message extension templates (#13066)
1 parent f740814 commit c246024

File tree

6 files changed

+4
-29
lines changed

6 files changed

+4
-29
lines changed

packages/fx-core/resource/package.nls.json

-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@
295295
"core.createProjectQuestion.option.description.preview": "Preview",
296296
"core.createProjectQuestion.option.description.worksInOutlook": "Works in Teams and Outlook",
297297
"core.createProjectQuestion.option.description.worksInOutlookM365": "Works in Teams, Outlook, and the Microsoft 365 application",
298-
"core.createProjectQuestion.option.description.worksInOutlookCopilot": "Works in Teams, Outlook and Copilot",
299298
"core.createProjectQuestion.projectType.bot.detail": "Create instant, engaging chat experiences that automate tasks seamlessly",
300299
"core.createProjectQuestion.projectType.bot.label": "Bot",
301300
"core.createProjectQuestion.projectType.bot.title": "App Features Using a Bot",

packages/fx-core/src/component/generator/templates/templateNames.ts

-10
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export enum TemplateNames {
3333
MessageExtension = "message-extension",
3434
MessageExtensionAction = "message-extension-action",
3535
MessageExtensionSearch = "message-extension-search",
36-
MessageExtensionCopilot = "message-extension-copilot",
3736
M365MessageExtension = "m365-message-extension",
3837
TabAndDefaultBot = "non-sso-tab-default-bot",
3938
BotAndMessageExtension = "default-bot-message-extension",
@@ -85,8 +84,6 @@ export const Feature2TemplateName = {
8584
[`${CapabilityOptions.me().id}:undefined`]: TemplateNames.MessageExtension,
8685
[`${CapabilityOptions.collectFormMe().id}:undefined`]: TemplateNames.MessageExtensionAction,
8786
[`${CapabilityOptions.SearchMe().id}:undefined`]: TemplateNames.MessageExtensionSearch,
88-
[`${CapabilityOptions.m365SearchMe().id}:undefined:${MeArchitectureOptions.botPlugin().id}`]:
89-
TemplateNames.MessageExtensionCopilot,
9087
[`${CapabilityOptions.m365SearchMe().id}:undefined:${MeArchitectureOptions.botMe().id}`]:
9188
TemplateNames.M365MessageExtension,
9289
[`${CapabilityOptions.nonSsoTabAndBot().id}:undefined`]: TemplateNames.TabAndDefaultBot,
@@ -204,13 +201,6 @@ export const inputsToTemplateName: Map<{ [key: string]: any }, TemplateNames> =
204201
{ [QuestionNames.Capabilities]: CapabilityOptions.SearchMe().id },
205202
TemplateNames.MessageExtensionSearch,
206203
],
207-
[
208-
{
209-
[QuestionNames.Capabilities]: CapabilityOptions.m365SearchMe().id,
210-
[QuestionNames.MeArchitectureType]: MeArchitectureOptions.botPlugin().id,
211-
},
212-
TemplateNames.MessageExtensionCopilot,
213-
],
214204
[
215205
{
216206
[QuestionNames.Capabilities]: CapabilityOptions.m365SearchMe().id,

packages/fx-core/src/question/constants.ts

+1-15
Original file line numberDiff line numberDiff line change
@@ -835,19 +835,6 @@ export class MeArchitectureOptions {
835835
};
836836
}
837837

838-
static botPlugin(): OptionItem {
839-
return {
840-
id: "bot-plugin",
841-
label: getLocalizedString("core.createProjectQuestion.capability.botMessageExtension.label"),
842-
detail: getLocalizedString(
843-
"core.createProjectQuestion.capability.botMessageExtension.detail"
844-
),
845-
description: getLocalizedString(
846-
"core.createProjectQuestion.option.description.worksInOutlookCopilot"
847-
),
848-
};
849-
}
850-
851838
static newApi(): OptionItem {
852839
return {
853840
id: "new-api",
@@ -876,15 +863,14 @@ export class MeArchitectureOptions {
876863
return [
877864
MeArchitectureOptions.newApi(),
878865
MeArchitectureOptions.apiSpec(),
879-
MeArchitectureOptions.botPlugin(),
866+
MeArchitectureOptions.botMe(),
880867
];
881868
}
882869

883870
static staticAll(): OptionItem[] {
884871
return [
885872
MeArchitectureOptions.newApi(),
886873
MeArchitectureOptions.apiSpec(),
887-
MeArchitectureOptions.botPlugin(),
888874
MeArchitectureOptions.botMe(),
889875
];
890876
}

packages/fx-core/src/question/inputs/CreateProjectInputs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface CreateProjectInputs extends Inputs {
5757
/** @description SPFx solution folder */
5858
"spfx-folder"?: string;
5959
/** @description Architecture of Search Based Message Extension */
60-
"me-architecture"?: "new-api" | "api-spec" | "bot-plugin" | "bot";
60+
"me-architecture"?: "new-api" | "api-spec" | "bot";
6161
/** @description Create Declarative Agent */
6262
"with-plugin"?: "no" | "yes";
6363
/** @description Create API Plugin */

packages/fx-core/src/question/options/CreateProjectOptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const CreateProjectOptions: CLICommandOption[] = [
106106
shortName: "m",
107107
description: "Architecture of Search Based Message Extension.",
108108
default: "new-api",
109-
choices: ["new-api", "api-spec", "bot-plugin", "bot"],
109+
choices: ["new-api", "api-spec", "bot"],
110110
},
111111
{
112112
name: "with-plugin",

packages/fx-core/tests/question/create.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3929,7 +3929,7 @@ describe("scaffold question", () => {
39293929
const select = question as SingleSelectQuestion;
39303930
const options = await select.dynamicOptions!(inputs);
39313931
assert.isTrue(options.length === 3);
3932-
return ok({ type: "success", result: MeArchitectureOptions.botPlugin().id });
3932+
return ok({ type: "success", result: MeArchitectureOptions.botMe().id });
39333933
} else if (question.name === QuestionNames.ProgrammingLanguage) {
39343934
const select = question as SingleSelectQuestion;
39353935
const options = await select.dynamicOptions!(inputs);

0 commit comments

Comments
 (0)