mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 06:21:50 +01:00
GitHub - add "Open on GitHub" to blame hover (#237514)
* WIP - saving my work * Refactor hover rendering code
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { QuickPickItem, window, QuickPick, QuickPickItemKind, l10n, Disposable } from 'vscode';
|
||||
import { QuickPickItem, window, QuickPick, QuickPickItemKind, l10n, Disposable, Command } from 'vscode';
|
||||
import { RemoteSourceProvider, RemoteSource, PickRemoteSourceOptions, PickRemoteSourceResult, RemoteSourceAction } from './api/git-base';
|
||||
import { Model } from './model';
|
||||
import { throttle, debounce } from './decorators';
|
||||
@@ -123,6 +123,20 @@ export async function getRemoteSourceActions(model: Model, url: string): Promise
|
||||
return remoteSourceActions;
|
||||
}
|
||||
|
||||
export async function getRemoteSourceControlHistoryItemCommands(model: Model, url: string): Promise<Command[]> {
|
||||
const providers = model.getRemoteProviders();
|
||||
|
||||
const remoteSourceCommands = [];
|
||||
for (const provider of providers) {
|
||||
const providerCommands = await provider.getRemoteSourceControlHistoryItemCommands?.(url);
|
||||
if (providerCommands?.length) {
|
||||
remoteSourceCommands.push(...providerCommands);
|
||||
}
|
||||
}
|
||||
|
||||
return remoteSourceCommands;
|
||||
}
|
||||
|
||||
export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions & { branch?: false | undefined }): Promise<string | undefined>;
|
||||
export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions & { branch: true }): Promise<PickRemoteSourceResult | undefined>;
|
||||
export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions = {}): Promise<string | PickRemoteSourceResult | undefined> {
|
||||
|
||||
Reference in New Issue
Block a user