Skip to content
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): allow Amazon Q endpoint to be configured through the registry #5318

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -6,6 +6,7 @@ package software.aws.toolkits.jetbrains.services.codewhisperer.util
import com.intellij.openapi.actionSystem.DataKey
import com.intellij.openapi.editor.markup.EffectType
import com.intellij.openapi.editor.markup.TextAttributes
import com.intellij.openapi.util.registry.Registry
import com.intellij.ui.JBColor
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.codewhispererruntime.model.AccessDeniedException
Expand Down Expand Up @@ -153,7 +154,9 @@ object CodeWhispererConstants {
}

object Config {
const val CODEWHISPERER_ENDPOINT = "https://codewhisperer.us-east-1.amazonaws.com/" // PROD
val CODEWHISPERER_ENDPOINT
get() = Registry.get("amazon.q.endpoint")

const val CODEWHISPERER_IDPOOL_ID = "us-east-1:70717e99-906f-4add-908c-bd9074a2f5b9"
val Sigv4ClientRegion = Region.US_EAST_1
val BearerClientRegion = Region.US_EAST_1
Expand Down
5 changes: 5 additions & 0 deletions plugins/amazonq/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
<incompatible-with>com.intellij.jetbrains.client</incompatible-with>
<incompatible-with>com.intellij.gateway</incompatible-with>

<extensions defaultExtensionNs="com.intellij">
<registryKey key="amazon.q.endpoint" description="Endpoint to use for Amazon Q"
defaultValue="https://codewhisperer.us-east-1.amazonaws.com/" restartRequired="true"/>
</extensions>

<xi:include href="/META-INF/module-amazonq.xml" />

<xi:include href="/META-INF/change-notes.xml" xpointer="xpointer(/idea-plugin/*)">
Expand Down
Loading