Skip to content

Add AI Context Box tool window, Prompt Manager UI, and branch-diff integration with generation diffs#7

Open
Idddd wants to merge 2 commits intomainfrom
codex/add-tab-for-code-diff-display-baoo2n
Open

Add AI Context Box tool window, Prompt Manager UI, and branch-diff integration with generation diffs#7
Idddd wants to merge 2 commits intomainfrom
codex/add-tab-for-code-diff-display-baoo2n

Conversation

@Idddd
Copy link
Copy Markdown
Collaborator

@Idddd Idddd commented Mar 25, 2026

Motivation

  • Provide a persistent, visible AI "Context Box" for showing generation results and branch analysis summaries in the IDE.
  • Improve prompt editing UX by consolidating prompt controls into a Prompt Manager UI used in both settings and the tool window.
  • Capture and surface generated test file diffs and branch summaries so users can inspect AI outputs and analysis in one place.
  • Make small project/build and icon updates to support the new UI and actions.

Description

  • Added a project service ContextBoxStateService that stores the latest AI snapshot and publishes updates via a message bus Topic and ContextBoxListener.
  • Implemented ContextBoxToolWindowFactory to host a read-only "Results" view and a Prompt Manager tab; prompts can be edited, saved, and reloaded via LlmSettingsLoader and Notifications.
  • Refactored settings UI to use a shared Prompt Manager builder (buildPromptManagerPanel) and added SwingUtilities usage for UI updates.
  • Updated GenerateTestsService to capture previous file content, compute a simple unified diff via buildCodeDiff, and push a generation snapshot to ContextBoxStateService after file creation; notifications are still sent for generated files.
  • Enhanced SummarizeBranchDiffAction to resolve the current repository branch, derive a target branch/commit from VCS Log selection, call AiBranchDiffSummaryService, and publish branch analysis into the Context Box; added new action variants and registered them in plugin.xml.
  • Replaced the previous icon and added blue-bulb.svg to resources; updated OpenProjectXIcons and several action icon paths.
  • Adjusted plugin-idea/build.gradle.kts to provide defaults for platformType and platformVersion properties and switched the intellijPlatform dependency creation call accordingly.
  • Updated plugin.xml to register the new tool window and new VCS log/context menu action entries.

Testing

  • Built the project and plugin module using Gradle via ./gradlew build and ./gradlew :plugin-idea:assemble, and the build completed successfully.
  • Verified the plugin wiring by running the IDE plugin run configuration (manual smoke run used for UI verification) which loaded the new tool window and actions without runtime errors.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant