twinnydotdev / twinny

The most no-nonsense, locally or API-hosted AI code completion plugin for Visual Studio Code - like GitHub Copilot but completely free and 100% private.
https://twinny.dev
MIT License
2.82k stars 149 forks source link

Feature request: Command+I in-line chat / Shortcut to chat with current selection #304

Open matthiasgeihs opened 3 weeks ago

matthiasgeihs commented 3 weeks ago

Is your feature request related to a problem? Please describe. Thinking about switching from GitHub Copilot. What I'm currently missing in Twinny, is the ability to use Cmd+i to open an inline chat window like Copilot does.

Describe the solution you'd like Add a shortcut to open an inline chat about the current code text (around cursor or selected text).

Alternatively, introduce a default shortcut that switches to the chat and focuses the input field. (There are a couple of methods to assign a shortcut for switching to the chat window, but none of them automatically focuses the input. Would also be great if the chat window automatically assumes the context around the cursor.)

rjmacarthy commented 3 weeks ago

Hello @matthiasgeihs for this, you can use twinny.sidebar.focus and assign a custom key binding. As for the inline chat view, this is under proposal by the vscode team and I plan to add something when it becomes available for extension developers.

matthiasgeihs commented 2 weeks ago

I've seen Continue make the inline chat work somehow.

The issue with using twinny.sidebar.focus for quick chat is that the focus doesn't go to the input text field, if the chat is already open. (So it requires another mouse click to start chatting.) Maybe that can be changed?

rjmacarthy commented 2 weeks ago

When you say "inline chat" please could you provide some kind of example?

As for that other issue, I understand your point, perhaps it can be made better :)

Many thanks.

matthiasgeihs commented 2 weeks ago

I'm referring to their "Refactor functions where you are coding" feature: https://github.com/continuedev/continue?tab=readme-ov-file#refactor-functions-where-you-are-coding