Skip to content

Conversation

rli
Copy link
Contributor

@rli rli commented May 30, 2025

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rli rli requested a review from a team as a code owner May 30, 2025 21:50
@rli rli changed the base branch from feature/q-lsp-chat to rli/download-flare May 30, 2025 21:50
@rli rli changed the title Rli/artifact fallback feat(amazonq): fallback to bundled flare assets if cannot be downloaded May 30, 2025
Copy link

github-actions bot commented May 30, 2025

Qodana Community for JVM

It 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
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

return@async artifactPath
} catch(e: Exception) {
logger.warn(e) { "Failed to resolve assets from Flare CDN" }
val path = AwsToolkit.PLUGINS_INFO[AwsPlugin.Q]?.path?.resolve("flare") ?: error("not even bundled")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to notify here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

user should not care

Base automatically changed from rli/download-flare to feature/q-lsp-chat June 2, 2025 17:26
@rli rli merged commit 6ef5842 into feature/q-lsp-chat Jun 2, 2025
11 of 16 checks passed
@rli rli deleted the rli/artifact-fallback branch June 2, 2025 19:46
leigaol added a commit to aws/aws-toolkit-vscode that referenced this pull request Jun 6, 2025
## Problem
The LSP start failure because 
1. node binary is blocked because of firewall
2. chat UI js file is blocked because of firewall or anti virus
3. lsp js file is broken post download because of security mechanism

## Solution
1. Bundle the JS LSP with the amazonq package.
2. Re-start LSP wth the bundled JS files if and only if downloaded LSP
does not work!
3. Use the VS Code vended node to start the bundled LSP.


This was tested by 
1. Generated the vsix, which is now 20MB.
2. Disconnect from internet, remove local LSP caches
3. Install the new vsix
4. Webview of chat should load.

also tested by manually corrupting the aws-lsp-codewhisperer.js


Limitations:
1. The indexing library function will not work because it is missing.
2. rg is not in the bundle

Ref: aws/aws-toolkit-jetbrains#5772

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Justin M. Keyes <[email protected]>
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