Skip to content

Parse the comments before the operation as it’s description #10

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 5 commits into from
Apr 29, 2025

Conversation

Jephuff
Copy link
Contributor

@Jephuff Jephuff commented Apr 16, 2025

This adds a secondary description option. If the generated descriptions aren't working for the models, or they are too big users can add a comment before the operation that will be used for the description instead. If no comment exists, it will still do the generated description.

In this example the description would be "this tool will just return a hat for you."

# this tool will just return a hat for you.
query AToolToGetHats {
  hat
}

@Jephuff Jephuff force-pushed the jeffrey/parse-comment-description branch from 066cff9 to 6973b08 Compare April 16, 2025 18:27
@Jephuff Jephuff force-pushed the jeffrey/parse-comment-description branch from 4037e69 to a147242 Compare April 26, 2025 00:17
@Jephuff Jephuff changed the title POC parse the comments before the operation as it’s description Parse the comments before the operation as it’s description Apr 28, 2025
@Jephuff Jephuff marked this pull request as ready for review April 28, 2025 21:59
match comment_description {
Some(description) => description,
None => {
let mut tree_shaker = TreeShaker::new(graphql_schema, fragment_defs);
Copy link
Contributor

Choose a reason for hiding this comment

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

So if the description is overridden, we're also not providing any type information?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now yes, the comment is treated as a full override.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok for now. We may need to consider how to make this available to the agent. This may be where having the ability to introspect tools comes in.

@Jephuff Jephuff merged commit d5950c9 into main Apr 29, 2025
4 checks passed
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