From fb3f91a3fd078e8c1401da48d7b0c7720882bc8f Mon Sep 17 00:00:00 2001 From: vicky1999 Date: Sat, 15 Nov 2025 01:09:25 +0530 Subject: [PATCH] feat: Add copy comment link button in PR overview --- webviews/components/comment.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/webviews/components/comment.tsx b/webviews/components/comment.tsx index bfd5e63286..76fe901207 100644 --- a/webviews/components/comment.tsx +++ b/webviews/components/comment.tsx @@ -5,7 +5,7 @@ import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'; import { ContextDropdown } from './contextDropdown'; -import { editIcon, quoteIcon, trashIcon } from './icon'; +import { copyIcon, editIcon, quoteIcon, trashIcon } from './icon'; import { nbsp, Spaced } from './space'; import { Timestamp } from './timestamp'; import { AuthorLink, Avatar } from './user'; @@ -48,6 +48,7 @@ export function CommentView(commentProps: Props) { const currentDraft = pr?.pendingCommentDrafts && pr.pendingCommentDrafts[id]; const [inEditMode, setEditMode] = useState(!!currentDraft); const [showActionBar, setShowActionBar] = useState(false); + const commentUrl = (comment as Partial).htmlUrl || (comment as PullRequest).url; if (inEditMode) { return React.cloneElement(headerInEditMode ? : <>, {}, [ @@ -96,6 +97,15 @@ export function CommentView(commentProps: Props) { > {quoteIcon} + {commentUrl ? ( + + ) : null} {canEdit ? (