Skip to content
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

Support Inline-Edit in IntelliJ Plugin #4019

Open
icycodes opened this issue Mar 17, 2025 · 2 comments
Open

Support Inline-Edit in IntelliJ Plugin #4019

icycodes opened this issue Mar 17, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@icycodes
Copy link
Member

icycodes commented Mar 17, 2025

The inline-edit feature is already supported in the VSCode extension. Users can select some text (optionally), invoke inline-edit (using Ctrl+I or selecting it from the context menu), input an instruction to edit the current file, then review the changes and accept or discard them.
We want to support this feature in the IntelliJ plugin as well.

The IntelliJ platform provides a code-intentions-preview api that can be used for reviewing changes and resolving edits. This should be a better approach than manually using color decoration for diffs, which is implemented in the VSCode extension.

The underlying inline-edit implementation is in tabby-agent, which exports an extended LSP method ChatEditRequest. It currently supports output in previewChanges format only (used in VSCode extension). We may need to modify it to support a direct editing format to make the result compatible with the IntelliJ code-intentions-preview API.


Please reply with a 👍 if you want this feature.

@icycodes icycodes added the enhancement New feature or request label Mar 17, 2025
@wsxiaoys wsxiaoys added the good first issue Good for newcomers label Mar 19, 2025
@zhanba
Copy link
Contributor

zhanba commented Mar 19, 2025

I would like to take this issue.

On how to display code diff:

  • Code intention preview is displayed when you hover on code intention, and disappeared when you move off. So it's hard to use it in inline chat which need first trigger a chat input and then display diff.
    Image

  • To display inline code diff, we can display a code diff editor on inline chat area ( a customized component inserted between code lines) or we can just add color decoration like VSCode extension did. I'd like to know which one you prefer?

@icycodes
Copy link
Member Author

I would like to take this issue.

On how to display code diff:

  • Code intention preview is displayed when you hover on code intention, and disappeared when you move off. So it's hard to use it in inline chat which need first trigger a chat input and then display diff.
    Image
  • To display inline code diff, we can display a code diff editor on inline chat area ( a customized component inserted between code lines) or we can just add color decoration like VSCode extension did. I'd like to know which one you prefer?

Thank you for pointing this out. It seems there isn't an API available to manually control the display and hiding of the code-intention-preview component. I will update the issue description accordingly.

I agree that implementing it similar to how is done in the VSCode extension would be a good approach for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants