getappmap / appmap-intellij-plugin

MIT License
38 stars 9 forks source link

Links to files can be clicked from Navie #810

Closed dustinbyrne closed 3 days ago

dustinbyrne commented 1 week ago

In the most recent version of @appland/components, a click-link event is emitted from the frontend when the user clicks a non-http(s) URL from within Navie. It provides a single argument, which is the href of the link clicked. This event should be handled to open the file in the main editor.

The href sent:

E.g.:

/absolute/path/to/file.md
relative/path/to/file.md
file:///fully/qualified/absolute/path.md
file:.fully/qualified/relative/path.md

A best effort should be made to open the file given. In ambiguous cases, it's okay for now to select the best (or first) match.

Here's the implementation in Visual Studio Code: https://github.com/getappmap/vscode-appland/pull/1049/commits/33e9a63e6c511fad4a761a03400ab116530180b5