Skip to content

Commit bc1c08c

Browse files
committed
Merge remote-tracking branch 'origin/main' into koesie10/separate-bqrs-types
2 parents b8ec847 + 9cb4d23 commit bc1c08c

71 files changed

Lines changed: 943 additions & 5348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/test-plan.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ Run one of the above MRVAs, but cancel it from within VS Code:
170170

171171
Note that this test requires the feature flag: `codeQL.model.llmGeneration`
172172

173+
A package that the AI normally gives models for is `javax.servlet-api` from the `jhy/jsoup` repository.
174+
173175
1. Click "Model with AI".
174176
- Check that rows change to "Thinking".
175177
- Check that results come back and rows get filled out.

extensions/ql-vscode/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- Remove support for CodeQL CLI versions older than 2.11.6. [#3087](https://github.com/github/vscode-codeql/pull/3087)
77
- Preserve focus on results viewer when showing a location in a file. [#3088](https://github.com/github/vscode-codeql/pull/3088)
88
- The `dataflowtracking` and `tainttracking` snippets expand to the new module-based interface. [#3091](https://github.com/github/vscode-codeql/pull/3091)
9+
- The compare view will now show a loading message while the results are loading. [#3107](https://github.com/github/vscode-codeql/pull/3107)
10+
- Make top-banner of the model editor sticky [#3120](https://github.com/github/vscode-codeql/pull/3120)
911

1012
## 1.10.0 - 16 November 2023
1113

extensions/ql-vscode/package-lock.json

Lines changed: 62 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,7 @@
20062006
"@vscode/vsce": "^2.19.0",
20072007
"ansi-colors": "^4.1.1",
20082008
"applicationinsights": "^2.3.5",
2009-
"cosmiconfig": "^8.2.0",
2009+
"cosmiconfig": "^9.0.0",
20102010
"cross-env": "^7.0.3",
20112011
"css-loader": "^6.8.1",
20122012
"del": "^6.0.0",

extensions/ql-vscode/src/codeql-cli/cli.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { EOL } from "os";
22
import { spawn } from "child-process-promise";
33
import * as child_process from "child_process";
44
import { readFile } from "fs-extra";
5-
import { dirname, join, delimiter } from "path";
5+
import { delimiter, dirname, join } from "path";
66
import * as sarif from "sarif";
77
import { SemVer } from "semver";
88
import { Readable } from "stream";
@@ -15,7 +15,7 @@ import {
1515
DecodedBqrs,
1616
DecodedBqrsChunk,
1717
} from "../common/bqrs-cli-types";
18-
import { allowCanaryQueryServer, CliConfig } from "../config";
18+
import { CliConfig } from "../config";
1919
import {
2020
DistributionProvider,
2121
FindDistributionResultKind,
@@ -1772,11 +1772,6 @@ export class CliVersionConstraint {
17721772
return (await this.cli.getVersion()).compare(v) >= 0;
17731773
}
17741774

1775-
async supportsNewQueryServer() {
1776-
// This allows users to explicitly opt-out of the new query server.
1777-
return allowCanaryQueryServer();
1778-
}
1779-
17801775
async supportsQlpacksKind() {
17811776
return this.isVersionAtLeast(
17821777
CliVersionConstraint.CLI_VERSION_WITH_QLPACKS_KIND,

extensions/ql-vscode/src/common/interface-types.ts

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,15 @@ interface ChangeCompareMessage {
336336
newResultSetName: string;
337337
}
338338

339-
export type ToCompareViewMessage = SetComparisonsMessage;
339+
export type ToCompareViewMessage =
340+
| SetComparisonQueryInfoMessage
341+
| SetComparisonsMessage;
340342

341343
/**
342-
* Message to the compare view that specifies the query results to compare.
344+
* Message to the compare view that sets the metadata of the compared queries.
343345
*/
344-
export interface SetComparisonsMessage {
345-
readonly t: "setComparisons";
346+
export interface SetComparisonQueryInfoMessage {
347+
readonly t: "setComparisonQueryInfo";
346348
readonly stats: {
347349
fromQuery?: {
348350
name: string;
@@ -355,28 +357,44 @@ export interface SetComparisonsMessage {
355357
time: string;
356358
};
357359
};
358-
readonly columns: readonly Column[];
360+
readonly databaseUri: string;
359361
readonly commonResultSetNames: string[];
362+
}
363+
364+
/**
365+
* Message to the compare view that specifies the query results to compare.
366+
*/
367+
export interface SetComparisonsMessage {
368+
readonly t: "setComparisons";
360369
readonly currentResultSetName: string;
361-
readonly rows: QueryCompareResult | undefined;
370+
readonly result: QueryCompareResult | undefined;
362371
readonly message: string | undefined;
363-
readonly databaseUri: string;
364372
}
365373

374+
type QueryCompareResult = RawQueryCompareResult | InterpretedQueryCompareResult;
375+
366376
/**
367377
* from is the set of rows that have changes in the "from" query.
368378
* to is the set of rows that have changes in the "to" query.
369-
* They are in the same order, so element 1 in "from" corresponds to
370-
* element 1 in "to".
371-
*
372-
* If an array element is null, that means that the element was removed
373-
* (or added) in the comparison.
374379
*/
375-
export type QueryCompareResult = {
380+
export type RawQueryCompareResult = {
381+
kind: "raw";
382+
columns: readonly Column[];
376383
from: Row[];
377384
to: Row[];
378385
};
379386

387+
/**
388+
* from is the set of results that have changes in the "from" query.
389+
* to is the set of results that have changes in the "to" query.
390+
*/
391+
type InterpretedQueryCompareResult = {
392+
kind: "interpreted";
393+
sourceLocationPrefix: string;
394+
from: sarif.Result[];
395+
to: sarif.Result[];
396+
};
397+
380398
/**
381399
* Extract the name of the default result. Prefer returning
382400
* 'alerts', or '#select'. Otherwise return the first in the list.

0 commit comments

Comments
 (0)