add explainTree command returning ExplainTreeNode for visual explain data#493
add explainTree command returning ExplainTreeNode for visual explain data#493shhhhreya wants to merge 1 commit intocodefori:mainfrom
Conversation
|
I have explained this in other PRs, but we should be using a proper extension API for this functionality. |
|
@shhhhreya As Liam mentioned, lets avoid adding arbitrary commands just for our extension to use. We should always look to add to the exported API as this is the standard way of exposing logic to other extensions. You can sorta see an example here: #480 In this case, we should look into what APIs we want to expose related to Visual Explain. |
|
You can find more info about exported APIs here: https://code.visualstudio.com/api/references/vscode-api#extensions. You can also refer to several of the other extensions to see how we structure this (check out Code for IBM i) |
Summary
Adds a new VS Code command
vscode-db2i.explain.explainTreewhich constructs anExplainTreefrom the providedvedataand returns the generated top-levelExplainTreeNodeto get structured visual explain data.Changes
vscode-db2i.explain.explainTreeExplainTreelogic to generate the tree structureexplainTree.get()Why
This command is required for the BOB MCP tool to retrieve visual explain data in a proper structured format from vedata, so it can be rendered correctly in MCP tool.