@microsoft/teamsfx-core 3.1.4 → 3.1.5-alpha.3256bba3fe.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.
Files changed (238) hide show
  1. package/README.md +4 -0
  2. package/build/common/featureFlags.d.ts +5 -0
  3. package/build/common/featureFlags.d.ts.map +1 -1
  4. package/build/common/featureFlags.js +5 -0
  5. package/build/common/featureFlags.js.map +1 -1
  6. package/build/common/telemetry.d.ts +2 -1
  7. package/build/common/telemetry.d.ts.map +1 -1
  8. package/build/common/telemetry.js +1 -0
  9. package/build/common/telemetry.js.map +1 -1
  10. package/build/common/templates-config.json +2 -2
  11. package/build/common/wrappedAxiosClient.d.ts +5 -0
  12. package/build/common/wrappedAxiosClient.d.ts.map +1 -1
  13. package/build/common/wrappedAxiosClient.js +95 -4
  14. package/build/common/wrappedAxiosClient.js.map +1 -1
  15. package/build/component/configManager/actionInjector.d.ts +1 -1
  16. package/build/component/configManager/actionInjector.d.ts.map +1 -1
  17. package/build/component/configManager/actionInjector.js +2 -2
  18. package/build/component/configManager/actionInjector.js.map +1 -1
  19. package/build/component/driver/copilotAgent/publish.d.ts.map +1 -1
  20. package/build/component/driver/copilotAgent/publish.js +1 -1
  21. package/build/component/driver/copilotAgent/publish.js.map +1 -1
  22. package/build/component/driver/dcr/create.d.ts.map +1 -1
  23. package/build/component/driver/dcr/create.js +47 -14
  24. package/build/component/driver/dcr/create.js.map +1 -1
  25. package/build/component/driver/dcr/interface/createDcrArgs.d.ts +4 -1
  26. package/build/component/driver/dcr/interface/createDcrArgs.d.ts.map +1 -1
  27. package/build/component/driver/index.d.ts +0 -1
  28. package/build/component/driver/index.d.ts.map +1 -1
  29. package/build/component/driver/index.js +0 -1
  30. package/build/component/driver/index.js.map +1 -1
  31. package/build/component/driver/m365/acquire.d.ts.map +1 -1
  32. package/build/component/driver/m365/acquire.js +2 -2
  33. package/build/component/driver/m365/acquire.js.map +1 -1
  34. package/build/component/driver/oauth/create.d.ts.map +1 -1
  35. package/build/component/driver/oauth/create.js +16 -2
  36. package/build/component/driver/oauth/create.js.map +1 -1
  37. package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.d.ts +5 -0
  38. package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.d.ts.map +1 -0
  39. package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.js +13 -0
  40. package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.js.map +1 -0
  41. package/build/component/driver/oauth/interface/createOauthArgs.d.ts +1 -0
  42. package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -1
  43. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +1 -0
  44. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -1
  45. package/build/component/driver/oauth/update.d.ts.map +1 -1
  46. package/build/component/driver/oauth/update.js +26 -4
  47. package/build/component/driver/oauth/update.js.map +1 -1
  48. package/build/component/driver/oauth/utility/supportedAccountTypes.d.ts +6 -0
  49. package/build/component/driver/oauth/utility/supportedAccountTypes.d.ts.map +1 -0
  50. package/build/component/driver/oauth/utility/supportedAccountTypes.js +31 -0
  51. package/build/component/driver/oauth/utility/supportedAccountTypes.js.map +1 -0
  52. package/build/component/driver/teamsApp/constants.d.ts +5 -0
  53. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  54. package/build/component/driver/teamsApp/constants.js +5 -0
  55. package/build/component/driver/teamsApp/constants.js.map +1 -1
  56. package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts +5 -2
  57. package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts.map +1 -1
  58. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +6 -0
  59. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
  60. package/build/component/driver/teamsApp/interfaces/OauthRegistration.js +5 -1
  61. package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
  62. package/build/component/generator/generatorProvider.d.ts.map +1 -1
  63. package/build/component/generator/generatorProvider.js +0 -3
  64. package/build/component/generator/generatorProvider.js.map +1 -1
  65. package/build/component/generator/templates/templateNames.d.ts +1 -1
  66. package/build/component/generator/templates/templateNames.d.ts.map +1 -1
  67. package/build/component/m365/packageService.d.ts +4 -3
  68. package/build/component/m365/packageService.d.ts.map +1 -1
  69. package/build/component/m365/packageService.js +34 -30
  70. package/build/component/m365/packageService.js.map +1 -1
  71. package/build/component/m365/serviceConstant.d.ts.map +1 -1
  72. package/build/component/m365/serviceConstant.js +5 -0
  73. package/build/component/m365/serviceConstant.js.map +1 -1
  74. package/build/component/m365/skills/graphSkillFileStore.d.ts +14 -0
  75. package/build/component/m365/skills/graphSkillFileStore.d.ts.map +1 -0
  76. package/build/component/m365/skills/graphSkillFileStore.js +164 -0
  77. package/build/component/m365/skills/graphSkillFileStore.js.map +1 -0
  78. package/build/component/m365/skills/incrementalSkillUpload.d.ts +6 -0
  79. package/build/component/m365/skills/incrementalSkillUpload.d.ts.map +1 -0
  80. package/build/component/m365/skills/incrementalSkillUpload.js +70 -0
  81. package/build/component/m365/skills/incrementalSkillUpload.js.map +1 -0
  82. package/build/component/m365/skills/skillDirectoryClient.d.ts +12 -0
  83. package/build/component/m365/skills/skillDirectoryClient.d.ts.map +1 -0
  84. package/build/component/m365/skills/skillDirectoryClient.js +150 -0
  85. package/build/component/m365/skills/skillDirectoryClient.js.map +1 -0
  86. package/build/component/m365/skills/skillFileSync.d.ts +35 -0
  87. package/build/component/m365/skills/skillFileSync.d.ts.map +1 -0
  88. package/build/component/m365/skills/skillFileSync.js +256 -0
  89. package/build/component/m365/skills/skillFileSync.js.map +1 -0
  90. package/build/component/m365/skills/skillPackage.d.ts +40 -0
  91. package/build/component/m365/skills/skillPackage.d.ts.map +1 -0
  92. package/build/component/m365/skills/skillPackage.js +471 -0
  93. package/build/component/m365/skills/skillPackage.js.map +1 -0
  94. package/build/component/m365/skills/skillRequest.d.ts +7 -0
  95. package/build/component/m365/skills/skillRequest.d.ts.map +1 -0
  96. package/build/component/m365/skills/skillRequest.js +91 -0
  97. package/build/component/m365/skills/skillRequest.js.map +1 -0
  98. package/build/component/utils/mcpAuthScaffolder.d.ts +5 -20
  99. package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
  100. package/build/component/utils/mcpAuthScaffolder.js +9 -24
  101. package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
  102. package/build/core/FxCore.d.ts +2 -4
  103. package/build/core/FxCore.d.ts.map +1 -1
  104. package/build/core/FxCore.js +7 -22
  105. package/build/core/FxCore.js.map +1 -1
  106. package/build/question/create.d.ts +0 -6
  107. package/build/question/create.d.ts.map +1 -1
  108. package/build/question/create.js +119 -281
  109. package/build/question/create.js.map +1 -1
  110. package/build/question/generator.js +0 -2
  111. package/build/question/generator.js.map +1 -1
  112. package/build/question/index.d.ts +0 -1
  113. package/build/question/index.d.ts.map +1 -1
  114. package/build/question/index.js +0 -3
  115. package/build/question/index.js.map +1 -1
  116. package/build/question/inputs/index.d.ts +0 -1
  117. package/build/question/inputs/index.d.ts.map +1 -1
  118. package/build/question/inputs/index.js +0 -1
  119. package/build/question/inputs/index.js.map +1 -1
  120. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  121. package/build/question/options/CreateProjectOptions.js +0 -1
  122. package/build/question/options/CreateProjectOptions.js.map +1 -1
  123. package/build/question/options/index.d.ts +0 -1
  124. package/build/question/options/index.d.ts.map +1 -1
  125. package/build/question/options/index.js +0 -1
  126. package/build/question/options/index.js.map +1 -1
  127. package/build/question/other.d.ts +0 -1
  128. package/build/question/other.d.ts.map +1 -1
  129. package/build/question/other.js +158 -214
  130. package/build/question/other.js.map +1 -1
  131. package/build/question/scaffold/vsc/CapabilityOptions.d.ts +0 -1
  132. package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
  133. package/build/question/scaffold/vsc/CapabilityOptions.js +0 -9
  134. package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
  135. package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
  136. package/build/question/scaffold/vsc/teamsProjectTypeNode.js +0 -24
  137. package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
  138. package/build/v4/mcp/mcpAuthAction.d.ts +0 -1
  139. package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -1
  140. package/build/v4/mcp/mcpAuthAction.js +5 -7
  141. package/build/v4/mcp/mcpAuthAction.js.map +1 -1
  142. package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -1
  143. package/build/v4/mcp/mcpAuthScaffold.js +4 -12
  144. package/build/v4/mcp/mcpAuthScaffold.js.map +1 -1
  145. package/package.json +11 -8
  146. package/resource/package.nls.cs.json +72 -68
  147. package/resource/package.nls.de.json +72 -68
  148. package/resource/package.nls.es.json +72 -68
  149. package/resource/package.nls.fr.json +72 -68
  150. package/resource/package.nls.it.json +72 -68
  151. package/resource/package.nls.ja.json +72 -68
  152. package/resource/package.nls.json +15 -58
  153. package/resource/package.nls.ko.json +72 -68
  154. package/resource/package.nls.pl.json +72 -68
  155. package/resource/package.nls.pt-BR.json +72 -68
  156. package/resource/package.nls.ru.json +72 -68
  157. package/resource/package.nls.tr.json +72 -68
  158. package/resource/package.nls.zh-Hans.json +72 -68
  159. package/resource/package.nls.zh-Hant.json +72 -68
  160. package/resource/yaml-schema/v1.13/yaml.schema.json +71 -33
  161. package/resource/yaml-schema/yaml.schema.json +71 -33
  162. package/templates/fallback/common.zip +0 -0
  163. package/templates/fallback/csharp.zip +0 -0
  164. package/templates/fallback/js.zip +0 -0
  165. package/templates/fallback/python.zip +0 -0
  166. package/templates/fallback/ts.zip +0 -0
  167. package/templates/metadata.zip +0 -0
  168. package/templates/v4/floor.json +1 -1
  169. package/templates/v4/templates-metadata.zip +0 -0
  170. package/templates/v4/templates.zip +0 -0
  171. package/build/common/treatmentVariables.d.ts +0 -5
  172. package/build/common/treatmentVariables.d.ts.map +0 -1
  173. package/build/common/treatmentVariables.js +0 -10
  174. package/build/common/treatmentVariables.js.map +0 -1
  175. package/build/component/driver/add/addWebPart.d.ts +0 -12
  176. package/build/component/driver/add/addWebPart.d.ts.map +0 -1
  177. package/build/component/driver/add/addWebPart.js +0 -109
  178. package/build/component/driver/add/addWebPart.js.map +0 -1
  179. package/build/component/driver/add/error/noConfigurationError.d.ts +0 -5
  180. package/build/component/driver/add/error/noConfigurationError.d.ts.map +0 -1
  181. package/build/component/driver/add/error/noConfigurationError.js +0 -22
  182. package/build/component/driver/add/error/noConfigurationError.js.map +0 -1
  183. package/build/component/driver/add/interface/AddWebPartArgs.d.ts +0 -27
  184. package/build/component/driver/add/interface/AddWebPartArgs.d.ts.map +0 -1
  185. package/build/component/driver/add/interface/AddWebPartArgs.js +0 -5
  186. package/build/component/driver/add/interface/AddWebPartArgs.js.map +0 -1
  187. package/build/component/driver/add/utility/constants.d.ts +0 -8
  188. package/build/component/driver/add/utility/constants.d.ts.map +0 -1
  189. package/build/component/driver/add/utility/constants.js +0 -14
  190. package/build/component/driver/add/utility/constants.js.map +0 -1
  191. package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts +0 -4
  192. package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts.map +0 -1
  193. package/build/component/generator/spfx/depsChecker/dependencyChecker.js +0 -5
  194. package/build/component/generator/spfx/depsChecker/dependencyChecker.js.map +0 -1
  195. package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts +0 -20
  196. package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +0 -1
  197. package/build/component/generator/spfx/depsChecker/generatorChecker.js +0 -129
  198. package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +0 -1
  199. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts +0 -20
  200. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +0 -1
  201. package/build/component/generator/spfx/depsChecker/yoChecker.js +0 -143
  202. package/build/component/generator/spfx/depsChecker/yoChecker.js.map +0 -1
  203. package/build/component/generator/spfx/error.d.ts +0 -15
  204. package/build/component/generator/spfx/error.d.ts.map +0 -1
  205. package/build/component/generator/spfx/error.js +0 -124
  206. package/build/component/generator/spfx/error.js.map +0 -1
  207. package/build/component/generator/spfx/spfxGenerator.d.ts +0 -30
  208. package/build/component/generator/spfx/spfxGenerator.d.ts.map +0 -1
  209. package/build/component/generator/spfx/spfxGenerator.js +0 -684
  210. package/build/component/generator/spfx/spfxGenerator.js.map +0 -1
  211. package/build/component/generator/spfx/utils/constants.d.ts +0 -45
  212. package/build/component/generator/spfx/utils/constants.d.ts.map +0 -1
  213. package/build/component/generator/spfx/utils/constants.js +0 -56
  214. package/build/component/generator/spfx/utils/constants.js.map +0 -1
  215. package/build/component/generator/spfx/utils/progress-helper.d.ts +0 -9
  216. package/build/component/generator/spfx/utils/progress-helper.d.ts.map +0 -1
  217. package/build/component/generator/spfx/utils/progress-helper.js +0 -22
  218. package/build/component/generator/spfx/utils/progress-helper.js.map +0 -1
  219. package/build/component/generator/spfx/utils/telemetry-helper.d.ts +0 -14
  220. package/build/component/generator/spfx/utils/telemetry-helper.d.ts.map +0 -1
  221. package/build/component/generator/spfx/utils/telemetry-helper.js +0 -31
  222. package/build/component/generator/spfx/utils/telemetry-helper.js.map +0 -1
  223. package/build/component/generator/spfx/utils/telemetryEvents.d.ts +0 -20
  224. package/build/component/generator/spfx/utils/telemetryEvents.d.ts.map +0 -1
  225. package/build/component/generator/spfx/utils/telemetryEvents.js +0 -27
  226. package/build/component/generator/spfx/utils/telemetryEvents.js.map +0 -1
  227. package/build/component/generator/spfx/utils/utils.d.ts +0 -19
  228. package/build/component/generator/spfx/utils/utils.d.ts.map +0 -1
  229. package/build/component/generator/spfx/utils/utils.js +0 -184
  230. package/build/component/generator/spfx/utils/utils.js.map +0 -1
  231. package/build/question/inputs/SPFxAddWebpartInputs.d.ts +0 -20
  232. package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +0 -1
  233. package/build/question/inputs/SPFxAddWebpartInputs.js +0 -5
  234. package/build/question/inputs/SPFxAddWebpartInputs.js.map +0 -1
  235. package/build/question/options/SPFxAddWebpartOptions.d.ts +0 -10
  236. package/build/question/options/SPFxAddWebpartOptions.d.ts.map +0 -1
  237. package/build/question/options/SPFxAddWebpartOptions.js +0 -50
  238. package/build/question/options/SPFxAddWebpartOptions.js.map +0 -1
