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 1/2] 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
From 348384bbe14cad2bbf4228624a3e6de725e3678a Mon Sep 17 00:00:00 2001
From: "Rossdan Craig rossdan@lastmileai.dev" <>
Date: Mon, 26 Feb 2024 16:11:33 -0500
Subject: [PATCH 2/2] [ez] Redirect users to our issues creation page when
submitting feedback
Super simple for now. Tried at first to connect to Jonathan's rage functiona but that was defined in the editor package: https://github.com/lastmile-ai/aiconfig/pull/870
## Test Plan
https://github.com/lastmile-ai/aiconfig/assets/151060367/1ab905d0-dec8-4168-9a4c-995b7af0cd28
---
vscode-extension/src/extension.ts | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/vscode-extension/src/extension.ts b/vscode-extension/src/extension.ts
index 4aad57031..3ab81da60 100644
--- a/vscode-extension/src/extension.ts
+++ b/vscode-extension/src/extension.ts
@@ -87,9 +87,12 @@ export async function activate(context: vscode.ExtensionContext) {
const submitUserFeedbackCommand = vscode.commands.registerCommand(
COMMANDS.SUBMIT_FEEDBACK,
- async () => {
- // TODO: implement next PR
- // return await shareAIConfig(context, aiconfigEditorManager);
+ () => {
+ // TODO: Add issue template forms to standardize feedback that we submit
+ // Can include info like device OS, extension version, aiconfig.log content, pip list, etc
+ vscode.env.openExternal(
+ vscode.Uri.parse("https://github.com/lastmile-ai/aiconfig/issues/new")
+ );
}
);
context.subscriptions.push(submitUserFeedbackCommand);