Repository navigation
Add navigation commands into the editor - #5
ryanhoangt wants to merge 43 commits into
Conversation
|
Hey @xingyaoww, I think this PR is mostly ready. Some remaining issues I'm not sure how to handle properly yet:
|
Is there a way for us to create this directory elsewhere? Say something under
Hmm interesting, can you point me to the exact code for this? I'm thinking we could potentialy track back from an model given path? |
Yeah thanks for the idea, I think we can do this.
Below is the code, I looked into command output in the trajectory and seems like when the |
|
@xingyaoww I figured out a way to handle the workspace thing, thanks to the pwd already set to bash pwd for ipython. This should be finally ready. Please take another look, then I'll cut a release and finish up the PR in OH repo. |
| query = ts_language.query(tags_query) | ||
| captures = query.captures(parsed_tree.root_node) | ||
|
|
||
| parsed_tags = [] |
There was a problem hiding this comment.
Why do you call it tags? Seems a bit confusing? Is it just node?
There was a problem hiding this comment.
It's a term in tree-sitter when using query files, the output can be called tag, which is just a named entity, or syntax node: https://tree-sitter.github.io/tree-sitter/code-navigation-systems
|
lmk when this is ready for another look! |
|
Close this in favor of #35. |
Description
This PR is to add navigation commands into the editor:
jump_to_definitionfind_referencesThe 2 commands will be enabled when detecting a git repo in cwd. Otherwise, it will print:
Also, if the navigator commands are enabled, when the agent
views a file, the content is also appended with to encourage exploration. If no git repo found the TIP will not be appended.How Has This Been Tested?
symbol-navigator.1.mov