From 105219339e15b4a018415edee770345646537e50 Mon Sep 17 00:00:00 2001
From: "Rossdan Craig rossdan@lastmileai.dev" <>
Date: Mon, 26 Feb 2024 15:53:44 -0500
Subject: [PATCH] Create menu icon for submitting user feedback
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
Light Mode
Command Palette
---
vscode-extension/package.json | 14 ++++++++++++++
vscode-extension/src/extension.ts | 9 +++++++++
vscode-extension/src/util.ts | 1 +
vscode-extension/static/bug-dark.svg | 1 +
vscode-extension/static/bug.svg | 1 +
5 files changed, 26 insertions(+)
create mode 100644 vscode-extension/static/bug-dark.svg
create mode 100644 vscode-extension/static/bug.svg
diff --git a/vscode-extension/package.json b/vscode-extension/package.json
index df61b680b..33e341190 100644
--- a/vscode-extension/package.json
+++ b/vscode-extension/package.json
@@ -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",
@@ -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": [
diff --git a/vscode-extension/src/extension.ts b/vscode-extension/src/extension.ts
index 6e7416cd2..4aad57031 100644
--- a/vscode-extension/src/extension.ts
+++ b/vscode-extension/src/extension.ts
@@ -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 () => {
diff --git a/vscode-extension/src/util.ts b/vscode-extension/src/util.ts
index 964ea60a5..137e611b0 100644
--- a/vscode-extension/src/util.ts
+++ b/vscode-extension/src/util.ts
@@ -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"];
diff --git a/vscode-extension/static/bug-dark.svg b/vscode-extension/static/bug-dark.svg
new file mode 100644
index 000000000..22b980304
--- /dev/null
+++ b/vscode-extension/static/bug-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/vscode-extension/static/bug.svg b/vscode-extension/static/bug.svg
new file mode 100644
index 000000000..e730f919c
--- /dev/null
+++ b/vscode-extension/static/bug.svg
@@ -0,0 +1 @@
+
\ No newline at end of file