-
Notifications
You must be signed in to change notification settings - Fork 241
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
feat(amazonq): implement workspace file messages #5377
base: feature/q-lsp
Are you sure you want to change the base?
Conversation
still trying to get unit tests working, didChangeWorkspaceFolders is a little bit trickier and needs its own PR |
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
...rc/software/aws/toolkits/jetbrains/services/amazonq/lsp/workspace/WorkspaceServiceHandler.kt
Show resolved
Hide resolved
...rc/software/aws/toolkits/jetbrains/services/amazonq/lsp/workspace/WorkspaceServiceHandler.kt
Outdated
Show resolved
Hide resolved
CreateFilesParams().apply { | ||
files = events.map { event -> | ||
FileCreate().apply { | ||
uri = event.file?.toNioPath()?.toUri().toString() |
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.
lets make a util for virtualfile -> URI because we will likely have a lot of edge cases to deal with
CreateFilesParams().apply { | ||
files = events.map { event -> | ||
FileCreate().apply { | ||
uri = event.file?.toNioPath()?.toUri().toString() |
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.
if there is no file we should not emit an event
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.
thought this would be handled by if (events.isNotEmpty())
for both messages
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 guess i meant if the uri is null then we shouldn't emit an event because that doesn't seem useful
do we even need |
Implement both
Types of changes
Description
Set up a messageBus listener to listen for VFileEvents for both file creation and deletion, sends appropriate messages in both cases.
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.