Add git-ai blame visualization to JetBrains plugin#741
Open
Krishnachaitanyakc wants to merge 4 commits intogit-ai-project:mainfrom
Open
Add git-ai blame visualization to JetBrains plugin#741Krishnachaitanyakc wants to merge 4 commits intogit-ai-project:mainfrom
Krishnachaitanyakc wants to merge 4 commits intogit-ai-project:mainfrom
Conversation
b503fd1 to
e11fc9a
Compare
Implements AI blame annotations in the IntelliJ plugin, matching the VS Code extension's functionality. Calls `git-ai blame --json --contents -` to get per-line AI authorship data and renders it via: - Gutter color stripes (4px colored icons per AI-authored line) - Inline after-text inlays showing model name (e.g. "Sonnet 3.5 via Cursor") - Status bar widget showing AI/human indicator for current line - Toggle action (Cmd+Shift+G) cycling Off/Line/All modes New files: BlameModels, BlameService, BlameEditorManager, BlameStatusBarWidgetFactory, BlameToggleAction, BlameStartupActivity, ModelNameParser (ported from VS Code extension).
e11fc9a to
f9ea024
Compare
- BlameService: start stdout/stderr readers before stdin write and make stdin write async to prevent pipe buffer deadlock on files >64KB - BlameEditorManager: use getEditors(file) instead of selectedTextEditor in fileOpened callback to resolve correct editor in split-editor scenarios - Add consolidated pre-commit checks section to CLAUDE.md covering process I/O patterns, IntelliJ API misuses, Rust formatting, and lint
BlameEditorManager.dispose() was calling Disposer.dispose(state) and clearDecorations() directly without invokeLater, causing EDT threading violations when the service is disposed from a background thread during project closing. Now matches the pattern already used in detachFromEditor().
Member
|
@Krishnachaitanyakc Do you have a moment to review the Devin feedback above? Also, we recently had an issue with the VS Code extension's blame where the |
- Replace containsKey()+put() with atomic putIfAbsent() to prevent concurrent threads from creating duplicate EditorBlameState with orphaned listeners and decorations. - Add early-exit in scheduleBlameRefresh() when blameMode is OFF so no scheduler tasks or git-ai CLI calls are made while disabled. - Cancel pending refreshes and clear decorations in toggleBlameMode() when switching to OFF.
Contributor
Author
|
@svarlamov addressed both |
Contributor
Author
|
@svarlamov can you review this? This is not dependent on #798 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements AI blame annotations in the JetBrains IntelliJ plugin, matching the VS Code extension's functionality. Resolves #660.
git-ai blame --json --contents -CLI to get per-line AI authorship dataSonnet 3.5 via Cursor)Cmd+Shift+G/Ctrl+Shift+Gcycles through Off → Line → All modes