import { CodeAPI, CommitFileChange, CommitParams, CommitRecord, EntryInfo } from '@codeblitzjs/ide-code-api'; import { IClipboardService } from '@opensumi/ide-core-browser'; import { CommandContribution, CommandRegistry, Disposable } from '@opensumi/ide-core-common'; export declare enum RemoteResourceType { Branch = "branch", Branches = "branches", Commit = "commit", File = "file", Repo = "repo", Revision = "revision" } export type RemoteResource = { type: RemoteResourceType.Branch; branch: string; } | { type: RemoteResourceType.Branches; } | { type: RemoteResourceType.Commit; sha: string; } | { type: RemoteResourceType.File; branch?: string; fileName: string; range?: Range; } | { type: RemoteResourceType.Repo; }; export declare class CommandsContribution extends Disposable implements CommandContribution { private readonly codeModel; private readonly openerService; clipboardService: IClipboardService; registerCommands(registry: CommandRegistry): void; getFileBlame(filepath: string): Promise | void; openInRemote(filepath: string, res: RemoteResource): void; branch(repoPath: string): Promise<{ branches: string[]; head: string | null; }>; repository(): Promise<{ HEAD: import("./types").HeadRef | undefined; commit: string; headLabel: string; name: string; owner: string; platform: "github" | "gitlab" | "gitlink" | "atomgit" | "codeup" | "gitee"; ref: string; origin: string; }>; defaultBranch(repoPath: any): Promise; createCommit(repoPath: any, actions: any, header: any): Promise; searchFiles(repoPath: any, searchString: any): Promise; getFiles(repoPath: any): Promise; getTree(repoPath: string, path: string): Promise; getUser(repoPath: string): Promise; scmRefresh(commit: string, ref: string): Promise; refs(repoPath: string): Promise<{ head: string | null; heads: { name: string; hash: string; }[]; tags: { name: string; hash: string; }[]; } | undefined>; commits(repoPath: string, params: CommitParams): Promise; commitDiff(repoPath: string, sha: string): Promise; commitCompare(repoPath: string, from: string, to: string): Promise; commitFile(repoPath: string, commitHash: string, filePath: string, options?: any): Promise; getEntryInfo(repoPath: string, refName: string, filePath: string): Promise; remoteUrl(repoPath: string): Promise; checkConflict(repoPath: string, sourceBranch: string, targetBranch: string, prId: string): Promise; resolveConflict(repoPath: string, content: CodeAPI.ResolveConflict, sourceBranch: string, targetBranch: string, prId?: string): Promise; getConflict(repoPath: string, sourceBranch: string, targetBranch: string): Promise; createNewBranch(repoPath: string, newBranchName: string, ref: string): Promise; mergeBase(repoPath: string, target: string, source: string): Promise; createPR(repoPath: string, target: string, source: string, title: string, autoMerge: boolean): Promise; checkoutBranch(repoPath: string, branchName: string): Promise; checkoutCommit(repoPath: string, sha: string): Promise; _clipboard(method: 'readText'): Promise; _clipboard(method: 'writeText', text: string): Promise; } //# sourceMappingURL=commands.contribution.d.ts.map