Skip to content

Commit

Permalink
[ez] Redirect users to our issues creation page when submitting feedb…
Browse files Browse the repository at this point in the history
…ack (lastmile-ai#1362)

[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:
lastmile-ai#870

## Test Plan


https://github.com/lastmile-ai/aiconfig/assets/151060367/1ab905d0-dec8-4168-9a4c-995b7af0cd28

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1362).
* __->__ lastmile-ai#1362
* lastmile-ai#1360
  • Loading branch information
rossdanlm authored Feb 26, 2024
2 parents 4710b12 + 348384b commit e4efb87
Show file tree
Hide file tree
Showing 5 changed files with 29 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
12 changes: 12 additions & 0 deletions vscode-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ export async function activate(context: vscode.ExtensionContext) {
);
context.subscriptions.push(shareModelParserCommand);

const submitUserFeedbackCommand = vscode.commands.registerCommand(
COMMANDS.SUBMIT_FEEDBACK,
() => {
// 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);

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 e4efb87

Please sign in to comment.