Skip to content

Conversation

@RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Oct 28, 2025

Description

We've been using diff streaming approaches built for when model streams an apply response in. Added utils for instant apply. See the before an after here:

instant-apply.mp4

And after for jetbrains
https://github.com/user-attachments/assets/21ea1ac1-9190-4356-bf91-16dcd0658db6


Summary by cubic

Instant apply for find/replace edits in VS Code and JetBrains. Diffs are computed once and applied immediately, replacing streaming for these tools.

  • New Features

    • Core: exposed myersDiff via a new getDiffLines protocol for synchronous diff generation.
    • JetBrains: added instantApplyDiffLines in DiffStreamHandler and switched ApplyToFileHandler to use it.
    • VS Code: added VerticalDiffManager.instantApplyDiff and used it in ApplyManager for search/replace; auto-scrolls to the first change and updates apply state.
  • Refactors

    • Moved getFirstChangedLine to a shared util and removed duplicate handler code.
    • Added GetDiffLinesPayload and registered "getDiffLines" message type; removed streaming paths in instant-apply scenarios.

@RomneyDa RomneyDa requested a review from a team as a code owner October 28, 2025 03:00
@RomneyDa RomneyDa requested review from Patrick-Erichsen and removed request for a team October 28, 2025 03:00
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 28, 2025
@github-actions
Copy link

github-actions bot commented Oct 28, 2025

✅ Review Complete

Code Review Summary

⚠️ Continue API authentication failed. Please check your CONTINUE_API_KEY.


Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 10 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/DiffStreamHandler.kt">

<violation number="1" location="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/DiffStreamHandler.kt:213">
Calling getLineStartOffset(currentLine) when currentLine equals document.lineCount (e.g., appending lines at EOF) throws IndexOutOfBoundsException; guard for this case before computing the offset.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

RomneyDa and others added 2 commits October 27, 2025 20:35
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Comment on lines +160 to +161
ApplicationManager.getApplication().invokeLater {
WriteCommandAction.runWriteCommandAction(project) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How confident are you that this is the right approach here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3/10
seems to work

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 28, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 28, 2025
@RomneyDa RomneyDa merged commit 7b17768 into main Oct 28, 2025
57 checks passed
@RomneyDa RomneyDa deleted the dallin/instant-edit branch October 28, 2025 17:54
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 28, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2025
@github-actions github-actions bot added the tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys label Oct 28, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 29, 2025

🎉 This PR is included in version 1.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 29, 2025

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 29, 2025

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

lgtm This PR has been approved by a maintainer released size:L This PR changes 100-499 lines, ignoring generated files. tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants