feat(vscode): show thread git metadata#2868
Conversation
There was a problem hiding this comment.
Hmbown has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
Code Review
This pull request adds support for rendering Git metadata, specifically the commit head and a dirty worktree flag, alongside branch metadata in the VS Code Agent View. The feedback suggests simplifying the parsing logic in runtime.ts by checking record.dirty === true directly, which would render the new readBoolean helper redundant. Additionally, it is recommended to truncate the thread.head value to a 7-character short SHA if it is a full 40-character Git commit SHA to prevent layout clutter in the VS Code sidebar.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| workspace: readString(record.workspace), | ||
| branch: readString(record.branch), | ||
| head: readString(record.head), | ||
| dirty: readBoolean(record.dirty), |
There was a problem hiding this comment.
We can simplify this by checking record.dirty === true directly, which is consistent with how archived is handled on the next line. This also makes the helper function readBoolean redundant, allowing us to remove it entirely.
| dirty: readBoolean(record.dirty), | |
| dirty: record.dirty === true, |
| function readBoolean(value: unknown): boolean { | ||
| return value === true; | ||
| } |
| if (thread.head) { | ||
| parts.push(`@ ${thread.head}`); | ||
| } |
There was a problem hiding this comment.
If thread.head is a full 40-character Git commit SHA, displaying it in its entirety can cause awkward text wrapping and clutter the narrow VS Code sidebar (Agent View). Truncating it to a standard 7-character short SHA when it matches a full SHA pattern improves readability and layout density.
| if (thread.head) { | |
| parts.push(`@ ${thread.head}`); | |
| } | |
| if (thread.head) { | |
| const shortHead = /^[0-9a-f]{40}$/i.test(thread.head) | |
| ? thread.head.slice(0, 7) | |
| : thread.head; | |
| parts.push(`@ ${shortHead}`); | |
| } |
Summary
headanddirtyfrom runtime thread summaries in the VS Code Agent ViewVerification
Credit
Thanks @AiurArtanis and @nasus9527 for the IDE/agent-view requests, and @gaord for the runtime metadata direction in #2808/#2862.