@microsoft/teamsfx-core 2.0.7-alpha.8120e652f.0 → 2.0.7-alpha.8d8f5a0bb.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 +5 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +5 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/deps-checker/constant/helpLink.d.ts +1 -1
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/common/deps-checker/constant/helpLink.js +1 -1
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/featureFlags.d.ts +3 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +15 -2
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/jsonUtils.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +1 -2
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts +3 -2
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +44 -15
- 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 +4 -3
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +85 -41
- 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 +1 -0
- package/build/common/tools.d.ts +1 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +7 -4
- package/build/common/tools.js.map +1 -1
- 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/configManager/lifecycle.js +1 -1
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/validator.js +1 -1
- package/build/component/configManager/validator.js.map +1 -1
- 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 +12 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +92 -21
- 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/create.d.ts +1 -1
- package/build/component/driver/aad/create.d.ts.map +1 -1
- package/build/component/driver/aad/create.js +11 -11
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/update.d.ts +1 -1
- package/build/component/driver/aad/update.d.ts.map +1 -1
- package/build/component/driver/aad/update.js +10 -8
- package/build/component/driver/aad/update.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 +16 -2
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts +1 -2
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +29 -34
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.d.ts.map +1 -1
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +2 -3
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -1
- package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts +2 -1
- package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts.map +1 -1
- package/build/component/driver/apiKey/utility/constants.d.ts +2 -1
- package/build/component/driver/apiKey/utility/constants.d.ts.map +1 -1
- package/build/component/driver/apiKey/utility/constants.js +3 -2
- package/build/component/driver/apiKey/utility/constants.js.map +1 -1
- package/build/component/driver/botAadApp/create.d.ts +2 -2
- package/build/component/driver/botAadApp/create.d.ts.map +1 -1
- package/build/component/driver/botAadApp/create.js +18 -18
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +9 -11
- 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/file/createOrUpdateEnvironmentFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js +6 -6
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.js +8 -8
- package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +9 -10
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/middleware/addSWADeployTelemetry.js +1 -2
- package/build/component/driver/middleware/addSWADeployTelemetry.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 +33 -9
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +142 -112
- 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 +7 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +7 -0
- 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/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/feature/collaboration.d.ts +1 -1
- package/build/component/feature/collaboration.d.ts.map +1 -1
- package/build/component/feature/collaboration.js +10 -12
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +4 -2
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +50 -18
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +5 -3
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +67 -25
- 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 +5 -0
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +28 -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 +1 -0
- package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +1 -0
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +1 -4
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +4 -11
- 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 +13 -7
- 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/spfx/error.d.ts +1 -0
- package/build/component/generator/spfx/error.d.ts.map +1 -1
- package/build/component/generator/spfx/error.js +11 -1
- package/build/component/generator/spfx/error.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts +1 -0
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +33 -0
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +2 -0
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +2 -0
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts +2 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.js +1 -0
- package/build/component/generator/spfx/utils/telemetryEvents.js.map +1 -1
- 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 +9 -6
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts +2 -0
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +46 -31
- 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.js +1 -1
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +21 -12
- 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/arm.d.ts.map +1 -1
- package/build/error/arm.js +0 -2
- package/build/error/arm.js.map +1 -1
- package/build/error/common.d.ts +4 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +36 -2
- 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/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +4 -2
- package/build/error/teamsApp.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 +37 -2
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +514 -62
- package/build/question/create.js.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +20 -6
- 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 +56 -11
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +2 -1
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +11 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +10 -0
- package/build/question/questionNames.js.map +1 -1
- package/package.json +8 -8
- package/resource/package.nls.json +163 -80
- package/resource/yaml-schema/v1.3/yaml.schema.json +6 -43
- package/resource/yaml-schema/v1.4/yaml.schema.json +1588 -0
- package/resource/yaml-schema/yaml.schema.json +1588 -0
- 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 -587
- 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.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = 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.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,27 @@ class ProjectTypeOptions {
|
|
|
80
81
|
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"),
|
|
81
82
|
};
|
|
82
83
|
}
|
|
84
|
+
static officeAddin(platform) {
|
|
85
|
+
return {
|
|
86
|
+
id: "office-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
|
+
}
|
|
83
91
|
static copilotPlugin(platform) {
|
|
84
92
|
return {
|
|
85
93
|
id: "copilot-plugin-type",
|
|
86
|
-
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(
|
|
94
|
+
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-copilot-plugin) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
|
|
87
95
|
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.detail"),
|
|
88
96
|
};
|
|
89
97
|
}
|
|
98
|
+
static customCopilot(platform) {
|
|
99
|
+
return {
|
|
100
|
+
id: "custom-copilot-type",
|
|
101
|
+
label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-custom-copilot) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.label")}`,
|
|
102
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.detail"),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
90
105
|
}
|
|
91
106
|
exports.ProjectTypeOptions = ProjectTypeOptions;
|
|
92
107
|
function projectTypeQuestion() {
|
|
@@ -94,7 +109,9 @@ function projectTypeQuestion() {
|
|
|
94
109
|
ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
|
|
95
110
|
ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
|
|
96
111
|
ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
|
|
97
|
-
|
|
112
|
+
featureFlags_1.isOfficeXMLAddinEnabled()
|
|
113
|
+
? ProjectTypeOptions.officeAddin(teamsfx_api_1.Platform.CLI)
|
|
114
|
+
: ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
|
|
98
115
|
];
|
|
99
116
|
return {
|
|
100
117
|
name: questionNames_1.QuestionNames.ProjectType,
|
|
@@ -103,22 +120,12 @@ function projectTypeQuestion() {
|
|
|
103
120
|
staticOptions: staticOptions,
|
|
104
121
|
dynamicOptions: (inputs) => {
|
|
105
122
|
var _a;
|
|
106
|
-
|
|
123
|
+
const staticOptions = [];
|
|
107
124
|
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
|
-
];
|
|
125
|
+
staticOptions.push(ProjectTypeOptions.copilotPlugin(inputs.platform));
|
|
121
126
|
}
|
|
127
|
+
staticOptions.push(ProjectTypeOptions.customCopilot(inputs.platform));
|
|
128
|
+
staticOptions.push(ProjectTypeOptions.bot(inputs.platform), ProjectTypeOptions.tab(inputs.platform), ProjectTypeOptions.me(inputs.platform));
|
|
122
129
|
if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
|
|
123
130
|
const projectType = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
|
|
124
131
|
if (projectType) {
|
|
@@ -126,7 +133,9 @@ function projectTypeQuestion() {
|
|
|
126
133
|
}
|
|
127
134
|
}
|
|
128
135
|
else {
|
|
129
|
-
staticOptions.push(
|
|
136
|
+
staticOptions.push(featureFlags_1.isOfficeXMLAddinEnabled()
|
|
137
|
+
? ProjectTypeOptions.officeAddin(inputs.platform)
|
|
138
|
+
: ProjectTypeOptions.outlookAddin(inputs.platform));
|
|
130
139
|
}
|
|
131
140
|
return staticOptions;
|
|
132
141
|
},
|
|
@@ -135,6 +144,30 @@ function projectTypeQuestion() {
|
|
|
135
144
|
skipSingleOption: true,
|
|
136
145
|
};
|
|
137
146
|
}
|
|
147
|
+
class OfficeAddinCapabilityOptions {
|
|
148
|
+
static word() {
|
|
149
|
+
return {
|
|
150
|
+
id: "word",
|
|
151
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.title"),
|
|
152
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.detail"),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
static excel() {
|
|
156
|
+
return {
|
|
157
|
+
id: "excel",
|
|
158
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.title"),
|
|
159
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.detail"),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
static powerpoint() {
|
|
163
|
+
return {
|
|
164
|
+
id: "powerpoint",
|
|
165
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.title"),
|
|
166
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.detail"),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.OfficeAddinCapabilityOptions = OfficeAddinCapabilityOptions;
|
|
138
171
|
class CapabilityOptions {
|
|
139
172
|
// bot
|
|
140
173
|
static basicBot() {
|
|
@@ -292,11 +325,9 @@ class CapabilityOptions {
|
|
|
292
325
|
detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
|
|
293
326
|
};
|
|
294
327
|
}
|
|
295
|
-
static bots(inputs
|
|
328
|
+
static bots(inputs) {
|
|
296
329
|
return [
|
|
297
330
|
CapabilityOptions.basicBot(),
|
|
298
|
-
CapabilityOptions.aiBot(),
|
|
299
|
-
...(includeAssistant === true ? [CapabilityOptions.aiAssistantBot()] : []),
|
|
300
331
|
CapabilityOptions.notificationBot(),
|
|
301
332
|
CapabilityOptions.commandBot(),
|
|
302
333
|
CapabilityOptions.workflowBot(inputs),
|
|
@@ -311,13 +342,17 @@ class CapabilityOptions {
|
|
|
311
342
|
];
|
|
312
343
|
}
|
|
313
344
|
static dotnetCaps(inputs) {
|
|
314
|
-
|
|
345
|
+
const capabilities = [
|
|
315
346
|
...CapabilityOptions.copilotPlugins(),
|
|
316
|
-
...CapabilityOptions.bots(inputs
|
|
347
|
+
...CapabilityOptions.bots(inputs),
|
|
317
348
|
CapabilityOptions.nonSsoTab(),
|
|
318
349
|
CapabilityOptions.tab(),
|
|
319
350
|
...CapabilityOptions.collectMECaps(),
|
|
320
351
|
];
|
|
352
|
+
if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
|
|
353
|
+
capabilities.push(CapabilityOptions.me());
|
|
354
|
+
}
|
|
355
|
+
return capabilities;
|
|
321
356
|
}
|
|
322
357
|
/**
|
|
323
358
|
* Collect all capabilities for message extension, including dotnet and nodejs.
|
|
@@ -348,7 +383,22 @@ class CapabilityOptions {
|
|
|
348
383
|
return [
|
|
349
384
|
CapabilityOptions.copilotPluginNewApi(),
|
|
350
385
|
CapabilityOptions.copilotPluginApiSpec(),
|
|
351
|
-
CapabilityOptions.copilotPluginOpenAIPlugin(),
|
|
386
|
+
// CapabilityOptions.copilotPluginOpenAIPlugin(),
|
|
387
|
+
];
|
|
388
|
+
}
|
|
389
|
+
static customCopilots() {
|
|
390
|
+
return [
|
|
391
|
+
CapabilityOptions.customCopilotBasic(),
|
|
392
|
+
// CapabilityOptions.customCopilotRag(),
|
|
393
|
+
CapabilityOptions.customCopilotAssistant(),
|
|
394
|
+
];
|
|
395
|
+
}
|
|
396
|
+
static tdpIntegrationCapabilities() {
|
|
397
|
+
// templates that are used by TDP integration only
|
|
398
|
+
return [
|
|
399
|
+
CapabilityOptions.me(),
|
|
400
|
+
CapabilityOptions.botAndMe(),
|
|
401
|
+
CapabilityOptions.nonSsoTabAndBot(),
|
|
352
402
|
];
|
|
353
403
|
}
|
|
354
404
|
/**
|
|
@@ -356,11 +406,23 @@ class CapabilityOptions {
|
|
|
356
406
|
*/
|
|
357
407
|
static staticAll(inputs) {
|
|
358
408
|
const capabilityOptions = [
|
|
359
|
-
...CapabilityOptions.bots(inputs
|
|
409
|
+
...CapabilityOptions.bots(inputs),
|
|
360
410
|
...CapabilityOptions.tabs(),
|
|
361
411
|
...CapabilityOptions.collectMECaps(),
|
|
362
412
|
...CapabilityOptions.copilotPlugins(),
|
|
413
|
+
...CapabilityOptions.customCopilots(),
|
|
414
|
+
...CapabilityOptions.tdpIntegrationCapabilities(),
|
|
363
415
|
];
|
|
416
|
+
if (featureFlags_1.isOfficeXMLAddinEnabled()) {
|
|
417
|
+
capabilityOptions.push(...[
|
|
418
|
+
...CapabilityOptions.officeXMLAddinHostOptionItems(OfficeAddinCapabilityOptions.word().id),
|
|
419
|
+
...CapabilityOptions.officeXMLAddinHostOptionItems(OfficeAddinCapabilityOptions.excel().id),
|
|
420
|
+
...CapabilityOptions.officeXMLAddinHostOptionItems(OfficeAddinCapabilityOptions.powerpoint().id),
|
|
421
|
+
]);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
capabilityOptions.push(...CapabilityOptions.officeAddinItems());
|
|
425
|
+
}
|
|
364
426
|
return capabilityOptions;
|
|
365
427
|
}
|
|
366
428
|
/**
|
|
@@ -368,13 +430,19 @@ class CapabilityOptions {
|
|
|
368
430
|
*/
|
|
369
431
|
static all(inputs) {
|
|
370
432
|
const capabilityOptions = [
|
|
371
|
-
...CapabilityOptions.bots(inputs
|
|
433
|
+
...CapabilityOptions.bots(inputs),
|
|
372
434
|
...CapabilityOptions.tabs(),
|
|
373
435
|
...CapabilityOptions.collectMECaps(),
|
|
436
|
+
...CapabilityOptions.officeAddinItems(),
|
|
374
437
|
];
|
|
375
438
|
if (featureFlags_1.isApiCopilotPluginEnabled()) {
|
|
376
439
|
capabilityOptions.push(...CapabilityOptions.copilotPlugins());
|
|
377
440
|
}
|
|
441
|
+
capabilityOptions.push(...CapabilityOptions.customCopilots());
|
|
442
|
+
if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
|
|
443
|
+
// test templates that are used by TDP integration only
|
|
444
|
+
capabilityOptions.push(...CapabilityOptions.tdpIntegrationCapabilities());
|
|
445
|
+
}
|
|
378
446
|
return capabilityOptions;
|
|
379
447
|
}
|
|
380
448
|
static officeAddinImport() {
|
|
@@ -382,15 +450,20 @@ class CapabilityOptions {
|
|
|
382
450
|
id: "import",
|
|
383
451
|
label: localizeUtils_1.getLocalizedString("core.importAddin.label"),
|
|
384
452
|
detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
|
|
385
|
-
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
|
|
386
453
|
};
|
|
387
454
|
}
|
|
455
|
+
static officeXMLAddinHostOptionItems(host) {
|
|
456
|
+
return projectConfig_1.getOfficeXMLAddinHostProjectOptions(host).map((x) => ({
|
|
457
|
+
id: x.proj,
|
|
458
|
+
label: localizeUtils_1.getLocalizedString(x.title),
|
|
459
|
+
detail: localizeUtils_1.getLocalizedString(x.detail),
|
|
460
|
+
}));
|
|
461
|
+
}
|
|
388
462
|
static officeAddinItems() {
|
|
389
463
|
return officeAddinJsonData.getProjectTemplateNames().map((template) => ({
|
|
390
464
|
id: template,
|
|
391
465
|
label: localizeUtils_1.getLocalizedString(officeAddinJsonData.getProjectDisplayName(template)),
|
|
392
466
|
detail: localizeUtils_1.getLocalizedString(officeAddinJsonData.getProjectDetails(template)),
|
|
393
|
-
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
|
|
394
467
|
}));
|
|
395
468
|
}
|
|
396
469
|
static nonSsoTabAndBot() {
|
|
@@ -442,12 +515,47 @@ class CapabilityOptions {
|
|
|
442
515
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
|
|
443
516
|
};
|
|
444
517
|
}
|
|
518
|
+
// custom copilot
|
|
519
|
+
static customCopilotBasic() {
|
|
520
|
+
return {
|
|
521
|
+
id: "custom-copilot-basic",
|
|
522
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.label"),
|
|
523
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.detail"),
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
static customCopilotRag() {
|
|
527
|
+
return {
|
|
528
|
+
id: "custom-copilot-rag",
|
|
529
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.label"),
|
|
530
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.detail"),
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
static customCopilotAssistant() {
|
|
534
|
+
return {
|
|
535
|
+
id: "custom-copilot-assistant",
|
|
536
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.label"),
|
|
537
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.detail"),
|
|
538
|
+
};
|
|
539
|
+
}
|
|
445
540
|
}
|
|
446
541
|
exports.CapabilityOptions = CapabilityOptions;
|
|
447
542
|
function capabilityQuestion() {
|
|
448
543
|
return {
|
|
449
544
|
name: questionNames_1.QuestionNames.Capabilities,
|
|
450
545
|
title: (inputs) => {
|
|
546
|
+
// Office Add-in Capability
|
|
547
|
+
if (featureFlags_1.isOfficeXMLAddinEnabled()) {
|
|
548
|
+
switch (inputs[questionNames_1.QuestionNames.OfficeAddinCapability]) {
|
|
549
|
+
case ProjectTypeOptions.outlookAddin().id:
|
|
550
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
|
|
551
|
+
case OfficeAddinCapabilityOptions.word().id:
|
|
552
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.create.title");
|
|
553
|
+
case OfficeAddinCapabilityOptions.excel().id:
|
|
554
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.create.title");
|
|
555
|
+
case OfficeAddinCapabilityOptions.powerpoint().id:
|
|
556
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.create.title");
|
|
557
|
+
}
|
|
558
|
+
}
|
|
451
559
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
452
560
|
switch (projectType) {
|
|
453
561
|
case ProjectTypeOptions.bot().id:
|
|
@@ -460,6 +568,8 @@ function capabilityQuestion() {
|
|
|
460
568
|
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
|
|
461
569
|
case ProjectTypeOptions.copilotPlugin().id:
|
|
462
570
|
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.title");
|
|
571
|
+
case ProjectTypeOptions.customCopilot().id:
|
|
572
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.title");
|
|
463
573
|
default:
|
|
464
574
|
return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.titleNew");
|
|
465
575
|
}
|
|
@@ -489,8 +599,9 @@ function capabilityQuestion() {
|
|
|
489
599
|
}
|
|
490
600
|
// nodejs capabilities
|
|
491
601
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
602
|
+
const officeHost = inputs[questionNames_1.QuestionNames.OfficeAddinCapability];
|
|
492
603
|
if (projectType === ProjectTypeOptions.bot().id) {
|
|
493
|
-
return CapabilityOptions.bots(inputs
|
|
604
|
+
return CapabilityOptions.bots(inputs);
|
|
494
605
|
}
|
|
495
606
|
else if (projectType === ProjectTypeOptions.tab().id) {
|
|
496
607
|
return CapabilityOptions.tabs();
|
|
@@ -498,12 +609,21 @@ function capabilityQuestion() {
|
|
|
498
609
|
else if (projectType === ProjectTypeOptions.me().id) {
|
|
499
610
|
return CapabilityOptions.mes();
|
|
500
611
|
}
|
|
501
|
-
else if (projectType === ProjectTypeOptions.outlookAddin().id)
|
|
612
|
+
else if ((!featureFlags_1.isOfficeXMLAddinEnabled() && projectType === ProjectTypeOptions.outlookAddin().id) ||
|
|
613
|
+
(featureFlags_1.isOfficeXMLAddinEnabled() &&
|
|
614
|
+
projectType === ProjectTypeOptions.officeAddin().id &&
|
|
615
|
+
officeHost === ProjectTypeOptions.outlookAddin().id)) {
|
|
502
616
|
return [...CapabilityOptions.officeAddinItems(), CapabilityOptions.officeAddinImport()];
|
|
503
617
|
}
|
|
618
|
+
else if (featureFlags_1.isOfficeXMLAddinEnabled() && projectType === ProjectTypeOptions.officeAddin().id) {
|
|
619
|
+
return CapabilityOptions.officeXMLAddinHostOptionItems(officeHost);
|
|
620
|
+
}
|
|
504
621
|
else if (projectType === ProjectTypeOptions.copilotPlugin().id) {
|
|
505
622
|
return CapabilityOptions.copilotPlugins();
|
|
506
623
|
}
|
|
624
|
+
else if (projectType === ProjectTypeOptions.customCopilot().id) {
|
|
625
|
+
return CapabilityOptions.customCopilots();
|
|
626
|
+
}
|
|
507
627
|
else {
|
|
508
628
|
return CapabilityOptions.all(inputs);
|
|
509
629
|
}
|
|
@@ -512,6 +632,9 @@ function capabilityQuestion() {
|
|
|
512
632
|
if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.copilotPlugin().id) {
|
|
513
633
|
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.placeholder");
|
|
514
634
|
}
|
|
635
|
+
else if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.customCopilot().id) {
|
|
636
|
+
return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.placeholder");
|
|
637
|
+
}
|
|
515
638
|
return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.placeholder");
|
|
516
639
|
},
|
|
517
640
|
forgetLastValue: true,
|
|
@@ -540,14 +663,14 @@ class MeArchitectureOptions {
|
|
|
540
663
|
return {
|
|
541
664
|
id: "new-api",
|
|
542
665
|
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.label"),
|
|
543
|
-
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.
|
|
666
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionNewApiOption.detail"),
|
|
544
667
|
};
|
|
545
668
|
}
|
|
546
669
|
static apiSpec() {
|
|
547
670
|
return {
|
|
548
671
|
id: "api-spec",
|
|
549
672
|
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.label"),
|
|
550
|
-
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.
|
|
673
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionApiSpecOption.detail"),
|
|
551
674
|
};
|
|
552
675
|
}
|
|
553
676
|
static all() {
|
|
@@ -624,6 +747,16 @@ class NotificationTriggerOptions {
|
|
|
624
747
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.detail"),
|
|
625
748
|
};
|
|
626
749
|
}
|
|
750
|
+
static functionsTimerTriggerIsolated() {
|
|
751
|
+
return {
|
|
752
|
+
id: "timer-functions-isolated",
|
|
753
|
+
hostType: HostType.Functions,
|
|
754
|
+
triggers: [NotificationTriggers.TIMER],
|
|
755
|
+
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.label"),
|
|
756
|
+
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.description"),
|
|
757
|
+
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.detail"),
|
|
758
|
+
};
|
|
759
|
+
}
|
|
627
760
|
static functionsHttpAndTimerTrigger() {
|
|
628
761
|
return {
|
|
629
762
|
id: "http-and-timer-functions",
|
|
@@ -634,6 +767,16 @@ class NotificationTriggerOptions {
|
|
|
634
767
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.detail"),
|
|
635
768
|
};
|
|
636
769
|
}
|
|
770
|
+
static functionsHttpAndTimerTriggerIsolated() {
|
|
771
|
+
return {
|
|
772
|
+
id: "http-and-timer-functions-isolated",
|
|
773
|
+
hostType: HostType.Functions,
|
|
774
|
+
triggers: [NotificationTriggers.HTTP, NotificationTriggers.TIMER],
|
|
775
|
+
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.label"),
|
|
776
|
+
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.description"),
|
|
777
|
+
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.detail"),
|
|
778
|
+
};
|
|
779
|
+
}
|
|
637
780
|
static functionsHttpTrigger() {
|
|
638
781
|
return {
|
|
639
782
|
id: "http-functions",
|
|
@@ -644,6 +787,16 @@ class NotificationTriggerOptions {
|
|
|
644
787
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.detail"),
|
|
645
788
|
};
|
|
646
789
|
}
|
|
790
|
+
static functionsHttpTriggerIsolated() {
|
|
791
|
+
return {
|
|
792
|
+
id: "http-functions-isolated",
|
|
793
|
+
hostType: HostType.Functions,
|
|
794
|
+
triggers: [NotificationTriggers.HTTP],
|
|
795
|
+
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.label"),
|
|
796
|
+
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.description"),
|
|
797
|
+
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.detail"),
|
|
798
|
+
};
|
|
799
|
+
}
|
|
647
800
|
static functionsTriggers() {
|
|
648
801
|
return [
|
|
649
802
|
NotificationTriggerOptions.functionsHttpAndTimerTrigger(),
|
|
@@ -887,22 +1040,42 @@ function getLanguageOptions(inputs) {
|
|
|
887
1040
|
}
|
|
888
1041
|
// office addin supports language defined in officeAddinJsonData
|
|
889
1042
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
890
|
-
|
|
1043
|
+
const officeHost = inputs[questionNames_1.QuestionNames.OfficeAddinCapability];
|
|
1044
|
+
if ((!featureFlags_1.isOfficeXMLAddinEnabled() && projectType === ProjectTypeOptions.outlookAddin().id) ||
|
|
1045
|
+
(featureFlags_1.isOfficeXMLAddinEnabled() &&
|
|
1046
|
+
projectType === ProjectTypeOptions.officeAddin().id &&
|
|
1047
|
+
officeHost === ProjectTypeOptions.outlookAddin().id)) {
|
|
891
1048
|
const template = exports.getTemplate(inputs);
|
|
892
1049
|
const supportedTypes = officeAddinJsonData.getSupportedScriptTypes(template);
|
|
893
1050
|
const options = supportedTypes.map((language) => ({ label: language, id: language }));
|
|
894
1051
|
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
895
1052
|
}
|
|
1053
|
+
if (featureFlags_1.isOfficeXMLAddinEnabled() && projectType === ProjectTypeOptions.officeAddin().id) {
|
|
1054
|
+
const officeProject = inputs[questionNames_1.QuestionNames.Capabilities];
|
|
1055
|
+
return officeProject !== "manifest"
|
|
1056
|
+
? projectConfig_1.getOfficeXMLAddinHostProjectLangOptions(officeHost, officeProject)
|
|
1057
|
+
: [{ id: "javascript", label: "JavaScript" }];
|
|
1058
|
+
}
|
|
896
1059
|
const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
|
|
897
|
-
// SPFx only supports typescript
|
|
898
1060
|
if (capabilities === CapabilityOptions.SPFxTab().id) {
|
|
1061
|
+
// SPFx only supports typescript
|
|
899
1062
|
return [{ id: "typescript", label: "TypeScript" }];
|
|
900
1063
|
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
1064
|
+
else if (constants_3.capabilitiesHavePythonOption.includes(capabilities)) {
|
|
1065
|
+
// support python language
|
|
1066
|
+
return [
|
|
1067
|
+
{ id: "javascript", label: "JavaScript" },
|
|
1068
|
+
{ id: "typescript", label: "TypeScript" },
|
|
1069
|
+
{ id: "python", label: "Python" },
|
|
1070
|
+
];
|
|
1071
|
+
}
|
|
1072
|
+
else {
|
|
1073
|
+
// other cases
|
|
1074
|
+
return [
|
|
1075
|
+
{ id: "javascript", label: "JavaScript" },
|
|
1076
|
+
{ id: "typescript", label: "TypeScript" },
|
|
1077
|
+
];
|
|
1078
|
+
}
|
|
906
1079
|
}
|
|
907
1080
|
exports.getLanguageOptions = getLanguageOptions;
|
|
908
1081
|
var ProgrammingLanguage;
|
|
@@ -910,17 +1083,19 @@ var ProgrammingLanguage;
|
|
|
910
1083
|
ProgrammingLanguage["JS"] = "javascript";
|
|
911
1084
|
ProgrammingLanguage["TS"] = "typescript";
|
|
912
1085
|
ProgrammingLanguage["CSharp"] = "csharp";
|
|
1086
|
+
ProgrammingLanguage["PY"] = "python";
|
|
913
1087
|
})(ProgrammingLanguage = exports.ProgrammingLanguage || (exports.ProgrammingLanguage = {}));
|
|
914
1088
|
function programmingLanguageQuestion() {
|
|
915
1089
|
const programmingLanguageQuestion = {
|
|
916
1090
|
name: questionNames_1.QuestionNames.ProgrammingLanguage,
|
|
917
1091
|
cliShortName: "l",
|
|
918
|
-
title: "
|
|
1092
|
+
title: localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.title"),
|
|
919
1093
|
type: "singleSelect",
|
|
920
1094
|
staticOptions: [
|
|
921
1095
|
{ id: ProgrammingLanguage.JS, label: "JavaScript" },
|
|
922
1096
|
{ id: ProgrammingLanguage.TS, label: "TypeScript" },
|
|
923
1097
|
{ id: ProgrammingLanguage.CSharp, label: "C#" },
|
|
1098
|
+
{ id: ProgrammingLanguage.PY, label: "Python" },
|
|
924
1099
|
],
|
|
925
1100
|
dynamicOptions: getLanguageOptions,
|
|
926
1101
|
default: (inputs) => {
|
|
@@ -974,7 +1149,7 @@ function appNameQuestion() {
|
|
|
974
1149
|
type: "text",
|
|
975
1150
|
name: questionNames_1.QuestionNames.AppName,
|
|
976
1151
|
cliShortName: "n",
|
|
977
|
-
title: "
|
|
1152
|
+
title: localizeUtils_1.getLocalizedString("core.question.appName.title"),
|
|
978
1153
|
required: true,
|
|
979
1154
|
default: async (inputs) => {
|
|
980
1155
|
var _a, _b;
|
|
@@ -1028,7 +1203,7 @@ function appNameQuestion() {
|
|
|
1028
1203
|
return undefined;
|
|
1029
1204
|
},
|
|
1030
1205
|
},
|
|
1031
|
-
placeholder: "
|
|
1206
|
+
placeholder: localizeUtils_1.getLocalizedString("core.question.appName.placeholder"),
|
|
1032
1207
|
};
|
|
1033
1208
|
return question;
|
|
1034
1209
|
}
|
|
@@ -1221,6 +1396,24 @@ function getBotOptions(inputs) {
|
|
|
1221
1396
|
}
|
|
1222
1397
|
return options;
|
|
1223
1398
|
}
|
|
1399
|
+
class ApiMessageExtensionAuthOptions {
|
|
1400
|
+
static none() {
|
|
1401
|
+
return {
|
|
1402
|
+
id: "none",
|
|
1403
|
+
label: "None",
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
static apiKey() {
|
|
1407
|
+
return {
|
|
1408
|
+
id: "api-key",
|
|
1409
|
+
label: "API Key",
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
static all() {
|
|
1413
|
+
return [ApiMessageExtensionAuthOptions.none(), ApiMessageExtensionAuthOptions.apiKey()];
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
exports.ApiMessageExtensionAuthOptions = ApiMessageExtensionAuthOptions;
|
|
1224
1417
|
function selectBotIdsQuestion() {
|
|
1225
1418
|
// const statcOptions: OptionItem[] = [];
|
|
1226
1419
|
// statcOptions.push(botOptionItem(false, "000000-0000-0000"));
|
|
@@ -1241,14 +1434,14 @@ function selectBotIdsQuestion() {
|
|
|
1241
1434
|
}
|
|
1242
1435
|
const maximumLengthOfDetailsErrorMessageInInputBox = 90;
|
|
1243
1436
|
function apiSpecLocationQuestion(includeExistingAPIs = true) {
|
|
1244
|
-
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will
|
|
1437
|
+
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will lose correlation id when user accepts the value.
|
|
1245
1438
|
const validationOnAccept = async (input, inputs) => {
|
|
1246
1439
|
try {
|
|
1247
1440
|
if (!inputs) {
|
|
1248
1441
|
throw new Error("inputs is undefined"); // should never happen
|
|
1249
1442
|
}
|
|
1250
1443
|
const context = utils_4.createContextV3();
|
|
1251
|
-
const res = await helper_1.listOperations(context, undefined, input.trim(), inputs
|
|
1444
|
+
const res = await helper_1.listOperations(context, undefined, input.trim(), inputs, includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
|
|
1252
1445
|
if (res.isOk()) {
|
|
1253
1446
|
inputs.supportedApisFromApiSpec = res.value;
|
|
1254
1447
|
}
|
|
@@ -1315,7 +1508,7 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
|
|
|
1315
1508
|
exports.apiSpecLocationQuestion = apiSpecLocationQuestion;
|
|
1316
1509
|
function openAIPluginManifestLocationQuestion() {
|
|
1317
1510
|
// export for unit test
|
|
1318
|
-
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will
|
|
1511
|
+
const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will lose correlation id when user accepts the value.
|
|
1319
1512
|
return {
|
|
1320
1513
|
type: "text",
|
|
1321
1514
|
name: questionNames_1.QuestionNames.OpenAIPluginManifest,
|
|
@@ -1350,7 +1543,7 @@ function openAIPluginManifestLocationQuestion() {
|
|
|
1350
1543
|
}
|
|
1351
1544
|
const context = utils_4.createContextV3();
|
|
1352
1545
|
try {
|
|
1353
|
-
const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation],
|
|
1546
|
+
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);
|
|
1354
1547
|
if (res.isOk()) {
|
|
1355
1548
|
inputs.supportedApisFromApiSpec = res.value;
|
|
1356
1549
|
}
|
|
@@ -1377,19 +1570,50 @@ function openAIPluginManifestLocationQuestion() {
|
|
|
1377
1570
|
};
|
|
1378
1571
|
}
|
|
1379
1572
|
exports.openAIPluginManifestLocationQuestion = openAIPluginManifestLocationQuestion;
|
|
1573
|
+
function apiMessageExtensionAuthQuestion() {
|
|
1574
|
+
return {
|
|
1575
|
+
type: "singleSelect",
|
|
1576
|
+
name: questionNames_1.QuestionNames.ApiMEAuth,
|
|
1577
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiMessageExtensionAuth.title"),
|
|
1578
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
|
|
1579
|
+
cliDescription: "The authentication type for the API.",
|
|
1580
|
+
staticOptions: ApiMessageExtensionAuthOptions.all(),
|
|
1581
|
+
default: ApiMessageExtensionAuthOptions.none().id,
|
|
1582
|
+
};
|
|
1583
|
+
}
|
|
1584
|
+
exports.apiMessageExtensionAuthQuestion = apiMessageExtensionAuthQuestion;
|
|
1380
1585
|
function apiOperationQuestion(includeExistingAPIs = true) {
|
|
1381
1586
|
// export for unit test
|
|
1587
|
+
let placeholder = "";
|
|
1588
|
+
const isPlugin = (inputs) => {
|
|
1589
|
+
return (!!inputs && inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id);
|
|
1590
|
+
};
|
|
1382
1591
|
return {
|
|
1383
1592
|
type: "multiSelect",
|
|
1384
1593
|
name: questionNames_1.QuestionNames.ApiOperation,
|
|
1385
|
-
title:
|
|
1594
|
+
title: (inputs) => {
|
|
1595
|
+
return isPlugin(inputs)
|
|
1596
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.copilotOperation.title")
|
|
1597
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title");
|
|
1598
|
+
},
|
|
1386
1599
|
cliDescription: "Select Operation(s) Teams Can Interact with.",
|
|
1387
1600
|
cliShortName: "o",
|
|
1388
|
-
placeholder:
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1601
|
+
placeholder: (inputs) => {
|
|
1602
|
+
const isPlugin = inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id;
|
|
1603
|
+
if (!includeExistingAPIs) {
|
|
1604
|
+
placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
|
|
1605
|
+
}
|
|
1606
|
+
else if (isPlugin) {
|
|
1607
|
+
placeholder = ""; // TODO: add placeholder for api plugin
|
|
1608
|
+
}
|
|
1609
|
+
else if (featureFlags_1.isApiKeyEnabled()) {
|
|
1610
|
+
placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.apikey.placeholder");
|
|
1611
|
+
}
|
|
1612
|
+
else {
|
|
1613
|
+
placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder");
|
|
1614
|
+
}
|
|
1615
|
+
return placeholder;
|
|
1616
|
+
},
|
|
1393
1617
|
forgetLastValue: true,
|
|
1394
1618
|
staticOptions: [],
|
|
1395
1619
|
validation: {
|
|
@@ -1427,6 +1651,153 @@ function apiOperationQuestion(includeExistingAPIs = true) {
|
|
|
1427
1651
|
};
|
|
1428
1652
|
}
|
|
1429
1653
|
exports.apiOperationQuestion = apiOperationQuestion;
|
|
1654
|
+
class CustomCopilotRagOptions {
|
|
1655
|
+
static customize() {
|
|
1656
|
+
return {
|
|
1657
|
+
id: "custom-copilot-rag-customize",
|
|
1658
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.label"),
|
|
1659
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.detail"),
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
static azureAISearch() {
|
|
1663
|
+
return {
|
|
1664
|
+
id: "custom-copilot-rag-azureAISearch",
|
|
1665
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.label"),
|
|
1666
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.detail"),
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1669
|
+
static customApi() {
|
|
1670
|
+
return {
|
|
1671
|
+
id: "custom-copilot-rag-customApi",
|
|
1672
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.label"),
|
|
1673
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.detail"),
|
|
1674
|
+
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
|
|
1675
|
+
};
|
|
1676
|
+
}
|
|
1677
|
+
static microsoft365() {
|
|
1678
|
+
return {
|
|
1679
|
+
id: "custom-copilot-rag-microsoft365",
|
|
1680
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.label"),
|
|
1681
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.detail"),
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
static all() {
|
|
1685
|
+
return [
|
|
1686
|
+
CustomCopilotRagOptions.customize(),
|
|
1687
|
+
CustomCopilotRagOptions.azureAISearch(),
|
|
1688
|
+
CustomCopilotRagOptions.customApi(),
|
|
1689
|
+
CustomCopilotRagOptions.microsoft365(),
|
|
1690
|
+
];
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
exports.CustomCopilotRagOptions = CustomCopilotRagOptions;
|
|
1694
|
+
class CustomCopilotAssistantOptions {
|
|
1695
|
+
static new() {
|
|
1696
|
+
return {
|
|
1697
|
+
id: "custom-copilot-assistant-new",
|
|
1698
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.label"),
|
|
1699
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.detail"),
|
|
1700
|
+
};
|
|
1701
|
+
}
|
|
1702
|
+
static assistantsApi() {
|
|
1703
|
+
return {
|
|
1704
|
+
id: "custom-copilot-assistant-assistantsApi",
|
|
1705
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.label"),
|
|
1706
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.detail"),
|
|
1707
|
+
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
static all() {
|
|
1711
|
+
return [CustomCopilotAssistantOptions.new(), CustomCopilotAssistantOptions.assistantsApi()];
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
exports.CustomCopilotAssistantOptions = CustomCopilotAssistantOptions;
|
|
1715
|
+
function customCopilotRagQuestion() {
|
|
1716
|
+
return {
|
|
1717
|
+
type: "singleSelect",
|
|
1718
|
+
name: questionNames_1.QuestionNames.CustomCopilotRag,
|
|
1719
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.title"),
|
|
1720
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.placeholder"),
|
|
1721
|
+
staticOptions: CustomCopilotRagOptions.all(),
|
|
1722
|
+
dynamicOptions: () => CustomCopilotRagOptions.all(),
|
|
1723
|
+
default: CustomCopilotRagOptions.customize().id,
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
function customCopilotAssistantQuestion() {
|
|
1727
|
+
return {
|
|
1728
|
+
type: "singleSelect",
|
|
1729
|
+
name: questionNames_1.QuestionNames.CustomCopilotAssistant,
|
|
1730
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.title"),
|
|
1731
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
|
|
1732
|
+
staticOptions: CustomCopilotAssistantOptions.all(),
|
|
1733
|
+
dynamicOptions: () => CustomCopilotAssistantOptions.all(),
|
|
1734
|
+
default: CustomCopilotAssistantOptions.new().id,
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
function llmServiceQuestion() {
|
|
1738
|
+
return {
|
|
1739
|
+
type: "singleSelect",
|
|
1740
|
+
name: questionNames_1.QuestionNames.LLMService,
|
|
1741
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.title"),
|
|
1742
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.placeholder"),
|
|
1743
|
+
staticOptions: [
|
|
1744
|
+
{
|
|
1745
|
+
id: "llm-service-azureOpenAI",
|
|
1746
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
|
|
1747
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
id: "llm-service-openAI",
|
|
1751
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
|
|
1752
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
|
|
1753
|
+
},
|
|
1754
|
+
],
|
|
1755
|
+
dynamicOptions: (inputs) => {
|
|
1756
|
+
const options = [];
|
|
1757
|
+
if (inputs[questionNames_1.QuestionNames.CustomCopilotAssistant] !== "custom-copilot-assistant-assistantsApi") {
|
|
1758
|
+
options.push({
|
|
1759
|
+
id: "llm-service-azureOpenAI",
|
|
1760
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
|
|
1761
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
options.push({
|
|
1765
|
+
id: "llm-service-openAI",
|
|
1766
|
+
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
|
|
1767
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
|
|
1768
|
+
});
|
|
1769
|
+
return options;
|
|
1770
|
+
},
|
|
1771
|
+
skipSingleOption: true,
|
|
1772
|
+
default: "llm-service-azureOpenAI",
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1775
|
+
function openAIKeyQuestion() {
|
|
1776
|
+
return {
|
|
1777
|
+
type: "text",
|
|
1778
|
+
password: true,
|
|
1779
|
+
name: questionNames_1.QuestionNames.OpenAIKey,
|
|
1780
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.title"),
|
|
1781
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.placeholder"),
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1784
|
+
function azureOpenAIKeyQuestion() {
|
|
1785
|
+
return {
|
|
1786
|
+
type: "text",
|
|
1787
|
+
password: true,
|
|
1788
|
+
name: questionNames_1.QuestionNames.AzureOpenAIKey,
|
|
1789
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
|
|
1790
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
function azureOpenAIEndpointQuestion() {
|
|
1794
|
+
return {
|
|
1795
|
+
type: "text",
|
|
1796
|
+
name: questionNames_1.QuestionNames.AzureOpenAIEndpoint,
|
|
1797
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
|
|
1798
|
+
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1430
1801
|
function capabilitySubTree() {
|
|
1431
1802
|
const node = {
|
|
1432
1803
|
data: capabilityQuestion(),
|
|
@@ -1479,9 +1850,11 @@ function capabilitySubTree() {
|
|
|
1479
1850
|
},
|
|
1480
1851
|
{
|
|
1481
1852
|
// office addin other items sub-tree
|
|
1482
|
-
condition:
|
|
1483
|
-
|
|
1484
|
-
|
|
1853
|
+
condition: (inputs) => featureFlags_1.isOfficeXMLAddinEnabled()
|
|
1854
|
+
? false
|
|
1855
|
+
: CapabilityOptions.officeAddinItems()
|
|
1856
|
+
.map((i) => i.id)
|
|
1857
|
+
.includes(inputs[questionNames_1.QuestionNames.Capabilities]),
|
|
1485
1858
|
data: officeAddinHostingQuestion(),
|
|
1486
1859
|
},
|
|
1487
1860
|
{
|
|
@@ -1507,15 +1880,55 @@ function capabilitySubTree() {
|
|
|
1507
1880
|
},
|
|
1508
1881
|
data: apiSpecLocationQuestion(),
|
|
1509
1882
|
},
|
|
1510
|
-
{
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
},
|
|
1883
|
+
// {
|
|
1884
|
+
// condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
|
|
1885
|
+
// data: openAIPluginManifestLocationQuestion(),
|
|
1886
|
+
// },
|
|
1514
1887
|
{
|
|
1515
1888
|
data: apiOperationQuestion(),
|
|
1516
1889
|
},
|
|
1517
1890
|
],
|
|
1518
1891
|
},
|
|
1892
|
+
{
|
|
1893
|
+
condition: (inputs) => {
|
|
1894
|
+
return (featureFlags_1.isApiKeyEnabled() &&
|
|
1895
|
+
(inputs[questionNames_1.QuestionNames.MeArchitectureType] == MeArchitectureOptions.newApi().id ||
|
|
1896
|
+
inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.copilotPluginNewApi().id));
|
|
1897
|
+
},
|
|
1898
|
+
data: apiMessageExtensionAuthQuestion(),
|
|
1899
|
+
},
|
|
1900
|
+
/*
|
|
1901
|
+
{
|
|
1902
|
+
condition: (inputs: Inputs) => {
|
|
1903
|
+
return inputs[QuestionNames.Capabilities] == CapabilityOptions.customCopilotRag().id;
|
|
1904
|
+
},
|
|
1905
|
+
data: customCopilotRagQuestion(),
|
|
1906
|
+
children: [
|
|
1907
|
+
{
|
|
1908
|
+
condition: (inputs: Inputs) => {
|
|
1909
|
+
return (
|
|
1910
|
+
inputs[QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id
|
|
1911
|
+
);
|
|
1912
|
+
},
|
|
1913
|
+
data: apiSpecLocationQuestion(),
|
|
1914
|
+
},
|
|
1915
|
+
{
|
|
1916
|
+
condition: (inputs: Inputs) => {
|
|
1917
|
+
return (
|
|
1918
|
+
inputs[QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id
|
|
1919
|
+
);
|
|
1920
|
+
},
|
|
1921
|
+
data: apiOperationQuestion(),
|
|
1922
|
+
},
|
|
1923
|
+
],
|
|
1924
|
+
},
|
|
1925
|
+
*/
|
|
1926
|
+
{
|
|
1927
|
+
condition: (inputs) => {
|
|
1928
|
+
return (inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.customCopilotAssistant().id);
|
|
1929
|
+
},
|
|
1930
|
+
data: customCopilotAssistantQuestion(),
|
|
1931
|
+
},
|
|
1519
1932
|
{
|
|
1520
1933
|
// programming language
|
|
1521
1934
|
data: programmingLanguageQuestion(),
|
|
@@ -1527,6 +1940,33 @@ function capabilitySubTree() {
|
|
|
1527
1940
|
inputs[questionNames_1.QuestionNames.MeArchitectureType] !== MeArchitectureOptions.apiSpec().id);
|
|
1528
1941
|
},
|
|
1529
1942
|
},
|
|
1943
|
+
{
|
|
1944
|
+
condition: (inputs) => {
|
|
1945
|
+
return (inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotBasic().id ||
|
|
1946
|
+
inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotRag().id ||
|
|
1947
|
+
inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotAssistant().id);
|
|
1948
|
+
},
|
|
1949
|
+
data: llmServiceQuestion(),
|
|
1950
|
+
children: [
|
|
1951
|
+
{
|
|
1952
|
+
condition: { equals: "llm-service-azureOpenAI" },
|
|
1953
|
+
data: azureOpenAIKeyQuestion(),
|
|
1954
|
+
children: [
|
|
1955
|
+
{
|
|
1956
|
+
condition: (inputs) => {
|
|
1957
|
+
var _a;
|
|
1958
|
+
return ((_a = inputs[questionNames_1.QuestionNames.AzureOpenAIKey]) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1959
|
+
},
|
|
1960
|
+
data: azureOpenAIEndpointQuestion(),
|
|
1961
|
+
},
|
|
1962
|
+
],
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
condition: { equals: "llm-service-openAI" },
|
|
1966
|
+
data: openAIKeyQuestion(),
|
|
1967
|
+
},
|
|
1968
|
+
],
|
|
1969
|
+
},
|
|
1530
1970
|
{
|
|
1531
1971
|
// root folder
|
|
1532
1972
|
data: folderQuestion(),
|
|
@@ -1553,6 +1993,21 @@ function createProjectQuestionNode() {
|
|
|
1553
1993
|
data: projectTypeQuestion(),
|
|
1554
1994
|
cliOptionDisabled: "self",
|
|
1555
1995
|
},
|
|
1996
|
+
{
|
|
1997
|
+
condition: (inputs) => featureFlags_1.isOfficeXMLAddinEnabled() &&
|
|
1998
|
+
inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.officeAddin().id,
|
|
1999
|
+
data: {
|
|
2000
|
+
name: questionNames_1.QuestionNames.OfficeAddinCapability,
|
|
2001
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.create.title"),
|
|
2002
|
+
type: "singleSelect",
|
|
2003
|
+
staticOptions: [
|
|
2004
|
+
ProjectTypeOptions.outlookAddin(),
|
|
2005
|
+
OfficeAddinCapabilityOptions.word(),
|
|
2006
|
+
OfficeAddinCapabilityOptions.excel(),
|
|
2007
|
+
OfficeAddinCapabilityOptions.powerpoint(),
|
|
2008
|
+
],
|
|
2009
|
+
},
|
|
2010
|
+
},
|
|
1556
2011
|
capabilitySubTree(),
|
|
1557
2012
|
{
|
|
1558
2013
|
condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
|
|
@@ -1616,9 +2071,6 @@ function createProjectCliHelpNode() {
|
|
|
1616
2071
|
if (!featureFlags_1.isCLIDotNetEnabled()) {
|
|
1617
2072
|
deleteNames.push(questionNames_1.QuestionNames.Runtime);
|
|
1618
2073
|
}
|
|
1619
|
-
if (!featureFlags_1.isApiCopilotPluginEnabled()) {
|
|
1620
|
-
deleteNames.push(questionNames_1.QuestionNames.CopilotPluginExistingApi);
|
|
1621
|
-
}
|
|
1622
2074
|
trimQuestionTreeForCliHelp(node, deleteNames);
|
|
1623
2075
|
return node;
|
|
1624
2076
|
}
|