@microsoft/teamsfx-core 2.0.7 → 2.0.8-alpha.e17ffd4d1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/constants.d.ts +6 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +6 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/featureFlags.d.ts +5 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +24 -2
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/m365/packageService.d.ts +1 -0
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +15 -2
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +3 -0
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +29 -1
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/projectTypeChecker.d.ts.map +1 -1
- package/build/common/projectTypeChecker.js +1 -2
- package/build/common/projectTypeChecker.js.map +1 -1
- package/build/common/samples.d.ts +3 -2
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +84 -40
- package/build/common/samples.js.map +1 -1
- package/build/common/telemetry.d.ts +3 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +2 -0
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +3 -2
- package/build/common/wrappedAxiosClient.d.ts +59 -0
- package/build/common/wrappedAxiosClient.d.ts.map +1 -0
- package/build/common/wrappedAxiosClient.js +247 -0
- package/build/common/wrappedAxiosClient.js.map +1 -0
- package/build/component/constant/commonConstant.d.ts +5 -0
- package/build/component/constant/commonConstant.d.ts.map +1 -1
- package/build/component/constant/commonConstant.js +7 -1
- package/build/component/constant/commonConstant.js.map +1 -1
- package/build/component/coordinator/index.d.ts +8 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +71 -5
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +0 -2
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -0
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +9 -0
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +2 -4
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +0 -2
- package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +5 -5
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/index.d.ts +1 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +1 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +0 -2
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +31 -9
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +86 -111
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.js +3 -24
- package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +0 -2
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +4 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +6 -1
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +0 -2
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +61 -14
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/errors.d.ts +4 -0
- package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
- package/build/component/driver/teamsApp/errors.js +7 -0
- package/build/component/driver/teamsApp/errors.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts +21 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js +5 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts +17 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js +16 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts +41 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js +5 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts +17 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js +5 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js.map +1 -0
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +3 -5
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -0
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +17 -0
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +8 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +63 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +0 -31
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +1 -53
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +0 -1
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +0 -1
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts +13 -0
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -0
- package/build/component/driver/teamsApp/validateTestCases.js +143 -0
- package/build/component/driver/teamsApp/validateTestCases.js.map +1 -0
- package/build/component/feature/collaboration.d.ts +1 -1
- package/build/component/feature/collaboration.d.ts.map +1 -1
- package/build/component/feature/collaboration.js +2 -4
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +5 -2
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +101 -26
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +8 -3
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +239 -28
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/error.d.ts +1 -1
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +4 -4
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts +6 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +32 -26
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +5 -16
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +46 -87
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts +32 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +33 -2
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +7 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +54 -4
- package/build/component/generator/officeAddin/config/projectsJsonData.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +31 -10
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +2 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +21 -10
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/officeXMLAddin/generator.d.ts +9 -0
- package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -0
- package/build/component/generator/officeXMLAddin/generator.js +90 -0
- package/build/component/generator/officeXMLAddin/generator.js.map +1 -0
- package/build/component/generator/officeXMLAddin/projectConfig.d.ts +36 -0
- package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -0
- package/build/component/generator/officeXMLAddin/projectConfig.js +127 -0
- package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -0
- package/build/component/generator/utils.d.ts +2 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +35 -16
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/middleware/envMW.d.ts.map +1 -1
- package/build/component/middleware/envMW.js +1 -0
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +11 -39
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +2 -0
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +23 -0
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +2 -0
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/core/FxCore.d.ts +1 -0
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +49 -15
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.js +3 -3
- package/build/core/collaborator.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +6 -1
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +1 -1
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +17 -6
- package/build/error/deploy.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +1 -0
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +2 -1
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +34 -2
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +552 -74
- package/build/question/create.js.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +21 -7
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +57 -11
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/other.d.ts +1 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +17 -1
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +10 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +9 -0
- package/build/question/questionNames.js.map +1 -1
- package/package.json +4 -4
- package/resource/package.nls.json +208 -116
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/Enable SSO.txt +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts +0 -7
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +0 -1
- package/build/common/spec-parser/adaptiveCardGenerator.js +0 -168
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +0 -1
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts +0 -15
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts.map +0 -1
- package/build/common/spec-parser/adaptiveCardWrapper.js +0 -98
- package/build/common/spec-parser/adaptiveCardWrapper.js.map +0 -1
- package/build/common/spec-parser/constants.d.ts +0 -41
- package/build/common/spec-parser/constants.d.ts.map +0 -1
- package/build/common/spec-parser/constants.js +0 -95
- package/build/common/spec-parser/constants.js.map +0 -1
- package/build/common/spec-parser/index.browser.d.ts +0 -6
- package/build/common/spec-parser/index.browser.d.ts.map +0 -1
- package/build/common/spec-parser/index.browser.js +0 -16
- package/build/common/spec-parser/index.browser.js.map +0 -1
- package/build/common/spec-parser/index.d.ts +0 -5
- package/build/common/spec-parser/index.d.ts.map +0 -1
- package/build/common/spec-parser/index.js +0 -16
- package/build/common/spec-parser/index.js.map +0 -1
- package/build/common/spec-parser/interfaces.d.ts +0 -180
- package/build/common/spec-parser/interfaces.d.ts.map +0 -1
- package/build/common/spec-parser/interfaces.js +0 -51
- package/build/common/spec-parser/interfaces.js.map +0 -1
- package/build/common/spec-parser/manifestUpdater.d.ts +0 -7
- package/build/common/spec-parser/manifestUpdater.d.ts.map +0 -1
- package/build/common/spec-parser/manifestUpdater.js +0 -98
- package/build/common/spec-parser/manifestUpdater.js.map +0 -1
- package/build/common/spec-parser/specFilter.d.ts +0 -3
- package/build/common/spec-parser/specFilter.d.ts.map +0 -1
- package/build/common/spec-parser/specFilter.js +0 -40
- package/build/common/spec-parser/specFilter.js.map +0 -1
- package/build/common/spec-parser/specParser.browser.d.ts +0 -46
- package/build/common/spec-parser/specParser.browser.d.ts.map +0 -1
- package/build/common/spec-parser/specParser.browser.js +0 -139
- package/build/common/spec-parser/specParser.browser.js.map +0 -1
- package/build/common/spec-parser/specParser.d.ts +0 -46
- package/build/common/spec-parser/specParser.d.ts.map +0 -1
- package/build/common/spec-parser/specParser.js +0 -244
- package/build/common/spec-parser/specParser.js.map +0 -1
- package/build/common/spec-parser/specParserError.d.ts +0 -6
- package/build/common/spec-parser/specParserError.d.ts.map +0 -1
- package/build/common/spec-parser/specParserError.js +0 -13
- package/build/common/spec-parser/specParserError.js.map +0 -1
- package/build/common/spec-parser/utils.d.ts +0 -43
- package/build/common/spec-parser/utils.d.ts.map +0 -1
- package/build/common/spec-parser/utils.js +0 -595
- package/build/common/spec-parser/utils.js.map +0 -1
package/build/question/create.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.apiOperationQuestion = exports.apiMessageExtensionAuthQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.ApiMessageExtensionAuthOptions = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.folderQuestion = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.officeAddinHostingQuestion = exports.getTemplate = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.meArchitectureQuestion = exports.MeArchitectureOptions = exports.capabilityQuestion = exports.CapabilityOptions = exports.ProjectTypeOptions = exports.ScratchOptions = void 0;
|
|
5
|
+
exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.CustomCopilotAssistantOptions = exports.CustomCopilotRagOptions = exports.apiOperationQuestion = exports.apiMessageExtensionAuthQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.ApiMessageExtensionAuthOptions = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.folderQuestion = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.OfficeAddinFrameworkQuestion = exports.getAddinHostOptions = exports.officeAddinHostingQuestion = exports.getTemplate = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.meArchitectureQuestion = exports.MeArchitectureOptions = exports.capabilityQuestion = exports.CapabilityOptions = exports.OfficeAddinCapabilityOptions = exports.ProjectTypeOptions = exports.ScratchOptions = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
8
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
@@ -29,6 +29,7 @@ const questionNames_1 = require("./questionNames");
|
|
|
29
29
|
const util_1 = require("./util");
|
|
30
30
|
const constants_3 = require("./constants");
|
|
31
31
|
const correlator_1 = require("../common/correlator");
|
|
32
|
+
const projectConfig_1 = require("../component/generator/officeXMLAddin/projectConfig");
|
|
32
33
|
class ScratchOptions {
|
|
33
34
|
static yes() {
|
|
34
35
|
return {
|
|
@@ -80,13 +81,34 @@ class ProjectTypeOptions {
|
|
|
80
81
|
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"),
|
|
81
82
|
};
|
|
82
83
|
}
|
|
84
|
+
static officeXMLAddin(platform) {
|
|
85
|
+
return {
|
|
86
|
+
id: "office-xml-addin-type",
|
|
87
|
+
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(inbox) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.mainEntry.title")}`,
|
|
88
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.mainEntry.detail"),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
static officeAddin(platform) {
|
|
92
|
+
return {
|
|
93
|
+
id: "office-addin-type",
|
|
94
|
+
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(extensions) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.label")}`,
|
|
95
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.detail"),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
83
98
|
static copilotPlugin(platform) {
|
|
84
99
|
return {
|
|
85
100
|
id: "copilot-plugin-type",
|
|
86
|
-
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(
|
|
101
|
+
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-copilot-plugin) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
|
|
87
102
|
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.detail"),
|
|
88
103
|
};
|
|
89
104
|
}
|
|
105
|
+
static customCopilot(platform) {
|
|
106
|
+
return {
|
|
107
|
+
id: "custom-copilot-type",
|
|
108
|
+
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-custom-copilot) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.label")}`,
|
|
109
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.detail"),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
90
112
|
}
|
|
91
113
|
exports.ProjectTypeOptions = ProjectTypeOptions;
|
|
92
114
|
function projectTypeQuestion() {
|
|
@@ -94,7 +116,10 @@ function projectTypeQuestion() {
|
|
|
94
116
|
ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
|
|
95
117
|
ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
|
|
96
118
|
ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
|
|
97
|
-
|
|
119
|
+
featureFlags_1.isOfficeXMLAddinEnabled()
|
|
120
|
+
? ProjectTypeOptions.officeXMLAddin(teamsfx_api_1.Platform.CLI)
|
|
121
|
+
: ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
|
|
122
|
+
ProjectTypeOptions.officeAddin(teamsfx_api_1.Platform.CLI),
|
|
98
123
|
];
|
|
99
124
|
return {
|
|
100
125
|
name: questionNames_1.QuestionNames.ProjectType,
|
|
@@ -103,22 +128,12 @@ function projectTypeQuestion() {
|
|
|
103
128
|
staticOptions: staticOptions,
|
|
104
129
|
dynamicOptions: (inputs) => {
|
|
105
130
|
var _a;
|
|
106
|
-
|
|
131
|
+
const staticOptions = [];
|
|
107
132
|
if (featureFlags_1.isApiCopilotPluginEnabled()) {
|
|
108
|
-
staticOptions
|
|
109
|
-
ProjectTypeOptions.copilotPlugin(inputs.platform),
|
|
110
|
-
ProjectTypeOptions.bot(inputs.platform),
|
|
111
|
-
ProjectTypeOptions.tab(inputs.platform),
|
|
112
|
-
ProjectTypeOptions.me(inputs.platform),
|
|
113
|
-
];
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
staticOptions = [
|
|
117
|
-
ProjectTypeOptions.bot(inputs.platform),
|
|
118
|
-
ProjectTypeOptions.tab(inputs.platform),
|
|
119
|
-
ProjectTypeOptions.me(inputs.platform),
|
|
120
|
-
];
|
|
133
|
+
staticOptions.push(ProjectTypeOptions.copilotPlugin(inputs.platform));
|
|
121
134
|
}
|
|
135
|
+
staticOptions.push(ProjectTypeOptions.customCopilot(inputs.platform));
|
|
136
|
+
staticOptions.push(ProjectTypeOptions.bot(inputs.platform), ProjectTypeOptions.tab(inputs.platform), ProjectTypeOptions.me(inputs.platform));
|
|
122
137
|
if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
|
|
123
138
|
const projectType = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
|
|
124
139
|
if (projectType) {
|
|
@@ -126,7 +141,11 @@ function projectTypeQuestion() {
|
|
|
126
141
|
}
|
|
127
142
|
}
|
|
128
143
|
else {
|
|
129
|
-
staticOptions.push(
|
|
144
|
+
staticOptions.push(featureFlags_1.isOfficeXMLAddinEnabled() && !featureFlags_1.isOfficeJSONAddinEnabled()
|
|
145
|
+
? ProjectTypeOptions.officeXMLAddin(inputs.platform)
|
|
146
|
+
: featureFlags_1.isOfficeJSONAddinEnabled()
|
|
147
|
+
? ProjectTypeOptions.officeAddin(inputs.platform)
|
|
148
|
+
: ProjectTypeOptions.outlookAddin(inputs.platform));
|
|
130
149
|
}
|
|
131
150
|
return staticOptions;
|
|
132
151
|
},
|
|
@@ -135,6 +154,30 @@ function projectTypeQuestion() {
|
|
|
135
154
|
skipSingleOption: true,
|
|
136
155
|
};
|
|
137
156
|
}
|
|
157
|
+
class OfficeAddinCapabilityOptions {
|
|
158
|
+
static word() {
|
|
159
|
+
return {
|
|
160
|
+
id: "word",
|
|
161
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.title"),
|
|
162
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.detail"),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
static excel() {
|
|
166
|
+
return {
|
|
167
|
+
id: "excel",
|
|
168
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.title"),
|
|
169
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.detail"),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static powerpoint() {
|
|
173
|
+
return {
|
|
174
|
+
id: "powerpoint",
|
|
175
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.title"),
|
|
176
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.detail"),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
exports.OfficeAddinCapabilityOptions = OfficeAddinCapabilityOptions;
|
|
138
181
|
class CapabilityOptions {
|
|
139
182
|
// bot
|
|
140
183
|
static basicBot() {
|
|
@@ -292,11 +335,19 @@ class CapabilityOptions {
|
|
|
292
335
|
detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
|
|
293
336
|
};
|
|
294
337
|
}
|
|
295
|
-
static bots(inputs
|
|
338
|
+
static bots(inputs) {
|
|
339
|
+
if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.VS) {
|
|
340
|
+
return [
|
|
341
|
+
CapabilityOptions.basicBot(),
|
|
342
|
+
CapabilityOptions.aiBot(),
|
|
343
|
+
CapabilityOptions.aiAssistantBot(),
|
|
344
|
+
CapabilityOptions.notificationBot(),
|
|
345
|
+
CapabilityOptions.commandBot(),
|
|
346
|
+
CapabilityOptions.workflowBot(inputs),
|
|
347
|
+
];
|
|
348
|
+
}
|
|
296
349
|
return [
|
|
297
350
|
CapabilityOptions.basicBot(),
|
|
298
|
-
CapabilityOptions.aiBot(),
|
|
299
|
-
...(includeAssistant === true ? [CapabilityOptions.aiAssistantBot()] : []),
|
|
300
351
|
CapabilityOptions.notificationBot(),
|
|
301
352
|
CapabilityOptions.commandBot(),
|
|
302
353
|
CapabilityOptions.workflowBot(inputs),
|
|
@@ -311,13 +362,17 @@ class CapabilityOptions {
|
|
|
311
362
|
];
|
|
312
363
|
}
|
|
313
364
|
static dotnetCaps(inputs) {
|
|
314
|
-
|
|
365
|
+
const capabilities = [
|
|
315
366
|
...CapabilityOptions.copilotPlugins(),
|
|
316
|
-
...CapabilityOptions.bots(inputs
|
|
367
|
+
...CapabilityOptions.bots(inputs),
|
|
317
368
|
CapabilityOptions.nonSsoTab(),
|
|
318
369
|
CapabilityOptions.tab(),
|
|
319
370
|
...CapabilityOptions.collectMECaps(),
|
|
320
371
|
];
|
|
372
|
+
if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
|
|
373
|
+
capabilities.push(CapabilityOptions.me());
|
|
374
|
+
}
|
|
375
|
+
return capabilities;
|
|
321
376
|
}
|
|
322
377
|
/**
|
|
323
378
|
* Collect all capabilities for message extension, including dotnet and nodejs.
|
|
@@ -344,11 +399,29 @@ class CapabilityOptions {
|
|
|
344
399
|
CapabilityOptions.linkUnfurling(),
|
|
345
400
|
];
|
|
346
401
|
}
|
|
402
|
+
static officeAll() {
|
|
403
|
+
return [...CapabilityOptions.officeAddinItems(), CapabilityOptions.officeAddinImport()];
|
|
404
|
+
}
|
|
347
405
|
static copilotPlugins() {
|
|
348
406
|
return [
|
|
349
407
|
CapabilityOptions.copilotPluginNewApi(),
|
|
350
408
|
CapabilityOptions.copilotPluginApiSpec(),
|
|
351
|
-
CapabilityOptions.copilotPluginOpenAIPlugin(),
|
|
409
|
+
// CapabilityOptions.copilotPluginOpenAIPlugin(),
|
|
410
|
+
];
|
|
411
|
+
}
|
|
412
|
+
static customCopilots() {
|
|
413
|
+
return [
|
|
414
|
+
CapabilityOptions.customCopilotBasic(),
|
|
415
|
+
// CapabilityOptions.customCopilotRag(),
|
|
416
|
+
CapabilityOptions.customCopilotAssistant(),
|
|
417
|
+
];
|
|
418
|
+
}
|
|
419
|
+
static tdpIntegrationCapabilities() {
|
|
420
|
+
// templates that are used by TDP integration only
|
|
421
|
+
return [
|
|
422
|
+
CapabilityOptions.me(),
|
|
423
|
+
CapabilityOptions.botAndMe(),
|
|
424
|
+
CapabilityOptions.nonSsoTabAndBot(),
|
|
352
425
|
];
|
|
353
426
|
}
|
|
354
427
|
/**
|
|
@@ -356,11 +429,23 @@ class CapabilityOptions {
|
|
|
356
429
|
*/
|
|
357
430
|
static staticAll(inputs) {
|
|
358
431
|
const capabilityOptions = [
|
|
359
|
-
...CapabilityOptions.bots(inputs
|
|
432
|
+
...CapabilityOptions.bots(inputs),
|
|
360
433
|
...CapabilityOptions.tabs(),
|
|
361
434
|
...CapabilityOptions.collectMECaps(),
|
|
362
435
|
...CapabilityOptions.copilotPlugins(),
|
|
436
|
+
...CapabilityOptions.customCopilots(),
|
|
437
|
+
...CapabilityOptions.tdpIntegrationCapabilities(),
|
|
363
438
|
];
|
|
439
|
+
if (featureFlags_1.isOfficeXMLAddinEnabled()) {
|
|
440
|
+
capabilityOptions.push(...[
|
|
441
|
+
...CapabilityOptions.officeXMLAddinHostOptionItems(OfficeAddinCapabilityOptions.word().id),
|
|
442
|
+
...CapabilityOptions.officeXMLAddinHostOptionItems(OfficeAddinCapabilityOptions.excel().id),
|
|
443
|
+
...CapabilityOptions.officeXMLAddinHostOptionItems(OfficeAddinCapabilityOptions.powerpoint().id),
|
|
444
|
+
]);
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
capabilityOptions.push(...CapabilityOptions.outlookAddinItems());
|
|
448
|
+
}
|
|
364
449
|
return capabilityOptions;
|
|
365
450
|
}
|
|
366
451
|
/**
|
|
@@ -368,24 +453,44 @@ class CapabilityOptions {
|
|
|
368
453
|
*/
|
|
369
454
|
static all(inputs) {
|
|
370
455
|
const capabilityOptions = [
|
|
371
|
-
...CapabilityOptions.bots(inputs
|
|
456
|
+
...CapabilityOptions.bots(inputs),
|
|
372
457
|
...CapabilityOptions.tabs(),
|
|
373
458
|
...CapabilityOptions.collectMECaps(),
|
|
459
|
+
...CapabilityOptions.outlookAddinItems(),
|
|
374
460
|
];
|
|
375
461
|
if (featureFlags_1.isApiCopilotPluginEnabled()) {
|
|
376
462
|
capabilityOptions.push(...CapabilityOptions.copilotPlugins());
|
|
377
463
|
}
|
|
464
|
+
capabilityOptions.push(...CapabilityOptions.customCopilots());
|
|
465
|
+
if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
|
|
466
|
+
// test templates that are used by TDP integration only
|
|
467
|
+
capabilityOptions.push(...CapabilityOptions.tdpIntegrationCapabilities());
|
|
468
|
+
}
|
|
378
469
|
return capabilityOptions;
|
|
379
470
|
}
|
|
380
|
-
static
|
|
471
|
+
static outlookAddinImport() {
|
|
381
472
|
return {
|
|
382
473
|
id: "import",
|
|
383
474
|
label: localizeUtils_1.getLocalizedString("core.importAddin.label"),
|
|
384
475
|
detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
static officeAddinImport() {
|
|
479
|
+
return {
|
|
480
|
+
id: "import",
|
|
481
|
+
label: localizeUtils_1.getLocalizedString("core.importOfficeAddin.label"),
|
|
482
|
+
detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
|
|
385
483
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
|
|
386
484
|
};
|
|
387
485
|
}
|
|
388
|
-
static
|
|
486
|
+
static officeXMLAddinHostOptionItems(host) {
|
|
487
|
+
return projectConfig_1.getOfficeXMLAddinHostProjectOptions(host).map((x) => ({
|
|
488
|
+
id: x.proj,
|
|
489
|
+
label: localizeUtils_1.getLocalizedString(x.title),
|
|
490
|
+
detail: localizeUtils_1.getLocalizedString(x.detail),
|
|
491
|
+
}));
|
|
492
|
+
}
|
|
493
|
+
static outlookAddinItems() {
|
|
389
494
|
return officeAddinJsonData.getProjectTemplateNames().map((template) => ({
|
|
390
495
|
id: template,
|
|
391
496
|
label: localizeUtils_1.getLocalizedString(officeAddinJsonData.getProjectDisplayName(template)),
|
|
@@ -393,6 +498,13 @@ class CapabilityOptions {
|
|
|
393
498
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
|
|
394
499
|
}));
|
|
395
500
|
}
|
|
501
|
+
static officeAddinItems() {
|
|
502
|
+
return officeAddinJsonData.getProjectTemplateNames().map((template) => ({
|
|
503
|
+
id: template,
|
|
504
|
+
label: localizeUtils_1.getLocalizedString(officeAddinJsonData.getProjectDisplayName(template)),
|
|
505
|
+
detail: localizeUtils_1.getLocalizedString(officeAddinJsonData.getProjectDetails(template)),
|
|
506
|
+
}));
|
|
507
|
+
}
|
|
396
508
|
static nonSsoTabAndBot() {
|
|
397
509
|
return {
|
|
398
510
|
id: "TabNonSsoAndBot",
|
|
@@ -442,12 +554,47 @@ class CapabilityOptions {
|
|
|
442
554
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
|
|
443
555
|
};
|
|
444
556
|
}
|
|
557
|
+
// custom copilot
|
|
558
|
+
static customCopilotBasic() {
|
|
559
|
+
return {
|
|
560
|
+
id: "custom-copilot-basic",
|
|
561
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.label"),
|
|
562
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.detail"),
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
static customCopilotRag() {
|
|
566
|
+
return {
|
|
567
|
+
id: "custom-copilot-rag",
|
|
568
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.label"),
|
|
569
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.detail"),
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
static customCopilotAssistant() {
|
|
573
|
+
return {
|
|
574
|
+
id: "custom-copilot-agent",
|
|
575
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.label"),
|
|
576
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.detail"),
|
|
577
|
+
};
|
|
578
|
+
}
|
|
445
579
|
}
|
|
446
580
|
exports.CapabilityOptions = CapabilityOptions;
|
|
447
581
|
function capabilityQuestion() {
|
|
448
582
|
return {
|
|
449
583
|
name: questionNames_1.QuestionNames.Capabilities,
|
|
450
584
|
title: (inputs) => {
|
|
585
|
+
// Office Add-in Capability
|
|
586
|
+
if (featureFlags_1.isOfficeXMLAddinEnabled()) {
|
|
587
|
+
switch (inputs[questionNames_1.QuestionNames.OfficeAddinCapability]) {
|
|
588
|
+
case ProjectTypeOptions.outlookAddin().id:
|
|
589
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
|
|
590
|
+
case OfficeAddinCapabilityOptions.word().id:
|
|
591
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.create.title");
|
|
592
|
+
case OfficeAddinCapabilityOptions.excel().id:
|
|
593
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.create.title");
|
|
594
|
+
case OfficeAddinCapabilityOptions.powerpoint().id:
|
|
595
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.create.title");
|
|
596
|
+
}
|
|
597
|
+
}
|
|
451
598
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
452
599
|
switch (projectType) {
|
|
453
600
|
case ProjectTypeOptions.bot().id:
|
|
@@ -458,8 +605,12 @@ function capabilityQuestion() {
|
|
|
458
605
|
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.messageExtension.title");
|
|
459
606
|
case ProjectTypeOptions.outlookAddin().id:
|
|
460
607
|
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
|
|
608
|
+
case ProjectTypeOptions.officeAddin().id:
|
|
609
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.title");
|
|
461
610
|
case ProjectTypeOptions.copilotPlugin().id:
|
|
462
611
|
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.title");
|
|
612
|
+
case ProjectTypeOptions.customCopilot().id:
|
|
613
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.title");
|
|
463
614
|
default:
|
|
464
615
|
return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.titleNew");
|
|
465
616
|
}
|
|
@@ -489,8 +640,9 @@ function capabilityQuestion() {
|
|
|
489
640
|
}
|
|
490
641
|
// nodejs capabilities
|
|
491
642
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
643
|
+
const officeHost = inputs[questionNames_1.QuestionNames.OfficeAddinCapability];
|
|
492
644
|
if (projectType === ProjectTypeOptions.bot().id) {
|
|
493
|
-
return CapabilityOptions.bots(inputs
|
|
645
|
+
return CapabilityOptions.bots(inputs);
|
|
494
646
|
}
|
|
495
647
|
else if (projectType === ProjectTypeOptions.tab().id) {
|
|
496
648
|
return CapabilityOptions.tabs();
|
|
@@ -498,12 +650,25 @@ function capabilityQuestion() {
|
|
|
498
650
|
else if (projectType === ProjectTypeOptions.me().id) {
|
|
499
651
|
return CapabilityOptions.mes();
|
|
500
652
|
}
|
|
501
|
-
else if (projectType === ProjectTypeOptions.outlookAddin().id)
|
|
502
|
-
|
|
653
|
+
else if ((!featureFlags_1.isOfficeXMLAddinEnabled() && projectType === ProjectTypeOptions.outlookAddin().id) ||
|
|
654
|
+
(featureFlags_1.isOfficeXMLAddinEnabled() &&
|
|
655
|
+
projectType === ProjectTypeOptions.officeXMLAddin().id &&
|
|
656
|
+
officeHost === ProjectTypeOptions.outlookAddin().id)) {
|
|
657
|
+
return [...CapabilityOptions.outlookAddinItems(), CapabilityOptions.outlookAddinImport()];
|
|
658
|
+
}
|
|
659
|
+
else if (featureFlags_1.isOfficeXMLAddinEnabled() &&
|
|
660
|
+
projectType === ProjectTypeOptions.officeXMLAddin().id) {
|
|
661
|
+
return CapabilityOptions.officeXMLAddinHostOptionItems(officeHost);
|
|
662
|
+
}
|
|
663
|
+
else if (projectType === ProjectTypeOptions.officeAddin().id) {
|
|
664
|
+
return CapabilityOptions.officeAll();
|
|
503
665
|
}
|
|
504
666
|
else if (projectType === ProjectTypeOptions.copilotPlugin().id) {
|
|
505
667
|
return CapabilityOptions.copilotPlugins();
|
|
506
668
|
}
|
|
669
|
+
else if (projectType === ProjectTypeOptions.customCopilot().id) {
|
|
670
|
+
return CapabilityOptions.customCopilots();
|
|
671
|
+
}
|
|
507
672
|
else {
|
|
508
673
|
return CapabilityOptions.all(inputs);
|
|
509
674
|
}
|
|
@@ -512,6 +677,9 @@ function capabilityQuestion() {
|
|
|
512
677
|
if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.copilotPlugin().id) {
|
|
513
678
|
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.placeholder");
|
|
514
679
|
}
|
|
680
|
+
else if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.customCopilot().id) {
|
|
681
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.placeholder");
|
|
682
|
+
}
|
|
515
683
|
return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.placeholder");
|
|
516
684
|
},
|
|
517
685
|
forgetLastValue: true,
|
|
@@ -540,14 +708,14 @@ class MeArchitectureOptions {
|
|
|
540
708
|
return {
|
|
541
709
|
id: "new-api",
|
|
542
710
|
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.label"),
|
|
543
|
-
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.
|
|
711
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionNewApiOption.detail"),
|
|
544
712
|
};
|
|
545
713
|
}
|
|
546
714
|
static apiSpec() {
|
|
547
715
|
return {
|
|
548
716
|
id: "api-spec",
|
|
549
717
|
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.label"),
|
|
550
|
-
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.
|
|
718
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionApiSpecOption.detail"),
|
|
551
719
|
};
|
|
552
720
|
}
|
|
553
721
|
static all() {
|
|
@@ -889,15 +1057,7 @@ function officeAddinHostingQuestion() {
|
|
|
889
1057
|
name: questionNames_1.QuestionNames.OfficeAddinHost,
|
|
890
1058
|
title: "Add-in Host",
|
|
891
1059
|
staticOptions: [],
|
|
892
|
-
dynamicOptions:
|
|
893
|
-
const template = exports.getTemplate(inputs);
|
|
894
|
-
const getHostTemplateNames = officeAddinJsonData.getHostTemplateNames(template);
|
|
895
|
-
const options = getHostTemplateNames.map((host) => ({
|
|
896
|
-
label: officeAddinJsonData.getHostDisplayName(host),
|
|
897
|
-
id: host,
|
|
898
|
-
}));
|
|
899
|
-
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
900
|
-
},
|
|
1060
|
+
dynamicOptions: getAddinHostOptions,
|
|
901
1061
|
default: (inputs) => {
|
|
902
1062
|
const template = exports.getTemplate(inputs);
|
|
903
1063
|
const options = officeAddinJsonData.getHostTemplateNames(template);
|
|
@@ -908,6 +1068,41 @@ function officeAddinHostingQuestion() {
|
|
|
908
1068
|
return OfficeHostQuestion;
|
|
909
1069
|
}
|
|
910
1070
|
exports.officeAddinHostingQuestion = officeAddinHostingQuestion;
|
|
1071
|
+
function getAddinHostOptions(inputs) {
|
|
1072
|
+
// office addin supports host defined in officeAddinJsonData
|
|
1073
|
+
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
1074
|
+
const template = exports.getTemplate(inputs);
|
|
1075
|
+
const hostTypes = officeAddinJsonData.getHostTemplateNames(template);
|
|
1076
|
+
const options = [];
|
|
1077
|
+
hostTypes.forEach((host) => {
|
|
1078
|
+
options.push({ label: officeAddinJsonData.getHostDisplayName(host), id: host });
|
|
1079
|
+
});
|
|
1080
|
+
// Outlook addin only supports outlook
|
|
1081
|
+
if (projectType === ProjectTypeOptions.outlookAddin().id) {
|
|
1082
|
+
return [options[0] || { label: "No Options", id: "No Options" }];
|
|
1083
|
+
}
|
|
1084
|
+
else if (projectType === ProjectTypeOptions.officeAddin().id) {
|
|
1085
|
+
return options;
|
|
1086
|
+
}
|
|
1087
|
+
return options || "No Options";
|
|
1088
|
+
}
|
|
1089
|
+
exports.getAddinHostOptions = getAddinHostOptions;
|
|
1090
|
+
function OfficeAddinFrameworkQuestion() {
|
|
1091
|
+
return {
|
|
1092
|
+
type: "singleSelect",
|
|
1093
|
+
name: questionNames_1.QuestionNames.OfficeAddinFramework,
|
|
1094
|
+
cliShortName: "f",
|
|
1095
|
+
cliDescription: "Framework for WXP extension.",
|
|
1096
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.title"),
|
|
1097
|
+
staticOptions: [
|
|
1098
|
+
{ id: "default", label: "Default" },
|
|
1099
|
+
{ id: "react", label: "React" },
|
|
1100
|
+
],
|
|
1101
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.placeholder"),
|
|
1102
|
+
default: "default",
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
exports.OfficeAddinFrameworkQuestion = OfficeAddinFrameworkQuestion;
|
|
911
1106
|
const officeAddinJsonData = new projectsJsonData_1.default();
|
|
912
1107
|
function getLanguageOptions(inputs) {
|
|
913
1108
|
const runtime = getRuntime(inputs);
|
|
@@ -917,22 +1112,56 @@ function getLanguageOptions(inputs) {
|
|
|
917
1112
|
}
|
|
918
1113
|
// office addin supports language defined in officeAddinJsonData
|
|
919
1114
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
920
|
-
|
|
1115
|
+
const officeHost = inputs[questionNames_1.QuestionNames.OfficeAddinCapability];
|
|
1116
|
+
if ((!featureFlags_1.isOfficeXMLAddinEnabled() && projectType === ProjectTypeOptions.outlookAddin().id) ||
|
|
1117
|
+
(featureFlags_1.isOfficeXMLAddinEnabled() &&
|
|
1118
|
+
projectType === ProjectTypeOptions.officeXMLAddin().id &&
|
|
1119
|
+
officeHost === ProjectTypeOptions.outlookAddin().id)) {
|
|
921
1120
|
const template = exports.getTemplate(inputs);
|
|
922
1121
|
const supportedTypes = officeAddinJsonData.getSupportedScriptTypes(template);
|
|
923
1122
|
const options = supportedTypes.map((language) => ({ label: language, id: language }));
|
|
924
1123
|
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
925
1124
|
}
|
|
1125
|
+
if (featureFlags_1.isOfficeXMLAddinEnabled() && projectType === ProjectTypeOptions.officeXMLAddin().id) {
|
|
1126
|
+
const officeProject = inputs[questionNames_1.QuestionNames.Capabilities];
|
|
1127
|
+
return officeProject !== "manifest"
|
|
1128
|
+
? projectConfig_1.getOfficeXMLAddinHostProjectLangOptions(officeHost, officeProject)
|
|
1129
|
+
: [{ id: "javascript", label: "JavaScript" }];
|
|
1130
|
+
}
|
|
1131
|
+
if (projectType === ProjectTypeOptions.officeAddin().id) {
|
|
1132
|
+
const template = exports.getTemplate(inputs);
|
|
1133
|
+
const supportedTypes = officeAddinJsonData.getSupportedScriptTypesNew(template);
|
|
1134
|
+
const options = [];
|
|
1135
|
+
supportedTypes.forEach((language) => {
|
|
1136
|
+
if (language === "TypeScript") {
|
|
1137
|
+
options.push({ label: "TypeScript", id: "typescript" });
|
|
1138
|
+
}
|
|
1139
|
+
else if (language === "JavaScript") {
|
|
1140
|
+
options.push({ label: "JavaScript", id: "javascript" });
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
1144
|
+
}
|
|
926
1145
|
const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
|
|
927
|
-
// SPFx only supports typescript
|
|
928
1146
|
if (capabilities === CapabilityOptions.SPFxTab().id) {
|
|
1147
|
+
// SPFx only supports typescript
|
|
929
1148
|
return [{ id: "typescript", label: "TypeScript" }];
|
|
930
1149
|
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1150
|
+
else if (constants_3.capabilitiesHavePythonOption.includes(capabilities)) {
|
|
1151
|
+
// support python language
|
|
1152
|
+
return [
|
|
1153
|
+
{ id: "javascript", label: "JavaScript" },
|
|
1154
|
+
{ id: "typescript", label: "TypeScript" },
|
|
1155
|
+
{ id: "python", label: "Python" },
|
|
1156
|
+
];
|
|
1157
|
+
}
|
|
1158
|
+
else {
|
|
1159
|
+
// other cases
|
|
1160
|
+
return [
|
|
1161
|
+
{ id: "javascript", label: "JavaScript" },
|
|
1162
|
+
{ id: "typescript", label: "TypeScript" },
|
|
1163
|
+
];
|
|
1164
|
+
}
|
|
936
1165
|
}
|
|
937
1166
|
exports.getLanguageOptions = getLanguageOptions;
|
|
938
1167
|
var ProgrammingLanguage;
|
|
@@ -940,17 +1169,19 @@ var ProgrammingLanguage;
|
|
|
940
1169
|
ProgrammingLanguage["JS"] = "javascript";
|
|
941
1170
|
ProgrammingLanguage["TS"] = "typescript";
|
|
942
1171
|
ProgrammingLanguage["CSharp"] = "csharp";
|
|
1172
|
+
ProgrammingLanguage["PY"] = "python";
|
|
943
1173
|
})(ProgrammingLanguage = exports.ProgrammingLanguage || (exports.ProgrammingLanguage = {}));
|
|
944
1174
|
function programmingLanguageQuestion() {
|
|
945
1175
|
const programmingLanguageQuestion = {
|
|
946
1176
|
name: questionNames_1.QuestionNames.ProgrammingLanguage,
|
|
947
1177
|
cliShortName: "l",
|
|
948
|
-
title: "
|
|
1178
|
+
title: localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.title"),
|
|
949
1179
|
type: "singleSelect",
|
|
950
1180
|
staticOptions: [
|
|
951
1181
|
{ id: ProgrammingLanguage.JS, label: "JavaScript" },
|
|
952
1182
|
{ id: ProgrammingLanguage.TS, label: "TypeScript" },
|
|
953
1183
|
{ id: ProgrammingLanguage.CSharp, label: "C#" },
|
|
1184
|
+
{ id: ProgrammingLanguage.PY, label: "Python" },
|
|
954
1185
|
],
|
|
955
1186
|
dynamicOptions: getLanguageOptions,
|
|
956
1187
|
default: (inputs) => {
|
|
@@ -966,7 +1197,7 @@ function programmingLanguageQuestion() {
|
|
|
966
1197
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
967
1198
|
if (projectType === ProjectTypeOptions.outlookAddin().id) {
|
|
968
1199
|
const template = exports.getTemplate(inputs);
|
|
969
|
-
const options = officeAddinJsonData.
|
|
1200
|
+
const options = officeAddinJsonData.getSupportedScriptTypesNew(template);
|
|
970
1201
|
return options[0] || "No Options";
|
|
971
1202
|
}
|
|
972
1203
|
const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
|
|
@@ -1004,7 +1235,7 @@ function appNameQuestion() {
|
|
|
1004
1235
|
type: "text",
|
|
1005
1236
|
name: questionNames_1.QuestionNames.AppName,
|
|
1006
1237
|
cliShortName: "n",
|
|
1007
|
-
title: "
|
|
1238
|
+
title: localizeUtils_1.getLocalizedString("core.question.appName.title"),
|
|
1008
1239
|
required: true,
|
|
1009
1240
|
default: async (inputs) => {
|
|
1010
1241
|
var _a, _b;
|
|
@@ -1058,7 +1289,7 @@ function appNameQuestion() {
|
|
|
1058
1289
|
return undefined;
|
|
1059
1290
|
},
|
|
1060
1291
|
},
|
|
1061
|
-
placeholder: "
|
|
1292
|
+
placeholder: localizeUtils_1.getLocalizedString("core.question.appName.placeholder"),
|
|
1062
1293
|
};
|
|
1063
1294
|
return question;
|
|
1064
1295
|
}
|
|
@@ -1289,14 +1520,14 @@ function selectBotIdsQuestion() {
|
|
|
1289
1520
|
}
|
|
1290
1521
|
const maximumLengthOfDetailsErrorMessageInInputBox = 90;
|
|
1291
1522
|
function apiSpecLocationQuestion(includeExistingAPIs = true) {
|
|
1292
|
-
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will
|
|
1523
|
+
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will lose correlation id when user accepts the value.
|
|
1293
1524
|
const validationOnAccept = async (input, inputs) => {
|
|
1294
1525
|
try {
|
|
1295
1526
|
if (!inputs) {
|
|
1296
1527
|
throw new Error("inputs is undefined"); // should never happen
|
|
1297
1528
|
}
|
|
1298
1529
|
const context = utils_4.createContextV3();
|
|
1299
|
-
const res = await helper_1.listOperations(context, undefined, input.trim(), inputs
|
|
1530
|
+
const res = await helper_1.listOperations(context, undefined, input.trim(), inputs, includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
|
|
1300
1531
|
if (res.isOk()) {
|
|
1301
1532
|
inputs.supportedApisFromApiSpec = res.value;
|
|
1302
1533
|
}
|
|
@@ -1363,7 +1594,7 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
|
|
|
1363
1594
|
exports.apiSpecLocationQuestion = apiSpecLocationQuestion;
|
|
1364
1595
|
function openAIPluginManifestLocationQuestion() {
|
|
1365
1596
|
// export for unit test
|
|
1366
|
-
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will
|
|
1597
|
+
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will lose correlation id when user accepts the value.
|
|
1367
1598
|
return {
|
|
1368
1599
|
type: "text",
|
|
1369
1600
|
name: questionNames_1.QuestionNames.OpenAIPluginManifest,
|
|
@@ -1398,7 +1629,7 @@ function openAIPluginManifestLocationQuestion() {
|
|
|
1398
1629
|
}
|
|
1399
1630
|
const context = utils_4.createContextV3();
|
|
1400
1631
|
try {
|
|
1401
|
-
const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation],
|
|
1632
|
+
const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], inputs, true, true, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
|
|
1402
1633
|
if (res.isOk()) {
|
|
1403
1634
|
inputs.supportedApisFromApiSpec = res.value;
|
|
1404
1635
|
}
|
|
@@ -1439,17 +1670,36 @@ function apiMessageExtensionAuthQuestion() {
|
|
|
1439
1670
|
exports.apiMessageExtensionAuthQuestion = apiMessageExtensionAuthQuestion;
|
|
1440
1671
|
function apiOperationQuestion(includeExistingAPIs = true) {
|
|
1441
1672
|
// export for unit test
|
|
1673
|
+
let placeholder = "";
|
|
1674
|
+
const isPlugin = (inputs) => {
|
|
1675
|
+
return (!!inputs && inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id);
|
|
1676
|
+
};
|
|
1442
1677
|
return {
|
|
1443
1678
|
type: "multiSelect",
|
|
1444
1679
|
name: questionNames_1.QuestionNames.ApiOperation,
|
|
1445
|
-
title:
|
|
1680
|
+
title: (inputs) => {
|
|
1681
|
+
return isPlugin(inputs)
|
|
1682
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.copilotOperation.title")
|
|
1683
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title");
|
|
1684
|
+
},
|
|
1446
1685
|
cliDescription: "Select Operation(s) Teams Can Interact with.",
|
|
1447
1686
|
cliShortName: "o",
|
|
1448
|
-
placeholder:
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1687
|
+
placeholder: (inputs) => {
|
|
1688
|
+
const isPlugin = inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id;
|
|
1689
|
+
if (!includeExistingAPIs) {
|
|
1690
|
+
placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
|
|
1691
|
+
}
|
|
1692
|
+
else if (isPlugin) {
|
|
1693
|
+
placeholder = ""; // TODO: add placeholder for api plugin
|
|
1694
|
+
}
|
|
1695
|
+
else if (featureFlags_1.isApiKeyEnabled()) {
|
|
1696
|
+
placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.apikey.placeholder");
|
|
1697
|
+
}
|
|
1698
|
+
else {
|
|
1699
|
+
placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder");
|
|
1700
|
+
}
|
|
1701
|
+
return placeholder;
|
|
1702
|
+
},
|
|
1453
1703
|
forgetLastValue: true,
|
|
1454
1704
|
staticOptions: [],
|
|
1455
1705
|
validation: {
|
|
@@ -1487,6 +1737,154 @@ function apiOperationQuestion(includeExistingAPIs = true) {
|
|
|
1487
1737
|
};
|
|
1488
1738
|
}
|
|
1489
1739
|
exports.apiOperationQuestion = apiOperationQuestion;
|
|
1740
|
+
class CustomCopilotRagOptions {
|
|
1741
|
+
static customize() {
|
|
1742
|
+
return {
|
|
1743
|
+
id: "custom-copilot-rag-customize",
|
|
1744
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.label"),
|
|
1745
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.detail"),
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1748
|
+
static azureAISearch() {
|
|
1749
|
+
return {
|
|
1750
|
+
id: "custom-copilot-rag-azureAISearch",
|
|
1751
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.label"),
|
|
1752
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.detail"),
|
|
1753
|
+
};
|
|
1754
|
+
}
|
|
1755
|
+
static customApi() {
|
|
1756
|
+
return {
|
|
1757
|
+
id: "custom-copilot-rag-customApi",
|
|
1758
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.label"),
|
|
1759
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.detail"),
|
|
1760
|
+
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
|
|
1761
|
+
};
|
|
1762
|
+
}
|
|
1763
|
+
static microsoft365() {
|
|
1764
|
+
return {
|
|
1765
|
+
id: "custom-copilot-rag-microsoft365",
|
|
1766
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.label"),
|
|
1767
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.detail"),
|
|
1768
|
+
};
|
|
1769
|
+
}
|
|
1770
|
+
static all() {
|
|
1771
|
+
return [
|
|
1772
|
+
CustomCopilotRagOptions.customize(),
|
|
1773
|
+
CustomCopilotRagOptions.azureAISearch(),
|
|
1774
|
+
CustomCopilotRagOptions.customApi(),
|
|
1775
|
+
CustomCopilotRagOptions.microsoft365(),
|
|
1776
|
+
];
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
exports.CustomCopilotRagOptions = CustomCopilotRagOptions;
|
|
1780
|
+
class CustomCopilotAssistantOptions {
|
|
1781
|
+
static new() {
|
|
1782
|
+
return {
|
|
1783
|
+
id: "custom-copilot-agent-new",
|
|
1784
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.label"),
|
|
1785
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.detail"),
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1788
|
+
static assistantsApi() {
|
|
1789
|
+
return {
|
|
1790
|
+
id: "custom-copilot-agent-assistants-api",
|
|
1791
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.label"),
|
|
1792
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.detail"),
|
|
1793
|
+
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
|
|
1794
|
+
};
|
|
1795
|
+
}
|
|
1796
|
+
static all() {
|
|
1797
|
+
return [CustomCopilotAssistantOptions.new(), CustomCopilotAssistantOptions.assistantsApi()];
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
exports.CustomCopilotAssistantOptions = CustomCopilotAssistantOptions;
|
|
1801
|
+
function customCopilotRagQuestion() {
|
|
1802
|
+
return {
|
|
1803
|
+
type: "singleSelect",
|
|
1804
|
+
name: questionNames_1.QuestionNames.CustomCopilotRag,
|
|
1805
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.title"),
|
|
1806
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.placeholder"),
|
|
1807
|
+
staticOptions: CustomCopilotRagOptions.all(),
|
|
1808
|
+
dynamicOptions: () => CustomCopilotRagOptions.all(),
|
|
1809
|
+
default: CustomCopilotRagOptions.customize().id,
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1812
|
+
function customCopilotAssistantQuestion() {
|
|
1813
|
+
return {
|
|
1814
|
+
type: "singleSelect",
|
|
1815
|
+
name: questionNames_1.QuestionNames.CustomCopilotAssistant,
|
|
1816
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.title"),
|
|
1817
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
|
|
1818
|
+
staticOptions: CustomCopilotAssistantOptions.all(),
|
|
1819
|
+
dynamicOptions: () => CustomCopilotAssistantOptions.all(),
|
|
1820
|
+
default: CustomCopilotAssistantOptions.new().id,
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
function llmServiceQuestion() {
|
|
1824
|
+
return {
|
|
1825
|
+
type: "singleSelect",
|
|
1826
|
+
name: questionNames_1.QuestionNames.LLMService,
|
|
1827
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.title"),
|
|
1828
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.placeholder"),
|
|
1829
|
+
staticOptions: [
|
|
1830
|
+
{
|
|
1831
|
+
id: "llm-service-azure-openai",
|
|
1832
|
+
cliName: "azure-openai",
|
|
1833
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
|
|
1834
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
id: "llm-service-openai",
|
|
1838
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
|
|
1839
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
|
|
1840
|
+
},
|
|
1841
|
+
],
|
|
1842
|
+
dynamicOptions: (inputs) => {
|
|
1843
|
+
const options = [];
|
|
1844
|
+
if (inputs[questionNames_1.QuestionNames.CustomCopilotAssistant] !== "custom-copilot-agent-assistants-api") {
|
|
1845
|
+
options.push({
|
|
1846
|
+
id: "llm-service-azure-openai",
|
|
1847
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
|
|
1848
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
options.push({
|
|
1852
|
+
id: "llm-service-openai",
|
|
1853
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
|
|
1854
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
|
|
1855
|
+
});
|
|
1856
|
+
return options;
|
|
1857
|
+
},
|
|
1858
|
+
skipSingleOption: true,
|
|
1859
|
+
default: "llm-service-azure-openai",
|
|
1860
|
+
};
|
|
1861
|
+
}
|
|
1862
|
+
function openAIKeyQuestion() {
|
|
1863
|
+
return {
|
|
1864
|
+
type: "text",
|
|
1865
|
+
password: true,
|
|
1866
|
+
name: questionNames_1.QuestionNames.OpenAIKey,
|
|
1867
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.title"),
|
|
1868
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.placeholder"),
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
function azureOpenAIKeyQuestion() {
|
|
1872
|
+
return {
|
|
1873
|
+
type: "text",
|
|
1874
|
+
password: true,
|
|
1875
|
+
name: questionNames_1.QuestionNames.AzureOpenAIKey,
|
|
1876
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
|
|
1877
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
|
|
1878
|
+
};
|
|
1879
|
+
}
|
|
1880
|
+
function azureOpenAIEndpointQuestion() {
|
|
1881
|
+
return {
|
|
1882
|
+
type: "text",
|
|
1883
|
+
name: questionNames_1.QuestionNames.AzureOpenAIEndpoint,
|
|
1884
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
|
|
1885
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
|
|
1886
|
+
};
|
|
1887
|
+
}
|
|
1490
1888
|
function capabilitySubTree() {
|
|
1491
1889
|
const node = {
|
|
1492
1890
|
data: capabilityQuestion(),
|
|
@@ -1518,7 +1916,7 @@ function capabilitySubTree() {
|
|
|
1518
1916
|
},
|
|
1519
1917
|
{
|
|
1520
1918
|
// office addin import sub-tree
|
|
1521
|
-
condition: { equals: CapabilityOptions.
|
|
1919
|
+
condition: { equals: CapabilityOptions.outlookAddinImport().id },
|
|
1522
1920
|
data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
|
|
1523
1921
|
children: [
|
|
1524
1922
|
{
|
|
@@ -1539,9 +1937,11 @@ function capabilitySubTree() {
|
|
|
1539
1937
|
},
|
|
1540
1938
|
{
|
|
1541
1939
|
// office addin other items sub-tree
|
|
1542
|
-
condition:
|
|
1543
|
-
|
|
1544
|
-
|
|
1940
|
+
condition: (inputs) => featureFlags_1.isOfficeXMLAddinEnabled()
|
|
1941
|
+
? false
|
|
1942
|
+
: CapabilityOptions.outlookAddinItems()
|
|
1943
|
+
.map((i) => i.id)
|
|
1944
|
+
.includes(inputs[questionNames_1.QuestionNames.Capabilities]),
|
|
1545
1945
|
data: officeAddinHostingQuestion(),
|
|
1546
1946
|
},
|
|
1547
1947
|
{
|
|
@@ -1567,10 +1967,10 @@ function capabilitySubTree() {
|
|
|
1567
1967
|
},
|
|
1568
1968
|
data: apiSpecLocationQuestion(),
|
|
1569
1969
|
},
|
|
1570
|
-
{
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
},
|
|
1970
|
+
// {
|
|
1971
|
+
// condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
|
|
1972
|
+
// data: openAIPluginManifestLocationQuestion(),
|
|
1973
|
+
// },
|
|
1574
1974
|
{
|
|
1575
1975
|
data: apiOperationQuestion(),
|
|
1576
1976
|
},
|
|
@@ -1584,6 +1984,38 @@ function capabilitySubTree() {
|
|
|
1584
1984
|
},
|
|
1585
1985
|
data: apiMessageExtensionAuthQuestion(),
|
|
1586
1986
|
},
|
|
1987
|
+
/*
|
|
1988
|
+
{
|
|
1989
|
+
condition: (inputs: Inputs) => {
|
|
1990
|
+
return inputs[QuestionNames.Capabilities] == CapabilityOptions.customCopilotRag().id;
|
|
1991
|
+
},
|
|
1992
|
+
data: customCopilotRagQuestion(),
|
|
1993
|
+
children: [
|
|
1994
|
+
{
|
|
1995
|
+
condition: (inputs: Inputs) => {
|
|
1996
|
+
return (
|
|
1997
|
+
inputs[QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id
|
|
1998
|
+
);
|
|
1999
|
+
},
|
|
2000
|
+
data: apiSpecLocationQuestion(),
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
condition: (inputs: Inputs) => {
|
|
2004
|
+
return (
|
|
2005
|
+
inputs[QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id
|
|
2006
|
+
);
|
|
2007
|
+
},
|
|
2008
|
+
data: apiOperationQuestion(),
|
|
2009
|
+
},
|
|
2010
|
+
],
|
|
2011
|
+
},
|
|
2012
|
+
*/
|
|
2013
|
+
{
|
|
2014
|
+
condition: (inputs) => {
|
|
2015
|
+
return (inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.customCopilotAssistant().id);
|
|
2016
|
+
},
|
|
2017
|
+
data: customCopilotAssistantQuestion(),
|
|
2018
|
+
},
|
|
1587
2019
|
{
|
|
1588
2020
|
// programming language
|
|
1589
2021
|
data: programmingLanguageQuestion(),
|
|
@@ -1595,6 +2027,40 @@ function capabilitySubTree() {
|
|
|
1595
2027
|
inputs[questionNames_1.QuestionNames.MeArchitectureType] !== MeArchitectureOptions.apiSpec().id);
|
|
1596
2028
|
},
|
|
1597
2029
|
},
|
|
2030
|
+
{
|
|
2031
|
+
condition: (inputs) => {
|
|
2032
|
+
return (inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotBasic().id ||
|
|
2033
|
+
inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotRag().id ||
|
|
2034
|
+
inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotAssistant().id);
|
|
2035
|
+
},
|
|
2036
|
+
data: llmServiceQuestion(),
|
|
2037
|
+
children: [
|
|
2038
|
+
{
|
|
2039
|
+
condition: { equals: "llm-service-azure-openai" },
|
|
2040
|
+
data: azureOpenAIKeyQuestion(),
|
|
2041
|
+
children: [
|
|
2042
|
+
{
|
|
2043
|
+
condition: (inputs) => {
|
|
2044
|
+
var _a;
|
|
2045
|
+
return ((_a = inputs[questionNames_1.QuestionNames.AzureOpenAIKey]) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
2046
|
+
},
|
|
2047
|
+
data: azureOpenAIEndpointQuestion(),
|
|
2048
|
+
},
|
|
2049
|
+
],
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
condition: { equals: "llm-service-openai" },
|
|
2053
|
+
data: openAIKeyQuestion(),
|
|
2054
|
+
},
|
|
2055
|
+
],
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
// WXP addin framework
|
|
2059
|
+
condition: (inputs) => {
|
|
2060
|
+
return inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.officeAddin().id;
|
|
2061
|
+
},
|
|
2062
|
+
data: OfficeAddinFrameworkQuestion(),
|
|
2063
|
+
},
|
|
1598
2064
|
{
|
|
1599
2065
|
// root folder
|
|
1600
2066
|
data: folderQuestion(),
|
|
@@ -1621,6 +2087,21 @@ function createProjectQuestionNode() {
|
|
|
1621
2087
|
data: projectTypeQuestion(),
|
|
1622
2088
|
cliOptionDisabled: "self",
|
|
1623
2089
|
},
|
|
2090
|
+
{
|
|
2091
|
+
condition: (inputs) => featureFlags_1.isOfficeXMLAddinEnabled() &&
|
|
2092
|
+
inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.officeXMLAddin().id,
|
|
2093
|
+
data: {
|
|
2094
|
+
name: questionNames_1.QuestionNames.OfficeAddinCapability,
|
|
2095
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.create.title"),
|
|
2096
|
+
type: "singleSelect",
|
|
2097
|
+
staticOptions: [
|
|
2098
|
+
ProjectTypeOptions.outlookAddin(),
|
|
2099
|
+
OfficeAddinCapabilityOptions.word(),
|
|
2100
|
+
OfficeAddinCapabilityOptions.excel(),
|
|
2101
|
+
OfficeAddinCapabilityOptions.powerpoint(),
|
|
2102
|
+
],
|
|
2103
|
+
},
|
|
2104
|
+
},
|
|
1624
2105
|
capabilitySubTree(),
|
|
1625
2106
|
{
|
|
1626
2107
|
condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
|
|
@@ -1684,9 +2165,6 @@ function createProjectCliHelpNode() {
|
|
|
1684
2165
|
if (!featureFlags_1.isCLIDotNetEnabled()) {
|
|
1685
2166
|
deleteNames.push(questionNames_1.QuestionNames.Runtime);
|
|
1686
2167
|
}
|
|
1687
|
-
if (!featureFlags_1.isApiCopilotPluginEnabled()) {
|
|
1688
|
-
deleteNames.push(questionNames_1.QuestionNames.CopilotPluginExistingApi);
|
|
1689
|
-
}
|
|
1690
2168
|
trimQuestionTreeForCliHelp(node, deleteNames);
|
|
1691
2169
|
return node;
|
|
1692
2170
|
}
|