import { CommitDetails , CompareFileCommitDetails , FileCommitDetails } from '../common/types' ; export const ICommandHandler = Symbol . for ( 'ICommandHandler' ) ; export interface ICommandHandler { } export const IGitHistoryCommandHandler = Symbol . for ( 'IGitHistoryCommandHandler' ) ; export interface IGitHistoryCommandHandler extends ICommandHandler { viewHistory ( x ) : Promise < void > ; } export const IGitFileHistoryCommandHandler = Symbol . for ( 'IGitFileHistoryCommandHandler' ) ; export interface IGitFileHistoryCommandHandler extends ICommandHandler { viewFile ( fileCommit ) : Promise < void > ; compareFileWithWorkspace ( fileCommit ) : Promise < void > ; compareFileWithPrevious ( fileCommit ) : Promise < void > ; compareFileAcrossCommits ( fileCommit ) : Promise < void > ; } export const IGitCommitViewExplorerCommandHandler = Symbol . for ( 'IGitCommitViewExplorerCommandHandler' ) ; export interface IGitCommitViewExplorerCommandHandler extends ICommandHandler { hideCommitView ( commit ) : Promise < void > ; showCommitView ( commit ) : Promise < void > ; } export const IFileCommandHandler = Symbol . for ( 'IFileCommandHandler' ) ; export type IFileCommandHandler = ICommandHandler ; export const IGitCompareCommitViewExplorerCommandHandler = Symbol . for ( 'IGitCompareCommitViewExplorerCommandHandler' ) ; export interface IGitCompareCommitViewExplorerCommandHandler extends ICommandHandler { hide ( ) : Promise < void > ; show ( ) : Promise < void > ; } export const IGitCommitCommandHandler = Symbol . for ( 'IGitCommitCommandHandler' ) ; export interface IGitCommitCommandHandler extends ICommandHandler { doSomethingWithCommit ( commit ) : Promise < void > ; createTagFromCommit ( commit , newTagName ? ) : Promise < void > ; createBranchFromCommit ( commit , newBranchName ? ) : Promise < void > ; onCommitSelected ( commit ) : Promise < void > ; } export const IGitRefCommandHandler = Symbol . for ( 'IGitRefCommandHandler' ) ; export type IGitRefCommandHandler = ICommandHandler ; export const IGitCommitViewDetailsCommandHandler = Symbol . for ( 'IGitCommitViewDetailsCommandHandler' ) ; export interface IGitCommitViewDetailsCommandHandler extends ICommandHandler { viewDetails ( commit ) : Promise < void > ; viewCommitTree ( commit ) : Promise < void > ; } export const IGitCherryPickCommandHandler = Symbol . for ( 'IGitCherryPickCommandHandler' ) ; export interface IGitCherryPickCommandHandler extends ICommandHandler { cherryPickCommit ( commit ) : Promise < void > ; } export const IGitCheckoutCommandHandler = Symbol . for ( 'IGitCheckoutCommandHandler' ) ; export interface IGitCheckoutCommandHandler extends ICommandHandler { checkoutCommit ( commit ) : Promise < void > ; } export const IGitMergeCommandHandler = Symbol . for ( 'IGitMergeCommandHandler' ) ; export interface IGitMergeCommandHandler extends ICommandHandler { merge ( commit ) : Promise < void > ; } export const IGitRebaseCommandHandler = Symbol . for ( 'IGitRebaseCommandHandler' ) ; export interface IGitRebaseCommandHandler extends ICommandHandler { rebase ( commit ) : Promise < void > ; } export const IGitRevertCommandHandler = Symbol . for ( 'IGitRevertCommandHandler' ) ; export interface IGitRevertCommandHandler extends ICommandHandler { revertCommit ( commit , showPrompt ? ) : Promise < void > ; } export const IGitCompareCommandHandler = Symbol . for ( 'IGitCompareCommandHandler' ) ; export interface IGitCompareCommandHandler extends ICommandHandler { readonly selectedCommit ? : CommitDetails ; select ( fileCommit ) : Promise < void > ; compare ( fileCommit ) : Promise < void > ; } export const IGitCompareFileCommandHandler = Symbol . for ( 'IGitCompareFileCommandHandler' ) ; export interface IGitCompareFileCommandHandler extends ICommandHandler { readonly selectedCommit ? : FileCommitDetails ; select ( fileCommit ) : Promise < void > ; compare ( fileCommit ) : Promise < void > ; } export const ICommandHandlerManager = Symbol . for ( 'ICommandHandlerManager' ) ; export interface ICommandHandlerManager { registerHandlers ( ) : void ; }