@@ -4,13 +4,7 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.selectTabsContentUrlQuestion = exports.createQuestionDeps = exports.listOperations = exports.createContext = void 0;
6
6
  exports.getProjectTypeAndCapability = getProjectTypeAndCapability;
7
- exports.SPFxSolutionQuestion = SPFxSolutionQuestion;
8
- exports.SPFxPackageSelectQuestion = SPFxPackageSelectQuestion;
9
- exports.SPFxFrameworkQuestion = SPFxFrameworkQuestion;
10
- exports.SPFxWebpartNameQuestion = SPFxWebpartNameQuestion;
11
- exports.SPFxImportFolderQuestion = SPFxImportFolderQuestion;
12
7
  exports.folderQuestion = folderQuestion;
13
- exports.getSolutionName = getSolutionName;
14
8
  exports.appNameQuestion = appNameQuestion;
15
9
  exports.getTabWebsiteOptions = getTabWebsiteOptions;
16
10
  exports.selectTabWebsiteUrlQuestion = selectTabWebsiteUrlQuestion;
@@ -71,15 +65,12 @@ const utils_1 = require("../component/driver/teamsApp/utils/utils");
71
65
  const constant_1 = require("../component/generator/constant");
72
66
  const helper_1 = require("../component/generator/declarativeAgent/helper");
