11import type { TextDocumentShowOptions , Uri } from 'vscode' ;
22import { ViewColumn } from 'vscode' ;
33import { GlyphChars } from '../constants' ;
4+ import type { Source } from '../constants.telemetry' ;
45import type { Container } from '../container' ;
56import type { DiffRange } from '../git/gitProvider' ;
67import type { GitCommit } from '../git/models/commit' ;
@@ -30,13 +31,18 @@ export interface DiffWithCommandArgs {
3031 fromComparison ?: boolean ;
3132 range ?: DiffRange ;
3233 showOptions ?: TextDocumentShowOptions ;
34+ source ?: Source ;
3335}
3436
3537@command ( )
3638export class DiffWithCommand extends GlCommandBase {
3739 static createMarkdownCommandLink ( args : DiffWithCommandArgs ) : string ;
38- static createMarkdownCommandLink ( commit : GitCommit , range ?: DiffRange ) : string ;
39- static createMarkdownCommandLink ( argsOrCommit : DiffWithCommandArgs | GitCommit , range ?: DiffRange ) : string {
40+ static createMarkdownCommandLink ( commit : GitCommit , range ?: DiffRange , source ?: Source ) : string ;
41+ static createMarkdownCommandLink (
42+ argsOrCommit : DiffWithCommandArgs | GitCommit ,
43+ range ?: DiffRange ,
44+ source ?: Source ,
45+ ) : string {
4046 let args : DiffWithCommandArgs | GitCommit ;
4147 if ( isCommit ( argsOrCommit ) ) {
4248 const commit = argsOrCommit ;
@@ -51,6 +57,7 @@ export class DiffWithCommand extends GlCommandBase {
5157 lhs : { sha : 'HEAD' , uri : commit . file . uri } ,
5258 rhs : { sha : '' , uri : commit . file . uri } ,
5359 range : range ,
60+ source : source ,
5461 } ;
5562 } else {
5663 args = {
@@ -59,6 +66,7 @@ export class DiffWithCommand extends GlCommandBase {
5966 lhs : { sha : commit . unresolvedPreviousSha , uri : commit . file . originalUri ?? commit . file . uri } ,
6067 rhs : { sha : commit . sha , uri : commit . file . uri } ,
6168 range : range ,
69+ source : source ,
6270 } ;
6371 }
6472 } else {
0 commit comments