-
Notifications
You must be signed in to change notification settings - Fork 79
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
[vscode][2/n] Setup Env Variables: Define env path #1280
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rossdanlm
changed the title
[vscode][1/n] Setup Env Variables: Define env path
[vscode][2/n] Setup Env Variables: Define env path
Feb 21, 2024
rossdanlm
commented
Feb 21, 2024
Comment on lines
+773
to
+805
// // Create the model registry file from the sample | ||
// const sampleModelRegistryPath = vscode.Uri.joinPath( | ||
// context.extensionUri, | ||
// "static", | ||
// "example_aiconfig_model_registry.py" | ||
// ); | ||
|
||
// try { | ||
// await vscode.workspace.fs.copy( | ||
// sampleModelRegistryPath, | ||
// vscode.Uri.file(modelRegistryPath), | ||
// { overwrite: false } | ||
// ); | ||
// } catch (err) { | ||
// vscode.window.showErrorMessage( | ||
// `Error creating new file ${modelRegistryPath}. Error is ${err}` | ||
// ); | ||
// } | ||
|
||
// const doc = await vscode.workspace.openTextDocument(modelRegistryPath); | ||
// if (doc) { | ||
// vscode.window.showTextDocument(doc); | ||
// vscode.window.showInformationMessage( | ||
// "Please customize your new model registry." | ||
// ); | ||
// } | ||
|
||
// let config = vscode.workspace.getConfiguration(EXTENSION_NAME); | ||
// await handleCustomModelRegistryUpdate( | ||
// config, | ||
// aiconfigEditorManager, | ||
// modelRegistryPath | ||
// ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will delete later in stack, just doing small PRs now to get more quick feedback
rossdanlm
requested review from
saqadri,
rholinshead,
suyoglastmileai,
Ankush-lastmile and
jonathanlastmileai
as code owners
February 21, 2024 22:38
Opening a window for user to enter in an `.env` path. Using the home dir for now, but can change to workspace if you want, not a big deal. Next diffs will implement a static file template and use that when env path doesn't exist. Diff after that I'll deal with existing env path situation ## Test Plan https://github.com/lastmile-ai/aiconfig/assets/151060367/cceadc3a-cd20-4164-b8b2-c8d11b36b5bb
Ankush-lastmile
approved these changes
Feb 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, approving to unblock
rossdanlm
added a commit
that referenced
this pull request
Feb 22, 2024
#1283) [vscode][3/n] Setup Env Variables: Use env template file for new files If the file does not exist, created a template file with some helper text to help guide people on how to set their environment variables. Next PR I will handle the use case for when the env file already exists ## Test Plan https://github.com/lastmile-ai/aiconfig/assets/151060367/4608833c-d64f-4906-a7ed-94af12174c6d --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1283). * #1284 * __->__ #1283 * #1280
rossdanlm
added a commit
that referenced
this pull request
Feb 22, 2024
…th (#1284) [vscode][4/n] Setup Env Variables: Add helper text to existing env path This PR I had some issues with reading the env template, so for now I'm splitting up this logic and will follow up next PR ## Test Plan https://github.com/lastmile-ai/aiconfig/assets/151060367/6aad117f-0c55-4549-8f46-1b438c6ebf4b --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1284). * #1285 * __->__ #1284 * #1283 * #1280
rossdanlm
added a commit
that referenced
this pull request
Feb 22, 2024
…e and append to existing file (#1285) [vscode][5/n] Setup Env Variables: Read the text from the env template and append to existing file TSIA, and making the function async now that we call an await statement ## Test Plan https://github.com/lastmile-ai/aiconfig/assets/151060367/6679e13d-6d58-4ec4-a237-360cb273e59c --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1285). * __->__ #1285 * #1284 * #1283 * #1280
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[vscode][2/n] Setup Env Variables: Define env path
Opening a window for user to enter in an
.env
path. Using the home dir for now, but can change to workspace if you want, not a big deal.Next diffs will implement a static file template and use that when env path doesn't exist. Diff after that I'll deal with existing env path situation
Test Plan
2b363216-0cf5-4a6c-bb5e-d2fc2f781dfb.1.mp4
Stack created with Sapling. Best reviewed with ReviewStack.