Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: let user input OpenAI keys in F5 #13130

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

feat: let user input OpenAI keys in F5 #13130

wants to merge 5 commits into from

Conversation

nliu-ms
Copy link
Contributor

@nliu-ms nliu-ms commented Feb 6, 2025

Work item: https://msazure.visualstudio.com/Microsoft%20Teams%20Extensibility/_workitems/edit/30664776

We can scaffold OpenAI projects without OpenAI key, but it will meet MissingEnvironmentVariablesError when F5.
In this scenario, we will let user input these env variables to proceed, otherwise it will return a UserCancel error:
openaikey

If user Escape the input:
image

Sample telemetry for UserCancel:

[2025-02-07T14:06:27.341] [DEBUG] TelemTest - debug-all {
  'project-id': '1b48dcc9-bea6-4123-a84c-960fa7070307',
  'manifest-app-id': '${{TEAMS_APP_ID}}',
  'teamsfx-project-id': '1b48dcc9-bea6-4123-a84c-960fa7070307',
  languages: 'js',
  'manifest-capabilities': 'bot',
  'correlation-id': '53929de8-622e-4cc6-999b-bc676a2bd6e0',
  success: 'no',
  'debug-is-transparent-task': 'true',
  'debug-prelaunch-task-info': '{"Start Teams App Locally":[{"label":"Validate prerequisites","type":"teamsfx","command":"debug-check-prerequisites"},{"label":"Start local tunnel","type":"teamsfx","command":"debug-start-local-tunnel"},{"label":"Provision","type":"teamsfx","command":"provision"},{"label":"Deploy","type":"teamsfx","command":"deploy"},{"label":"Start application","type":"<unknown>","command":"npm run dev:teamsfx"}],"Start Teams App (Test Tool)":[{"label":"Validate prerequisites (Test Tool)","type":"teamsfx","command":"debug-check-prerequisites"},{"label":"Deploy (Test Tool)","type":"teamsfx","command":"deploy"},{"label":"<unknown>","type":"<unknown>","command":"npm run dev:teamsfx:testtool"},{"label":"Start Test Tool","type":"<unknown>","command":"npm run dev:teamsfx:launch-testtool"}]}',
  'debug-checked-ports': '3978,9239,56150',
  'debug-last-event-name': 'debug-lifecycle-task',
  component: 'extension',
  'is-existing-user': 'yes',
  'error-code': 'UI.UserCancelError',
  'error-type': 'user',
  'err-message': 'select option is empty',
  'err-stack': 'Ah.value | D.B | D.fire | h._fireDidHide | Uy.S | Uy.Q | Uy.M | Uy.L | Ah.value | D.B | D.fire | Xn.fire | Ah.value | D.B | D.fire | Xn.fire | MessagePortMain.<anonymous> | MessagePortMain.emit | Object.MessagePortMain._internalPort.emit | Object.callbackTrampoline',
  'error-name': 'UserCancelError',
  'feature-flags': 'TEAMSFX_CHAT_PARTICIPANT;TEAMSFX_TELEMETRY_TEST'
} 

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 93.44262% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.28%. Comparing base (2f4e3f4) to head (602c18e).
Report is 11 commits behind head on dev.

Files with missing lines Patch % Lines
...onent/driver/file/createOrUpdateEnvironmentFile.ts 92.59% 0 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##              dev   #13130    +/-   ##
========================================
  Coverage   90.28%   90.28%            
========================================
  Files         583      584     +1     
  Lines       35061    35185   +124     
  Branches     6834     6849    +15     
========================================
+ Hits        31654    31766   +112     
- Misses       1478     1484     +6     
- Partials     1929     1935     +6     
Files with missing lines Coverage Δ
...s/fx-core/src/component/configManager/lifecycle.ts 94.03% <100.00%> (+0.24%) ⬆️
packages/fx-core/src/component/constants.ts 100.00% <100.00%> (ø)
packages/fx-core/src/question/create.ts 92.19% <ø> (+0.02%) ⬆️
...onent/driver/file/createOrUpdateEnvironmentFile.ts 96.58% <92.59%> (-3.42%) ⬇️

... and 17 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants