Skip to content

Commit

Permalink
[vscode][1/n] Setup Env Variables: Initial scaffolding (#1277)
Browse files Browse the repository at this point in the history
[vscode][1/n] Setup Env Variables: Initial scaffolding

No implementation yet, just connecting commands

## Test Plan


https://github.com/lastmile-ai/aiconfig/assets/151060367/46f254ae-68e0-426f-81e3-88f2c3c64ea7

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1277).
* #1278
* __->__ #1277
  • Loading branch information
rossdanlm authored Feb 21, 2024
2 parents 6f1ea15 + 7ccbab4 commit 5cfa7b1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
12 changes: 10 additions & 2 deletions vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"title": "Open Custom Model Registry File",
"category": "AIConfig"
},
{
"command": "vscode-aiconfig.setupEnvironmentVariables",
"title": "Setup Environment Variables",
"category": "AIConfig"
},
{
"command": "vscode-aiconfig.showWelcome",
"title": "Welcome",
Expand Down Expand Up @@ -122,10 +127,13 @@
{
"id": "setupEnvironmentVariables",
"title": "Setup Environment Variables",
"description": "This creates an .env file (or uses it if it already exists) to define environment varialbes needed to run AI models. Ex: OpenAI models read from the `OPENAI_API_KEY` variable",
"description": "This creates an .env file (or uses it if it already exists) to define environment varialbes needed to run AI models. Ex: OpenAI models read from the `OPENAI_API_KEY` variable\n[Setup Environment Variables](command:vscode-aiconfig.setupEnvironmentVariables)",
"media": {
"markdown": "media/welcomePage.md"
}
},
"completionEvents": [
"onCommand:vscode-aiconfig.setupEnvironmentVariables"
]
},
{
"id": "createAIConfig",
Expand Down
9 changes: 9 additions & 0 deletions vscode-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ export function activate(context: vscode.ExtensionContext) {
})
);

context.subscriptions.push(
vscode.commands.registerCommand(
COMMANDS.SETUP_ENVIRONMENT_VARIABLES,
() => {
vscode.window.showInformationMessage("Will implement next PR");
}
)
);

const createAIConfigJSONCommand = vscode.commands.registerCommand(
COMMANDS.CREATE_NEW_JSON,
async () => {
Expand Down
1 change: 1 addition & 0 deletions vscode-extension/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const COMMANDS = {
CREATE_CUSTOM_MODEL_REGISTRY: `${EXTENSION_NAME}.createCustomModelRegistry`,
OPEN_CONFIG_FILE: `${EXTENSION_NAME}.openConfigFile`,
OPEN_MODEL_REGISTRY: `${EXTENSION_NAME}.openModelRegistry`,
SETUP_ENVIRONMENT_VARIABLES: `${EXTENSION_NAME}.setupEnvironmentVariables`,
SHARE: `${EXTENSION_NAME}.share`,
SHOW_WELCOME: `${EXTENSION_NAME}.showWelcome`,
};
Expand Down

0 comments on commit 5cfa7b1

Please sign in to comment.