@@ -5,6 +5,7 @@ import { customElement, property, state } from 'lit/decorators.js';
55import { classMap } from 'lit/directives/class-map.js' ;
66import { when } from 'lit/directives/when.js' ;
77import type { GlCommands } from '../../../../../constants.commands' ;
8+ import type { WebviewIds , WebviewViewIds } from '../../../../../constants.views' ;
89import type { LaunchpadCommandArgs } from '../../../../../plus/launchpad/launchpad' ;
910import {
1011 actionGroupMap ,
@@ -16,6 +17,7 @@ import type { AssociateIssueWithBranchCommandArgs } from '../../../../../plus/st
1617import { createCommandLink } from '../../../../../system/commands' ;
1718import { fromNow } from '../../../../../system/date' ;
1819import { interpolate , pluralize } from '../../../../../system/string' ;
20+ import { createWebviewCommandLink } from '../../../../../system/webview' ;
1921import type {
2022 BranchRef ,
2123 CreatePullRequestCommandArgs ,
@@ -694,6 +696,18 @@ export abstract class GlBranchCardBase extends GlElement {
694696 return html `< action-nav class ="branch-item__collapsed-actions "> ${ actions } </ action-nav > ` ;
695697 }
696698
699+ protected createWebviewCommandLink < T > (
700+ command : `${WebviewIds | WebviewViewIds } .${string } ` | `gitlens.plus.${string } `,
701+ args ?: T | any ,
702+ ) : string {
703+ return createWebviewCommandLink < T > (
704+ command ,
705+ 'gitlens.views.home' ,
706+ '' ,
707+ args ? { ...args , ...this . branchRef } : this . branchRef ,
708+ ) ;
709+ }
710+
697711 protected createCommandLink < T > ( command : GlCommands , args ?: T | any ) : string {
698712 return createCommandLink < T > ( command , args ? { ...args , ...this . branchRef } : this . branchRef ) ;
699713 }
0 commit comments