Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lm/tools/fetchIssueTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface FetchIssueResult {
title: string;
body: string;
comments: {
author: string;
body: string;
}[];
fileChanges?: FileChange[];
Expand All @@ -43,7 +44,7 @@ export class FetchIssueTool extends RepoToolBase<FetchIssueToolParameters> {
const result: FetchIssueResult = {
title: issueOrPullRequest.title,
body: issueOrPullRequest.body,
comments: issueOrPullRequest.item.comments?.map(c => ({ body: c.body })) ?? []
comments: issueOrPullRequest.item.comments?.map(c => ({ body: c.body, author: c.author.login })) ?? []
};
if (issueOrPullRequest instanceof PullRequestModel) {
const fileChanges = await issueOrPullRequest.getFileChangesInfo();
Expand Down
4 changes: 3 additions & 1 deletion src/lm/tools/summarizeIssueTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Patch: ${fileChange.patch}
for (const [index, comment] of comments.entries()) {
issueOrPullRequestInfo += `
Comment ${index} :
Author: ${comment.author}
Body: ${comment.body}
`;
}
Expand All @@ -71,7 +72,8 @@ Body: ${comment.body}
You are an AI assistant who is very proficient in summarizing issues and PRs.
You will be given information relative to an issue or PR : the title, the body and the comments. In the case of a PR you will also be given patches of the PR changes.
Your task is to output a summary of all this information.
Do not output code. When you try to summarize PR changes, write in a textual format.
Do not output code. When you try to summarize PR changes, summarize in a textual format.
When you summarize comments, give a summary of each comment and mention the author clearly.
Make sure the summary is at least as short or shorter than the issue or PR with the comments and the patches if there are.
`;
}
Expand Down