File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 16581658 ],
16591659 "panel" : [
16601660 {
1661- "id" : " codeql-model-details-view " ,
1661+ "id" : " codeql-model-details" ,
16621662 "title" : " CodeQL Model Details" ,
16631663 "icon" : " media/logo.svg"
16641664 }
16931693 "when" : " config.codeQL.canary"
16941694 }
16951695 ],
1696- "codeql-model-details-view " : [
1696+ "codeql-model-details" : [
16971697 {
16981698 "id" : " codeQLModelDetails" ,
16991699 "name" : " CodeQL Model Details" ,
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ export type ExplorerSelectionCommandFunction<Item> = (
5858type BuiltInVsCodeCommands = {
5959 // The codeQLDatabases.focus command is provided by VS Code because we've registered the custom view
6060 "codeQLDatabases.focus" : ( ) => Promise < void > ;
61+ "codeQLModelDetails.focus" : ( ) => Promise < void > ;
6162 "markdown.showPreviewToSide" : ( uri : Uri ) => Promise < void > ;
6263 "workbench.action.closeActiveEditor" : ( ) => Promise < void > ;
6364 revealFileInOS : ( uri : Uri ) => Promise < void > ;
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import {
4747import {
4848 enableFrameworkMode ,
4949 showLlmGeneration ,
50+ showModelDetailsView ,
5051 useLlmGenerationV2 ,
5152} from "../config" ;
5253import { getAutoModelUsages } from "./auto-model-usages-query" ;
@@ -138,7 +139,7 @@ export class DataExtensionsEditorView extends AbstractWebview<
138139
139140 break ;
140141 case "jumpToUsage" :
141- await this . jumpToUsage ( msg . location ) ;
142+ await this . handleJumpToUsage ( msg . location ) ;
142143
143144 break ;
144145 case "saveModeledMethods" :
@@ -211,6 +212,18 @@ export class DataExtensionsEditorView extends AbstractWebview<
211212 } ) ;
212213 }
213214
215+ protected async handleJumpToUsage ( location : ResolvableLocationValue ) {
216+ if ( showModelDetailsView ( ) ) {
217+ await this . openModelDetailsView ( ) ;
218+ } else {
219+ await this . jumpToUsage ( location ) ;
220+ }
221+ }
222+
223+ protected async openModelDetailsView ( ) {
224+ await this . app . commands . execute ( "codeQLModelDetails.focus" ) ;
225+ }
226+
214227 protected async jumpToUsage (
215228 location : ResolvableLocationValue ,
216229 ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments