Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove bot-plugin option from message extension templates #13066

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/fx-core/resource/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@
"core.createProjectQuestion.option.description.preview": "Preview",
"core.createProjectQuestion.option.description.worksInOutlook": "Works in Teams and Outlook",
"core.createProjectQuestion.option.description.worksInOutlookM365": "Works in Teams, Outlook, and the Microsoft 365 application",
"core.createProjectQuestion.option.description.worksInOutlookCopilot": "Works in Teams, Outlook and Copilot",
"core.createProjectQuestion.projectType.bot.detail": "Create instant, engaging chat experiences that automate tasks seamlessly",
"core.createProjectQuestion.projectType.bot.label": "Bot",
"core.createProjectQuestion.projectType.bot.title": "App Features Using a Bot",
Expand Down
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
2 changes: 1 addition & 1 deletion packages/fx-core/tests/question/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3932,7 +3932,7 @@ describe("scaffold question", () => {
const select = question as SingleSelectQuestion;
const options = await select.dynamicOptions!(inputs);
assert.isTrue(options.length === 3);
return ok({ type: "success", result: MeArchitectureOptions.botPlugin().id });
return ok({ type: "success", result: MeArchitectureOptions.botMe().id });
} else if (question.name === QuestionNames.ProgrammingLanguage) {
const select = question as SingleSelectQuestion;
const options = await select.dynamicOptions!(inputs);
Expand Down
Loading