Closed rszwajko closed 1 week ago
- Do we need the tree view to navigate these things?
No. Actually we use the tree as a list. However it's easier (and future-proof) to use tree view. The extensions I've followed (reference-view and SCM) use this approach. In SCM (i.e. git) you can switch between tree and list but technically it's the same tree.
- How the result of our analyzerClient's
getSolution
for a specific incident is going to integrate with what is demonstrated here.
The solutions need to be written to in-memory file system. Right now I'm using static mock data from vscode/src/diffView/suggestions
.
This approach (EDIT: hidden file tree) originates from Continue's DiffManager but instead of real file system we are using in-memory one borrowed from fsprovider-sample
- Would prefer all of the commands to be registered in
commands.ts
. I really don't want them spread about the repository.
All commands are already listed in package.json
. We could duplicate that in commands.ts
but this will require imports from all modules.
- The number of new commands being added. I would have thought we could have something like
konveyor.acceptFix
andkonveyor.rejectFix
and that is it.
Most of the commands are related to navigation. Copy*
were inherited from reference-view - the seem to be commonly used in VS Code in file views.
- We are generating all of these file changes at startup...shouldn't this be tied to some user action? This is where I had thought the mocks would come into play...You call "Generate Fix" and you get changes that you can optional accept or reject.
Yep. Right now we are using static mock data. As soon as we will have better mocks we can switch.
@djzager the current solution is not fully functional as it uses mock data however this will be improved in follow-up issues. First one is https://github.com/konveyor/editor-extensions/issues/68 which should provide us better mocks. If you prefer to put some fixes already in this PR then please comment.
Use built-in vscode.diff editor to compare the current code(pointed via file URI) with proposed changes(pointed via custom konveyorMemFs Uri).
Key points:
konveyor
(global) orkonveyor.diffView
prefix(diff view specific): a) applyAll - apply all fixes b) revertAll - discard local changes to the proposed fixes c) applyFile/revertFile - as above but on a single file d) copyDiff/copyPath - convenience commands (single file scope) e) next/prev - keyboard navigation (for now) using the same key bindings as reference-view extension (f4 and shift+f4) f) viewFix - wrapper around vscode.diff that uses konveyorMemFsSources:
Reference-Url: https://github.com/continuedev/continue/blob/e7fe5994ffc6a3f45ad358ced7d6890deb145d96/extensions/vscode/src/diff/horizontal.ts#L34 Reference-Url: https://github.com/microsoft/vscode/tree/main/extensions/references-view Reference-Url: https://github.com/microsoft/vscode-extension-samples/tree/main/fsprovider-sample Reference-Url: https://github.com/microsoft/vscode-extension-samples/tree/main/source-control-sample