Skip to content

Add incoming_calls and outgoing_calls tools #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

virtuald
Copy link

No description provided.

Copy link
Owner

@isaacphi isaacphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really interesting! Thank you, I didn't even know about this LSP function. Let me know what you think about my comment

// After this point we just return errors instead of erroring out
var result strings.Builder

for _, symbol := range results {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this tool it might be better to accept an exact location instead of a name, sort of like how hover works. The reason I say this is because "definition" is currently pretty imprecise, especailly in larger projects. If it is based on a location then it could be called after a first call to find out where the desired symbol is.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe?

In my initial experiments, I'm not sure adding these calls is actually useful anyways. For some projects the output is really large because the LLM isn't setting depth. I noticed that without this it would use references to basically do the same thing.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean you're not sure if these call_hierarchy tools are useful?

In my experience, it already works really well if you instruct the LLM to recursively look up definitions that are relevant to a specific code flow you're interested in. This way it only looks things up that are relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants