Skip to content

add signature_help tool #110

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

Merged
merged 3 commits into from
May 5, 2025
Merged

add signature_help tool #110

merged 3 commits into from
May 5, 2025

Conversation

jakemac53
Copy link
Contributor

@jakemac53 jakemac53 commented May 5, 2025

This forwards directly to the LSP signature help functionality.

Allows requesting information about the signature of some API being used at a specific cursor location.

Note: Does not seem to give useful information if the location is a definition site (such as one returned by a workspace_symbol lookup). But this looks like it is by design probably.

Copy link

github-actions bot commented May 5, 2025

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

@bwilkerson
Copy link
Member

Does not seem to give useful information if the location is a definition site ...

I think the primary use that VS Code has for this is to display information about the parameters while the user is attempting to edit a call site. I don't think it helps much at the declaration site. But it would be good to double check with Danny to make sure my understanding is correct.

@jakemac53
Copy link
Contributor Author

I think the primary use that VS Code has for this is to display information about the parameters while the user is attempting to edit a call site. I don't think it helps much at the declaration site. But it would be good to double check with Danny to make sure my understanding is correct.

Yes, this is my understanding as well, and I tried to describe that in the text for the tool. I just wanted to call it out in the review, because we are also going to want that functionality (give me the docs for declaration X).

@auto-submit auto-submit bot merged commit e0e33f4 into main May 5, 2025
22 checks passed
@auto-submit auto-submit bot deleted the signature-help branch May 5, 2025 21:52
@bwilkerson
Copy link
Member

The docs are included in the hover text (even at the declaration site). Not sure if the hover text is in a good format for LLMs, though. Hovers also include the docs and signature information at call sites, so it might be a better all-purpose tool in some ways.

Also, all of the docs we currently return are minimally pre-processed. We remove dartdoc tags that we don't understand how to render, so if that data is useful to the LLMs then we might need a dedicated protocol just for that purpose.

@jakemac53
Copy link
Contributor Author

jakemac53 commented May 5, 2025

The docs are included in the hover text (even at the declaration site). Not sure if the hover text is in a good format for LLMs, though. Hovers also include the docs and signature information at call sites, so it might be a better all-purpose tool in some ways.

Ah interesting, maybe that would be better. Most of the time though I think this will be at call sites and I validated that the existing response data is sufficient for an LLM to use, given enough prompting.

sigurdm pushed a commit to sigurdm/ai that referenced this pull request May 6, 2025
This forwards directly to the [LSP signature help](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_signatureHelp) functionality.

Allows requesting information about the signature of some API being _used_ at a specific cursor location.

**Note**: Does not seem to give useful information if the location is a _definition_ site (such as one returned by a workspace_symbol lookup). But this looks like it is by design probably.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants