Skip to content

Commit

Permalink
Create menu icon for submitting user feedback
Browse files Browse the repository at this point in the history
I also made this a command that you can get from the command palette too.

Next PR will do implementation, just wanted to keep it simple and display this here for now


## Test Plan

Dark Mode
<img width="991" alt="Screenshot 2024-02-26 at 15 50 32" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/10658e28-4dbc-4475-9994-bb806620e878">

Light Mode

<img width="996" alt="Screenshot 2024-02-26 at 15 50 43" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/e865c149-8f10-4aaf-bfb0-97d04d1619e9">

Command Palette

<img width="874" alt="Screenshot 2024-02-26 at 15 51 53" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/92072c41-66ac-400b-86f4-5a80bcbb0a84">
  • Loading branch information
Rossdan Craig [email protected] committed Feb 26, 2024
1 parent 8fefeb7 commit 1052193
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
"dark": "./static/share-dark.svg"
}
},
{
"command": "vscode-aiconfig.submitFeedback",
"title": "Submit Feedback",
"category": "AIConfig",
"icon": {
"light": "./static/bug.svg",
"dark": "./static/bug-dark.svg"
}
},
{
"command": "vscode-aiconfig.customModelRegistryPath",
"title": "Set Custom Model Registry File Path",
Expand Down Expand Up @@ -185,6 +194,11 @@
"command": "vscode-aiconfig.share",
"when": "resourcePath =~ /.*(\\.aiconfig\\.json|\\.aiconfig\\.yaml|\\.aiconfig\\.yml|\\.aiconfig)$/",
"group": "navigation"
},
{
"command": "vscode-aiconfig.submitFeedback",
"when": "resourcePath =~ /.*(\\.aiconfig\\.json|\\.aiconfig\\.yaml|\\.aiconfig\\.yml|\\.aiconfig)$/",
"group": "navigation"
}
],
"file/newFile": [
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 @@ -85,6 +85,15 @@ export async function activate(context: vscode.ExtensionContext) {
);
context.subscriptions.push(shareModelParserCommand);

const submitUserFeedbackCommand = vscode.commands.registerCommand(
COMMANDS.SUBMIT_FEEDBACK,
async () => {
// TODO: implement next PR
// return await shareAIConfig(context, aiconfigEditorManager);
}
);
context.subscriptions.push(submitUserFeedbackCommand);

const customModelParserCommand = vscode.commands.registerCommand(
COMMANDS.CUSTOM_MODEL_REGISTRY_PATH,
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 @@ -21,6 +21,7 @@ export const COMMANDS = {
RESTART_ACTIVE_EDITOR_SERVER: `${EXTENSION_NAME}.restartActiveEditorServer`,
SET_API_KEYS: `${EXTENSION_NAME}.setApiKeys`,
SHARE: `${EXTENSION_NAME}.share`,
SUBMIT_FEEDBACK: `${EXTENSION_NAME}.submitFeedback`,
};

export const SUPPORTED_FILE_EXTENSIONS = [".json", ".yaml", ".yml"];
Expand Down
1 change: 1 addition & 0 deletions vscode-extension/static/bug-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions vscode-extension/static/bug.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1052193

Please sign in to comment.