Cyfrin / aderyn-vscode

MIT License
1 stars 1 forks source link

SideBar TreeView takes results from the Diagnostics API #24

Open alexroan opened 2 months ago

alexroan commented 2 months ago

Currently, The Diagnostics API (what highlights the code in the editor) and the TreeView are constructed separately within the extension. This means that JSON parsing is done separately, twice, to build the two separate things.

Ideally, the TreeView should be a visual representation of what is already in the Diagnostics. The flow should look like this:

  1. Parse the JSON
  2. Build the Diagnostics and pass to API
  3. Retrieve diagnostics and build the TreeView from it.

This way, when we build more intelligent "watching" in aderyn, clearing the diagnostics has the benefit of also clearing the TreeView.