Sublime Forum

Claude 3.5 sonnet support

#1

I believe this LLM came out recently, and I’m seeing people praise it for programming. Given that ST’s Copilot support is limited (VSCode has some home field advantage here), it would be pretty awesome if somebody (perhaps ST maintainers) built a powerful multi-faceted integration with an LLM such as Claude, with inline modifications, flexible context, chat panel, etc. Just a thought.

ST remains my favorite (just renewed my license), but I increasingly find myself opening another editor to ask LLM to write me some tests, or do a not-entirely-trivial edit. Maybe I didn’t find a good flow for this in ST (happy to hear advice if any), but I think ST really needs a solid AI story to remain competitive. The pressure is growing.

0 Likes

#2

LSP-Copilot uses the same copilot as VSCode. If limitations are present open and issue and we can work on them.

If you want Claude support, a plugin will help implement it.

0 Likes

#3

To clarify, when I said Copilot is limited, I was referring to discussions like this one.

I’m a bit skeptical about a plugin, because I think the integration should start with a no-constraints overarching vision rather than “what is currently possible with plugin API”. Even if it is a plugin, the API should be expanded as necessary to accommodate said vision.

0 Likes

#4

Technically yes it’s limited, we only do what https://github.com/github/copilot.vim can do. Even simply so, it’s still annoying that we have to do sort of reverse engineering to know how to use it.

1 Like

#5

@hakunin I am still unclear by the limits you are referring too. Yes, I understand we are limited to what we can reverse engineer. But to this point, if I do not know the limits you see, I cannot attempt to solve them :wink:

As for the plugin approach, I would still heavily recommend you being at the plugin. The reason being, is if you had followed the journey that the core team behind the LSP package underwent. You would see that they are extremely detailed at writing Issue and Feature Requests to the Sublime HQ team. And thus, many API improvements happened to support the LSP world.

So if you begin to write the plugin and being to encounter said limitations, it would give you a great base to write and report issues and feature requests that the Sublime HQ team could then potentially support.

We can give them scenarios on how to better improve the editor (which I do not believe we are always in the best position to do this) but if you give them tangible blockers with a detailed user story, you are more likely to find success.

0 Likes

#6

Afaiu based on what @jfcherng said, we don’t have full access to copilot API, and what we do have must be reverse-engineered. Things like these seem impossible:

  1. Copilot-based chat assistant.
  2. Ask copilot to document or refactor parts of code (rather than just let it do whatever it decides via autocomplete).

Yeah, I think we’re saying the same thing.

It’s not as good as HQ doing it themselves, because it introduces some communication overhead, but I’m sure it’s workable.

0 Likes

#7

These are supported today. With many improvements in the pipeline for better referencing and such.

I do not believe ST will waste cycles on AI integration when they don’t have core package management or core LSP.

Just my 2c

1 Like

#8

When was all this stuff introduced? :astonished: That’s the first I’m seeing this. (Just found out it’s in the editor).

Ok I stand corrected, I see doc/test/etc and the chat. Now I need to learn how to use these conversation agents, conversation templates, etc.

Holy crap, this is great news to me.

0 Likes

#9

Speaking of which, I can’t seem to find any docs on Conversation Agents and Conversation Templates. Trying to select them in the command menu does nothing. :thinking: Are they still WIP?

0 Likes

#10

Looks like a bug slipped in, I am working on fix these commands.

And some of them are still being worked on. Issues opened on the repo would be great!

Docs for chat are coming

1 Like

#11

@hakunin

This fixes the issue and is a step in the right direction in showing how to use these commands

Also, you can reference selections via {{ sel }} rather {{ sel[0] }} which grabs your first selection

1 Like

#12

:+1: Are you planning on cutting a release with these fixes, or waiting for more?

0 Likes

#13

Yes, a release was already cut and another today

0 Likes

#14

@TheSecEng I want to file issues on certain things, but I’m really confused whether the way it works is intentional or not. Which is what stops me from doing that.

For example, selecting a piece of code and choosing “generate docs” behaves weird. After a pause, it opens side panel and bottom panel. Side panel has /doc written in it, and Copilot’s response, which is a made up doc for some made up code (not what I selected). The bottom panel has /doc entered there. If I manually re-select the code, then add /doc {{sel[0]}} in bottom panel, it actually generates the docs for my selected code in the right pane, but not sure how to have the modification happen inline. Is there support for inline modifications?

If some of the above is indeed a bug, I can try filing some issues like this one. FWIW, I’m also using NeoVintageous, do you guys ever test with it?

0 Likes

#15

The fact that it docs random code is for sure a bug. We have been making refactors lately trying to further be inline with what copilot is expecting. So it has require changes.

Also we have now switched to allow just passing {{ code }} instead of {{sel[0]}} to make things easier on the user.

I am working on the bug for the /doc example tonight

1 Like

#16

As a work around I suggest you do /doc {{code}} until we push a new tag

As for inline, we are working on it.

1 Like