Skip to content

Commit

Permalink
refactor: remove bot-plugin option from message extension templates
Browse files Browse the repository at this point in the history
  • Loading branch information
huimiu committed Jan 17, 2025
1 parent dc12c6b commit 7214d6e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export enum TemplateNames {
MessageExtension = "message-extension",
MessageExtensionAction = "message-extension-action",
MessageExtensionSearch = "message-extension-search",
MessageExtensionCopilot = "message-extension-copilot",
M365MessageExtension = "m365-message-extension",
TabAndDefaultBot = "non-sso-tab-default-bot",
BotAndMessageExtension = "default-bot-message-extension",
Expand Down Expand Up @@ -85,8 +84,6 @@ export const Feature2TemplateName = {
[`${CapabilityOptions.me().id}:undefined`]: TemplateNames.MessageExtension,
[`${CapabilityOptions.collectFormMe().id}:undefined`]: TemplateNames.MessageExtensionAction,
[`${CapabilityOptions.SearchMe().id}:undefined`]: TemplateNames.MessageExtensionSearch,
[`${CapabilityOptions.m365SearchMe().id}:undefined:${MeArchitectureOptions.botPlugin().id}`]:
TemplateNames.MessageExtensionCopilot,
[`${CapabilityOptions.m365SearchMe().id}:undefined:${MeArchitectureOptions.botMe().id}`]:
TemplateNames.M365MessageExtension,
[`${CapabilityOptions.nonSsoTabAndBot().id}:undefined`]: TemplateNames.TabAndDefaultBot,
Expand Down Expand Up @@ -204,13 +201,6 @@ export const inputsToTemplateName: Map<{ [key: string]: any }, TemplateNames> =
{ [QuestionNames.Capabilities]: CapabilityOptions.SearchMe().id },
TemplateNames.MessageExtensionSearch,
],
[
{
[QuestionNames.Capabilities]: CapabilityOptions.m365SearchMe().id,
[QuestionNames.MeArchitectureType]: MeArchitectureOptions.botPlugin().id,
},
TemplateNames.MessageExtensionCopilot,
],
[
{
[QuestionNames.Capabilities]: CapabilityOptions.m365SearchMe().id,
Expand Down
16 changes: 1 addition & 15 deletions packages/fx-core/src/question/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -835,19 +835,6 @@ export class MeArchitectureOptions {
};
}

static botPlugin(): OptionItem {
return {
id: "bot-plugin",
label: getLocalizedString("core.createProjectQuestion.capability.botMessageExtension.label"),
detail: getLocalizedString(
"core.createProjectQuestion.capability.botMessageExtension.detail"
),
description: getLocalizedString(
"core.createProjectQuestion.option.description.worksInOutlookCopilot"
),
};
}

static newApi(): OptionItem {
return {
id: "new-api",
Expand Down Expand Up @@ -876,15 +863,14 @@ export class MeArchitectureOptions {
return [
MeArchitectureOptions.newApi(),
MeArchitectureOptions.apiSpec(),
MeArchitectureOptions.botPlugin(),
MeArchitectureOptions.botMe(),
];
}

static staticAll(): OptionItem[] {
return [
MeArchitectureOptions.newApi(),
MeArchitectureOptions.apiSpec(),
MeArchitectureOptions.botPlugin(),
MeArchitectureOptions.botMe(),
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface CreateProjectInputs extends Inputs {
/** @description SPFx solution folder */
"spfx-folder"?: string;
/** @description Architecture of Search Based Message Extension */
"me-architecture"?: "new-api" | "api-spec" | "bot-plugin" | "bot";
"me-architecture"?: "new-api" | "api-spec" | "bot";
/** @description Create Declarative Agent */
"with-plugin"?: "no" | "yes";
/** @description Create API Plugin */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const CreateProjectOptions: CLICommandOption[] = [
shortName: "m",
description: "Architecture of Search Based Message Extension.",
default: "new-api",
choices: ["new-api", "api-spec", "bot-plugin", "bot"],
choices: ["new-api", "api-spec", "bot"],
},
{
name: "with-plugin",
Expand Down

0 comments on commit 7214d6e

Please sign in to comment.