@microsoft/teamsfx-core 3.0.0-alpha.e2e4e5205.0 → 3.0.0-alpha.e86157a65.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/client/graphClient.d.ts +6 -1
- package/build/client/graphClient.d.ts.map +1 -1
- package/build/client/graphClient.js +49 -18
- package/build/client/graphClient.js.map +1 -1
- package/build/client/teamsDevPortalClient.js +1 -1
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/common/constants.d.ts +1 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/daSpecParser.d.ts +5 -2
- package/build/common/daSpecParser.d.ts.map +1 -1
- package/build/common/daSpecParser.js +89 -35
- package/build/common/daSpecParser.js.map +1 -1
- package/build/common/featureFlags.d.ts +3 -8
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +7 -12
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/kiotaClient.d.ts +2 -2
- package/build/common/kiotaClient.d.ts.map +1 -1
- package/build/common/kiotaClient.js +26 -2
- package/build/common/kiotaClient.js.map +1 -1
- package/build/common/samples.d.ts +1 -1
- package/build/common/samples.js +3 -3
- package/build/common/samples.js.map +1 -1
- package/build/common/telemetry.d.ts +2 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +1 -0
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +14 -7
- package/build/common/wrappedAxiosClient.js.map +1 -1
- package/build/component/configManager/interface.d.ts +11 -0
- package/build/component/configManager/interface.d.ts.map +1 -1
- package/build/component/configManager/interface.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts +1 -0
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +3 -2
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/coordinator/index.d.ts +3 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +36 -7
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/update.d.ts.map +1 -1
- package/build/component/driver/apiKey/update.js +7 -7
- package/build/component/driver/apiKey/update.js.map +1 -1
- package/build/component/driver/devChannel/errors.d.ts +5 -0
- package/build/component/driver/devChannel/errors.d.ts.map +1 -0
- package/build/component/driver/devChannel/errors.js +19 -0
- package/build/component/driver/devChannel/errors.js.map +1 -0
- package/build/component/driver/devChannel/installApp.d.ts.map +1 -1
- package/build/component/driver/devChannel/installApp.js +7 -0
- package/build/component/driver/devChannel/installApp.js.map +1 -1
- package/build/component/driver/oauth/utility/utility.d.ts.map +1 -1
- package/build/component/driver/oauth/utility/utility.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +0 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +1 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +24 -11
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +29 -29
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +1 -1
- package/build/component/driver/typeSpec/compile.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.js +3 -4
- package/build/component/driver/typeSpec/compile.js.map +1 -1
- package/build/component/generator/combinedProject/generator.d.ts +1 -1
- package/build/component/generator/combinedProject/generator.d.ts.map +1 -1
- package/build/component/generator/combinedProject/generator.js +3 -3
- package/build/component/generator/combinedProject/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/helper.js +3 -3
- package/build/component/generator/declarativeAgent/helper.js.map +1 -1
- package/build/component/generator/declarativeAgent/oneDriveSharePointHandler.d.ts +1 -1
- package/build/component/generator/declarativeAgent/oneDriveSharePointHandler.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/oneDriveSharePointHandler.js +7 -2
- package/build/component/generator/declarativeAgent/oneDriveSharePointHandler.js.map +1 -1
- package/build/component/generator/defaultGenerator.d.ts.map +1 -1
- package/build/component/generator/defaultGenerator.js +1 -0
- package/build/component/generator/defaultGenerator.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +33 -1
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/metaOSHelper.d.ts +13 -0
- package/build/component/generator/officeAddin/metaOSHelper.d.ts.map +1 -0
- package/build/component/generator/officeAddin/metaOSHelper.js +236 -0
- package/build/component/generator/officeAddin/metaOSHelper.js.map +1 -0
- package/build/component/generator/openApiSpec/helper.d.ts +1 -1
- package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +19 -3
- package/build/component/generator/openApiSpec/helper.js.map +1 -1
- package/build/component/generator/templates/metadata/agentForTeams.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/agentForTeams.js +0 -6
- package/build/component/generator/templates/metadata/agentForTeams.js.map +1 -1
- package/build/component/generator/templates/metadata/customEngineAgent.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/customEngineAgent.js +24 -0
- package/build/component/generator/templates/metadata/customEngineAgent.js.map +1 -1
- package/build/component/generator/templates/metadata/da.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/da.js +12 -0
- package/build/component/generator/templates/metadata/da.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +3 -1
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +4 -2
- package/build/component/generator/templates/templateNames.js.map +1 -1
- package/build/component/local/constants.d.ts +1 -0
- package/build/component/local/constants.d.ts.map +1 -1
- package/build/component/local/constants.js +1 -0
- package/build/component/local/constants.js.map +1 -1
- package/build/component/m365/serviceConstant.d.ts.map +1 -1
- package/build/component/m365/serviceConstant.js +10 -0
- package/build/component/m365/serviceConstant.js.map +1 -1
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +1 -2
- package/build/component/migrate.js.map +1 -1
- package/build/component/resource/botService/errors.d.ts +1 -1
- package/build/component/resource/botService/errors.d.ts.map +1 -1
- package/build/component/resource/botService/errors.js +2 -2
- package/build/component/resource/botService/errors.js.map +1 -1
- package/build/component/resource/botService/messages.d.ts +1 -1
- package/build/component/resource/botService/messages.d.ts.map +1 -1
- package/build/component/resource/botService/messages.js +6 -1
- package/build/component/resource/botService/messages.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +0 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -1
- package/build/component/utils/metadataGraphPermssion.js +9 -0
- package/build/component/utils/metadataGraphPermssion.js.map +1 -1
- package/build/component/utils/pathUtils.js +2 -2
- package/build/core/FxCore.d.ts +12 -2
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +163 -4
- package/build/core/FxCore.js.map +1 -1
- package/build/core/middleware/retry.d.ts +3 -0
- package/build/core/middleware/retry.d.ts.map +1 -0
- package/build/core/middleware/retry.js +30 -0
- package/build/core/middleware/retry.js.map +1 -0
- package/build/error/common.d.ts +15 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +60 -3
- package/build/error/common.js.map +1 -1
- package/build/index.d.ts +4 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +19 -5
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +2 -206
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +6 -683
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +4 -9
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +171 -563
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +2 -0
- package/build/question/generator.js.map +1 -1
- package/build/question/index.d.ts +2 -0
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +6 -1
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddKnowledgeInputs.d.ts +2 -2
- package/build/question/inputs/AddKnowledgeInputs.d.ts.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +6 -0
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/inputs/RegeneratePluginInputs.d.ts +16 -0
- package/build/question/inputs/RegeneratePluginInputs.d.ts.map +1 -0
- package/build/question/inputs/RegeneratePluginInputs.js +5 -0
- package/build/question/inputs/RegeneratePluginInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +1 -0
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +1 -0
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/AddKnowledgeOptions.js +3 -3
- package/build/question/options/AddKnowledgeOptions.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts.map +1 -1
- package/build/question/options/AddPluginOptions.js +17 -0
- package/build/question/options/AddPluginOptions.js.map +1 -1
- package/build/question/options/CreateProjectOptions.js +1 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/RegeneratePluginOptions.d.ts +10 -0
- package/build/question/options/RegeneratePluginOptions.d.ts.map +1 -0
- package/build/question/options/RegeneratePluginOptions.js +28 -0
- package/build/question/options/RegeneratePluginOptions.js.map +1 -0
- package/build/question/options/index.d.ts +1 -0
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +1 -0
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +2 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +50 -21
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +132 -0
- package/build/question/questionNames.d.ts.map +1 -0
- package/build/question/questionNames.js +138 -0
- package/build/question/questionNames.js.map +1 -0
- package/build/question/scaffold/vs/createRootNode.d.ts +1 -0
- package/build/question/scaffold/vs/createRootNode.d.ts.map +1 -1
- package/build/question/scaffold/vs/createRootNode.js +14 -6
- package/build/question/scaffold/vs/createRootNode.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts +13 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +86 -17
- package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts +4 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.js +15 -11
- package/build/question/scaffold/vsc/ProjectTypeOptions.js.map +1 -1
- package/build/question/scaffold/vsc/agentForTeamsNode.js +11 -11
- package/build/question/scaffold/vsc/agentForTeamsNode.js.map +1 -1
- package/build/question/scaffold/vsc/createFromTdpNode.d.ts +1 -7
- package/build/question/scaffold/vsc/createFromTdpNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/createFromTdpNode.js +11 -45
- package/build/question/scaffold/vsc/createFromTdpNode.js.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.js +30 -12
- package/build/question/scaffold/vsc/createRootNode.js.map +1 -1
- package/build/question/scaffold/vsc/customEngineAgentNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/customEngineAgentNode.js +6 -3
- package/build/question/scaffold/vsc/customEngineAgentNode.js.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.d.ts +2 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.js +20 -22
- package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
- package/build/question/scaffold/vsc/graphConnectorProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/graphConnectorProjectTypeNode.js +0 -1
- package/build/question/scaffold/vsc/graphConnectorProjectTypeNode.js.map +1 -1
- package/build/question/scaffold/vsc/officeAddinProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/officeAddinProjectTypeNode.js +40 -9
- package/build/question/scaffold/vsc/officeAddinProjectTypeNode.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +17 -17
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +25 -42
- package/build/ui/visitor.js.map +1 -1
- package/package.json +8 -5
- package/resource/package.nls.cs.json +215 -183
- package/resource/package.nls.de.json +215 -183
- package/resource/package.nls.es.json +215 -183
- package/resource/package.nls.fr.json +215 -183
- package/resource/package.nls.it.json +215 -183
- package/resource/package.nls.ja.json +215 -183
- package/resource/package.nls.json +55 -39
- package/resource/package.nls.ko.json +215 -183
- package/resource/package.nls.pl.json +208 -176
- package/resource/package.nls.pt-BR.json +215 -183
- package/resource/package.nls.ru.json +214 -182
- package/resource/package.nls.tr.json +215 -183
- package/resource/package.nls.zh-Hans.json +208 -176
- package/resource/package.nls.zh-Hant.json +215 -183
- 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/build/component/driver/typeSpec/error/reProvisionError.d.ts +0 -5
- package/build/component/driver/typeSpec/error/reProvisionError.d.ts.map +0 -1
- package/build/component/driver/typeSpec/error/reProvisionError.js +0 -21
- package/build/component/driver/typeSpec/error/reProvisionError.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.createSampleProjectQuestionNode = exports.
|
|
5
|
+
exports.createSampleProjectQuestionNode = exports.GCConnectionIdQuestion = exports.GCNameQuestion = exports.searchTypeQuestion = exports.webContentQuestion = exports.GCInputQuestion = exports.GCListQuestion = exports.GCItemQuestion = exports.oneDriveSharePointItemConfirmQuestion = exports.oneDriveSharePointItemQuestion = exports.addKnowledgeStartQuestion = exports.pluginApiSpecQuestion = exports.pluginManifestQuestion = exports.selectApiOperationForRegenerateQuestion = exports.selectOpenAPISpecFromPluginQuestion = exports.selectExistingPluginManifestQuestion = exports.apiPluginStartQuestion = exports.azureOpenAIDeploymentNameQuestion = exports.azureOpenAIEndpointQuestion = exports.azureOpenAIKeyQuestion = exports.openAIKeyQuestion = exports.apiOperationQuestion = exports.apiAuthQuestion = exports.apiSpecLocationQuestion = exports.selectOpenApiSpecQuestion = exports.searchOpenAPISpecQueryQuestion = exports.apiSpecTypeSelectQuestion = exports.selectBotIdsQuestion = exports.selectTabsContentUrlQuestion = exports.selectTabWebsiteUrlQuestion = exports.getTabWebsiteOptions = exports.appNameQuestion = exports.getSolutionName = exports.folderQuestion = exports.SPFxImportFolderQuestion = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.SPFxSolutionQuestion = exports.getProjectTypeAndCapability = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const m365_spec_parser_1 = require("@microsoft/m365-spec-parser");
|
|
8
8
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
@@ -12,236 +12,52 @@ const os = tslib_1.__importStar(require("os"));
|
|
|
12
12
|
const path = tslib_1.__importStar(require("path"));
|
|
13
13
|
const constants_1 = require("../common/constants");
|
|
14
14
|
const correlator_1 = require("../common/correlator");
|
|
15
|
-
const
|
|
15
|
+
const daSpecParser_1 = require("../common/daSpecParser");
|
|
16
16
|
const globalVars_1 = require("../common/globalVars");
|
|
17
|
+
const kiotaClient_1 = require("../common/kiotaClient");
|
|
17
18
|
const localizeUtils_1 = require("../common/localizeUtils");
|
|
18
19
|
const samples_1 = require("../common/samples");
|
|
19
20
|
const stringUtils_1 = require("../common/stringUtils");
|
|
20
21
|
const telemetry_1 = require("../common/telemetry");
|
|
21
22
|
const PluginManifestUtils_1 = require("../component/driver/teamsApp/utils/PluginManifestUtils");
|
|
22
23
|
const utils_1 = require("../component/driver/teamsApp/utils/utils");
|
|
24
|
+
const constant_1 = require("../component/generator/constant");
|
|
23
25
|
const helper_1 = require("../component/generator/declarativeAgent/helper");
|
|
24
26
|
const helper_2 = require("../component/generator/openApiSpec/helper");
|
|
25
27
|
const error_1 = require("../component/generator/spfx/error");
|
|
26
28
|
const constants_2 = require("../component/generator/spfx/utils/constants");
|
|
27
29
|
const utils_2 = require("../component/generator/spfx/utils/utils");
|
|
30
|
+
const templateNames_1 = require("../component/generator/templates/templateNames");
|
|
28
31
|
const error_2 = require("../error");
|
|
29
32
|
const constants_3 = require("./constants");
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const kiotaClient_1 = require("../common/kiotaClient");
|
|
33
|
-
const daSpecParser_1 = require("../common/daSpecParser");
|
|
33
|
+
const CapabilityOptions_1 = require("./scaffold/vsc/CapabilityOptions");
|
|
34
|
+
const ProjectTypeOptions_1 = require("./scaffold/vsc/ProjectTypeOptions");
|
|
34
35
|
const utils_3 = require("./utils");
|
|
35
|
-
|
|
36
|
-
const staticOptions = [
|
|
37
|
-
constants_3.ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
|
|
38
|
-
constants_3.ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
|
|
39
|
-
constants_3.ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
|
|
40
|
-
constants_3.ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
|
|
41
|
-
];
|
|
42
|
-
return {
|
|
43
|
-
name: constants_3.QuestionNames.ProjectType,
|
|
44
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.title"),
|
|
45
|
-
type: "singleSelect",
|
|
46
|
-
staticOptions: staticOptions,
|
|
47
|
-
dynamicOptions: (inputs) => {
|
|
48
|
-
var _a;
|
|
49
|
-
const staticOptions = [];
|
|
50
|
-
staticOptions.push(constants_3.ProjectTypeOptions.Agent(inputs.platform));
|
|
51
|
-
if ((0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.NodeJS().id) {
|
|
52
|
-
staticOptions.push(constants_3.ProjectTypeOptions.customCopilot(inputs.platform));
|
|
53
|
-
}
|
|
54
|
-
staticOptions.push(constants_3.ProjectTypeOptions.bot(inputs.platform), constants_3.ProjectTypeOptions.tab(inputs.platform), constants_3.ProjectTypeOptions.me(inputs.platform));
|
|
55
|
-
if (isFromDevPortal(inputs)) {
|
|
56
|
-
const projectType = (_a = getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
|
|
57
|
-
if (projectType) {
|
|
58
|
-
return [projectType];
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else if ((0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.NodeJS().id) {
|
|
62
|
-
if (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.OfficeMetaOS)) {
|
|
63
|
-
staticOptions.push(constants_3.ProjectTypeOptions.officeMetaOS(inputs.platform));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
staticOptions.push(constants_3.ProjectTypeOptions.outlookAddin(inputs.platform));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (inputs.platform === teamsfx_api_1.Platform.VSCode &&
|
|
70
|
-
featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.ChatParticipantUIEntries) &&
|
|
71
|
-
!inputs.teamsAppFromTdp) {
|
|
72
|
-
staticOptions.push(constants_3.ProjectTypeOptions.startWithGithubCopilot());
|
|
73
|
-
}
|
|
74
|
-
return staticOptions;
|
|
75
|
-
},
|
|
76
|
-
placeholder: (0, localizeUtils_1.getLocalizedString)("core.getCreateNewOrFromSampleQuestion.placeholder"),
|
|
77
|
-
forgetLastValue: true,
|
|
78
|
-
skipSingleOption: true,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
exports.projectTypeQuestion = projectTypeQuestion;
|
|
36
|
+
const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
|
|
82
37
|
function getProjectTypeAndCapability(teamsApp) {
|
|
83
38
|
// tab with bot, tab with message extension, tab with bot and message extension
|
|
84
39
|
if ((0, utils_1.needTabAndBotCode)(teamsApp)) {
|
|
85
|
-
return { projectType: "tab-bot-type", templateId:
|
|
40
|
+
return { projectType: "tab-bot-type", templateId: CapabilityOptions_1.TdpCapabilityOptions.nonSsoTabAndBot().id };
|
|
86
41
|
}
|
|
87
42
|
// tab only
|
|
88
43
|
if ((0, utils_1.needTabCode)(teamsApp)) {
|
|
89
|
-
return { projectType: "tab-type", templateId:
|
|
44
|
+
return { projectType: "tab-type", templateId: CapabilityOptions_1.TdpCapabilityOptions.nonSsoTab().id };
|
|
90
45
|
}
|
|
91
46
|
// bot and message extension
|
|
92
47
|
if ((0, utils_1.isBotAndBotBasedMessageExtension)(teamsApp)) {
|
|
93
|
-
return { projectType: "bot-me-type", templateId:
|
|
48
|
+
return { projectType: "bot-me-type", templateId: CapabilityOptions_1.TdpCapabilityOptions.botAndMe().id };
|
|
94
49
|
}
|
|
95
50
|
// bot based message extension
|
|
96
51
|
if ((0, utils_1.isBotBasedMessageExtension)(teamsApp)) {
|
|
97
|
-
return { projectType: "me-type", templateId:
|
|
52
|
+
return { projectType: "me-type", templateId: CapabilityOptions_1.TdpCapabilityOptions.me().id };
|
|
98
53
|
}
|
|
99
54
|
// bot
|
|
100
55
|
if ((0, utils_1.isBot)(teamsApp)) {
|
|
101
|
-
return { projectType: "bot-type", templateId:
|
|
56
|
+
return { projectType: "bot-type", templateId: CapabilityOptions_1.BotCapabilityOptions.basicBot().id };
|
|
102
57
|
}
|
|
103
58
|
return undefined;
|
|
104
59
|
}
|
|
105
60
|
exports.getProjectTypeAndCapability = getProjectTypeAndCapability;
|
|
106
|
-
function isFromDevPortal(inputs) {
|
|
107
|
-
return !!(inputs === null || inputs === void 0 ? void 0 : inputs.teamsAppFromTdp);
|
|
108
|
-
}
|
|
109
|
-
exports.isFromDevPortal = isFromDevPortal;
|
|
110
|
-
function capabilityQuestion() {
|
|
111
|
-
return {
|
|
112
|
-
name: constants_3.QuestionNames.Capabilities,
|
|
113
|
-
title: (inputs) => {
|
|
114
|
-
const projectType = inputs[constants_3.QuestionNames.ProjectType];
|
|
115
|
-
switch (projectType) {
|
|
116
|
-
case constants_3.ProjectTypeOptions.bot().id:
|
|
117
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.bot.title");
|
|
118
|
-
case constants_3.ProjectTypeOptions.tab().id:
|
|
119
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.tab.title");
|
|
120
|
-
case constants_3.ProjectTypeOptions.me().id:
|
|
121
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.messageExtension.title");
|
|
122
|
-
case constants_3.ProjectTypeOptions.outlookAddin().id:
|
|
123
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.outlookAddin.title");
|
|
124
|
-
case constants_3.ProjectTypeOptions.officeMetaOS().id:
|
|
125
|
-
case constants_3.ProjectTypeOptions.Agent().id:
|
|
126
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.title");
|
|
127
|
-
case constants_3.ProjectTypeOptions.customCopilot().id:
|
|
128
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.customCopilot.title");
|
|
129
|
-
default:
|
|
130
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createCapabilityQuestion.titleNew");
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
cliDescription: "Specifies the app feature.",
|
|
134
|
-
cliName: constants_3.CliQuestionName.Capability,
|
|
135
|
-
cliShortName: "c",
|
|
136
|
-
cliChoiceListCommand: "teamsapp list templates",
|
|
137
|
-
type: "singleSelect",
|
|
138
|
-
staticOptions: constants_3.CapabilityOptions.staticAll(),
|
|
139
|
-
dynamicOptions: (inputs) => {
|
|
140
|
-
var _a;
|
|
141
|
-
// from dev portal
|
|
142
|
-
if (isFromDevPortal(inputs)) {
|
|
143
|
-
const capability = (_a = getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.templateId;
|
|
144
|
-
if (capability) {
|
|
145
|
-
return [capability];
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
// dotnet capabilities
|
|
149
|
-
if (inputs.platform === teamsfx_api_1.Platform.VS) {
|
|
150
|
-
return constants_3.CapabilityOptions.dotnetCaps(inputs);
|
|
151
|
-
}
|
|
152
|
-
if (inputs.nonInteractive && inputs.platform === teamsfx_api_1.Platform.CLI) {
|
|
153
|
-
//cli non-interactive mode the choice list is the same as staticOptions
|
|
154
|
-
return constants_3.CapabilityOptions.all(inputs);
|
|
155
|
-
}
|
|
156
|
-
// capabilities if VSC or CLI interactive mode
|
|
157
|
-
const projectType = inputs[constants_3.QuestionNames.ProjectType];
|
|
158
|
-
if (projectType === constants_3.ProjectTypeOptions.bot().id) {
|
|
159
|
-
return constants_3.CapabilityOptions.bots(inputs);
|
|
160
|
-
}
|
|
161
|
-
else if (projectType === constants_3.ProjectTypeOptions.tab().id) {
|
|
162
|
-
return constants_3.CapabilityOptions.tabs();
|
|
163
|
-
}
|
|
164
|
-
else if (projectType === constants_3.ProjectTypeOptions.me().id) {
|
|
165
|
-
return constants_3.CapabilityOptions.mes();
|
|
166
|
-
}
|
|
167
|
-
else if (constants_3.ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
|
|
168
|
-
return constants_3.CapabilityOptions.officeAddinCapabilities(projectType);
|
|
169
|
-
}
|
|
170
|
-
else if (projectType === constants_3.ProjectTypeOptions.Agent().id) {
|
|
171
|
-
return constants_3.CapabilityOptions.agents();
|
|
172
|
-
}
|
|
173
|
-
else if (projectType === constants_3.ProjectTypeOptions.customCopilot().id) {
|
|
174
|
-
return constants_3.CapabilityOptions.customCopilots();
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
return constants_3.CapabilityOptions.all(inputs);
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
placeholder: (inputs) => {
|
|
181
|
-
if (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.Agent().id) {
|
|
182
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder");
|
|
183
|
-
}
|
|
184
|
-
else if (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.customCopilot().id) {
|
|
185
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.customCopilot.placeholder");
|
|
186
|
-
}
|
|
187
|
-
return (0, localizeUtils_1.getLocalizedString)("core.createCapabilityQuestion.placeholder");
|
|
188
|
-
},
|
|
189
|
-
forgetLastValue: true,
|
|
190
|
-
skipSingleOption: (inputs) => {
|
|
191
|
-
const projectType = inputs[constants_3.QuestionNames.ProjectType];
|
|
192
|
-
if (projectType === constants_3.ProjectTypeOptions.Agent().id) {
|
|
193
|
-
return true;
|
|
194
|
-
}
|
|
195
|
-
return isFromDevPortal(inputs);
|
|
196
|
-
},
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
exports.capabilityQuestion = capabilityQuestion;
|
|
200
|
-
function meArchitectureQuestion() {
|
|
201
|
-
return {
|
|
202
|
-
name: constants_3.QuestionNames.MeArchitectureType,
|
|
203
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.meArchitecture.title"),
|
|
204
|
-
cliDescription: "Architecture of Search Based Message Extension.",
|
|
205
|
-
cliShortName: "m",
|
|
206
|
-
type: "singleSelect",
|
|
207
|
-
staticOptions: constants_3.MeArchitectureOptions.staticAll(),
|
|
208
|
-
dynamicOptions: (inputs) => {
|
|
209
|
-
return constants_3.MeArchitectureOptions.all();
|
|
210
|
-
},
|
|
211
|
-
default: constants_3.MeArchitectureOptions.newApi().id,
|
|
212
|
-
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder"),
|
|
213
|
-
forgetLastValue: true,
|
|
214
|
-
skipSingleOption: true,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
exports.meArchitectureQuestion = meArchitectureQuestion;
|
|
218
|
-
function botTriggerQuestion() {
|
|
219
|
-
return {
|
|
220
|
-
name: constants_3.QuestionNames.BotTrigger,
|
|
221
|
-
title: (0, localizeUtils_1.getLocalizedString)("plugins.bot.questionHostTypeTrigger.title"),
|
|
222
|
-
cliDescription: "Specifies the trigger for `Chat Notification Message` app template.",
|
|
223
|
-
cliShortName: "t",
|
|
224
|
-
type: "singleSelect",
|
|
225
|
-
staticOptions: constants_3.NotificationTriggerOptions.all(),
|
|
226
|
-
dynamicOptions: (inputs) => {
|
|
227
|
-
const runtime = (0, constants_3.getRuntime)(inputs);
|
|
228
|
-
return [
|
|
229
|
-
runtime === constants_3.RuntimeOptions.DotNet().id
|
|
230
|
-
? constants_3.NotificationTriggerOptions.appServiceForVS()
|
|
231
|
-
: constants_3.NotificationTriggerOptions.appService(),
|
|
232
|
-
...constants_3.NotificationTriggerOptions.functionsTriggers(),
|
|
233
|
-
];
|
|
234
|
-
},
|
|
235
|
-
default: (inputs) => {
|
|
236
|
-
const runtime = (0, constants_3.getRuntime)(inputs);
|
|
237
|
-
return runtime === constants_3.RuntimeOptions.DotNet().id
|
|
238
|
-
? constants_3.NotificationTriggerOptions.appServiceForVS().id
|
|
239
|
-
: constants_3.NotificationTriggerOptions.appService().id;
|
|
240
|
-
},
|
|
241
|
-
placeholder: (0, localizeUtils_1.getLocalizedString)("plugins.bot.questionHostTypeTrigger.placeholder"),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
exports.botTriggerQuestion = botTriggerQuestion;
|
|
245
61
|
function SPFxSolutionQuestion() {
|
|
246
62
|
return {
|
|
247
63
|
type: "singleSelect",
|
|
@@ -382,71 +198,6 @@ function SPFxImportFolderQuestion(hasDefaultFunc = false) {
|
|
|
382
198
|
};
|
|
383
199
|
}
|
|
384
200
|
exports.SPFxImportFolderQuestion = SPFxImportFolderQuestion;
|
|
385
|
-
function getLanguageOptions(inputs) {
|
|
386
|
-
const runtime = (0, constants_3.getRuntime)(inputs);
|
|
387
|
-
// dotnet runtime only supports C#
|
|
388
|
-
if (runtime === constants_3.RuntimeOptions.DotNet().id) {
|
|
389
|
-
return [{ id: constants_3.ProgrammingLanguage.CSharp, label: "C#" }];
|
|
390
|
-
}
|
|
391
|
-
const capabilities = inputs[constants_3.QuestionNames.Capabilities];
|
|
392
|
-
if (capabilities === constants_3.CapabilityOptions.SPFxTab().id) {
|
|
393
|
-
// SPFx only supports typescript
|
|
394
|
-
return [{ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" }];
|
|
395
|
-
}
|
|
396
|
-
else if (constants_3.capabilitiesHavePythonOption.includes(inputs[capabilities] ? inputs[capabilities] : capabilities) &&
|
|
397
|
-
!(capabilities == constants_3.CapabilityOptions.customCopilotRag().id &&
|
|
398
|
-
inputs[constants_3.CapabilityOptions.customCopilotRag().id] == constants_3.CustomCopilotRagOptions.microsoft365().id)) {
|
|
399
|
-
// support python language
|
|
400
|
-
return [
|
|
401
|
-
{ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
|
|
402
|
-
{ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" },
|
|
403
|
-
{ id: constants_3.ProgrammingLanguage.PY, label: "Python" },
|
|
404
|
-
];
|
|
405
|
-
}
|
|
406
|
-
else {
|
|
407
|
-
// other cases
|
|
408
|
-
return [
|
|
409
|
-
{ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
|
|
410
|
-
{ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" },
|
|
411
|
-
];
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
exports.getLanguageOptions = getLanguageOptions;
|
|
415
|
-
function programmingLanguageQuestion() {
|
|
416
|
-
const programmingLanguageQuestion = {
|
|
417
|
-
name: constants_3.QuestionNames.ProgrammingLanguage,
|
|
418
|
-
cliShortName: "l",
|
|
419
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.title"),
|
|
420
|
-
type: "singleSelect",
|
|
421
|
-
staticOptions: [
|
|
422
|
-
{ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
|
|
423
|
-
{ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" },
|
|
424
|
-
{ id: constants_3.ProgrammingLanguage.CSharp, label: "C#" },
|
|
425
|
-
{ id: constants_3.ProgrammingLanguage.PY, label: "Python" },
|
|
426
|
-
],
|
|
427
|
-
dynamicOptions: getLanguageOptions,
|
|
428
|
-
default: (inputs) => {
|
|
429
|
-
return getLanguageOptions(inputs)[0].id;
|
|
430
|
-
},
|
|
431
|
-
placeholder: (inputs) => {
|
|
432
|
-
const runtime = (0, constants_3.getRuntime)(inputs);
|
|
433
|
-
// dotnet
|
|
434
|
-
if (runtime === constants_3.RuntimeOptions.DotNet().id) {
|
|
435
|
-
return "";
|
|
436
|
-
}
|
|
437
|
-
const capabilities = inputs[constants_3.QuestionNames.Capabilities];
|
|
438
|
-
// SPFx
|
|
439
|
-
if (capabilities === constants_3.CapabilityOptions.SPFxTab().id) {
|
|
440
|
-
return (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.placeholder.spfx");
|
|
441
|
-
}
|
|
442
|
-
// other
|
|
443
|
-
return (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.placeholder");
|
|
444
|
-
},
|
|
445
|
-
skipSingleOption: true,
|
|
446
|
-
};
|
|
447
|
-
return programmingLanguageQuestion;
|
|
448
|
-
}
|
|
449
|
-
exports.programmingLanguageQuestion = programmingLanguageQuestion;
|
|
450
201
|
function folderQuestion() {
|
|
451
202
|
return {
|
|
452
203
|
type: "folder",
|
|
@@ -599,17 +350,6 @@ function sampleSelectQuestion() {
|
|
|
599
350
|
],
|
|
600
351
|
};
|
|
601
352
|
}
|
|
602
|
-
function runtimeQuestion() {
|
|
603
|
-
return {
|
|
604
|
-
type: "singleSelect",
|
|
605
|
-
name: constants_3.QuestionNames.Runtime,
|
|
606
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.getRuntimeQuestion.title"),
|
|
607
|
-
staticOptions: [constants_3.RuntimeOptions.NodeJS(), constants_3.RuntimeOptions.DotNet()],
|
|
608
|
-
default: constants_3.RuntimeOptions.NodeJS().id,
|
|
609
|
-
placeholder: (0, localizeUtils_1.getLocalizedString)("core.getRuntimeQuestion.placeholder"),
|
|
610
|
-
cliHidden: true,
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
353
|
const defaultTabLocalHostUrl = "https://localhost:53000/index.html#/tab";
|
|
614
354
|
const tabContentUrlOptionItem = (tab) => {
|
|
615
355
|
return {
|
|
@@ -635,6 +375,7 @@ function getTabWebsiteOptions(inputs) {
|
|
|
635
375
|
}
|
|
636
376
|
return [];
|
|
637
377
|
}
|
|
378
|
+
exports.getTabWebsiteOptions = getTabWebsiteOptions;
|
|
638
379
|
function selectTabWebsiteUrlQuestion() {
|
|
639
380
|
return {
|
|
640
381
|
type: "multiSelect",
|
|
@@ -736,6 +477,9 @@ function apiSpecTypeSelectQuestion() {
|
|
|
736
477
|
label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.selectOpenAPISpecFromSearch.label"),
|
|
737
478
|
},
|
|
738
479
|
],
|
|
480
|
+
onDidSelection(itemOrId, inputs) {
|
|
481
|
+
inputs[constants_3.QuestionNames.ActionType] = constants_3.ActionStartOptions.apiSpec().id;
|
|
482
|
+
},
|
|
739
483
|
};
|
|
740
484
|
}
|
|
741
485
|
exports.apiSpecTypeSelectQuestion = apiSpecTypeSelectQuestion;
|
|
@@ -935,7 +679,8 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
|
|
|
935
679
|
if (input.length < 1 ||
|
|
936
680
|
(input.length > 10 &&
|
|
937
681
|
inputs[constants_3.QuestionNames.CustomCopilotRag] !== constants_3.CustomCopilotRagOptions.customApi().id &&
|
|
938
|
-
inputs[constants_3.QuestionNames.ProjectType] !==
|
|
682
|
+
inputs[constants_3.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId &&
|
|
683
|
+
inputs[constants_3.QuestionNames.ActionType] !== constants_3.ActionStartOptions.apiSpec().id)) {
|
|
939
684
|
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
|
|
940
685
|
}
|
|
941
686
|
const operations = inputs.supportedApisFromApiSpec;
|
|
@@ -1085,29 +830,18 @@ function azureOpenAIDeploymentNameQuestion() {
|
|
|
1085
830
|
};
|
|
1086
831
|
}
|
|
1087
832
|
exports.azureOpenAIDeploymentNameQuestion = azureOpenAIDeploymentNameQuestion;
|
|
1088
|
-
function declarativeCopilotPluginQuestion() {
|
|
1089
|
-
return {
|
|
1090
|
-
type: "singleSelect",
|
|
1091
|
-
name: constants_3.QuestionNames.WithPlugin,
|
|
1092
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.declarativeCopilot.title"),
|
|
1093
|
-
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.declarativeCopilot.placeholder"),
|
|
1094
|
-
cliDescription: "Whether to add API plugin for your declarative Copilot.",
|
|
1095
|
-
staticOptions: constants_3.DeclarativeCopilotTypeOptions.all(),
|
|
1096
|
-
default: constants_3.DeclarativeCopilotTypeOptions.noPlugin().id,
|
|
1097
|
-
};
|
|
1098
|
-
}
|
|
1099
833
|
function apiPluginStartQuestion(doesProjectExists) {
|
|
1100
834
|
return {
|
|
1101
835
|
type: "singleSelect",
|
|
1102
836
|
name: constants_3.QuestionNames.ActionType,
|
|
1103
837
|
title: (inputs) => {
|
|
1104
|
-
return inputs[constants_3.QuestionNames.Capabilities] ===
|
|
838
|
+
return inputs[constants_3.QuestionNames.Capabilities] === CapabilityOptions_1.DACapabilityOptions.declarativeAgent().id ||
|
|
1105
839
|
doesProjectExists
|
|
1106
840
|
? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addApiPlugin.title")
|
|
1107
841
|
: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.createApiPlugin.title");
|
|
1108
842
|
},
|
|
1109
843
|
placeholder: (inputs) => {
|
|
1110
|
-
return inputs[constants_3.QuestionNames.Capabilities] ===
|
|
844
|
+
return inputs[constants_3.QuestionNames.Capabilities] === CapabilityOptions_1.DACapabilityOptions.declarativeAgent().id ||
|
|
1111
845
|
doesProjectExists
|
|
1112
846
|
? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addApiPlugin.placeholder")
|
|
1113
847
|
: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder");
|
|
@@ -1121,6 +855,146 @@ function apiPluginStartQuestion(doesProjectExists) {
|
|
|
1121
855
|
};
|
|
1122
856
|
}
|
|
1123
857
|
exports.apiPluginStartQuestion = apiPluginStartQuestion;
|
|
858
|
+
function selectExistingPluginManifestQuestion() {
|
|
859
|
+
return {
|
|
860
|
+
type: "singleSelect",
|
|
861
|
+
name: constants_3.QuestionNames.SelectPluginManifest,
|
|
862
|
+
title: (0, localizeUtils_1.getLocalizedString)("core.regenerateQuestion.selectPluginManifestTitle"),
|
|
863
|
+
cliDescription: "Select plugin manifest file.",
|
|
864
|
+
staticOptions: [],
|
|
865
|
+
onDidSelection: (item, inputs) => {
|
|
866
|
+
inputs[constants_3.QuestionNames.SelectPluginId] = item.data;
|
|
867
|
+
},
|
|
868
|
+
dynamicOptions: async (inputs) => {
|
|
869
|
+
var _a, _b, _c;
|
|
870
|
+
if (!inputs.projectPath) {
|
|
871
|
+
throw new Error("projectPath is undefined");
|
|
872
|
+
}
|
|
873
|
+
const options = [];
|
|
874
|
+
const manifestPath = path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName);
|
|
875
|
+
inputs[constants_3.QuestionNames.ManifestPath] = manifestPath;
|
|
876
|
+
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
|
|
877
|
+
if (manifestRes.isErr()) {
|
|
878
|
+
throw manifestRes.error;
|
|
879
|
+
}
|
|
880
|
+
const manifest = manifestRes.value;
|
|
881
|
+
const declarativeAgentPathRelativePath = (_c = (_b = (_a = manifest === null || manifest === void 0 ? void 0 : manifest.copilotAgents) === null || _a === void 0 ? void 0 : _a.declarativeAgents) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.file;
|
|
882
|
+
if (!declarativeAgentPathRelativePath) {
|
|
883
|
+
throw new error_2.DeclarativeAgentPathNotFoundError(manifestPath);
|
|
884
|
+
}
|
|
885
|
+
const declarativeAgentPath = path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, declarativeAgentPathRelativePath);
|
|
886
|
+
const declarativeAgentJson = (await fs_extra_1.default.readJSON(declarativeAgentPath));
|
|
887
|
+
const actions = declarativeAgentJson.actions;
|
|
888
|
+
if (!actions || actions.length === 0) {
|
|
889
|
+
throw new error_2.ActionNotFoundError(declarativeAgentPath);
|
|
890
|
+
}
|
|
891
|
+
for (const action of actions) {
|
|
892
|
+
const actionName = action.file;
|
|
893
|
+
options.push({
|
|
894
|
+
id: path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, actionName),
|
|
895
|
+
label: path.basename(actionName),
|
|
896
|
+
data: action.id,
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
return options;
|
|
900
|
+
},
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
exports.selectExistingPluginManifestQuestion = selectExistingPluginManifestQuestion;
|
|
904
|
+
function selectOpenAPISpecFromPluginQuestion() {
|
|
905
|
+
return {
|
|
906
|
+
type: "singleSelect",
|
|
907
|
+
name: constants_3.QuestionNames.SelectOpenAPISpecFromPlugin,
|
|
908
|
+
title: (0, localizeUtils_1.getLocalizedString)("core.regenerateQuestion.selectOpenAPISpecFromPluginTitle"),
|
|
909
|
+
cliDescription: "Select OpenAPI description document file.",
|
|
910
|
+
staticOptions: [],
|
|
911
|
+
onDidSelection: (itemOrId, inputs) => {
|
|
912
|
+
inputs[constants_3.QuestionNames.ActionType] = constants_3.DeclarativeAgentApiSpecOptionId;
|
|
913
|
+
},
|
|
914
|
+
dynamicOptions: async (inputs) => {
|
|
915
|
+
var _a;
|
|
916
|
+
const pluginPath = inputs[constants_3.QuestionNames.SelectPluginManifest];
|
|
917
|
+
const options = [];
|
|
918
|
+
const pluginManifest = await fs_extra_1.default.readJSON(inputs[constants_3.QuestionNames.SelectPluginManifest]);
|
|
919
|
+
const specUrlMap = new Map();
|
|
920
|
+
(_a = pluginManifest.runtimes) === null || _a === void 0 ? void 0 : _a.forEach((runtime) => {
|
|
921
|
+
if (runtime.spec) {
|
|
922
|
+
const specPath = runtime.spec.url;
|
|
923
|
+
const functions = runtime.run_for_functions;
|
|
924
|
+
if (specUrlMap.has(specPath)) {
|
|
925
|
+
const existingValue = specUrlMap.get(specPath);
|
|
926
|
+
if (existingValue) {
|
|
927
|
+
existingValue.push(...(functions !== null && functions !== void 0 ? functions : []));
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
else {
|
|
931
|
+
specUrlMap.set(specPath, functions !== null && functions !== void 0 ? functions : []);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
specUrlMap.forEach((value, key) => {
|
|
936
|
+
const specAbsolutePath = path.join(path.dirname(pluginPath), key);
|
|
937
|
+
options.push({
|
|
938
|
+
id: specAbsolutePath,
|
|
939
|
+
label: key,
|
|
940
|
+
});
|
|
941
|
+
});
|
|
942
|
+
if (options.length === 0) {
|
|
943
|
+
throw new error_2.SpecNotFoundError(pluginPath);
|
|
944
|
+
}
|
|
945
|
+
return options;
|
|
946
|
+
},
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
exports.selectOpenAPISpecFromPluginQuestion = selectOpenAPISpecFromPluginQuestion;
|
|
950
|
+
function selectApiOperationForRegenerateQuestion() {
|
|
951
|
+
return {
|
|
952
|
+
type: "multiSelect",
|
|
953
|
+
name: constants_3.QuestionNames.ApiOperation,
|
|
954
|
+
title: (0, localizeUtils_1.getLocalizedString)("core.regenerateQuestion.selectApiOperationForRegenerateTitle"),
|
|
955
|
+
cliDescription: "Select operation(s) Copilot can interact with.",
|
|
956
|
+
cliShortName: "o",
|
|
957
|
+
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.plugin.placeholder"),
|
|
958
|
+
forgetLastValue: true,
|
|
959
|
+
staticOptions: [],
|
|
960
|
+
validation: {
|
|
961
|
+
validFunc: (input, inputs) => {
|
|
962
|
+
const operations = inputs.supportedApisFromApiSpec;
|
|
963
|
+
const serverUrls = new Set();
|
|
964
|
+
for (const inputItem of input) {
|
|
965
|
+
const operation = operations.find((op) => op.id === inputItem);
|
|
966
|
+
if (operation) {
|
|
967
|
+
serverUrls.add(operation.data.serverUrl);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
if (serverUrls.size > 1) {
|
|
971
|
+
return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.multipleServer", Array.from(serverUrls).join(", "));
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
},
|
|
975
|
+
dynamicOptions: async (inputs) => {
|
|
976
|
+
const specUrl = inputs[constants_3.QuestionNames.SelectOpenAPISpecFromPlugin] + ".original";
|
|
977
|
+
if (!(await fs_extra_1.default.pathExists(specUrl))) {
|
|
978
|
+
throw new error_2.OriginalSpecNotFoundError(specUrl);
|
|
979
|
+
}
|
|
980
|
+
inputs[constants_3.QuestionNames.ApiSpecLocation] = specUrl;
|
|
981
|
+
const context = (0, globalVars_1.createContext)();
|
|
982
|
+
const res = await (0, helper_2.listOperations)(context, specUrl, inputs, true, false);
|
|
983
|
+
if (res.isOk()) {
|
|
984
|
+
inputs.supportedApisFromApiSpec = res.value;
|
|
985
|
+
}
|
|
986
|
+
else {
|
|
987
|
+
throw res.error;
|
|
988
|
+
}
|
|
989
|
+
if (!inputs.supportedApisFromApiSpec || inputs.supportedApisFromApiSpec.length === 0) {
|
|
990
|
+
throw new error_2.EmptyOptionError(constants_3.QuestionNames.ApiOperation, "question");
|
|
991
|
+
}
|
|
992
|
+
const operations = inputs.supportedApisFromApiSpec;
|
|
993
|
+
return operations;
|
|
994
|
+
},
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
exports.selectApiOperationForRegenerateQuestion = selectApiOperationForRegenerateQuestion;
|
|
1124
998
|
function pluginManifestQuestion() {
|
|
1125
999
|
const correlationId = correlator_1.Correlator.getId();
|
|
1126
1000
|
return {
|
|
@@ -1325,12 +1199,12 @@ function GCInputQuestion() {
|
|
|
1325
1199
|
type: "text",
|
|
1326
1200
|
name: constants_3.QuestionNames.GCInput,
|
|
1327
1201
|
title: (0, localizeUtils_1.getLocalizedString)("core.GCInputQuestion.title"),
|
|
1328
|
-
cliDescription: "a connection ID for
|
|
1202
|
+
cliDescription: "a connection ID for Copilot connector",
|
|
1329
1203
|
forgetLastValue: true,
|
|
1330
1204
|
validation: {
|
|
1331
1205
|
validFunc: (input, inputs) => {
|
|
1332
1206
|
if (!input || input.trim().length === 0) {
|
|
1333
|
-
return "Please enter a connection ID for
|
|
1207
|
+
return "Please enter a connection ID for Copilot connector.";
|
|
1334
1208
|
}
|
|
1335
1209
|
},
|
|
1336
1210
|
},
|
|
@@ -1388,14 +1262,14 @@ function GCNameQuestion() {
|
|
|
1388
1262
|
name: constants_3.QuestionNames.GCName,
|
|
1389
1263
|
title: (0, localizeUtils_1.getLocalizedString)("core.GCNameQuestion.title"),
|
|
1390
1264
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.GCNameQuestion.placeholder"),
|
|
1391
|
-
cliDescription: "a name for
|
|
1265
|
+
cliDescription: "a name for Copilot connector",
|
|
1392
1266
|
forgetLastValue: true,
|
|
1393
1267
|
additionalValidationOnAccept: {
|
|
1394
1268
|
validFunc: (input, inputs) => {
|
|
1395
1269
|
inputs = (0, utils_3.ensureInputs)(inputs);
|
|
1396
1270
|
inputs[constants_3.QuestionNames.ProgrammingLanguage] = constants_3.ProgrammingLanguage.TS;
|
|
1397
|
-
// Set template name and app name for
|
|
1398
|
-
if (inputs[constants_3.QuestionNames.ProjectType] !==
|
|
1271
|
+
// Set template name and app name for Copilot connector Template
|
|
1272
|
+
if (inputs[constants_3.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId) {
|
|
1399
1273
|
inputs[constants_3.QuestionNames.TemplateName] = templateNames_1.TemplateNames.GraphConnector;
|
|
1400
1274
|
inputs[constants_3.QuestionNames.AppName] = input;
|
|
1401
1275
|
}
|
|
@@ -1405,13 +1279,13 @@ function GCNameQuestion() {
|
|
|
1405
1279
|
validation: {
|
|
1406
1280
|
validFunc: (input, inputs) => {
|
|
1407
1281
|
if (!input || input.trim().length === 0) {
|
|
1408
|
-
return "Please enter a
|
|
1282
|
+
return "Please enter a Copilot connector name.";
|
|
1409
1283
|
}
|
|
1410
1284
|
inputs = (0, utils_3.ensureInputs)(inputs);
|
|
1411
|
-
if (inputs[constants_3.QuestionNames.ProjectType] !==
|
|
1412
|
-
//
|
|
1285
|
+
if (inputs[constants_3.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId) {
|
|
1286
|
+
// Copilot connector Template will use the name as app name, which has a minimum length of 2.
|
|
1413
1287
|
if (input.trim().length < 2) {
|
|
1414
|
-
return "Please enter a
|
|
1288
|
+
return "Please enter a Copilot connector name with minimum two characters.";
|
|
1415
1289
|
}
|
|
1416
1290
|
}
|
|
1417
1291
|
return undefined;
|
|
@@ -1426,7 +1300,7 @@ function GCConnectionIdQuestion() {
|
|
|
1426
1300
|
name: constants_3.QuestionNames.GCConnectionId,
|
|
1427
1301
|
title: (0, localizeUtils_1.getLocalizedString)("core.GCConnectionIdQuestion.title"),
|
|
1428
1302
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.GCConnectionIdQuestion.placeholder"),
|
|
1429
|
-
cliDescription: "a connection id for
|
|
1303
|
+
cliDescription: "a connection id for Copilot connector",
|
|
1430
1304
|
forgetLastValue: true,
|
|
1431
1305
|
validation: {
|
|
1432
1306
|
validFunc: (input, inputs) => {
|
|
@@ -1474,272 +1348,6 @@ function GCConnectionIdQuestion() {
|
|
|
1474
1348
|
};
|
|
1475
1349
|
}
|
|
1476
1350
|
exports.GCConnectionIdQuestion = GCConnectionIdQuestion;
|
|
1477
|
-
function capabilitySubTree() {
|
|
1478
|
-
const node = {
|
|
1479
|
-
data: capabilityQuestion(),
|
|
1480
|
-
children: [
|
|
1481
|
-
{
|
|
1482
|
-
// Notification bot trigger sub-tree
|
|
1483
|
-
condition: { equals: constants_3.CapabilityOptions.notificationBot().id },
|
|
1484
|
-
data: botTriggerQuestion(),
|
|
1485
|
-
},
|
|
1486
|
-
{
|
|
1487
|
-
// SPFx sub-tree
|
|
1488
|
-
condition: { equals: constants_3.CapabilityOptions.SPFxTab().id },
|
|
1489
|
-
data: SPFxSolutionQuestion(),
|
|
1490
|
-
children: [
|
|
1491
|
-
{
|
|
1492
|
-
data: { type: "group" },
|
|
1493
|
-
children: [
|
|
1494
|
-
{ data: SPFxPackageSelectQuestion() },
|
|
1495
|
-
{ data: SPFxFrameworkQuestion() },
|
|
1496
|
-
{ data: SPFxWebpartNameQuestion() },
|
|
1497
|
-
],
|
|
1498
|
-
condition: { equals: "new" },
|
|
1499
|
-
},
|
|
1500
|
-
{
|
|
1501
|
-
data: SPFxImportFolderQuestion(),
|
|
1502
|
-
condition: { equals: "import" },
|
|
1503
|
-
},
|
|
1504
|
-
],
|
|
1505
|
-
},
|
|
1506
|
-
{
|
|
1507
|
-
// office addin import sub-tree (capabilities=office-addin-import | outlook-addin-import)
|
|
1508
|
-
condition: {
|
|
1509
|
-
enum: [
|
|
1510
|
-
constants_3.CapabilityOptions.outlookAddinImport().id,
|
|
1511
|
-
constants_3.CapabilityOptions.officeAddinImport().id,
|
|
1512
|
-
],
|
|
1513
|
-
},
|
|
1514
|
-
data: { type: "group", name: constants_3.QuestionNames.OfficeAddinImport },
|
|
1515
|
-
children: [
|
|
1516
|
-
{
|
|
1517
|
-
data: {
|
|
1518
|
-
type: "folder",
|
|
1519
|
-
name: constants_3.QuestionNames.OfficeAddinFolder,
|
|
1520
|
-
title: "Existing add-in project folder",
|
|
1521
|
-
},
|
|
1522
|
-
},
|
|
1523
|
-
{
|
|
1524
|
-
data: {
|
|
1525
|
-
type: "singleFile",
|
|
1526
|
-
name: constants_3.QuestionNames.OfficeAddinManifest,
|
|
1527
|
-
title: "Select import project manifest file",
|
|
1528
|
-
},
|
|
1529
|
-
},
|
|
1530
|
-
],
|
|
1531
|
-
},
|
|
1532
|
-
{
|
|
1533
|
-
// Search ME sub-tree
|
|
1534
|
-
condition: { equals: constants_3.CapabilityOptions.m365SearchMe().id },
|
|
1535
|
-
data: meArchitectureQuestion(),
|
|
1536
|
-
},
|
|
1537
|
-
{
|
|
1538
|
-
condition: { equals: constants_3.CapabilityOptions.declarativeAgent().id },
|
|
1539
|
-
data: declarativeCopilotPluginQuestion(),
|
|
1540
|
-
},
|
|
1541
|
-
{
|
|
1542
|
-
condition: (inputs) => {
|
|
1543
|
-
return (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
|
|
1544
|
-
inputs[constants_3.QuestionNames.WithPlugin] === constants_3.DeclarativeCopilotTypeOptions.withPlugin().id);
|
|
1545
|
-
},
|
|
1546
|
-
data: apiPluginStartQuestion(),
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
condition: (inputs) => {
|
|
1550
|
-
return inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.existingPlugin().id;
|
|
1551
|
-
},
|
|
1552
|
-
data: { type: "group", name: constants_3.QuestionNames.ImportPlugin },
|
|
1553
|
-
children: [
|
|
1554
|
-
{
|
|
1555
|
-
data: pluginManifestQuestion(),
|
|
1556
|
-
},
|
|
1557
|
-
{
|
|
1558
|
-
data: pluginApiSpecQuestion(),
|
|
1559
|
-
},
|
|
1560
|
-
],
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
condition: (inputs) => {
|
|
1564
|
-
return (inputs[constants_3.QuestionNames.MeArchitectureType] == constants_3.MeArchitectureOptions.newApi().id ||
|
|
1565
|
-
inputs[constants_3.QuestionNames.ActionType] == constants_3.ActionStartOptions.newApi().id);
|
|
1566
|
-
},
|
|
1567
|
-
data: apiAuthQuestion(),
|
|
1568
|
-
},
|
|
1569
|
-
{
|
|
1570
|
-
condition: (inputs) => {
|
|
1571
|
-
return inputs[constants_3.QuestionNames.Capabilities] == constants_3.CapabilityOptions.customCopilotRag().id;
|
|
1572
|
-
},
|
|
1573
|
-
data: customCopilotRagQuestion(),
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
// from API spec
|
|
1577
|
-
condition: (inputs) => {
|
|
1578
|
-
return ((inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.apiSpec().id ||
|
|
1579
|
-
inputs[constants_3.QuestionNames.MeArchitectureType] === constants_3.MeArchitectureOptions.apiSpec().id ||
|
|
1580
|
-
inputs[constants_3.QuestionNames.CustomCopilotRag] === constants_3.CustomCopilotRagOptions.customApi().id) &&
|
|
1581
|
-
!(
|
|
1582
|
-
// Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin/declarative copilot from existing spec
|
|
1583
|
-
(featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) &&
|
|
1584
|
-
inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.apiSpec().id &&
|
|
1585
|
-
(inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
|
|
1586
|
-
inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeAgent().id))));
|
|
1587
|
-
},
|
|
1588
|
-
data: { type: "group", name: constants_3.QuestionNames.FromExistingApi },
|
|
1589
|
-
children: [
|
|
1590
|
-
{
|
|
1591
|
-
data: apiSpecLocationQuestion(),
|
|
1592
|
-
},
|
|
1593
|
-
{
|
|
1594
|
-
data: apiOperationQuestion(),
|
|
1595
|
-
condition: (inputs) => {
|
|
1596
|
-
return !inputs[constants_3.QuestionNames.ActionManifestPath];
|
|
1597
|
-
},
|
|
1598
|
-
},
|
|
1599
|
-
],
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
condition: (inputs) => {
|
|
1603
|
-
return (inputs[constants_3.QuestionNames.Capabilities] == constants_3.CapabilityOptions.customCopilotAssistant().id);
|
|
1604
|
-
},
|
|
1605
|
-
data: customCopilotAssistantQuestion(),
|
|
1606
|
-
},
|
|
1607
|
-
{
|
|
1608
|
-
// programming language
|
|
1609
|
-
data: programmingLanguageQuestion(),
|
|
1610
|
-
condition: (inputs) => {
|
|
1611
|
-
return ((!!inputs[constants_3.QuestionNames.Capabilities] &&
|
|
1612
|
-
inputs[constants_3.QuestionNames.WithPlugin] !== constants_3.DeclarativeCopilotTypeOptions.noPlugin().id &&
|
|
1613
|
-
inputs[constants_3.QuestionNames.ActionType] !== constants_3.ActionStartOptions.apiSpec().id &&
|
|
1614
|
-
inputs[constants_3.QuestionNames.ActionType] !== constants_3.ActionStartOptions.existingPlugin().id &&
|
|
1615
|
-
inputs[constants_3.QuestionNames.MeArchitectureType] !== constants_3.MeArchitectureOptions.apiSpec().id &&
|
|
1616
|
-
inputs[constants_3.QuestionNames.ProjectType] !== constants_3.ProjectTypeOptions.officeMetaOS().id &&
|
|
1617
|
-
inputs[constants_3.QuestionNames.ProjectType] !== constants_3.ProjectTypeOptions.outlookAddin().id) ||
|
|
1618
|
-
(0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.DotNet().id);
|
|
1619
|
-
},
|
|
1620
|
-
},
|
|
1621
|
-
{
|
|
1622
|
-
condition: (inputs) => {
|
|
1623
|
-
return (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.customCopilotBasic().id ||
|
|
1624
|
-
inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.customCopilotRag().id ||
|
|
1625
|
-
inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.customCopilotAssistant().id ||
|
|
1626
|
-
inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.customCopilotWeather().id);
|
|
1627
|
-
},
|
|
1628
|
-
data: llmServiceQuestion(),
|
|
1629
|
-
children: [
|
|
1630
|
-
{
|
|
1631
|
-
condition: { equals: "llm-service-azure-openai" },
|
|
1632
|
-
data: azureOpenAIKeyQuestion(),
|
|
1633
|
-
children: [
|
|
1634
|
-
{
|
|
1635
|
-
condition: (inputs) => {
|
|
1636
|
-
var _a;
|
|
1637
|
-
return ((_a = inputs[constants_3.QuestionNames.AzureOpenAIKey]) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1638
|
-
},
|
|
1639
|
-
data: azureOpenAIEndpointQuestion(),
|
|
1640
|
-
children: [
|
|
1641
|
-
{
|
|
1642
|
-
condition: (inputs) => {
|
|
1643
|
-
var _a;
|
|
1644
|
-
return ((_a = inputs[constants_3.QuestionNames.AzureOpenAIEndpoint]) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1645
|
-
},
|
|
1646
|
-
data: azureOpenAIDeploymentNameQuestion(),
|
|
1647
|
-
},
|
|
1648
|
-
],
|
|
1649
|
-
},
|
|
1650
|
-
],
|
|
1651
|
-
},
|
|
1652
|
-
{
|
|
1653
|
-
condition: { equals: "llm-service-openai" },
|
|
1654
|
-
data: openAIKeyQuestion(),
|
|
1655
|
-
},
|
|
1656
|
-
],
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
// root folder
|
|
1660
|
-
data: folderQuestion(),
|
|
1661
|
-
condition: (inputs) => {
|
|
1662
|
-
// Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin/declarative copilot from existing spec 3. No plugin manifest path
|
|
1663
|
-
return !(featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) &&
|
|
1664
|
-
inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.apiSpec().id &&
|
|
1665
|
-
(inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
|
|
1666
|
-
inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeAgent().id) &&
|
|
1667
|
-
!inputs[constants_3.QuestionNames.ActionManifestPath]);
|
|
1668
|
-
},
|
|
1669
|
-
},
|
|
1670
|
-
{
|
|
1671
|
-
// app name
|
|
1672
|
-
data: appNameQuestion(),
|
|
1673
|
-
condition: (inputs) => {
|
|
1674
|
-
// Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin/declarative copilot from existing spec 3. No plugin manifest path
|
|
1675
|
-
return !(featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) &&
|
|
1676
|
-
inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.apiSpec().id &&
|
|
1677
|
-
(inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
|
|
1678
|
-
inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeAgent().id) &&
|
|
1679
|
-
!inputs[constants_3.QuestionNames.ActionManifestPath]);
|
|
1680
|
-
},
|
|
1681
|
-
},
|
|
1682
|
-
],
|
|
1683
|
-
condition: (inputs) => {
|
|
1684
|
-
return inputs[constants_3.QuestionNames.ProjectType] !== constants_3.ProjectTypeOptions.startWithGithubCopilot().id;
|
|
1685
|
-
},
|
|
1686
|
-
};
|
|
1687
|
-
return node;
|
|
1688
|
-
}
|
|
1689
|
-
exports.capabilitySubTree = capabilitySubTree;
|
|
1690
|
-
function createProjectQuestionNode() {
|
|
1691
|
-
const createProjectQuestion = {
|
|
1692
|
-
data: { type: "group" },
|
|
1693
|
-
children: [
|
|
1694
|
-
{
|
|
1695
|
-
condition: (inputs) => featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CLIDotNet) &&
|
|
1696
|
-
teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
|
|
1697
|
-
data: runtimeQuestion(),
|
|
1698
|
-
},
|
|
1699
|
-
{
|
|
1700
|
-
condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.VSCode || inputs.platform === teamsfx_api_1.Platform.CLI,
|
|
1701
|
-
data: projectTypeQuestion(),
|
|
1702
|
-
cliOptionDisabled: "self",
|
|
1703
|
-
},
|
|
1704
|
-
capabilitySubTree(),
|
|
1705
|
-
{
|
|
1706
|
-
condition: (inputs) => inputs.teamsAppFromTdp && (0, utils_1.isPersonalApp)(inputs.teamsAppFromTdp),
|
|
1707
|
-
data: { type: "group", name: constants_3.QuestionNames.RepalceTabUrl },
|
|
1708
|
-
cliOptionDisabled: "all",
|
|
1709
|
-
inputsDisabled: "all",
|
|
1710
|
-
children: [
|
|
1711
|
-
{
|
|
1712
|
-
condition: (inputs) => {
|
|
1713
|
-
var _a;
|
|
1714
|
-
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.websiteUrl)) || [])
|
|
1715
|
-
.length > 0;
|
|
1716
|
-
},
|
|
1717
|
-
data: selectTabWebsiteUrlQuestion(),
|
|
1718
|
-
},
|
|
1719
|
-
{
|
|
1720
|
-
condition: (inputs) => {
|
|
1721
|
-
var _a;
|
|
1722
|
-
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.contentUrl)) || [])
|
|
1723
|
-
.length > 0;
|
|
1724
|
-
},
|
|
1725
|
-
data: (0, exports.selectTabsContentUrlQuestion)(),
|
|
1726
|
-
},
|
|
1727
|
-
],
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
condition: (inputs) => {
|
|
1731
|
-
const appDef = inputs.teamsAppFromTdp;
|
|
1732
|
-
return appDef && (0, utils_1.needBotCode)(appDef);
|
|
1733
|
-
},
|
|
1734
|
-
data: selectBotIdsQuestion(),
|
|
1735
|
-
cliOptionDisabled: "all",
|
|
1736
|
-
inputsDisabled: "all",
|
|
1737
|
-
},
|
|
1738
|
-
],
|
|
1739
|
-
};
|
|
1740
|
-
return createProjectQuestion;
|
|
1741
|
-
}
|
|
1742
|
-
exports.createProjectQuestionNode = createProjectQuestionNode;
|
|
1743
1351
|
function createSampleProjectQuestionNode() {
|
|
1744
1352
|
return {
|
|
1745
1353
|
data: sampleSelectQuestion(),
|