Skip to content

Commit

Permalink
[vscode][1/n] Setup Env Variables: Initial scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossdan Craig [email protected] committed Feb 21, 2024
1 parent 6f1ea15 commit 7ccbab4
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 7ccbab4

Please sign in to comment.