-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: Ensure agent responses are replies to the triggering comment #2
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
Conversation
## Summary Updated the prompt and code to ensure that when the action is triggered by a user comment, the agent's responses are actual **replies** to that specific comment rather than standalone comments. ## Changes - Updated `src/utils/prompt.ts` with explicit instructions for the agent to reply to comments using the triggering comment ID - Added `commentId` to `AuggieParams` type in `src/utils/index.ts` - Pass `commentId` through `src/index.ts` to `runAuggie` - Include triggering comment ID in the prompt context in `src/auggie.ts` ## Why Previously, the agent would sometimes create regular comments instead of threaded replies, making conversations harder to follow. This change ensures consistent behavior where responses appear as replies to the original triggering comment.
🤖 Augment PR SummarySummary: Ensures the agent can respond in-thread by passing the triggering 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/utils/prompt.ts
Outdated
| When this action is triggered by a user comment, you MUST reply to that specific comment (not create a new standalone comment). | ||
| - A "Triggering Comment ID" will be provided in the prompt context. | ||
| - Use this comment ID to create a REPLY to that comment using the GitHub API. | ||
| - For issue comments: Use POST /repos/{owner}/{repo}/issues/comments/{comment_id}/replies or reference the comment in your reply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub issue/PR timeline comments don’t support true threaded replies, and there isn’t a POST /repos/{owner}/{repo}/issues/comments/{comment_id}/replies REST endpoint. As written, this may cause the agent to call a non-existent API instead of posting a normal comment that quotes/links the triggering comment.
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 2e2096c. Updated the prompt to:
- Remove the non-existent endpoint - Removed reference to
POST /repos/{owner}/{repo}/issues/comments/{comment_id}/replieswhich doesn't exist - Clarify issue comment behavior - Issue/PR timeline comments don't support threaded replies; the agent should create a new comment and reference the triggering comment via quote or link
- Keep PR review comment threading -
in_reply_toparameter still works for PR review comments (inline code comments) - Updated workflow instructions - Made the workflow section consistent with the correct API usage
Address review feedback: GitHub issue/PR timeline comments don't support
threaded replies. Updated the agent prompt to:
- Remove reference to non-existent /issues/comments/{id}/replies endpoint
- Clarify that issue comments require creating new comments with references
- Keep in_reply_to for PR review comments (which do support threading)
- Update workflow instructions to be consistent with correct API usage
Summary
Updated the prompt and code to ensure that when the action is triggered by a user comment, the agent's responses are actual replies to that specific comment rather than standalone comments.
Changes
src/utils/prompt.tswith explicit instructions for the agent to reply to comments using the triggering comment IDcommentIdtoAuggieParamstype insrc/utils/index.tscommentIdthroughsrc/index.tstorunAuggiesrc/auggie.tsWhy
Previously, the agent would sometimes create regular comments instead of threaded replies, making conversations harder to follow. This change ensures consistent behavior where responses appear as replies to the original triggering comment.
Pull Request opened by Augment Code with guidance from the PR author