@@ -3363,7 +3363,10 @@ function ChatViewContent(props: ChatViewProps) {
33633363 * same number would be worse than not opening it at all.
33643364 */
33653365 const openLinkedItem = useCallback (
3366- ( kind : "issue" | "pull-request" , link : { repository : string ; number : number ; url : string } ) => {
3366+ (
3367+ kind : "issue" | "pull-request" ,
3368+ link : { provider ?: string ; repository : string ; number : number ; url : string } ,
3369+ ) => {
33673370 const supported = kind === "issue" ? supportsIssues : supportsPullRequests ;
33683371 const project =
33693372 activeThreadEnvironmentId === null
@@ -3380,6 +3383,7 @@ function ChatViewContent(props: ChatViewProps) {
33803383 }
33813384 const reference = {
33823385 projectId : project . id ,
3386+ ...( kind === "issue" && link . provider !== undefined ? { provider : link . provider } : { } ) ,
33833387 repository : repositoryForProjectLink ( project , link . repository ) ,
33843388 number : link . number ,
33853389 } ;
@@ -3393,7 +3397,8 @@ function ChatViewContent(props: ChatViewProps) {
33933397 [ activeThreadEnvironmentId , activeThreadRef , allProjects , supportsIssues , supportsPullRequests ] ,
33943398 ) ;
33953399 const openLinkedIssue = useCallback (
3396- ( link : { repository : string ; number : number ; url : string } ) => openLinkedItem ( "issue" , link ) ,
3400+ ( link : { provider ?: string ; repository : string ; number : number ; url : string } ) =>
3401+ openLinkedItem ( "issue" , link ) ,
33973402 [ openLinkedItem ] ,
33983403 ) ;
33993404 const openLinkedPullRequest = useCallback (
@@ -4223,7 +4228,9 @@ function ChatViewContent(props: ChatViewProps) {
42234228 useRightPanelStore . getState ( ) . openIssues ( activeThreadRef ) ;
42244229 } , [ activeThreadRef ] ) ;
42254230 const selectIssueInPanel = useCallback (
4226- ( target : { projectId : string ; repository : string ; number : number } | null ) => {
4231+ (
4232+ target : { projectId : string ; provider ?: string ; repository : string ; number : number } | null ,
4233+ ) => {
42274234 if ( ! activeThreadRef ) return ;
42284235 useRightPanelStore . getState ( ) . selectIssueInPanel ( activeThreadRef , target ) ;
42294236 } ,
@@ -6269,10 +6276,13 @@ function ChatViewContent(props: ChatViewProps) {
62696276 // into the thread this panel is open beside, so reading an issue and acting on it stay one
62706277 // conversation instead of stranding the reader in a thread they did not ask for.
62716278 < IssueDetailPanel
6272- key = { ` ${ activeRightPanelSurface . repository } # ${ activeRightPanelSurface . number } ` }
6279+ key = { activeRightPanelSurface . id }
62736280 environmentId = { activeThread . environmentId }
62746281 reference = { {
62756282 projectId : activeRightPanelSurface . projectId as ProjectId ,
6283+ ...( activeRightPanelSurface . provider === undefined
6284+ ? { }
6285+ : { provider : activeRightPanelSurface . provider } ) ,
62766286 repository : activeRightPanelSurface . repository ,
62776287 number : activeRightPanelSurface . number ,
62786288 } }
0 commit comments