@@ -17,6 +17,7 @@ import {
1717 QuickCommand ,
1818 StepResultBreak ,
1919} from '../../commands/quickCommand' ;
20+ import { OpenOnGitHubQuickInputButton } from '../../commands/quickCommand.buttons' ;
2021import { getSteps } from '../../commands/quickWizard.utils' ;
2122import { proBadge } from '../../constants' ;
2223import type { IntegrationId } from '../../constants.integrations' ;
@@ -33,6 +34,7 @@ import { getScopedCounter } from '../../system/counter';
3334import { fromNow } from '../../system/date' ;
3435import { some } from '../../system/iterable' ;
3536import { configuration } from '../../system/vscode/configuration' ;
37+ import { openUrl } from '../../system/vscode/utils' ;
3638
3739export type StartWorkItem = {
3840 item : SearchedIssue ;
@@ -324,6 +326,7 @@ export class StartWorkCommand extends QuickCommand<State> {
324326 context : Context ,
325327 ) : StepResultGenerator < StartWorkItem | StartWorkAction > {
326328 const buildIssueItem = ( i : StartWorkItem ) => {
329+ const buttons = i . item . issue . url ? [ OpenOnGitHubQuickInputButton ] : [ ] ;
327330 return {
328331 label :
329332 i . item . issue . title . length > 60 ? `${ i . item . issue . title . substring ( 0 , 60 ) } ...` : i . item . issue . title ,
@@ -335,6 +338,7 @@ export class StartWorkCommand extends QuickCommand<State> {
335338 iconPath : i . item . issue . author ?. avatarUrl != null ? Uri . parse ( i . item . issue . author . avatarUrl ) : undefined ,
336339 item : i ,
337340 picked : i . item . issue . id === state . item ?. item ?. issue . id ,
341+ buttons : buttons ,
338342 } ;
339343 } ;
340344
@@ -378,6 +382,13 @@ export class StartWorkCommand extends QuickCommand<State> {
378382 matchOnDescription : true ,
379383 matchOnDetail : true ,
380384 items : items ,
385+ onDidClickItemButton : ( _quickpick , button , { item } ) => {
386+ if ( button === OpenOnGitHubQuickInputButton && typeof item !== 'string' ) {
387+ this . open ( item ) ;
388+ return true ;
389+ }
390+ return false ;
391+ } ,
381392 } ) ;
382393
383394 const selection : StepSelection < typeof step > = yield step ;
@@ -395,6 +406,11 @@ export class StartWorkCommand extends QuickCommand<State> {
395406 }
396407 }
397408
409+ private open ( item : StartWorkItem ) : void {
410+ if ( item . item . issue . url == null ) return ;
411+ void openUrl ( item . item . issue . url ) ;
412+ }
413+
398414 private async getConnectedIntegrations ( ) : Promise < Map < IntegrationId , boolean > > {
399415 const connected = new Map < IntegrationId , boolean > ( ) ;
400416 await Promise . allSettled (
0 commit comments