Skip to content

Commit 04919d3

Browse files
committed
Add rate command to allow users to provide feedback via marketplace links
1 parent 24bed48 commit 04919d3

4 files changed

Lines changed: 47 additions & 1 deletion

File tree

‎apps/editor/package.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@
123123
"category": "Code Web Chat",
124124
"icon": "$(copy)"
125125
},
126+
{
127+
"command": "codeWebChat.rate",
128+
"title": "Rate",
129+
"category": "Code Web Chat",
130+
"icon": "$(feedback)"
131+
},
126132
{
127133
"command": "codeWebChat.openRepository",
128134
"title": "GitHub",
@@ -492,6 +498,10 @@
492498
"command": "codeWebChat.generateCommitMessage",
493499
"when": "false"
494500
},
501+
{
502+
"command": "codeWebChat.rate",
503+
"when": "false"
504+
},
495505
{
496506
"command": "codeWebChat.setRanges",
497507
"when": "false"
@@ -608,6 +618,11 @@
608618
"when": "view == codeWebChatViewOpenEditors",
609619
"group": "navigation@5"
610620
},
621+
{
622+
"command": "codeWebChat.rate",
623+
"when": "view == codeWebChatView",
624+
"group": "navigation@1.5"
625+
},
611626
{
612627
"command": "codeWebChat.openRepository",
613628
"when": "view == codeWebChatView",

‎apps/editor/src/commands/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ export * from './uncheck-parent-folder-command'
2222
export * from './search-files-for-context'
2323
export * from './check-referencing-files-for-context-command'
2424
export * from './check-definition-file-for-context-command'
25+
export * from './rate-command'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import * as vscode from 'vscode'
2+
3+
export function rate_command() {
4+
return vscode.commands.registerCommand('codeWebChat.rate', async () => {
5+
const options = [
6+
{
7+
label: 'VS Code Marketplace',
8+
url: 'https://marketplace.visualstudio.com/items?itemName=robertpiosik.gemini-coder&ssr=false#review-details'
9+
},
10+
{
11+
label: 'Chrome Web Store',
12+
url: 'https://chromewebstore.google.com/detail/autofill-for-code-web-cha/ljookipcanaglfaocjbgdicfbdhhjffp'
13+
},
14+
{
15+
label: 'Firefox Add-ons',
16+
url: 'https://addons.mozilla.org/en-US/firefox/addon/autofill-for-code-web-chat/'
17+
}
18+
]
19+
20+
const selected = await vscode.window.showQuickPick(options, {
21+
placeHolder: 'Rate the tool'
22+
})
23+
24+
if (selected) {
25+
vscode.env.openExternal(vscode.Uri.parse(selected.url))
26+
}
27+
})
28+
}

‎apps/editor/src/extension.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import {
3333
uncheck_parent_folder_command,
3434
search_files_for_context_command,
3535
check_referencing_files_for_context_command,
36-
check_definition_file_for_context_command
36+
check_definition_file_for_context_command,
37+
rate_command
3738
} from './commands'
3839
import {
3940
get_checkpoints,
@@ -137,6 +138,7 @@ export async function activate(context: vscode.ExtensionContext) {
137138
check_referencing_files_for_context_command(workspace_provider),
138139
search_files_for_context_command(workspace_provider, context),
139140
check_definition_file_for_context_command(workspace_provider),
141+
rate_command(),
140142
open_url_command({
141143
command: 'codeWebChat.openRepository',
142144
url: 'https://github.com/robertpiosik/CodeWebChat'

0 commit comments

Comments
 (0)