-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode Extension #70
VSCode Extension #70
Conversation
contains required files to build/launch extension
VSCode Extension Skeleton
Extension buildout
I wonder if the LSP portion ( |
@granawkins do you have any references to VSCode plugins made with Svelte that are somewhat popular/high-quality that you like? Asking since I've never used Svelte before and wanted to see how other plugins do it. |
I'm a big fan of what Cursor is doing for their chat UI/UX. Any thoughts on this? ![]() They have some good feedback in their Discord on what people have liked/disliked too. |
Is this just blocked on #74? Happy to review but I also don't wanna add a bunch of comments per-maturely if you're still making big additions/edits :) Pretty dope to see this working in VSCode btw! |
@waydegg yes #74 needs to be merged first. The big open question is the best way to run both Mentat and the Python side of the LSP defined here - should we set up an async loop that runs both? Run on different processes?
Looks nice! My hope for this PR is to get a working Mentat experience in VS Code that we can then iterate on. So higher level comments on the best way to set this up are most useful. We should also track interface feature ideas somewhere, feel free to create issues for individual ideas or maybe we can start a list somewhere. |
Absolutely, that's what I was thinking too. That's how Rift does it. Since this is from a template I figure we leave it like this for now, and if/when we add NeoVim we can separate it out.
Yes - the main one is Rift. I also noticed it in some templates last week which I'm afraid I've lost. There are a few others if you search GitHub for vscode language:svelte. I'm not married to Svelte though, it's my first time using it as well. It's really similar to Vue, which I've used a lot, but the bundle is lighter and it builds really fast. Open to suggestions.
Ya, that's top of my list :) Cursor looks awesome - I'm going to try to just get something basic up to start, but love that direction.
The VSCode side is close to ready - go ahead and comment as much as you'd like. If you have a lot of comments/questions it might be easier just to do a videocall? HMU @waydegg |
I think we should def be building towards running everything async (electron already eats up enough processing as is haha). pygls, the library the VSCode extension template uses that interfaces w/ language servers, has first-class async support. Most of Mentat latency is network io also. Would love you hear what you guys are thinking. |
I'm not married to any particular framework either (I've been wanting an excuse to learn Svelte anyways haha). I guess my only concern would be ease-of-contributing since most ppl already know React/Vue and there's obv a huge library ecosystem for both frameworks. |
At a high level I think this looks good! I'll create a github discussion/issue for feature suggestions we can all collaborate on. Happy to review and approve once #74 is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two notes around latency. I don't think either need to be addressed in this PR (though one is quick to fix) but I wanted to flag them for later.
Also are we sure we want this as a sub-directory in the mentat repo? I guess if the VSCode and NeoVim plugins end up sharing code it'll be simplest. But it will interfere with the standard way of installing vim plugins: cloning a repo into a plugin directory.
</div> | ||
|
||
<div class="children-container {isOpen ? 'open' : ''}"> | ||
{#if file.children} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice a ~1 second latency when toggling expand/contract for large directories which can be fixed by checking isOpen
here.
constructor( | ||
public file: WorkspaceGraphElement, // File metadata | ||
) { | ||
if (this.file.children) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me there's an ~11s time to load after clicking the refresh button on this project (with python and node dependencies installed). Moving this to handleClick and loading files lazily cut it to ~3s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha - great idea. I've now done something a bit different but same principle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your approach is really clean. Nice!
Interesting: rift already included mentat as an agent. |
@granawkins and I were talking about this - the benefit of a shared repo is it's easier to coordinate versions and changes between "core" Mentat and the VS Code extension. We do want any code that would be shared by VS Code and NeoVim plugins here (and those bits would probably be useful as well for the community if they make extensions for other editors). @jakethekoenig is the way you see it interfering with vim plugin install just that the cloned repo would be bigger? Overall my vote is we keep it here for now and see how it goes, but that's not a strong opinion
Just announced today! They way they've included it involves inserting callbacks into the code / patching some input / output functions. When we finish getting Mentat setup for multiple interfaces they'll have an easier time connecting to it.
They have a discord but looks like they disabled invites for it and are switching to the forum |
Extension buildout
speedups suggested by @jakethekoenig
I have two concerns:
Sorry if this is getting off topic for this PR. |
Closing this b/c of #213 |
Implement Mentat as a Visual Studio Code extension. Basic functionality:
See
/vscode/README.md
for setup instructions.