73
67
  const helper_2 = require("../component/generator/openApiSpec/helper");
74
- const error_1 = require("../component/generator/spfx/error");
75
- const constants_2 = require("../component/generator/spfx/utils/constants");
76
- const utils_2 = require("../component/generator/spfx/utils/utils");
77
68
  const templateNames_1 = require("../component/generator/templates/templateNames");
78
- const error_2 = require("../error");
79
- const constants_3 = require("./constants");
69
+ const error_1 = require("../error");
70
+ const constants_2 = require("./constants");
80
71
  const CapabilityOptions_1 = require("./scaffold/vsc/CapabilityOptions");
81
72
  const ProjectTypeOptions_1 = require("./scaffold/vsc/ProjectTypeOptions");
82
- const utils_3 = require("./utils");
73
+ const utils_2 = require("./utils");
83
74
  exports.createContext = globalVars_1.createContext;
84
75
  exports.listOperations = helper_2.listOperations;
85
76
  exports.createQuestionDeps = {
@@ -101,145 +92,10 @@ function getProjectTypeAndCapability(teamsApp) {
101
92
  }
102
93
  return undefined;
103
94
  }
104
- function SPFxSolutionQuestion() {
105
- return {
106
- type: "singleSelect",
107
- name: constants_3.QuestionNames.SPFxSolution,
108
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.title"),
109
- cliDescription: "Create a new or import an existing SharePoint Framework solution.",
110
- cliShortName: "s",
111
- staticOptions: [
112
- {
113
- id: "new",
114
- label: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.createNew"),
115
- detail: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.createNew.detail"),
116
- },
117
- {
118
- id: "import",
119
- label: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.importExisting"),
120
- detail: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.importExisting.detail"),
121
- },
122
- ],
123
- default: "new",
124
- };
125
- }
126
- function SPFxPackageSelectQuestion() {
127
- return {
128
- type: "singleSelect",
129
- name: constants_3.QuestionNames.SPFxInstallPackage,
130
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.title"),
131
- cliDescription: "Install the latest version of SharePoint Framework.",
132
- staticOptions: [],
133
- placeholder: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.placeholder"),
134
- dynamicOptions: async (inputs) => {
135
- const versions = await Promise.all([
136
- utils_2.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.GeneratorPackageName, 0, false),
137
- utils_2.Utils.findLatestVersion(undefined, constants_2.Constants.GeneratorPackageName, 5),
138
- utils_2.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.YeomanPackageName, 0, false),
139
- ]);
140
- inputs.globalSpfxPackageVersion = versions[0];
141
- inputs.latestSpfxPackageVersion = versions[1];
142
- inputs.globalYeomanPackageVersion = versions[2];
143
- return [
144
- {
145
- id: constants_3.SPFxVersionOptionIds.installLocally,
146
- label: versions[1] !== undefined
147
- ? (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.installLocally.withVersion.label", "v" + versions[1])
148
- : (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.installLocally.noVersion.label"),
149
- },
150
- {
151
- id: constants_3.SPFxVersionOptionIds.globalPackage,
152
- label: versions[0] !== undefined
153
- ? (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label", "v" + versions[0])
154
- : (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label"),
155
- description: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.detail", constants_2.Constants.RecommendedLowestSpfxVersion),
156
- },
157
- ];
158
- },
159
- default: constants_3.SPFxVersionOptionIds.installLocally,
160
- validation: {
161
- validFunc: (input, previousInputs) => {
162
- if (input === constants_3.SPFxVersionOptionIds.globalPackage) {
163
- const hasPackagesInstalled = !!previousInputs &&
164
- !!previousInputs.globalSpfxPackageVersion &&
165
- !!previousInputs.globalYeomanPackageVersion;
166
- if (!hasPackagesInstalled) {
167
- return Promise.reject((0, error_1.DevEnvironmentSetupError)());
168
- }
169
- }
170
- return Promise.resolve(undefined);
171
- },
172
- },
173
- isBoolean: true,
174
- };
175
- }
176
- function SPFxFrameworkQuestion() {
177
- return {
178
- type: "singleSelect",
179
- name: constants_3.QuestionNames.SPFxFramework,
180
- cliShortName: "k",
181
- cliDescription: "Framework.",
182
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.framework.title"),
183
- staticOptions: [
184
- { id: "react", label: "React" },
185
- { id: "minimal", label: "Minimal" },
186
- { id: "none", label: "None" },
187
- ],
188
- placeholder: "Select an option",
189
- default: "react",
190
- };
191
- }
192
- function SPFxWebpartNameQuestion() {
193
- return {
194
- type: "text",
195
- name: constants_3.QuestionNames.SPFxWebpartName,
196
- cliShortName: "w",
197
- cliDescription: "Name for SharePoint Framework Web Part.",
198
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName"),
199
- default: constants_2.Constants.DEFAULT_WEBPART_NAME,
200
- validation: {
201
- validFunc: async (input, previousInputs) => {
202
- const schema = {
203
- pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$",
204
- };
205
- const validateRes = jsonschema.validate(input, schema);
206
- if (validateRes.errors && validateRes.errors.length > 0) {
207
- return (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName.error.notMatch", input, schema.pattern);
208
- }
209
- if (previousInputs &&
210
- ((previousInputs.stage === teamsfx_api_1.Stage.addWebpart &&
211
- previousInputs[constants_3.QuestionNames.SPFxFolder]) ||
212
- (previousInputs?.stage === teamsfx_api_1.Stage.addFeature && previousInputs?.projectPath))) {
213
- const webpartFolder = path.join(previousInputs[constants_3.QuestionNames.SPFxFolder], "src", "webparts", input);
214
- if (await fs_extra_1.default.pathExists(webpartFolder)) {
215
- return (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName.error.duplicate", webpartFolder);
216
- }
217
- }
218
- return undefined;
219
- },
220
- },
221
- };
222
- }
223
- function SPFxImportFolderQuestion(hasDefaultFunc = false) {
224
- return {
225
- type: "folder",
226
- name: constants_3.QuestionNames.SPFxFolder,
227
- title: (0, localizeUtils_1.getLocalizedString)("core.spfxFolder.title"),
228
- cliDescription: "Directory or Path that contains the existing SharePoint Framework solution.",
229
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.spfxFolder.placeholder"),
230
- default: hasDefaultFunc
231
- ? (inputs) => {
232
- if (inputs.projectPath)
233
- return path.join(inputs.projectPath, "src");
234
- return undefined;
235
- }
236
- : undefined,
237
- };
238
- }
239
95
  function folderQuestion() {
240
96
  return {
241
97
  type: "folder",
242
- name: constants_3.QuestionNames.Folder,
98
+ name: constants_2.QuestionNames.Folder,
243
99
  cliShortName: "f",
244
100
  title: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
245
101
  ? "Directory where the project folder will be created in"
@@ -251,42 +107,24 @@ function folderQuestion() {
251
107
  : path.join(os.homedir(), constants_1.ConstantString.RootFolder),
252
108
  };
253
109
  }
254
- async function getSolutionName(spfxFolder) {
255
- const yoInfoPath = path.join(spfxFolder, constants_2.Constants.YO_RC_FILE);
256
- if (await fs_extra_1.default.pathExists(yoInfoPath)) {
257
- const yoInfo = await fs_extra_1.default.readJson(yoInfoPath);
258
- if (yoInfo["@microsoft/generator-sharepoint"]) {
259
- return yoInfo["@microsoft/generator-sharepoint"][constants_2.Constants.YO_RC_SOLUTION_NAME];
260
- }
261
- else {
262
- return undefined;
263
- }
264
- }
265
- else {
266
- throw new error_2.FileNotFoundError(constants_2.Constants.PLUGIN_NAME, yoInfoPath, constants_2.Constants.IMPORT_HELP_LINK);
267
- }
268
- }
269
110
  function appNameQuestion() {
270
111
  const question = {
271
112
  type: "text",
272
- name: constants_3.QuestionNames.AppName,
113
+ name: constants_2.QuestionNames.AppName,
273
114
  cliShortName: "n",
274
115
  title: (0, localizeUtils_1.getLocalizedString)("core.question.appName.title"),
275
116
  required: true,
276
- default: async (inputs) => {
117
+ default: (inputs) => {
277
118
  let defaultName = undefined;
278
119
  if (inputs.teamsAppFromTdp?.appName) {
279
120
  defaultName = (0, stringUtils_1.convertToAlphanumericOnly)(inputs.teamsAppFromTdp?.appName);
280
121
  }
281
- else if (inputs[constants_3.QuestionNames.SPFxSolution] == "import") {
282
- defaultName = await getSolutionName(inputs[constants_3.QuestionNames.SPFxFolder]);
283
- }
284
- return defaultName;
122
+ return Promise.resolve(defaultName);
285
123
  },
286
124
  validation: {
287
125
  validFunc: async (input, previousInputs) => {
288
126
  const schema = {
289
- pattern: constants_3.AppNamePattern,
127
+ pattern: constants_2.AppNamePattern,
290
128
  maxLength: 30,
291
129
  };
292
130
  if (input.length === 25) {
@@ -328,7 +166,7 @@ function appNameQuestion() {
328
166
  function sampleSelectQuestion() {
329
167
  return {
330
168
  type: "singleSelect",
331
- name: constants_3.QuestionNames.Samples,
169
+ name: constants_2.QuestionNames.Samples,
332
170
  cliName: "sample-name",
333
171
  cliDescription: "Specifies the app sample name.",
334
172
  cliChoiceListCommand: "teamsapp list samples",
@@ -412,7 +250,7 @@ function getTabWebsiteOptions(inputs) {
412
250
  function selectTabWebsiteUrlQuestion() {
413
251
  return {
414
252
  type: "multiSelect",
415
- name: constants_3.QuestionNames.ReplaceWebsiteUrl,
253
+ name: constants_2.QuestionNames.ReplaceWebsiteUrl,
416
254
  title: (0, localizeUtils_1.getLocalizedString)("core.updateWebsiteUrlQuestion.title"),
417
255
  staticOptions: [],
418
256
  dynamicOptions: getTabWebsiteOptions,
@@ -434,7 +272,7 @@ function getTabContentUrlOptions(inputs) {
434
272
  const selectTabsContentUrlQuestion = () => {
435
273
  return {
436
274
  type: "multiSelect",
437
- name: constants_3.QuestionNames.ReplaceContentUrl,
275
+ name: constants_2.QuestionNames.ReplaceContentUrl,
438
276
  title: (0, localizeUtils_1.getLocalizedString)("core.updateContentUrlQuestion.title"),
439
277
  staticOptions: [],
440
278
  dynamicOptions: getTabContentUrlOptions,
@@ -483,7 +321,7 @@ function getBotOptions(inputs) {
483
321
  function selectBotIdsQuestion() {
484
322
  return {
485
323
  type: "multiSelect",
486
- name: constants_3.QuestionNames.ReplaceBotIds,
324
+ name: constants_2.QuestionNames.ReplaceBotIds,
487
325
  title: (0, localizeUtils_1.getLocalizedString)("core.updateBotIdsQuestion.title"),
488
326
  staticOptions: [],
489
327
  dynamicOptions: getBotOptions,
@@ -495,7 +333,7 @@ function selectBotIdsQuestion() {
495
333
  function apiSpecTypeSelectQuestion() {
496
334
  return {
497
335
  type: "singleSelect",
498
- name: constants_3.QuestionNames.OpenAPISpecType,
336
+ name: constants_2.QuestionNames.OpenAPISpecType,
499
337
  title: "OpenAPI Spec Document",
500
338
  cliDescription: "The type of the API spec.",
501
339
  staticOptions: [
@@ -513,14 +351,14 @@ function apiSpecTypeSelectQuestion() {
513
351
  },
514
352
  ],
515
353
  onDidSelection(itemOrId, inputs) {
516
- inputs[constants_3.QuestionNames.ActionType] = constants_3.ActionStartOptions.apiSpec().id;
354
+ inputs[constants_2.QuestionNames.ActionType] = constants_2.ActionStartOptions.apiSpec().id;
517
355
  },
518
356
  };
519
357
  }
520
358
  function searchOpenAPISpecQueryQuestion() {
521
359
  return {
522
360
  type: "text",
523
- name: constants_3.QuestionNames.SearchOpenAPISpecQuery,
361
+ name: constants_2.QuestionNames.SearchOpenAPISpecQuery,
524
362
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.searchOpenAPISpecQueryQuestion.label"),
525
363
  default: "",
526
364
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.searchOpenAPISpecQueryQuestion.placeholder"),
@@ -551,7 +389,7 @@ function searchOpenAPISpecQueryQuestion() {
551
389
  function selectOpenApiSpecQuestion() {
552
390
  return {
553
391
  type: "singleSelect",
554
- name: constants_3.QuestionNames.SelectOpenApiSpec,
392
+ name: constants_2.QuestionNames.SelectOpenApiSpec,
555
393
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.selectOpenAPISpecQuestion.label"),
556
394
  staticOptions: [],
557
395
  dynamicOptions: (inputs) => {
@@ -599,13 +437,13 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
599
437
  }
600
438
  }
601
439
  catch (e) {
602
- const error = (0, error_2.assembleError)(e);
440
+ const error = (0, error_1.assembleError)(e);
603
441
  throw error;
604
442
  }
605
443
  };
606
444
  return {
607
445
  type: "singleFileOrText",
608
- name: constants_3.QuestionNames.ApiSpecLocation,
446
+ name: constants_2.QuestionNames.ApiSpecLocation,
609
447
  cliShortName: "a",
610
448
  cliDescription: "OpenAPI description document location.",
611
449
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.title"),
@@ -652,7 +490,7 @@ function apiSpecUrlQuestion() {
652
490
  const correlationId = correlator_1.Correlator.getId();
653
491
  return {
654
492
  type: "text",
655
- name: constants_3.QuestionNames.ApiSpecLocation,
493
+ name: constants_2.QuestionNames.ApiSpecLocation,
656
494
  cliShortName: "a",
657
495
  cliDescription: "OpenAPI description document URL.",
658
496
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.title"),
@@ -702,7 +540,7 @@ function apiSpecFileQuestion() {
702
540
  const correlationId = correlator_1.Correlator.getId();
703
541
  return {
704
542
  type: "singleFile",
705
- name: constants_3.QuestionNames.ApiSpecLocation,
543
+ name: constants_2.QuestionNames.ApiSpecLocation,
706
544
  cliDescription: "OpenAPI description document file path.",
707
545
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.title"),
708
546
  filters: {
@@ -741,24 +579,24 @@ function apiSpecFileQuestion() {
741
579
  function apiAuthQuestion(excludeNone = false) {
742
580
  return {
743
581
  type: "singleSelect",
744
- name: constants_3.QuestionNames.ApiAuth,
582
+ name: constants_2.QuestionNames.ApiAuth,
745
583
  title: (0, localizeUtils_1.getLocalizedString)("template.createProjectQuestion.apiMessageExtensionAuth.title"),
746
584
  placeholder: (0, localizeUtils_1.getLocalizedString)("template.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
747
585
  cliDescription: "The authentication type for the API.",
748
- staticOptions: constants_3.ApiAuthOptions.all(),
586
+ staticOptions: constants_2.ApiAuthOptions.all(),
749
587
  dynamicOptions: (inputs) => {
750
- const options = excludeNone ? [] : [constants_3.ApiAuthOptions.none()];
751
- if (inputs[constants_3.QuestionNames.MeArchitectureType] === constants_3.MeArchitectureOptions.newApi().id) {
752
- options.push(constants_3.ApiAuthOptions.bearerToken(), constants_3.ApiAuthOptions.microsoftEntra());
588
+ const options = excludeNone ? [] : [constants_2.ApiAuthOptions.none()];
589
+ if (inputs[constants_2.QuestionNames.MeArchitectureType] === constants_2.MeArchitectureOptions.newApi().id) {
590
+ options.push(constants_2.ApiAuthOptions.bearerToken(), constants_2.ApiAuthOptions.microsoftEntra());
753
591
  }
754
- else if (inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.newApi().id) {
755
- options.push(constants_3.ApiAuthOptions.apiKey());
756
- options.push(constants_3.ApiAuthOptions.microsoftEntra());
757
- options.push(constants_3.ApiAuthOptions.oauth());
592
+ else if (inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.newApi().id) {
593
+ options.push(constants_2.ApiAuthOptions.apiKey());
594
+ options.push(constants_2.ApiAuthOptions.microsoftEntra());
595
+ options.push(constants_2.ApiAuthOptions.oauth());
758
596
  }
759
597
  return options;
760
598
  },
761
- default: constants_3.ApiAuthOptions.none().id,
599
+ default: constants_2.ApiAuthOptions.none().id,
762
600
  };
763
601
  }
764
602
  function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
@@ -766,11 +604,11 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
766
604
  let placeholder = "";
767
605
  const isPlugin = (inputs) => {
768
606
  return (isAddPlugin ||
769
- (!!inputs && inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.apiSpec().id));
607
+ (!!inputs && inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.apiSpec().id));
770
608
  };
771
609
  return {
772
610
  type: "multiSelect",
773
- name: constants_3.QuestionNames.ApiOperation,
611
+ name: constants_2.QuestionNames.ApiOperation,
774
612
  title: (inputs) => {
775
613
  return isPlugin(inputs)
776
614
  ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.copilotOperation.title")
@@ -781,7 +619,7 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
781
619
  : "Select operation(s) Teams can interact with.",
782
620
  cliShortName: "o",
783
621
  placeholder: (inputs) => {
784
- const isPlugin = inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.apiSpec().id;
622
+ const isPlugin = inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.apiSpec().id;
785
623
  if (!includeExistingAPIs) {
786
624
  placeholder = (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
787
625
  }
@@ -802,9 +640,9 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
802
640
  }
803
641
  if (input.length < 1 ||
804
642
  (input.length > 10 &&
805
- inputs[constants_3.QuestionNames.CustomCopilotRag] !== constants_3.CustomCopilotRagOptions.customApi().id &&
806
- inputs[constants_3.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId &&
807
- inputs[constants_3.QuestionNames.ActionType] !== constants_3.ActionStartOptions.apiSpec().id)) {
643
+ inputs[constants_2.QuestionNames.CustomCopilotRag] !== constants_2.CustomCopilotRagOptions.customApi().id &&
644
+ inputs[constants_2.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId &&
645
+ inputs[constants_2.QuestionNames.ActionType] !== constants_2.ActionStartOptions.apiSpec().id)) {
808
646
  return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
809
647
  }
810
648
  const operations = inputs.supportedApisFromApiSpec;
@@ -836,9 +674,9 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
836
674
  },
837
675
  },
838
676
  dynamicOptions: async (inputs) => {
839
- if (inputs[constants_3.QuestionNames.SelectOpenApiSpec]) {
840
- const specUrl = inputs[constants_3.QuestionNames.SelectOpenApiSpec];
841
- inputs[constants_3.QuestionNames.ApiSpecLocation] = specUrl;
677
+ if (inputs[constants_2.QuestionNames.SelectOpenApiSpec]) {
678
+ const specUrl = inputs[constants_2.QuestionNames.SelectOpenApiSpec];
679
+ inputs[constants_2.QuestionNames.ApiSpecLocation] = specUrl;
842
680
  const context = exports.createQuestionDeps.createContext();
843
681
  // TODO: will use kiota npm package for this api
844
682
  const res = await exports.createQuestionDeps.listOperations(context, specUrl, inputs, true, false);
@@ -850,7 +688,7 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
850
688
  }
851
689
  }
852
690
  if (!inputs.supportedApisFromApiSpec) {
853
- throw new error_2.EmptyOptionError(constants_3.QuestionNames.ApiOperation, "question");
691
+ throw new error_1.EmptyOptionError(constants_2.QuestionNames.ApiOperation, "question");
854
692
  }
855
693
  const operations = inputs.supportedApisFromApiSpec;
856
694
  return operations;
@@ -860,29 +698,29 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
860
698
  function customCopilotRagQuestion() {
861
699
  return {
862
700
  type: "singleSelect",
863
- name: constants_3.QuestionNames.CustomCopilotRag,
701
+ name: constants_2.QuestionNames.CustomCopilotRag,
864
702
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotRag.title"),
865
703
  placeholder: (0, localizeUtils_1.getLocalizedString)("template.teams.rag.source.placeholder"),
866
- staticOptions: constants_3.CustomCopilotRagOptions.all(),
867
- dynamicOptions: () => constants_3.CustomCopilotRagOptions.all(),
868
- default: constants_3.CustomCopilotRagOptions.customize().id,
704
+ staticOptions: constants_2.CustomCopilotRagOptions.all(),
705
+ dynamicOptions: () => constants_2.CustomCopilotRagOptions.all(),
706
+ default: constants_2.CustomCopilotRagOptions.customize().id,
869
707
  };
870
708
  }
871
709
  function customCopilotAssistantQuestion() {
872
710
  return {
873
711
  type: "singleSelect",
874
- name: constants_3.QuestionNames.CustomCopilotAssistant,
712
+ name: constants_2.QuestionNames.CustomCopilotAssistant,
875
713
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotAssistant.title"),
876
714
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
877
- staticOptions: constants_3.CustomCopilotAssistantOptions.all(),
878
- dynamicOptions: () => constants_3.CustomCopilotAssistantOptions.all(),
879
- default: constants_3.CustomCopilotAssistantOptions.new().id,
715
+ staticOptions: constants_2.CustomCopilotAssistantOptions.all(),
716
+ dynamicOptions: () => constants_2.CustomCopilotAssistantOptions.all(),
717
+ default: constants_2.CustomCopilotAssistantOptions.new().id,
880
718
  };
881
719
  }
882
720
  function llmServiceQuestion() {
883
721
  return {
884
722
  type: "singleSelect",
885
- name: constants_3.QuestionNames.LLMService,
723
+ name: constants_2.QuestionNames.LLMService,
886
724
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.title"),
887
725
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.placeholder"),
888
726
  staticOptions: [
@@ -919,7 +757,7 @@ function openAIKeyQuestion() {
919
757
  return {
920
758
  type: "text",
921
759
  password: true,
922
- name: constants_3.QuestionNames.OpenAIKey,
760
+ name: constants_2.QuestionNames.OpenAIKey,
923
761
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIKey.title"),
924
762
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIKey.placeholder"),
925
763
  };
@@ -928,7 +766,7 @@ function azureOpenAIKeyQuestion() {
928
766
  return {
929
767
  type: "text",
930
768
  password: true,
931
- name: constants_3.QuestionNames.AzureOpenAIKey,
769
+ name: constants_2.QuestionNames.AzureOpenAIKey,
932
770
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
933
771
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
934
772
  };
@@ -936,7 +774,7 @@ function azureOpenAIKeyQuestion() {
936
774
  function azureOpenAIEndpointQuestion() {
937
775
  return {
938
776
  type: "text",
939
- name: constants_3.QuestionNames.AzureOpenAIEndpoint,
777
+ name: constants_2.QuestionNames.AzureOpenAIEndpoint,
940
778
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
941
779
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
942
780
  };
@@ -944,7 +782,7 @@ function azureOpenAIEndpointQuestion() {
944
782
  function azureOpenAIDeploymentNameQuestion() {
945
783
  return {
946
784
  type: "text",
947
- name: constants_3.QuestionNames.AzureOpenAIDeploymentName,
785
+ name: constants_2.QuestionNames.AzureOpenAIDeploymentName,
948
786
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.title"),
949
787
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.placeholder"),
950
788
  };
@@ -952,7 +790,7 @@ function azureOpenAIDeploymentNameQuestion() {
952
790
  function openAIAssistantIdQuestion() {
953
791
  return {
954
792
  type: "text",
955
- name: constants_3.QuestionNames.OpenAIAssistantID,
793
+ name: constants_2.QuestionNames.OpenAIAssistantID,
956
794
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIAssistantID.title"),
957
795
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIAssistantID.placeholder"),
958
796
  };
@@ -960,7 +798,7 @@ function openAIAssistantIdQuestion() {
960
798
  function azureOpenAIAssistantIdQuestion() {
961
799
  return {
962
800
  type: "text",
963
- name: constants_3.QuestionNames.AzureOpenAIAssistantId,
801
+ name: constants_2.QuestionNames.AzureOpenAIAssistantId,
964
802
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIAssistantID.title"),
965
803
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIAssistantID.placeholder"),
966
804
  };
@@ -968,7 +806,7 @@ function azureOpenAIAssistantIdQuestion() {
968
806
  function azureOpenAIEmbeddingDeploymentNameQuestion() {
969
807
  return {
970
808
  type: "text",
971
- name: constants_3.QuestionNames.AzureOpenAIEmbeddingDeploymentName,
809
+ name: constants_2.QuestionNames.AzureOpenAIEmbeddingDeploymentName,
972
810
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEmbeddingDeploymentName.title"),
973
811
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEmbeddingDeploymentName.placeholder"),
974
812
  };
@@ -976,7 +814,7 @@ function azureOpenAIEmbeddingDeploymentNameQuestion() {
976
814
  function foundryEndpointQuestion() {
977
815
  return {
978
816
  type: "text",
979
- name: constants_3.QuestionNames.FoundryEndpoint,
817
+ name: constants_2.QuestionNames.FoundryEndpoint,
980
818
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.foundry.endpoint.title"),
981
819
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.foundry.endpoint.placeholder"),
982
820
  };
@@ -984,7 +822,7 @@ function foundryEndpointQuestion() {
984
822
  function foundryAgentIdQuestion() {
985
823
  return {
986
824
  type: "text",
987
- name: constants_3.QuestionNames.FoundryAgentId,
825
+ name: constants_2.QuestionNames.FoundryAgentId,
988
826
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.foundry.agentId.title"),
989
827
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.foundry.agentId.placeholder"),
990
828
  };
@@ -992,36 +830,36 @@ function foundryAgentIdQuestion() {
992
830
  function apiPluginStartQuestion(doesProjectExists) {
993
831
  return {
994
832
  type: "singleSelect",
995
- name: constants_3.QuestionNames.ActionType,
833
+ name: constants_2.QuestionNames.ActionType,
996
834
  title: (inputs) => {
997
- return inputs[constants_3.QuestionNames.Capabilities] === CapabilityOptions_1.DACapabilityOptions.declarativeAgent().id ||
835
+ return inputs[constants_2.QuestionNames.Capabilities] === CapabilityOptions_1.DACapabilityOptions.declarativeAgent().id ||
998
836
  doesProjectExists
999
837
  ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addApiPlugin.title")
1000
838
  : (0, localizeUtils_1.getLocalizedString)("template.createProjectQuestion.createApiPlugin.title");
1001
839
  },
1002
840
  placeholder: (inputs) => {
1003
- return inputs[constants_3.QuestionNames.Capabilities] === CapabilityOptions_1.DACapabilityOptions.declarativeAgent().id ||
841
+ return inputs[constants_2.QuestionNames.Capabilities] === CapabilityOptions_1.DACapabilityOptions.declarativeAgent().id ||
1004
842
  doesProjectExists
1005
843
  ? (0, localizeUtils_1.getLocalizedString)("template.createProjectQuestion.addApiPlugin.placeholder")
1006
844
  : (0, localizeUtils_1.getLocalizedString)("template.createProjectQuestion.projectType.copilotExtension.placeholder");
1007
845
  },
1008
846
  cliDescription: "Action type.",
1009
- staticOptions: constants_3.ActionStartOptions.staticAll(doesProjectExists),
847
+ staticOptions: constants_2.ActionStartOptions.staticAll(doesProjectExists),
1010
848
  dynamicOptions: (inputs) => {
1011
- return constants_3.ActionStartOptions.all(inputs, doesProjectExists);
849
+ return constants_2.ActionStartOptions.all(inputs, doesProjectExists);
1012
850
  },
1013
- default: constants_3.ActionStartOptions.newApi().id,
851
+ default: constants_2.ActionStartOptions.newApi().id,
1014
852
  };
1015
853
  }
1016
854
  function selectExistingPluginManifestQuestion() {
1017
855
  return {
1018
856
  type: "singleSelect",
1019
- name: constants_3.QuestionNames.SelectPluginManifest,
857
+ name: constants_2.QuestionNames.SelectPluginManifest,
1020
858
  title: (0, localizeUtils_1.getLocalizedString)("core.regenerateQuestion.selectPluginManifestTitle"),
1021
859
  cliDescription: "Select plugin manifest file.",
1022
860
  staticOptions: [],
1023
861
  onDidSelection: (item, inputs) => {
1024
- inputs[constants_3.QuestionNames.SelectPluginId] = item.data;
862
+ inputs[constants_2.QuestionNames.SelectPluginId] = item.data;
1025
863
  },
1026
864
  dynamicOptions: async (inputs) => {
1027
865
  if (!inputs.projectPath) {
@@ -1029,7 +867,7 @@ function selectExistingPluginManifestQuestion() {
1029
867
  }
1030
868
  const options = [];
1031
869
  const manifestPath = path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName);
1032
- inputs[constants_3.QuestionNames.ManifestPath] = manifestPath;
870
+ inputs[constants_2.QuestionNames.ManifestPath] = manifestPath;
1033
871
  const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
1034
872
  if (manifestRes.isErr()) {
1035
873
  throw manifestRes.error;
@@ -1037,13 +875,13 @@ function selectExistingPluginManifestQuestion() {
1037
875
  const manifest = manifestRes.value;
1038
876
  const declarativeAgentPathRelativePath = manifest?.copilotAgents?.declarativeAgents?.[0]?.file;
1039
877
  if (!declarativeAgentPathRelativePath) {
1040
- throw new error_2.DeclarativeAgentPathNotFoundError(manifestPath);
878
+ throw new error_1.DeclarativeAgentPathNotFoundError(manifestPath);
1041
879
  }
1042
880
  const declarativeAgentPath = path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, declarativeAgentPathRelativePath);
1043
881
  const declarativeAgentJson = (await fs_extra_1.default.readJSON(declarativeAgentPath));
1044
882
  const actions = declarativeAgentJson.actions;
1045
883
  if (!actions || actions.length === 0) {
1046
- throw new error_2.ActionNotFoundError(declarativeAgentPath);
884
+ throw new error_1.ActionNotFoundError(declarativeAgentPath);
1047
885
  }
1048
886
  for (const action of actions) {
1049
887
  const actionName = action.file;
@@ -1060,17 +898,17 @@ function selectExistingPluginManifestQuestion() {
1060
898
  function selectOpenAPISpecFromPluginQuestion() {
1061
899
  return {
1062
900
  type: "singleSelect",
1063
- name: constants_3.QuestionNames.SelectOpenAPISpecFromPlugin,
901
+ name: constants_2.QuestionNames.SelectOpenAPISpecFromPlugin,
1064
902
  title: (0, localizeUtils_1.getLocalizedString)("core.regenerateQuestion.selectOpenAPISpecFromPluginTitle"),
1065
903
  cliDescription: "Select OpenAPI description document file.",
1066
904
  staticOptions: [],
1067
905
  onDidSelection: (itemOrId, inputs) => {
1068
- inputs[constants_3.QuestionNames.ActionType] = constants_3.DeclarativeAgentApiSpecOptionId;
906
+ inputs[constants_2.QuestionNames.ActionType] = constants_2.DeclarativeAgentApiSpecOptionId;
1069
907
  },
1070
908
  dynamicOptions: async (inputs) => {
1071
- const pluginPath = inputs[constants_3.QuestionNames.SelectPluginManifest];
909
+ const pluginPath = inputs[constants_2.QuestionNames.SelectPluginManifest];
1072
910
  const options = [];
1073
- const pluginManifest = await fs_extra_1.default.readJSON(inputs[constants_3.QuestionNames.SelectPluginManifest]);
911
+ const pluginManifest = await fs_extra_1.default.readJSON(inputs[constants_2.QuestionNames.SelectPluginManifest]);
1074
912
  const specUrlMap = new Map();
1075
913
  pluginManifest.runtimes?.forEach((runtime) => {
1076
914
  if (runtime.spec) {
@@ -1095,7 +933,7 @@ function selectOpenAPISpecFromPluginQuestion() {
1095
933
  });
1096
934
  });
1097
935
  if (options.length === 0) {
1098
- throw new error_2.SpecNotFoundError(pluginPath);
936
+ throw new error_1.SpecNotFoundError(pluginPath);
1099
937
  }
1100
938
  return options;
1101
939
  },
@@ -1104,7 +942,7 @@ function selectOpenAPISpecFromPluginQuestion() {
1104
942
  function selectApiOperationForRegenerateQuestion() {
1105
943
  return {
1106
944
  type: "multiSelect",
1107
- name: constants_3.QuestionNames.ApiOperation,
945
+ name: constants_2.QuestionNames.ApiOperation,
1108
946
  title: (0, localizeUtils_1.getLocalizedString)("core.regenerateQuestion.selectApiOperationForRegenerateTitle"),
1109
947
  cliDescription: "Select operation(s) Copilot can interact with.",
1110
948
  cliShortName: "o",
@@ -1127,11 +965,11 @@ function selectApiOperationForRegenerateQuestion() {
1127
965
  },
1128
966
  },
1129
967
  dynamicOptions: async (inputs) => {
1130
- const specUrl = inputs[constants_3.QuestionNames.SelectOpenAPISpecFromPlugin] + ".original";
968
+ const specUrl = inputs[constants_2.QuestionNames.SelectOpenAPISpecFromPlugin] + ".original";
1131
969
  if (!(await fs_extra_1.default.pathExists(specUrl))) {
1132
- throw new error_2.OriginalSpecNotFoundError(specUrl);
970
+ throw new error_1.OriginalSpecNotFoundError(specUrl);
1133
971
  }
1134
- inputs[constants_3.QuestionNames.ApiSpecLocation] = specUrl;
972
+ inputs[constants_2.QuestionNames.ApiSpecLocation] = specUrl;
1135
973
  const context = exports.createQuestionDeps.createContext();
1136
974
  const res = await exports.createQuestionDeps.listOperations(context, specUrl, inputs, true, false);
1137
975
  if (res.isOk()) {
@@ -1142,7 +980,7 @@ function selectApiOperationForRegenerateQuestion() {
1142
980
  throw new teamsfx_api_1.UserError("FxCore", "ListOpenAPISpecOperationsError", message, message);
1143
981
  }
1144
982
  if (!inputs.supportedApisFromApiSpec || inputs.supportedApisFromApiSpec.length === 0) {
1145
- throw new error_2.EmptyOptionError(constants_3.QuestionNames.ApiOperation, "question");
983
+ throw new error_1.EmptyOptionError(constants_2.QuestionNames.ApiOperation, "question");
1146
984
  }
1147
985
  const operations = inputs.supportedApisFromApiSpec;
1148
986
  return operations;
@@ -1153,7 +991,7 @@ function pluginManifestQuestion() {
1153
991
  const correlationId = correlator_1.Correlator.getId();
1154
992
  return {
1155
993
  type: "singleFile",
1156
- name: constants_3.QuestionNames.PluginManifestFilePath,
994
+ name: constants_2.QuestionNames.PluginManifestFilePath,
1157
995
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.pluginManifest.title"),
1158
996
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.pluginManifest.placeholder"),
1159
997
  cliDescription: "Plugin manifest path.",
@@ -1175,16 +1013,16 @@ function pluginManifestQuestion() {
1175
1013
  validFunc: async (input) => {
1176
1014
  const manifestRes = await PluginManifestUtils_1.pluginManifestUtils.readPluginManifestFile(input.trim());
1177
1015
  if (manifestRes.isErr()) {
1178
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginManifestFilePath), manifestRes.error, {
1016
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_1.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_2.QuestionNames.PluginManifestFilePath), manifestRes.error, {
1179
1017
  "correlation-id": correlationId,
1180
1018
  });
1181
1019
  return manifestRes.error.displayMessage;
1182
1020
  }
1183
1021
  else {
1184
1022
  const manifest = manifestRes.value;
1185
- const checkRes = (0, helper_1.validateSourcePluginManifest)(manifest, constants_3.QuestionNames.PluginManifestFilePath);
1023
+ const checkRes = (0, helper_1.validateSourcePluginManifest)(manifest, constants_2.QuestionNames.PluginManifestFilePath);
1186
1024
  if (checkRes.isErr()) {
1187
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginManifestFilePath), checkRes.error, {
1025
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_1.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_2.QuestionNames.PluginManifestFilePath), checkRes.error, {
1188
1026
  "correlation-id": correlationId,
1189
1027
  });
1190
1028
  return checkRes.error.displayMessage;
@@ -1198,7 +1036,7 @@ function pluginApiSpecQuestion() {
1198
1036
  const correlationId = correlator_1.Correlator.getId();
1199
1037
  return {
1200
1038
  type: "singleFile",
1201
- name: constants_3.QuestionNames.PluginOpenApiSpecFilePath,
1039
+ name: constants_2.QuestionNames.PluginOpenApiSpecFilePath,
1202
1040
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.apiSpec.title"),
1203
1041
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.openApiSpec.placeholder"),
1204
1042
  cliDescription: "OpenAPI description document used for your API plugin.",
@@ -1207,7 +1045,7 @@ function pluginApiSpecQuestion() {
1207
1045
  },
1208
1046
  defaultFolder: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
1209
1047
  ? "./"
1210
- : path.dirname(inputs[constants_3.QuestionNames.PluginManifestFilePath]),
1048
+ : path.dirname(inputs[constants_2.QuestionNames.PluginManifestFilePath]),
1211
1049
  validation: {
1212
1050
  validFunc: async (input, inputs) => {
1213
1051
  if (!inputs) {
@@ -1216,8 +1054,8 @@ function pluginApiSpecQuestion() {
1216
1054
  const filePath = input.trim();
1217
1055
  const ext = path.extname(filePath).toLowerCase();
1218
1056
  if (![".json", ".yml", ".yaml"].includes(ext)) {
1219
- const error = new error_2.FileNotSupportError(error_2.CoreSource, ["json", "yml", "yaml"].join(", "));
1220
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginOpenApiSpecFilePath), error, {
1057
+ const error = new error_1.FileNotSupportError(error_1.CoreSource, ["json", "yml", "yaml"].join(", "));
1058
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_1.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_2.QuestionNames.PluginOpenApiSpecFilePath), error, {
1221
1059
  "correlation-id": correlationId,
1222
1060
  });
1223
1061
  return error.displayMessage;
@@ -1226,7 +1064,7 @@ function pluginApiSpecQuestion() {
1226
1064
  const invalidSpecError = validationRes.errors.find((o) => o.type === m365_spec_parser_1.ErrorType.SpecNotValid);
1227
1065
  if (invalidSpecError) {
1228
1066
  const error = new teamsfx_api_1.UserError(constants_1.SpecParserSource, telemetry_1.ApiSpecTelemetryPropertis.InvalidApiSpec, invalidSpecError.content, invalidSpecError.content);
1229
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginOpenApiSpecFilePath), error, {
1067
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_1.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_2.QuestionNames.PluginOpenApiSpecFilePath), error, {
1230
1068
  "correlation-id": correlationId,
1231
1069
  [telemetry_1.ApiSpecTelemetryPropertis.SpecNotValidDetails]: invalidSpecError.content,
1232
1070
  });
@@ -1239,15 +1077,15 @@ function pluginApiSpecQuestion() {
1239
1077
  function addKnowledgeStartQuestion(doesProjectExists) {
1240
1078
  return {
1241
1079
  type: "singleSelect",
1242
- name: constants_3.QuestionNames.KnowledgeSource,
1080
+ name: constants_2.QuestionNames.KnowledgeSource,
1243
1081
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addKnowledge.title"),
1244
1082
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addKnowledge.placeholder"),
1245
1083
  cliDescription: "Knowledge source.",
1246
- staticOptions: constants_3.KnowledgeSourceOptions.all(),
1247
- default: constants_3.KnowledgeSourceOptions.webSearch().id,
1084
+ staticOptions: constants_2.KnowledgeSourceOptions.all(),
1085
+ default: constants_2.KnowledgeSourceOptions.webSearch().id,
1248
1086
  required: true,
1249
1087
  dynamicOptions: (inputs) => {
1250
- return constants_3.KnowledgeSourceOptions.allWithFeatureFlags();
1088
+ return constants_2.KnowledgeSourceOptions.allWithFeatureFlags();
1251
1089
  },
1252
1090
  };
1253
1091
  }
@@ -1267,13 +1105,13 @@ function oneDriveSharePointItemQuestion() {
1267
1105
  }
1268
1106
  }
1269
1107
  catch (e) {
1270
- const error = (0, error_2.assembleError)(e);
1108
+ const error = (0, error_1.assembleError)(e);
1271
1109
  throw error;
1272
1110
  }
1273
1111
  };
1274
1112
  return {
1275
1113
  type: "text",
1276
- name: constants_3.QuestionNames.OneDriveSharePointURL,
1114
+ name: constants_2.QuestionNames.OneDriveSharePointURL,
1277
1115
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.oneDriveSharePointItem.title"),
1278
1116
  forgetLastValue: true,
1279
1117
  additionalValidationOnAccept: {
@@ -1289,7 +1127,7 @@ function oneDriveSharePointItemQuestion() {
1289
1127
  }
1290
1128
  function oneDriveSharePointItemConfirmQuestion() {
1291
1129
  return {
1292
- name: constants_3.QuestionNames.OneDriveSharePointContent,
1130
+ name: constants_2.QuestionNames.OneDriveSharePointContent,
1293
1131
  title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.oneDriveSharePointItem.title"),
1294
1132
  type: "singleSelect",
1295
1133
  staticOptions: [],
@@ -1309,9 +1147,9 @@ function oneDriveSharePointItemConfirmQuestion() {
1309
1147
  };
1310
1148
  }
1311
1149
  function GCItemQuestion() {
1312
- const options = [constants_3.GCSelectOptions.list(), constants_3.GCSelectOptions.input()];
1150
+ const options = [constants_2.GCSelectOptions.list(), constants_2.GCSelectOptions.input()];
1313
1151
  return {
1314
- name: constants_3.QuestionNames.GCContent,
1152
+ name: constants_2.QuestionNames.GCContent,
1315
1153
  title: (0, localizeUtils_1.getLocalizedString)("core.GCSelectQuestion.title"),
1316
1154
  staticOptions: options,
1317
1155
  type: "singleSelect",
@@ -1320,7 +1158,7 @@ function GCItemQuestion() {
1320
1158
  function GCListQuestion() {
1321
1159
  return {
1322
1160
  type: "multiSelect",
1323
- name: constants_3.QuestionNames.GCList,
1161
+ name: constants_2.QuestionNames.GCList,
1324
1162
  title: (0, localizeUtils_1.getLocalizedString)("core.GCListQuestion.title"),
1325
1163
  staticOptions: [],
1326
1164
  dynamicOptions: helper_1.getGraphConnectors,
@@ -1332,8 +1170,8 @@ function GCListQuestion() {
1332
1170
  if (!inputs) {
1333
1171
  throw new Error("inputs is undefined"); // should never happen
1334
1172
  }
1335
- if (inputs[constants_3.QuestionNames.KnowledgeSource] == constants_3.KnowledgeSourceOptions.graphConnector().id &&
1336
- inputs[constants_3.QuestionNames.GCContent] == constants_3.GCSelectOptions.list().id &&
1173
+ if (inputs[constants_2.QuestionNames.KnowledgeSource] == constants_2.KnowledgeSourceOptions.graphConnector().id &&
1174
+ inputs[constants_2.QuestionNames.GCContent] == constants_2.GCSelectOptions.list().id &&
1337
1175
  input.length < 1) {
1338
1176
  return Promise.resolve((0, localizeUtils_1.getLocalizedString)("core.GCListQuestion.invalidMessage", input.length));
1339
1177
  }
@@ -1344,7 +1182,7 @@ function GCListQuestion() {
1344
1182
  function GCInputQuestion() {
1345
1183
  return {
1346
1184
  type: "text",
1347
- name: constants_3.QuestionNames.GCInput,
1185
+ name: constants_2.QuestionNames.GCInput,
1348
1186
  title: (0, localizeUtils_1.getLocalizedString)("core.GCInputQuestion.title"),
1349
1187
  cliDescription: "a connection ID for Copilot connector",
1350
1188
  forgetLastValue: true,
@@ -1359,7 +1197,7 @@ function GCInputQuestion() {
1359
1197
  }
1360
1198
  function webContentQuestion() {
1361
1199
  return {
1362
- name: constants_3.QuestionNames.WebContent,
1200
+ name: constants_2.QuestionNames.WebContent,
1363
1201
  title: (0, localizeUtils_1.getLocalizedString)("core.addKnowledgeQuestion.webContent.title"),
1364
1202
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.addKnowledgeQuestion.webContent.placeholder"),
1365
1203
  type: "text",
@@ -1382,19 +1220,19 @@ function webContentQuestion() {
1382
1220
  }
1383
1221
  function searchTypeQuestion() {
1384
1222
  return {
1385
- name: constants_3.QuestionNames.SearchType,
1223
+ name: constants_2.QuestionNames.SearchType,
1386
1224
  title: (0, localizeUtils_1.getLocalizedString)("core.addKnowledgeQuestion.searchType.title"),
1387
- staticOptions: constants_3.KnowledgeSearchTypeOptions.all(),
1225
+ staticOptions: constants_2.KnowledgeSearchTypeOptions.all(),
1388
1226
  type: "singleSelect",
1389
1227
  required: true,
1390
- default: constants_3.KnowledgeSearchTypeOptions.url().id,
1228
+ default: constants_2.KnowledgeSearchTypeOptions.url().id,
1391
1229
  dynamicOptions: (inputs) => {
1392
- const options = [constants_3.KnowledgeSearchTypeOptions.url()];
1393
- if (inputs[constants_3.QuestionNames.KnowledgeSource] === constants_3.KnowledgeSourceOptions.webSearch().id) {
1394
- options.push(constants_3.KnowledgeSearchTypeOptions.allWeb());
1230
+ const options = [constants_2.KnowledgeSearchTypeOptions.url()];
1231
+ if (inputs[constants_2.QuestionNames.KnowledgeSource] === constants_2.KnowledgeSourceOptions.webSearch().id) {
1232
+ options.push(constants_2.KnowledgeSearchTypeOptions.allWeb());
1395
1233
  }
1396
- else if (inputs[constants_3.QuestionNames.KnowledgeSource] === constants_3.KnowledgeSourceOptions.oneDriveSharePoint().id) {
1397
- options.push(constants_3.KnowledgeSearchTypeOptions.allOneDriveSharepoint());
1234
+ else if (inputs[constants_2.QuestionNames.KnowledgeSource] === constants_2.KnowledgeSourceOptions.oneDriveSharePoint().id) {
1235
+ options.push(constants_2.KnowledgeSearchTypeOptions.allOneDriveSharepoint());
1398
1236
  }
1399
1237
  return options;
1400
1238
  },
@@ -1403,19 +1241,19 @@ function searchTypeQuestion() {
1403
1241
  function GCNameQuestion() {
1404
1242
  return {
1405
1243
  type: "text",
1406
- name: constants_3.QuestionNames.GCName,
1244
+ name: constants_2.QuestionNames.GCName,
1407
1245
  title: (0, localizeUtils_1.getLocalizedString)("core.GCNameQuestion.title"),
1408
1246
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.GCNameQuestion.placeholder"),
1409
1247
  cliDescription: "a name for Copilot connector",
1410
1248
  forgetLastValue: true,
1411
1249
  additionalValidationOnAccept: {
1412
1250
  validFunc: (input, inputs) => {
1413
- inputs = (0, utils_3.ensureInputs)(inputs);
1414
- inputs[constants_3.QuestionNames.ProgrammingLanguage] = constants_3.ProgrammingLanguage.TS;
1251
+ inputs = (0, utils_2.ensureInputs)(inputs);
1252
+ inputs[constants_2.QuestionNames.ProgrammingLanguage] = constants_2.ProgrammingLanguage.TS;
1415
1253
  // Set template name and app name for Copilot connector Template
1416
- if (inputs[constants_3.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId) {
1417
- inputs[constants_3.QuestionNames.TemplateName] = templateNames_1.TemplateNames.GraphConnector;
1418
- inputs[constants_3.QuestionNames.AppName] = input;
1254
+ if (inputs[constants_2.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId) {
1255
+ inputs[constants_2.QuestionNames.TemplateName] = templateNames_1.TemplateNames.GraphConnector;
1256
+ inputs[constants_2.QuestionNames.AppName] = input;
1419
1257
  }
1420
1258
  return;
1421
1259
  },
@@ -1425,8 +1263,8 @@ function GCNameQuestion() {
1425
1263
  if (!input || input.trim().length === 0) {
1426
1264
  return "Please enter a Copilot connector name.";
1427
1265
  }
1428
- inputs = (0, utils_3.ensureInputs)(inputs);
1429
- if (inputs[constants_3.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId) {
1266
+ inputs = (0, utils_2.ensureInputs)(inputs);
1267
+ if (inputs[constants_2.QuestionNames.ProjectType] !== ProjectTypeOptions_1.ProjectTypeOptions.copilotAgentOptionId) {
1430
1268
  // Copilot connector Template will use the name as app name, which has a minimum length of 2.
1431
1269
  if (input.trim().length < 2) {
1432
1270
  return "Please enter a Copilot connector name with minimum two characters.";
@@ -1440,7 +1278,7 @@ function GCNameQuestion() {
1440
1278
  function GCConnectionIdQuestion() {
1441
1279
  return {
1442
1280
  type: "text",
1443
- name: constants_3.QuestionNames.GCConnectionId,
1281
+ name: constants_2.QuestionNames.GCConnectionId,
1444
1282
  title: (0, localizeUtils_1.getLocalizedString)("core.GCConnectionIdQuestion.title"),
1445
1283
  placeholder: (0, localizeUtils_1.getLocalizedString)("core.GCConnectionIdQuestion.placeholder"),
1446
1284
  cliDescription: "a connection id for Copilot connector",