refactor(amazonq): reorg amazonq servers by their function#857
Conversation
|
Just trying to align myself with partner team expectations in the codebase, but correct me if i'm wrong but after this change:
|
|
Let's name the folder "shared" or "common". |
This is just the first step. At the end we'll get "common" folder + folder per LSP server. Agents should be a folder per agent - on the same level as other servers. We should add detailed instructions into |
@volodkevych I have renamed the folder as |
|
@jpinkney-aws Thanks for taking a look!
Yes
After this change the |
There was a problem hiding this comment.
This should be moved to shared utils: at least getUserAgent is used in more places than telemetry
There was a problem hiding this comment.
Do you mind if I just move the files in this change? Later on, we can decide which file to place this function.
Want to minimize the changes due to the folder structure reorganization.
There was a problem hiding this comment.
I do not think base service should be in the client folder.
There was a problem hiding this comment.
I also moved it to shared
There was a problem hiding this comment.
Can we move it to shared? I think we should have only a folder per server inside language-server.
There was a problem hiding this comment.
Let's not move it for now - we have code that import this file from specific path iirc, moving it will break it. Ideally we get rid of it completely, and export server factory functions directly. Can we do it as a follow-up?
There was a problem hiding this comment.
Can we change the code that imports this file from specific path? Where is this code?
There was a problem hiding this comment.
will do it as follow up.
|
As part of this or next PR for folder structure refactoring, can we add section into README with detailed guidance about this folder structure and where to add new code? |
Created a new directory called utilities under src/ for team to share code.
Problem
AmazonQ server is contributed by many teams and there are utilities function scattered all over the
language-serverdirectory.There will be further discussion about whether separate project is worthy of the efforts. But we agreed that at least splitting servers using the directory is a good start.
Solution
There will be further discussion about whether separate project is worthy of the efforts. But we agreed that at least splitting servers using the directory is a good start. A new directory
sharedis created to host the code that can be shared among different servers. Otherwise, each server should be restricted in their respective directories.Tested by launching the codewhisperer server in the VSCode debug profile.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.