Skip to content
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 diff visualize #539

Merged
merged 33 commits into from
Mar 29, 2024
Merged

Vscode diff visualize #539

merged 33 commits into from
Mar 29, 2024

Conversation

PCSwingle
Copy link
Member

Pull Request Checklist

  • Documentation has been updated, or this change doesn't require that

@PCSwingle PCSwingle force-pushed the vscode-diff-visualize branch from 070e683 to d2af7cb Compare March 20, 2024 21:36
Copy link
Member

@granawkins granawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General things:
In the README, line 27 should say pip install -e (not 3), and line 28 should be ~/.mentat/.venv (not ~/mentat).

I almost never see the accept/reject/preview buttons in vscode, not sure why. This is how it normally looks:
Screenshot 2024-03-25 at 7 38 58 AM

Also sometimes if there's text between two file_edits that gets rendered as part of the code block.

@@ -9,6 +9,10 @@ import { StreamMessage } from "types";
import * as util from "util";
import { v4 } from "uuid";
import * as vscode from "vscode";

// IMPORTANT: This MUST be updated with the vscode extension to ensure that the right mentat version is installed!
const MENTAT_VERSION = "1.0.10";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like someone (me) will forget to do this, any reason not to grab it programmatically from mentat/mentat/VERSION? Or maybe just always to pip --upgrade below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh hmm that would be a better idea to grab it from mentat/metnat/version; i'll do that. The reason we can't pip --upgrade is because I don't want to have to worry about backwards compatibility; this way, if somebody is using an older version of the extension it will automatically install the compatible version of mentat.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll add a build step that injects the version from mentat/mentat/version into the extension in another PR. I haven't messed with the build steps too much yet and it isn't really necessary right now.

mentat/code_context.py Outdated Show resolved Hide resolved

conversation.clear_messages()
code_context.clear_auto_context()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should either clear all the context, or reset your manually-included context. Especially now that auto-context is cumulative, a /clear command doesn't really make sense unless it resets the context too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of /clear is to remove all the messages; you can still /exclude * if you want to exclude all files.

mentat/server/mentat_server.py Show resolved Hide resolved
mentat/session.py Show resolved Hide resolved
console.log("Installed Mentat");
}

return binFolder;
}

private collectConfigOptions(): string[] {
const configuration = vscode.workspace.getConfiguration("mentat");
const optionNames = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually these could be enumerated in types and built programmatically, seen it a few places.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed it would be a lot nicer. Seeing as we have to manually add the config options to the package.json right now anyways though I think we can hold off on this for a bit.

@PCSwingle
Copy link
Member Author

I almost never see the accept/reject/preview buttons in vscode, not sure why.

I couldn't repro on linux, I assume it's a mac issue; I'll try and see if I can repro when I next have the chance to use a mac.

Also sometimes if there's text between two file_edits that gets rendered as part of the code block.

Fixed this. Thanks!

@PCSwingle PCSwingle marked this pull request as ready for review March 28, 2024 23:08
@PCSwingle PCSwingle merged commit 3dc152b into main Mar 29, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants