Skip to content

Commit fd99863

Browse files
committed
Refactors to use helpful/unhelpful sentiment
- Replaces positive/negative with helpful/unhelpful terminology - Adds visual state tracking with filled/unfilled thumbs up/down icons - Updates telemetry to focus on sentiment and unhelpful reasons - Improves AI context in AI markdown URIs - Only shows "custom" feedback input if "Other" is selected
1 parent 9d9370b commit fd99863

25 files changed

+383
-405
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1010

1111
- Adds support for using natural language to search for commits on the _Commit Graph_, _Search & Compare_ view, and in the _Search Commits_ command using AI ([#4471](https://github.com/gitkraken/vscode-gitlens/issues/4471))
1212
- Adds support for time-based commit searches on the _Commit Graph_, _Search & Compare_ view, and in the _Search Commits_ command
13-
- Adds dedicated "Helpful" and "Not helpful" feedback toolbar buttons to AI-generated markdown previews such as Commit Composer, Explain Changes ([#4449](https://github.com/gitkraken/vscode-gitlens/issues/4449))
13+
- Adds 👍 "Helpful" and 👎 "Unhelpful" feedback buttons to AI-generated markdown previews such as Commit Composer and Explain Changes ([#4449](https://github.com/gitkraken/vscode-gitlens/issues/4449))
1414

1515
### Changed
1616

contributions.json

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,28 +143,54 @@
143143
]
144144
}
145145
},
146-
"gitlens.ai.feedback.negative": {
147-
"label": "AI Feedback: Negative",
146+
"gitlens.ai.feedback.helpful": {
147+
"label": "Helpful",
148+
"icon": "$(thumbsup)",
149+
"menus": {
150+
"editor/title": [
151+
{
152+
"when": "resourceScheme == gitlens-ai-markdown && resource not in gitlens:tabs:ai:helpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
153+
"group": "navigation",
154+
"order": 1
155+
}
156+
]
157+
}
158+
},
159+
"gitlens.ai.feedback.helpful.chosen": {
160+
"label": "Helpful",
161+
"icon": "$(thumbsup-filled)",
162+
"menus": {
163+
"editor/title": [
164+
{
165+
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:helpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
166+
"group": "navigation",
167+
"order": 1
168+
}
169+
]
170+
}
171+
},
172+
"gitlens.ai.feedback.unhelpful": {
173+
"label": "Unhelpful",
148174
"icon": "$(thumbsdown)",
149175
"menus": {
150176
"editor/title": [
151177
{
152-
"when": "resourceScheme == gitlens-markdown && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
178+
"when": "resourceScheme == gitlens-ai-markdown && resource not in gitlens:tabs:ai:unhelpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
153179
"group": "navigation",
154180
"order": 2
155181
}
156182
]
157183
}
158184
},
159-
"gitlens.ai.feedback.positive": {
160-
"label": "AI Feedback: Positive",
161-
"icon": "$(thumbsup)",
185+
"gitlens.ai.feedback.unhelpful.chosen": {
186+
"label": "Unhelpful",
187+
"icon": "$(thumbsdown-filled)",
162188
"menus": {
163189
"editor/title": [
164190
{
165-
"when": "resourceScheme == gitlens-markdown && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
191+
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:unhelpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
166192
"group": "navigation",
167-
"order": 1
193+
"order": 2
168194
}
169195
]
170196
}
@@ -3708,14 +3734,14 @@
37083734
"menus": {
37093735
"editor/title": [
37103736
{
3711-
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
3737+
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
37123738
"group": "navigation",
37133739
"order": 3
37143740
}
37153741
],
37163742
"editor/title/context": [
37173743
{
3718-
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
3744+
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
37193745
"group": "1_gitlens",
37203746
"order": 0
37213747
}

docs/telemetry-events.md

Lines changed: 19 additions & 18 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 73 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6193,14 +6193,24 @@
61936193
"icon": "$(sparkle)"
61946194
},
61956195
{
6196-
"command": "gitlens.ai.feedback.negative",
6197-
"title": "AI Feedback: Negative",
6196+
"command": "gitlens.ai.feedback.helpful",
6197+
"title": "Helpful",
6198+
"icon": "$(thumbsup)"
6199+
},
6200+
{
6201+
"command": "gitlens.ai.feedback.helpful.chosen",
6202+
"title": "Helpful",
6203+
"icon": "$(thumbsup-filled)"
6204+
},
6205+
{
6206+
"command": "gitlens.ai.feedback.unhelpful",
6207+
"title": "Unhelpful",
61986208
"icon": "$(thumbsdown)"
61996209
},
62006210
{
6201-
"command": "gitlens.ai.feedback.positive",
6202-
"title": "AI Feedback: Positive",
6203-
"icon": "$(thumbsup)"
6211+
"command": "gitlens.ai.feedback.unhelpful.chosen",
6212+
"title": "Unhelpful",
6213+
"icon": "$(thumbsdown-filled)"
62046214
},
62056215
{
62066216
"command": "gitlens.ai.generateChangelog",
@@ -10733,11 +10743,19 @@
1073310743
"when": "false"
1073410744
},
1073510745
{
10736-
"command": "gitlens.ai.feedback.negative",
10746+
"command": "gitlens.ai.feedback.helpful",
10747+
"when": "false"
10748+
},
10749+
{
10750+
"command": "gitlens.ai.feedback.helpful.chosen",
10751+
"when": "false"
10752+
},
10753+
{
10754+
"command": "gitlens.ai.feedback.unhelpful",
1073710755
"when": "false"
1073810756
},
1073910757
{
10740-
"command": "gitlens.ai.feedback.positive",
10758+
"command": "gitlens.ai.feedback.unhelpful.chosen",
1074110759
"when": "false"
1074210760
},
1074310761
{
@@ -14037,11 +14055,6 @@
1403714055
}
1403814056
],
1403914057
"editor/title": [
14040-
{
14041-
"command": "gitlens.graph.refresh",
14042-
"when": "activeWebviewPanelId === gitlens.graph",
14043-
"group": "navigation@-99"
14044-
},
1404514058
{
1404614059
"command": "gitlens.timeline.refresh",
1404714060
"when": "activeWebviewPanelId === gitlens.timeline",
@@ -14052,11 +14065,6 @@
1405214065
"when": "activeWebviewPanelId === gitlens.graph",
1405314066
"group": "navigation@-98"
1405414067
},
14055-
{
14056-
"command": "gitlens.graph.split",
14057-
"when": "activeWebviewPanelId == gitlens.graph && resourceScheme == webview-panel && config.gitlens.graph.allowMultiple",
14058-
"group": "navigation@-97"
14059-
},
1406014068
{
1406114069
"command": "gitlens.timeline.split",
1406214070
"when": "activeWebviewPanelId == gitlens.timeline && resourceScheme == webview-panel && config.gitlens.visualHistory.allowMultiple",
@@ -14072,6 +14080,37 @@
1407214080
"when": "resource in gitlens:tabs:blameable && (gitlens:window:annotated == computing || resource in gitlens:tabs:annotated:computing) && config.gitlens.menus.editorGroup.blame",
1407314081
"group": "navigation@100"
1407414082
},
14083+
{
14084+
"command": "gitlens.diffWithPrevious",
14085+
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
14086+
"group": "navigation@97",
14087+
"alt": "gitlens.diffWithRevision"
14088+
},
14089+
{
14090+
"command": "gitlens.showQuickRevisionDetails",
14091+
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
14092+
"group": "navigation@98"
14093+
},
14094+
{
14095+
"command": "gitlens.diffWithNext",
14096+
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
14097+
"group": "navigation@99"
14098+
},
14099+
{
14100+
"command": "gitlens.diffWithWorking",
14101+
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled",
14102+
"group": "navigation@-99"
14103+
},
14104+
{
14105+
"command": "gitlens.graph.refresh",
14106+
"when": "activeWebviewPanelId === gitlens.graph",
14107+
"group": "navigation@-99"
14108+
},
14109+
{
14110+
"command": "gitlens.graph.split",
14111+
"when": "activeWebviewPanelId == gitlens.graph && resourceScheme == webview-panel && config.gitlens.graph.allowMultiple",
14112+
"group": "navigation@-97"
14113+
},
1407514114
{
1407614115
"command": "gitlens.toggleFileBlame",
1407714116
"when": "resource in gitlens:tabs:blameable && resource not in gitlens:tabs:annotated && config.gitlens.menus.editorGroup.blame && config.gitlens.fileAnnotations.command == blame",
@@ -14095,32 +14134,11 @@
1409514134
"when": "resource in gitlens:tabs:blameable && resource not in gitlens:tabs:annotated && !gitlens:window:annotated && config.gitlens.menus.editorGroup.blame && !config.gitlens.fileAnnotations.command",
1409614135
"group": "navigation@100"
1409714136
},
14098-
{
14099-
"command": "gitlens.diffWithPrevious",
14100-
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
14101-
"group": "navigation@97",
14102-
"alt": "gitlens.diffWithRevision"
14103-
},
14104-
{
14105-
"command": "gitlens.showQuickRevisionDetails",
14106-
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
14107-
"group": "navigation@98"
14108-
},
14109-
{
14110-
"command": "gitlens.diffWithNext",
14111-
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
14112-
"group": "navigation@99"
14113-
},
1411414137
{
1411514138
"command": "gitlens.openWorkingFile",
1411614139
"when": "resourceScheme == git && gitlens:enabled && !isInDiffEditor",
1411714140
"group": "navigation@-98"
1411814141
},
14119-
{
14120-
"command": "gitlens.diffWithWorking",
14121-
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled",
14122-
"group": "navigation@-99"
14123-
},
1412414142
{
1412514143
"command": "gitlens.openWorkingFile",
1412614144
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled",
@@ -14132,18 +14150,28 @@
1413214150
"group": "navigation@-97"
1413314151
},
1413414152
{
14135-
"command": "gitlens.ai.feedback.positive",
14136-
"when": "resourceScheme == gitlens-markdown && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
14153+
"command": "gitlens.ai.feedback.helpful",
14154+
"when": "resourceScheme == gitlens-ai-markdown && resource not in gitlens:tabs:ai:helpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
14155+
"group": "navigation@1"
14156+
},
14157+
{
14158+
"command": "gitlens.ai.feedback.helpful.chosen",
14159+
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:helpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
1413714160
"group": "navigation@1"
1413814161
},
1413914162
{
14140-
"command": "gitlens.ai.feedback.negative",
14141-
"when": "resourceScheme == gitlens-markdown && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
14163+
"command": "gitlens.ai.feedback.unhelpful",
14164+
"when": "resourceScheme == gitlens-ai-markdown && resource not in gitlens:tabs:ai:unhelpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
14165+
"group": "navigation@2"
14166+
},
14167+
{
14168+
"command": "gitlens.ai.feedback.unhelpful.chosen",
14169+
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:unhelpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
1414214170
"group": "navigation@2"
1414314171
},
1414414172
{
1414514173
"command": "gitlens.regenerateMarkdownDocument",
14146-
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
14174+
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
1414714175
"group": "navigation@3"
1414814176
},
1414914177
{
@@ -14169,7 +14197,7 @@
1416914197
},
1417014198
{
1417114199
"command": "gitlens.regenerateMarkdownDocument",
14172-
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
14200+
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
1417314201
"group": "1_gitlens@0"
1417414202
},
1417514203
{
@@ -23625,7 +23653,7 @@
2362523653
}
2362623654
},
2362723655
{
23628-
"scheme": "gitlens-markdown",
23656+
"scheme": "gitlens-ai-markdown",
2362923657
"authority": "*",
2363023658
"formatting": {
2363123659
"label": "${query.label}"

0 commit comments

Comments
 (0)