-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(vs-code): Agent Manager - Code diff hunks to add context to comments in the PR view panel #13071
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
feat(vs-code): Agent Manager - Code diff hunks to add context to comments in the PR view panel #13071
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
ada60ca
feat(pr-diff): show diff hunk in comments on pr panel
cosi-conda feb7fc2
feat(pr-diff): organize files
cosi-conda 3ce2ef1
feat(pr-diff): Log if no cwd for wt
cosi-conda 695e685
feat(pr-diff): Move resolve button / styles and add error message
cosi-conda 66b78db
feat(pr-diff): Move consts to file and add catch to resolve comment
cosi-conda 5996834
feat(pr-diff): Jump to comments section; Add unresolve comment function
cosi-conda 91773d6
feat(pr-actions): Resolve/unresolve comment functionality with error …
cosi-conda 13dd6de
feat(pr-actions): Jump to comments
cosi-conda de6bb95
feat(pr-actions): Prevent scroll on update
cosi-conda dbf7796
feat(pr-actions): Scroll to top floating button
cosi-conda 1ac66c3
feat(pr-actions): Refresh data on open pr panel
cosi-conda 15d13f3
feat(pr-actions): Match colors to diff panel and consolidate types
cosi-conda 954ee41
feat(pr-actions): Clear state if index changes
cosi-conda 95b2e18
feat(pr-actions): Unit tests
cosi-conda 8a9990d
feat(pr-actions): Unit tests
cosi-conda 7010e7e
Merge branch 'main' into feature/pr-actions-diff-hunk
cosi-conda 6f5b531
feat(pr-actions): Unit tests
cosi-conda c7da8a6
feat(pr-actions): Unit tests
cosi-conda 58ca25f
feat(pr-actions): Unit tests
cosi-conda b42d834
Merge branch 'main' into feature/pr-actions-diff-hunk
cosi-conda 5451451
feat(pr-actions): Prettier
cosi-conda 0be9469
feat(pr-actions): Unit test mocks
cosi-conda 851d372
feat(pr-actions): Unit test mocks
cosi-conda 9fde682
feat(pr-actions): Unit test mocks
cosi-conda 3746ae5
fix(pr-actions): post to webview if no cwd
cosi-conda 4af09d1
fix(pr-actions): Use button for clickable pr summary item
cosi-conda 3e3dd3d
fix(pr-actions): Add changeset md
cosi-conda 328dbd3
fix(pr-actions): Adjust typing for better type safety in pr status br…
cosi-conda d96d357
fix(pr-actions): Adjust comment total count and loading style; Fetch …
cosi-conda 4ee3934
fix(pr-actions): Adjut fallback for thread id in parseComments
cosi-conda ec94d8b
feat(pr-actions): Prettier
cosi-conda 7d2ba0a
Merge branch 'main' into feature/pr-actions-diff-hunk
cosi-conda 938105d
fix(pr-view): Address bot comment about timing of refreshing pr data
cosi-conda 4794595
Merge branch 'main' into feature/pr-actions-diff-hunk
cosi-conda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "kilo-code": minor | ||
| --- | ||
|
|
||
| Add Agent Manager PR comment actions: resolve/unresolve review threads, jump to comments section, and scroll-to-top for PR diff view. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { execGhRead } from "../gh" | ||
|
cosi-conda marked this conversation as resolved.
|
||
| import { GH_MUTATION_TIMEOUT } from "./pr-constants" | ||
|
|
||
| export async function resolveComment(threadId: string, cwd: string): Promise<void> { | ||
| const mutation = `mutation($id: ID!) { resolveReviewThread(input: { threadId: $id }) { thread { isResolved } } }` | ||
| try { | ||
| await execGhRead(["api", "graphql", "-f", `query=${mutation}`, "-F", `id=${threadId}`], { | ||
| cwd, | ||
| timeout: GH_MUTATION_TIMEOUT, | ||
| }) | ||
| } catch (err) { | ||
| const msg = err instanceof Error ? err.message : String(err) | ||
| const stderr = (err as Record<string, unknown>).stderr | ||
| throw new Error(`Could not resolve thread: ${msg}${stderr ? ` — ${stderr}` : ""}`) | ||
| } | ||
| } | ||
|
|
||
| export async function unresolveComment(threadId: string, cwd: string): Promise<void> { | ||
| const mutation = `mutation($id: ID!) { unresolveReviewThread(input: { threadId: $id }) { thread { isResolved } } }` | ||
| try { | ||
| await execGhRead(["api", "graphql", "-f", `query=${mutation}`, "-F", `id=${threadId}`], { | ||
| cwd, | ||
| timeout: GH_MUTATION_TIMEOUT, | ||
| }) | ||
| } catch (err) { | ||
| const msg = err instanceof Error ? err.message : String(err) | ||
| const stderr = (err as Record<string, unknown>).stderr | ||
| throw new Error(`Could not unresolve thread: ${msg}${stderr ? ` — ${stderr}` : ""}`) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| // Timeouts for gh CLI and GraphQL calls in PR actions | ||
| export const GH_MUTATION_TIMEOUT = 15_000 // 15 seconds — gh api graphql mutations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[SUGGESTION]:
total(fromtotalCount) andunresolved(from first 100 nodes) can disagreetotalCountcounts all review threads, butunresolvedis still computed only from the first 100 fetched nodes. On a PR with >100 threads the summary could show e.g. "103 comments" with a success status while unresolved threads exist beyond the first page (andcommentspassed to the webview is also capped at 100). Probably rare in practice, but worth either paginating (reviewThreadscursor) or clamping/annotating the cap so the counts stay consistent.Reply with
@kilocode-bot fix itto have Kilo Code address this issue.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.
Having over 100 threads seems very unlikely on a human reviewed PR