From bc01289e90a71b236160d540bc8a647def4fe1c4 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Wed, 15 Oct 2025 17:09:02 +0200 Subject: [PATCH] Git - limit the timeline/blame/graph hover commands (#271530) --- extensions/git/src/historyProvider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/git/src/historyProvider.ts b/extensions/git/src/historyProvider.ts index cf4fd96f749..68cd1b2fbd9 100644 --- a/extensions/git/src/historyProvider.ts +++ b/extensions/git/src/historyProvider.ts @@ -626,7 +626,9 @@ export function processHistoryItemRemoteHoverCommands(commands: Command[], hash: export function getHistoryItemHover(authorAvatar: string | undefined, authorName: string | undefined, authorEmail: string | undefined, authorDate: Date | number | undefined, message: string, shortStats: CommitShortStat | undefined, commands: Command[][] | undefined): MarkdownString { const markdownString = new MarkdownString('', true); - markdownString.isTrusted = true; + markdownString.isTrusted = { + enabledCommands: commands?.flat().map(c => c.command) ?? [] + }; if (authorName) { const avatar = authorAvatar ? `![${authorName}](${authorAvatar}|width=${AVATAR_SIZE},height=${AVATAR_SIZE})` : '$(account)';