Skip to content

deps(amazonq): Add registry entry for endpoint #5838

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

Merged
merged 2 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import com.intellij.openapi.util.registry.Registry
import org.jetbrains.annotations.VisibleForTesting
import software.aws.toolkits.core.utils.deleteIfExists
import software.aws.toolkits.core.utils.error
Expand All @@ -21,15 +22,17 @@
import java.nio.file.Path

class ManifestFetcher(
private val lspManifestUrl: String = DEFAULT_MANIFEST_URL,
private val lspManifestUrl: String = getManifestEndpoint(),

Check warning on line 25 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt#L25

Added line #L25 was not covered by tests
private val manifestPath: Path = DEFAULT_MANIFEST_PATH,
) {
companion object {
private val mapper = jacksonObjectMapper().apply { configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) }
private val logger = getLogger<ManifestFetcher>()

private const val DEFAULT_MANIFEST_URL =
"https://aws-toolkit-language-servers.amazonaws.com/qAgenticChatServer/0/manifest.json"
private fun getManifestEndpoint(): String {
val endpoint = Registry.get("amazon.q.flare.endpoint").asString()

Check warning on line 33 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ManifestFetcher.kt#L33

Added line #L33 was not covered by tests
return endpoint.ifBlank { "https://aws-toolkit-language-servers.amazonaws.com/qAgenticChatServer/0/manifest.json" }
}

private val DEFAULT_MANIFEST_PATH: Path = getToolkitsCommonCacheRoot()
.resolve("aws")
Expand Down
3 changes: 3 additions & 0 deletions plugins/amazonq/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
restartRequired="true"/>
<registryKey key="inline.completion.rem.dev.use.rhizome" description="Defined by IntelliJ. Used for Amazon Q to display suggestions on remote."
defaultValue="false" restartRequired="true"/>
<registryKey defaultValue=""
description="Endpoint to use to download flare artifacts"
key="amazon.q.flare.endpoint"/>
</extensions>

<extensionPoints>
Expand Down
Loading