File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 18101810 {
18111811 "command" : " codeQL.gotoQLContextEditor" ,
18121812 "when" : " false"
1813+ },
1814+ {
1815+ "command" : " codeQL.trimCache" ,
1816+ "when" : " codeql.supportsTrimCache"
18131817 }
18141818 ],
18151819 "editor/context" : [
Original file line number Diff line number Diff line change @@ -1492,6 +1492,13 @@ export class CodeQLCliServer implements Disposable {
14921492 CliVersionConstraint . CLI_VERSION_WITH_QUICK_EVAL_COUNT ,
14931493 ) >= 0 ,
14941494 ) ;
1495+ await this . app . commands . execute (
1496+ "setContext" ,
1497+ "codeql.supportsTrimCache" ,
1498+ newVersion . compare (
1499+ CliVersionConstraint . CLI_VERSION_WITH_TRIM_CACHE ,
1500+ ) >= 0 ,
1501+ ) ;
14951502 } catch ( e ) {
14961503 this . _versionChangedListeners . forEach ( ( listener ) =>
14971504 listener ( undefined ) ,
@@ -1755,6 +1762,12 @@ export class CliVersionConstraint {
17551762 "2.14.0" ,
17561763 ) ;
17571764
1765+ /**
1766+ * CLI version where the query server supports the `evaluation/trimCache` method
1767+ * with `codeql database cleanup --mode=trim` semantics.
1768+ */
1769+ public static CLI_VERSION_WITH_TRIM_CACHE = new SemVer ( "2.15.1" ) ;
1770+
17581771 constructor ( private readonly cli : CodeQLCliServer ) {
17591772 /**/
17601773 }
You can’t perform that action at this time.
0 commit comments