Skip to content

Commit d360815

Browse files
authored
Remove feature flags for queries panel + language selector (#3075)
1 parent ec7640f commit d360815

File tree

4 files changed

+7
-23
lines changed

4 files changed

+7
-23
lines changed

extensions/ql-vscode/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [UNRELEASED]
44

5+
- Add new CodeQL views for managing databases and queries:
6+
1. A queries panel, to create and run queries in one place.
7+
2. A language selector, to quickly determine the language compatibility of databases and queries.
8+
9+
For more information, see the [documentation](https://codeql.github.com/docs/codeql-for-visual-studio-code/analyzing-your-projects/#filtering-databases-and-queries-by-language).
510
- When adding a CodeQL database, we no longer add the database source folder to the workspace by default (since this caused bugs in single-folder workspaces). [#3047](https://github.com/github/vscode-codeql/pull/3047)
611
- You can manually add individual database source folders to the workspace with the "Add Database Source to Workspace" right-click command in the databases view.
712
- To restore the old behavior of adding all database source folders by default, set the `codeQL.addingDatabases.addDatabaseSourceToWorkspace` setting to `true`.

extensions/ql-vscode/package.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -1686,10 +1686,6 @@
16861686
"command": "codeQL.mockGitHubApiServer.unloadScenario",
16871687
"when": "config.codeQL.mockGitHubApiServer.enabled && codeQL.mockGitHubApiServer.scenarioLoaded"
16881688
},
1689-
{
1690-
"command": "codeQL.createQuery",
1691-
"when": "config.codeQL.codespacesTemplate || config.codeQL.canary && config.codeQL.queriesPanel"
1692-
},
16931689
{
16941690
"command": "codeQLTests.acceptOutputContextTestItem",
16951691
"when": "false"
@@ -1774,17 +1770,15 @@
17741770
"ql-container": [
17751771
{
17761772
"id": "codeQLLanguageSelection",
1777-
"name": "Language",
1778-
"when": "config.codeQL.canary && config.codeQL.showLanguageFilter"
1773+
"name": "Language"
17791774
},
17801775
{
17811776
"id": "codeQLDatabases",
17821777
"name": "Databases"
17831778
},
17841779
{
17851780
"id": "codeQLQueries",
1786-
"name": "Queries",
1787-
"when": "config.codeQL.canary && config.codeQL.queriesPanel"
1781+
"name": "Queries"
17881782
},
17891783
{
17901784
"id": "codeQLVariantAnalysisRepositories",

extensions/ql-vscode/src/config.ts

-9
Original file line numberDiff line numberDiff line change
@@ -710,15 +710,6 @@ export async function setAutogenerateQlPacks(choice: AutogenerateQLPacks) {
710710
);
711711
}
712712

713-
/**
714-
* A flag indicating whether to show the queries panel in the QL view container.
715-
*/
716-
const QUERIES_PANEL = new Setting("queriesPanel", ROOT_SETTING);
717-
718-
export function showQueriesPanel(): boolean {
719-
return !!QUERIES_PANEL.getValue<boolean>();
720-
}
721-
722713
const MODEL_SETTING = new Setting("model", ROOT_SETTING);
723714
const FLOW_GENERATION = new Setting("flowGeneration", MODEL_SETTING);
724715
const LLM_GENERATION = new Setting("llmGeneration", MODEL_SETTING);

extensions/ql-vscode/src/queries-panel/queries-module.ts

-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { CodeQLCliServer } from "../codeql-cli/cli";
22
import { extLogger } from "../common/logging/vscode";
33
import { App } from "../common/app";
4-
import { isCanary, showQueriesPanel } from "../config";
54
import { DisposableObject } from "../common/disposable-object";
65
import { QueriesPanel } from "./queries-panel";
76
import { QueryDiscovery } from "./query-discovery";
@@ -41,11 +40,6 @@ export class QueriesModule extends DisposableObject {
4140
langauageContext: LanguageContextStore,
4241
cliServer: CodeQLCliServer,
4342
): void {
44-
// Currently, we only want to expose the new panel when we are in canary mode
45-
// and the user has enabled the "Show queries panel" flag.
46-
if (!isCanary() || !showQueriesPanel()) {
47-
return;
48-
}
4943
void extLogger.log("Initializing queries panel.");
5044

5145
const queryPackDiscovery = new QueryPackDiscovery(cliServer);

0 commit comments

Comments
 (0)