Convert codeQL.copyVariantAnalysisRepoList command
This commit is contained in:
@@ -2,6 +2,8 @@ import type { CommandManager } from "../packages/commands";
|
||||
import type { Uri } from "vscode";
|
||||
import type { DbTreeViewItem } from "../databases/ui/db-tree-view-item";
|
||||
import type { QueryHistoryInfo } from "../query-history/query-history-info";
|
||||
import { RepositoriesFilterSortStateWithIds } from "../pure/variant-analysis-filter-sort";
|
||||
import { VariantAnalysis } from "../variant-analysis/shared/variant-analysis";
|
||||
|
||||
// A command function matching the signature that VS Code calls when
|
||||
// a command on a selection is invoked.
|
||||
@@ -62,6 +64,10 @@ export type QueryHistoryCommands = {
|
||||
|
||||
// Commands tied to variant analysis
|
||||
export type VariantAnalysisCommands = {
|
||||
"codeQL.copyVariantAnalysisRepoList": (
|
||||
variantAnalysisId: number,
|
||||
filterSort?: RepositoriesFilterSortStateWithIds,
|
||||
) => Promise<void>;
|
||||
"codeQL.openVariantAnalysisLogs": (
|
||||
variantAnalysisId: number,
|
||||
) => Promise<void>;
|
||||
|
||||
@@ -1100,21 +1100,6 @@ async function activateWithInstalledDistribution(
|
||||
app.commands.register(commandName as keyof AllCommands, command);
|
||||
}
|
||||
|
||||
ctx.subscriptions.push(
|
||||
commandRunner(
|
||||
"codeQL.copyVariantAnalysisRepoList",
|
||||
async (
|
||||
variantAnalysisId: number,
|
||||
filterSort?: RepositoriesFilterSortStateWithIds,
|
||||
) => {
|
||||
await variantAnalysisManager.copyRepoListToClipboard(
|
||||
variantAnalysisId,
|
||||
filterSort,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
ctx.subscriptions.push(
|
||||
commandRunner(
|
||||
"codeQL.monitorVariantAnalysis",
|
||||
|
||||
@@ -131,6 +131,8 @@ export class VariantAnalysisManager
|
||||
|
||||
getCommands(): VariantAnalysisCommands {
|
||||
return {
|
||||
"codeQL.copyVariantAnalysisRepoList":
|
||||
this.copyRepoListToClipboard.bind(this),
|
||||
"codeQL.openVariantAnalysisLogs": this.openVariantAnalysisLogs.bind(this),
|
||||
"codeQL.runVariantAnalysis":
|
||||
this.runVariantAnalysisFromCommand.bind(this),
|
||||
|
||||
Reference in New Issue
Block a user