|
1 | 1 | import type { CommandManager } from "../packages/commands"; |
2 | | -import type { Uri } from "vscode"; |
| 2 | +import type { Uri, Range } from "vscode"; |
3 | 3 | import type { DbTreeViewItem } from "../databases/ui/db-tree-view-item"; |
4 | 4 | import type { DatabaseItem } from "../local-databases"; |
5 | 5 | import type { QueryHistoryInfo } from "../query-history/query-history-info"; |
@@ -29,6 +29,21 @@ export type BaseCommands = { |
29 | 29 | "codeQL.openDocumentation": () => Promise<void>; |
30 | 30 | }; |
31 | 31 |
|
| 32 | +// Commands used for running local queries |
| 33 | +export type LocalQueryCommands = { |
| 34 | + "codeQL.runQuery": (uri?: Uri) => Promise<void>; |
| 35 | + "codeQL.runQueryContextEditor": (uri?: Uri) => Promise<void>; |
| 36 | + "codeQL.runQueryOnMultipleDatabases": (uri?: Uri) => Promise<void>; |
| 37 | + "codeQL.runQueryOnMultipleDatabasesContextEditor": ( |
| 38 | + uri?: Uri, |
| 39 | + ) => Promise<void>; |
| 40 | + "codeQL.runQueries": SelectionCommandFunction<Uri>; |
| 41 | + "codeQL.quickEval": (uri: Uri) => Promise<void>; |
| 42 | + "codeQL.quickEvalContextEditor": (uri: Uri) => Promise<void>; |
| 43 | + "codeQL.codeLensQuickEval": (uri: Uri, range: Range) => Promise<void>; |
| 44 | + "codeQL.quickQuery": () => Promise<void>; |
| 45 | +}; |
| 46 | + |
32 | 47 | // Commands used for the query history panel |
33 | 48 | export type QueryHistoryCommands = { |
34 | 49 | // Commands in the "navigation" group |
@@ -115,3 +130,7 @@ export type AllCommands = BaseCommands & |
115 | 130 | DatabasePanelCommands; |
116 | 131 |
|
117 | 132 | export type AppCommandManager = CommandManager<AllCommands>; |
| 133 | + |
| 134 | +// Separate command manager because it uses a different logger |
| 135 | +export type QueryServerCommands = LocalQueryCommands; |
| 136 | +export type QueryServerCommandManager = CommandManager<QueryServerCommands>; |
0 commit comments