Skip to content

Conversation

@vldF
Copy link
Contributor

@vldF vldF commented Aug 20, 2025

Description

This PR introduces an ability to reference files and directories in the Continue chat via the project view context action named AddToEditAction. This is a shortcut, so, you can add files manually (via the Continue GUI) or add them with these actions.

This PR also introduces ContinueProjectViewPopUpMenuGroup actions group which is a wrapper for AddToEditAction. This group is needed because 1) it shows that this action is belong to Continue and 2) it is an extension point to the future actions like this one (both points are discussable)

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-general-review or @continue-detailed-review

Checklist

  • I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

image

Video:

Screen.Recording.2025-09-09.at.11.10.52.mov

Summary by cubic

Add project view actions in the IntelliJ plugin to quickly insert file/folder mentions and repo maps into the Continue chat. Adds a new webview event to insert these mentions directly into the editor.

  • New Features
    • Project View context menu group “Continue” with:
      • “Add to the Chat” for files and folders.
      • “Add to the Chat as a Repository Map” for directories only.
    • Multi-select supported; sends addChatMention with AddChatMentionsPayload.
    • GUI inserts mention nodes (id/query: fullPath, itemType, label: name).
    • Updated typings and IDE webview protocol; utility to fetch selected files.
    • Actions are shown only when applicable.

@vldF vldF requested a review from a team as a code owner August 20, 2025 11:39
@vldF vldF requested review from RomneyDa and removed request for a team August 20, 2025 11:39
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 20, 2025
@vldF
Copy link
Contributor Author

vldF commented Aug 25, 2025

Hello, @RomneyDa, could you please review it?

@RomneyDa
Copy link
Collaborator

@vldF looking into this, checking with @TyDunn for product questions

@vldF
Copy link
Contributor Author

vldF commented Aug 29, 2025

@TyDunn, hello, could you check this one please?

@TyDunn
Copy link
Contributor

TyDunn commented Aug 29, 2025

@vldF Thanks for the contribution! @RomneyDa I think we will want the right click actions in JetBrains to match what we are doing in VS Code with @uinstinct

@vldF
Copy link
Contributor Author

vldF commented Aug 30, 2025

@TyDunn, hello!

When I checked similar feature implementation few weeks ago, that kind of implementation was different: in VS Code we can add some file to the context only. My implementation is more useful because we can refer some file (or multiple files, or directory) by name which is useful for some kind of prompts

@vldF
Copy link
Contributor Author

vldF commented Sep 3, 2025

@TyDunn, @RomneyDa, hello :)

@RomneyDa
Copy link
Collaborator

RomneyDa commented Sep 3, 2025

@vldF I'm a big fan of the "add to chat" option but I think we should not add the repo map option, since the repo map provider requires indexing which is being deprecated

I also think we should simplify the messaging to just be "addFilesToChat" or similar and not mix the tip-tap specific mention concept into messaging

@TyDunn
Copy link
Contributor

TyDunn commented Sep 3, 2025

@RomneyDa If we are going to have second one, then I'd say we also have "Add to Edit", which would make it consistent with VS Code

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@TyDunn input appreciated, then I'll adjust review to say

  • simplify messaging to be "addToChat" and "addToEdit" (I think this might already exist using add higlighted code or similar)
  • remove repo map option and replace with "Add to Edit" option

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 3, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 8, 2025
@vldF
Copy link
Contributor Author

vldF commented Sep 8, 2025

@RomneyDa @TyDunn if I understand you right, here are changes

@RomneyDa
Copy link
Collaborator

RomneyDa commented Sep 9, 2025

@vldF could you update the description/screenshot to reflect changes, or add a comment showing new interface?

@vldF
Copy link
Contributor Author

vldF commented Sep 9, 2025

@RomneyDa, done. Also, I had reverted addToChat handling due to bug

@vldF
Copy link
Contributor Author

vldF commented Sep 12, 2025

@RomneyDa, gentle reminder :)

Also, could you please restart failed jobs, please?

@RomneyDa
Copy link
Collaborator

RomneyDa commented Sep 16, 2025

@vldF haven't forgot about this one! Need to pull and test.
Just to clarify, ended on only having add to edit?

@RomneyDa
Copy link
Collaborator

@vldF current state of the PR seems to mix add to chat and add to edit. The add to chat option calls the add to edit action, etc. Could you take a look? I would either remove add to edit and only have add to chat or make sure both work separately

@vldF
Copy link
Contributor Author

vldF commented Sep 23, 2025

Just to clarify, ended on only having add to edit?

Yeah

@vldF
Copy link
Contributor Author

vldF commented Sep 23, 2025

Could you take a look

Sure, I'll do it tomorrow

@vldF
Copy link
Contributor Author

vldF commented Sep 24, 2025

@RomneyDa, hello. It seems I'm confused in comments above. Could you please give me a short description of both Add to Chat and Add to Edit actions? Is "Edit" in this context an input field of the chat? So, was my initial request about Add to Chat action? If it is true, what Add to Edit action does?

@RomneyDa
Copy link
Collaborator

RomneyDa commented Sep 25, 2025

@vldF agreed can be a bit confusing, in both Jetbrains VS Code there are two main actions for selected code:

  • Add to Chat - cmd L in vs code, cmd J in Jetbrains - inserts selected code into the chat input
  • Add to Edit - cmd I in both - opens Edit mode for a quick targeted edit of the selected code

I think I didn't realize that you were implementing Add to Chat and the only change needed is to change the naming throughout to be "Add to Chat" rather than Add to Edit. Does that sound right?

@vldF
Copy link
Contributor Author

vldF commented Sep 28, 2025

@RomneyDa, thank you. I have changed the naming in my code

@vldF
Copy link
Contributor Author

vldF commented Oct 2, 2025

@RomneyDa, hello :)

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@vldF thanks for the updates!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 6, 2025
@RomneyDa
Copy link
Collaborator

RomneyDa commented Oct 6, 2025

Tested, works great!

@RomneyDa RomneyDa merged commit 8367d33 into continuedev:main Oct 6, 2025
51 of 54 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 6, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 8, 2025

🎉 This PR is included in version 1.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 12, 2025

🎉 This PR is included in version 1.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.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:M This PR changes 30-99 lines, ignoring generated files.