AI Assistant equivalent of copilot inline chat?

The actual context of this question is RustRover but I think PyCharm too does not have this feature right now or I can't locate it. 

Copilot can start its inline chat about selected code by a key binding. I didn't find the built-in JetBrains AI Assistant feature "new chat using selection", which is the closest or entirely overlapping feature, to be an action that can be assigned a key binding, in the key map settings. Only by cliking the inlay AI menu and selecting it there. 

Could something like this be added? copilot was very quick to answer questions in that inline window and I couldn't find an AI Assistant equivalent feature that is immediately invocable like it. 

Associating a key binding to this action would make workflow much more efficient esp. when working with a new programming language. It's also nice to have the equivalent of copilot's `/explain` prompt but this too doesn't seem to be an immeidate affordance of that feature.


 

0
5 comments

As to that inlay AI menu itself, its “Add Your Prompts …” menu item leads to “Chat Instructions" which are a global thing, not to any prompt library feature. Otherwise this could have partially helped on the same aspect just a bit, in a partial way. Which seems to be a broken, though only orthogonal, issue. At least remove that option if it's broken I'd say.

0
Hi, 

Thanks for the detailed explanation. The workflow you describe (select code → press a shortcut → get a small inline chat tied to that selection, like Copilot’s inline chat) is a common “fast feedback loop”, especially when learning a new language.

Current state (RustRover / PyCharm / JetBrains AI Assistant):

• At the moment, AI Assistant does have actions accessible from the in-editor AI inlay menu, but the “chat about selection” flow typically routes you into the main AI Assistant tool window rather than opening a dedicated inline chat pop-up.
• I’m not aware of a dedicated Keymap action that opens a Copilot‑style inline chat for the current selection; the current behavior is to send the selection to the main AI Assistant tool window (tracked in LLM-22968).

As temporary workarounds you may try:

• The fastest built-in workaround today is to use the editor inlay menu action that sends the selection to AI Assistant, and then continue the conversation in the AI Assistant tool window.
• If you want something closer to Copilot’s `/explain`, the closest workflow is: select code → send to AI Assistant → ask “Explain this” in the chat (still in the main tool window). It’s not as immediate as a single shortcut + inline UI, but it achieves the same outcome.

Feature request tracking

This request is already tracked in YouTrack as a dedicated feature request and can be found here: https://youtrack.jetbrains.com/issue/LLM-22968/Add-Contextual-Inline-Chat-for-Code-Fragments-in-AI-Assistant

It specifically describes:

• selecting a code fragment
• opening a small, separate contextual chat for that selection
• instead of sending it to the main tool window

About the “Add Your Prompts …” → “Chat Instructions” confusion
What you observed is valid: “Chat Instructions” are global instructions, not a per-selection prompt library. If your expectation was “save reusable prompts / snippets for quick access”, that’s a different feature area than Chat Instructions.

If you want, tell us which exact behavior you expected from “Add Your Prompts …” (prompt library? per-project? per-language?), and I can help word it clearly as either:

• a separate feature request, or
• an improvement suggestion attached to the existing one.

Also, if you share what shortcut you’d ideally want (e.g., `Ctrl+Enter`, `Alt+Enter`, etc.), we can include that as a concrete UX requirement in the request.

Kind regards,

Emin.
0

Actually, my inlay AI menu now has an “explain” option to select under the AI button of it. This comes closer. 

0

As to “Add Your Prompts …” I still find that's not a conducive phrasing, not to say a slightly misleading one, sorry. 

“Add Your Prompts” strongly implies adding to the list of AI menu options where currently “explain code” and other options appear. A general prompt should be called something else, and is called something else in other online AI venues perhaps even in the JetBrains copilot widget settings too.

Lets close this post, though begin able to assign a shortcut for an “explain code” AI chat response would be nice, and that kind of chat response, as I today noticed is alredy implemented as said, so why not expose it for key bindings by more product developer work?

0
Thanks for the clarification, Matan.

I agree with your point about the wording: “Add Your Prompts …” really sounds like it would add a new item to the in‑editor AI inlay menu (next to “Explain”, etc.), while in reality it leads to global Chat Instructions, which is a different concept. We’ve now captured this as UX copy/labeling feedback in the tracking request so it can be addressed.
Also, it’s great that you found the Explain action in the inlay menu — the remaining gap is being able to trigger it via a keyboard shortcut (Keymap action) without opening the inlay menu. We’ve updated the existing YouTrack request to include this exact improvement (including “Explain selection” / “Explain at caret” as possible actions):
https://youtrack.jetbrains.com/issue/LLM-22968/Add-Contextual-Inline-Chat-for-Code-Fragments-in-AI-Assistant

With that, we can close this community post as requested. 
0

Please sign in to leave a comment.