Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

- 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))
- Adds support for time-based commit searches on the _Commit Graph_, _Search & Compare_ view, and in the _Search Commits_ command
- 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))

### Changed

Expand Down
58 changes: 55 additions & 3 deletions contributions.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,58 @@
]
}
},
"gitlens.ai.feedback.helpful": {
"label": "Helpful",
"icon": "$(thumbsup)",
"menus": {
"editor/title": [
{
"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",
"group": "navigation",
"order": 1
}
]
}
},
"gitlens.ai.feedback.helpful.chosen": {
"label": "Helpful",
"icon": "$(thumbsup-filled)",
"menus": {
"editor/title": [
{
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:helpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "navigation",
"order": 1
}
]
}
},
"gitlens.ai.feedback.unhelpful": {
"label": "Unhelpful",
"icon": "$(thumbsdown)",
"menus": {
"editor/title": [
{
"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",
"group": "navigation",
"order": 2
}
]
}
},
"gitlens.ai.feedback.unhelpful.chosen": {
"label": "Unhelpful",
"icon": "$(thumbsdown-filled)",
"menus": {
"editor/title": [
{
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:unhelpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "navigation",
"order": 2
}
]
}
},
"gitlens.ai.generateChangelog": {
"label": "Generate Changelog (Preview)...",
"commandPalette": "gitlens:enabled && !gitlens:untrusted && gitlens:gk:organization:ai:enabled"
Expand Down Expand Up @@ -3682,14 +3734,14 @@
"menus": {
"editor/title": [
{
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "navigation",
"order": 0
"order": 3
}
],
"editor/title/context": [
{
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "1_gitlens",
"order": 0
}
Expand Down
38 changes: 36 additions & 2 deletions docs/telemetry-events.md

Large diffs are not rendered by default.

126 changes: 91 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6192,6 +6192,26 @@
"title": "Explain Working Changes (Preview)",
"icon": "$(sparkle)"
},
{
"command": "gitlens.ai.feedback.helpful",
"title": "Helpful",
"icon": "$(thumbsup)"
},
{
"command": "gitlens.ai.feedback.helpful.chosen",
"title": "Helpful",
"icon": "$(thumbsup-filled)"
},
{
"command": "gitlens.ai.feedback.unhelpful",
"title": "Unhelpful",
"icon": "$(thumbsdown)"
},
{
"command": "gitlens.ai.feedback.unhelpful.chosen",
"title": "Unhelpful",
"icon": "$(thumbsdown-filled)"
},
{
"command": "gitlens.ai.generateChangelog",
"title": "Generate Changelog (Preview)...",
Expand Down Expand Up @@ -10722,6 +10742,22 @@
"command": "gitlens.ai.explainWip:views",
"when": "false"
},
{
"command": "gitlens.ai.feedback.helpful",
"when": "false"
},
{
"command": "gitlens.ai.feedback.helpful.chosen",
"when": "false"
},
{
"command": "gitlens.ai.feedback.unhelpful",
"when": "false"
},
{
"command": "gitlens.ai.feedback.unhelpful.chosen",
"when": "false"
},
{
"command": "gitlens.ai.generateChangelog",
"when": "gitlens:enabled && !gitlens:untrusted && gitlens:gk:organization:ai:enabled"
Expand Down Expand Up @@ -14019,11 +14055,6 @@
}
],
"editor/title": [
{
"command": "gitlens.graph.refresh",
"when": "activeWebviewPanelId === gitlens.graph",
"group": "navigation@-99"
},
{
"command": "gitlens.timeline.refresh",
"when": "activeWebviewPanelId === gitlens.timeline",
Expand All @@ -14034,11 +14065,6 @@
"when": "activeWebviewPanelId === gitlens.graph",
"group": "navigation@-98"
},
{
"command": "gitlens.graph.split",
"when": "activeWebviewPanelId == gitlens.graph && resourceScheme == webview-panel && config.gitlens.graph.allowMultiple",
"group": "navigation@-97"
},
{
"command": "gitlens.timeline.split",
"when": "activeWebviewPanelId == gitlens.timeline && resourceScheme == webview-panel && config.gitlens.visualHistory.allowMultiple",
Expand All @@ -14054,6 +14080,37 @@
"when": "resource in gitlens:tabs:blameable && (gitlens:window:annotated == computing || resource in gitlens:tabs:annotated:computing) && config.gitlens.menus.editorGroup.blame",
"group": "navigation@100"
},
{
"command": "gitlens.diffWithPrevious",
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
"group": "navigation@97",
"alt": "gitlens.diffWithRevision"
},
{
"command": "gitlens.showQuickRevisionDetails",
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
"group": "navigation@98"
},
{
"command": "gitlens.diffWithNext",
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
"group": "navigation@99"
},
{
"command": "gitlens.diffWithWorking",
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled",
"group": "navigation@-99"
},
{
"command": "gitlens.graph.refresh",
"when": "activeWebviewPanelId === gitlens.graph",
"group": "navigation@-99"
},
{
"command": "gitlens.graph.split",
"when": "activeWebviewPanelId == gitlens.graph && resourceScheme == webview-panel && config.gitlens.graph.allowMultiple",
"group": "navigation@-97"
},
{
"command": "gitlens.toggleFileBlame",
"when": "resource in gitlens:tabs:blameable && resource not in gitlens:tabs:annotated && config.gitlens.menus.editorGroup.blame && config.gitlens.fileAnnotations.command == blame",
Expand All @@ -14077,32 +14134,11 @@
"when": "resource in gitlens:tabs:blameable && resource not in gitlens:tabs:annotated && !gitlens:window:annotated && config.gitlens.menus.editorGroup.blame && !config.gitlens.fileAnnotations.command",
"group": "navigation@100"
},
{
"command": "gitlens.diffWithPrevious",
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
"group": "navigation@97",
"alt": "gitlens.diffWithRevision"
},
{
"command": "gitlens.showQuickRevisionDetails",
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
"group": "navigation@98"
},
{
"command": "gitlens.diffWithNext",
"when": "resource in gitlens:tabs:tracked && config.gitlens.menus.editorGroup.compare",
"group": "navigation@99"
},
{
"command": "gitlens.openWorkingFile",
"when": "resourceScheme == git && gitlens:enabled && !isInDiffEditor",
"group": "navigation@-98"
},
{
"command": "gitlens.diffWithWorking",
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled",
"group": "navigation@-99"
},
{
"command": "gitlens.openWorkingFile",
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled",
Expand All @@ -14113,10 +14149,30 @@
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled && isInDiffEditor",
"group": "navigation@-97"
},
{
"command": "gitlens.ai.feedback.helpful",
"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",
"group": "navigation@1"
},
{
"command": "gitlens.ai.feedback.helpful.chosen",
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:helpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "navigation@1"
},
{
"command": "gitlens.ai.feedback.unhelpful",
"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",
"group": "navigation@2"
},
{
"command": "gitlens.ai.feedback.unhelpful.chosen",
"when": "resourceScheme == gitlens-ai-markdown && resource in gitlens:tabs:ai:unhelpful && config.gitlens.telemetry.enabled && config.telemetry.telemetryLevel != off && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "navigation@2"
},
{
"command": "gitlens.regenerateMarkdownDocument",
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "navigation@0"
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "navigation@3"
},
{
"command": "gitlens.openPatch",
Expand All @@ -14141,7 +14197,7 @@
},
{
"command": "gitlens.regenerateMarkdownDocument",
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"when": "resourceScheme == gitlens-ai-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
"group": "1_gitlens@0"
},
{
Expand Down Expand Up @@ -23597,7 +23653,7 @@
}
},
{
"scheme": "gitlens-markdown",
"scheme": "gitlens-ai-markdown",
"authority": "*",
"formatting": {
"label": "${query.label}"
Expand Down
1 change: 1 addition & 0 deletions src/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './commands/addAuthors';
import './commands/aiFeedback';
import './commands/browseRepoAtRevision';
import './commands/closeUnchangedFiles';
import './commands/cloudIntegrations';
Expand Down
Loading