// The Oxygen extension's exported API, as its src/api.ts declares it. // Kept as a copy of the interface so this extension compiles alone. export interface RemoteProvider { readonly id: string; readonly label: string; matches(remoteUrl: string): boolean; urlFor(remoteUrl: string, target: RemoteTarget): string | undefined; } export type RemoteTarget = | { kind: "repository" } | { kind: "bookmark"; name: string } | { kind: "change"; hash: string } | { kind: "file"; reference: string; path: string; line?: number } | { kind: "proposals" } | { kind: "issues" }; export interface RepositoryHandle { readonly root: string; readonly status: unknown; readonly bookmarks: { name: string; heads: string[]; current?: boolean }[]; readonly currentBookmark: string | undefined; remotes(): Promise<{ name: string; url: string }[]>; json(args: string[]): Promise; refresh(): Promise; } export interface OxygenAPI { readonly version: 1; readonly repositories: readonly RepositoryHandle[]; readonly onDidChangeStatus: (listener: (repo: RepositoryHandle) => void) => { dispose(): void }; readonly onDidChangeRepositories: (listener: () => void) => { dispose(): void }; getRepository(fsPath: string): RepositoryHandle | undefined; registerRemoteProvider(provider: RemoteProvider): { dispose(): void }; remoteProviders(): readonly RemoteProvider[]; }