zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.32k stars 3.1k forks source link

Adopt GitHub Copilot assistant features #18512

Open Visual-Studio-Coder opened 1 month ago

Visual-Studio-Coder commented 1 month ago

Check for existing issues

Describe the feature

Its nice that theres markdown and syntax highlighting in the chat window, but I wish it was AS GOOD as GitHub Copilot in the sense that:

I wish command + I opened the inline thing, like github copilot too.

Essentially, I'm asking you guys to copy GitHub's UI word for word. As easy/seamless you make switching from VSCode or Jetbrains results with more Zed switchers

RustoMCSpit commented 1 month ago

title is funny but please change it to "Adopt Github Co-pilot chat features"

Visual-Studio-Coder commented 1 month ago

title is funny but please change it to "Adopt Github Co-pilot chat features"

Done!

JosephTLyons commented 1 month ago

Hey @Visual-Studio-Coder, can you expand on the terminal bullet point a bit - it isn't quite clear to me what you are requesting there.

A copy button on code snippets seems reasonable, especially now since we have the assistant: copy code action.

I can't imagine us shifting away from using a plain text editor to a more chat-centric panel. That was something we experimented with, some months back, and just weren't happy with how incredibly inflexible it was. We like that everything is editable and changeable - you can remove parts of the history where the model didn't return anything valuable and regain tokens, etc.

Visual-Studio-Coder commented 1 month ago

Oh, that's new information to me. I wasn't aware about the tokens thing, however, its a bit frustrating that it isn't a traditional window. I guess what I'm asking for is a set of actions that make it clear to the user what their editing.

Or you could have a Chat Window vs Editor mode. I find it a bit frustrating that code blocks show up as `````` instead of just a box with monospace font.

For the terminal thing, copilot lets you highlight a codeblock and auto insert it into the terminal

Visual-Studio-Coder commented 1 month ago

I have not used GPUI in my life, but I'm going to take a look into making a PR later today. The goal of the PR will be to draw a box around all code blocks and add copy buttons on the code blocks. Don't let this stop you from implementing the same thing because I will likely not be successful at finishing it

aaronhma commented 1 month ago

Hey @Visual-Studio-Coder, can you expand on the terminal bullet point a bit - it isn't quite clear to me what you are requesting there.

A copy button on code snippets seems reasonable, especially now since we have the assistant: copy code action.

I can't imagine us shifting away from using a plain text editor to a more chat-centric panel. That was something we experimented with, some months back, and just weren't happy with how incredibly inflexible it was. We like that everything is editable and changeable - you can remove parts of the history where the model didn't return anything valuable and regain tokens, etc.

@JosephTLyons, I think a good approach would be how LM Studio ↗ handles AI responses. By default, the AI's response isn't editable/deleteable, but you can double click or click on a dedicated "Edit message" button. This is available for the both the user and AI's text fields.

Screenshot 2024-10-02 at 9 16 27 PM
Visual-Studio-Coder commented 1 month ago

Update: I failed to add the "code container" feature because the code-folding button doesn't actually control the AI output. I might try adding a "chat mode" instead.

alanxmay commented 1 month ago

I really like the way using a plain text editor, it's incredibe.

notpeter commented 1 month ago

Code block copy: