Skip to content

Commit 4e4c717

Browse files
authored
Merge branch 'feature/cw-proactive-scan' into feature/abtesting
2 parents 5065697 + ad9c553 commit 4e4c717

File tree

60 files changed

+999
-1284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+999
-1284
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "Connection id is now shown beside CodeCatalyst dropdown"
4+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ target/
44
.idea
55
!.run/
66
build/
7+
gradle_build/
78
*.iml
89
.DS_Store
910
Build/

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session/Session.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package software.aws.toolkits.jetbrains.services.amazonqFeatureDev.session
55

66
import com.intellij.openapi.project.Project
77
import com.intellij.openapi.vfs.VfsUtil
8+
import software.aws.toolkits.jetbrains.services.amazonq.FeatureDevSessionContext
89
import software.aws.toolkits.jetbrains.services.amazonq.messages.MessagePublisher
910
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.APPROACH_RETRY_LIMIT
1011
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.CODE_GENERATION_RETRY_LIMIT

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session/SessionStateTypes.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package software.aws.toolkits.jetbrains.services.amazonqFeatureDev.session
55

66
import com.fasterxml.jackson.annotation.JsonValue
7+
import software.aws.toolkits.jetbrains.services.amazonq.FeatureDevSessionContext
78
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.clients.FeatureDevClient
89
import software.aws.toolkits.jetbrains.services.cwc.messages.CodeReference
910

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/telemetry/TelemetryHelper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import software.amazon.awssdk.services.toolkittelemetry.model.Sentiment
1010
import software.aws.toolkits.core.utils.getLogger
1111
import software.aws.toolkits.core.utils.info
1212
import software.aws.toolkits.core.utils.warn
13-
import software.aws.toolkits.jetbrains.feedback.sendFeedbackWithExperimentsMetadata
1413
import software.aws.toolkits.jetbrains.services.amazonq.apps.AmazonQAppInitContext
1514
import software.aws.toolkits.jetbrains.services.codewhisperer.credentials.CodeWhispererClientAdaptor
1615
import software.aws.toolkits.jetbrains.services.cwc.clients.chat.model.ChatRequestData
@@ -21,6 +20,7 @@ import software.aws.toolkits.jetbrains.services.cwc.messages.ChatMessage
2120
import software.aws.toolkits.jetbrains.services.cwc.messages.IncomingCwcMessage
2221
import software.aws.toolkits.jetbrains.services.cwc.messages.LinkType
2322
import software.aws.toolkits.jetbrains.services.cwc.storage.ChatSessionStorage
23+
import software.aws.toolkits.jetbrains.services.telemetry.TelemetryService
2424
import software.aws.toolkits.jetbrains.utils.notifyError
2525
import software.aws.toolkits.resources.message
2626
import software.aws.toolkits.telemetry.AmazonqTelemetry
@@ -272,7 +272,7 @@ class TelemetryHelper(private val context: AmazonQAppInitContext, private val se
272272
)
273273

274274
try {
275-
sendFeedbackWithExperimentsMetadata(
275+
TelemetryService.getInstance().sendFeedback(
276276
sentiment = Sentiment.NEGATIVE,
277277
comment = ChatController.objectMapper.writeValueAsString(comment),
278278
)

plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session/PrepareRefinementStateTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ import org.mockito.kotlin.mock
1818
import org.mockito.kotlin.times
1919
import org.mockito.kotlin.verify
2020
import org.mockito.kotlin.whenever
21+
import software.aws.toolkits.jetbrains.services.amazonq.FeatureDevSessionContext
22+
import software.aws.toolkits.jetbrains.services.amazonq.ZipCreationResult
2123
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.FeatureDevTestBase
2224
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.clients.FeatureDevClient
23-
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.model.ZipCreationResult
2425
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.util.uploadArtifactToS3
2526
import java.io.File
2627

plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/session/RefinementStateTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import org.mockito.kotlin.mock
1515
import org.mockito.kotlin.times
1616
import org.mockito.kotlin.verify
1717
import org.mockito.kotlin.whenever
18+
import software.aws.toolkits.jetbrains.services.amazonq.FeatureDevSessionContext
1819
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.FeatureDevException
1920
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.FeatureDevTestBase
2021
import software.aws.toolkits.jetbrains.services.amazonqFeatureDev.clients.FeatureDevClient

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/ui/feedback/CodeTransformFeedbackDialog.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
package software.aws.toolkits.jetbrains.ui.feedback
55

66
import com.intellij.openapi.project.Project
7-
import software.aws.toolkits.jetbrains.feedback.sendFeedbackWithExperimentsMetadata
87
import software.aws.toolkits.jetbrains.services.codemodernizer.state.CodeModernizerSessionState
8+
import software.aws.toolkits.jetbrains.services.telemetry.TelemetryService
99
import software.aws.toolkits.resources.message
1010

1111
class CodeTransformFeedbackDialog(project: Project) : FeedbackDialog(project) {
@@ -21,7 +21,7 @@ class CodeTransformFeedbackDialog(project: Project) : FeedbackDialog(project) {
2121
override suspend fun sendFeedback() {
2222
val sessionState = CodeModernizerSessionState.getInstance(project)
2323
val jobId: String = sessionState.currentJobId?.id ?: "None"
24-
sendFeedbackWithExperimentsMetadata(
24+
TelemetryService.getInstance().sendFeedback(
2525
sentiment,
2626
"Amazon Q onboarding: $commentText",
2727
mapOf(FEEDBACK_SOURCE to "Amazon Q onboarding", "JobId" to jobId)

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/coroutines/scopes.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import java.util.concurrent.CancellationException
1919
*
2020
* Use this if the coroutine needs to live past a project being closed or across projects such as an Application Service
2121
*/
22+
@Deprecated("Application x plugin intersection scope should not be used https://plugins.jetbrains.com/docs/intellij/coroutine-scopes.html#use-service-scopes")
2223
fun applicationCoroutineScope(coroutineName: String): CoroutineScope =
2324
PluginCoroutineScopeTracker.getInstance().applicationThreadPoolScope(coroutineName)
2425

@@ -27,6 +28,7 @@ fun applicationCoroutineScope(coroutineName: String): CoroutineScope =
2728
*
2829
* Use this if the coroutine needs to live past a UI being closed, or tied to a project's life cycle such as a Project Service.
2930
*/
31+
@Deprecated("Project x plugin intersection scope should not be used https://plugins.jetbrains.com/docs/intellij/coroutine-scopes.html#use-service-scopes")
3032
fun projectCoroutineScope(project: Project, coroutineName: String): CoroutineScope =
3133
PluginCoroutineScopeTracker.getInstance(project).applicationThreadPoolScope(coroutineName)
3234

@@ -38,6 +40,9 @@ fun projectCoroutineScope(project: Project, coroutineName: String): CoroutineSco
3840
* **Note: If a call lives past the closing of a UI such as kicking off a resource creation, use [projectCoroutineScope].
3941
* Otherwise, the coroutine will be canceled when the UI is closed!**
4042
*/
43+
@Deprecated(
44+
"Coroutine scope should not be shared across entire plugin lifecycle https://plugins.jetbrains.com/docs/intellij/coroutine-scopes.html#use-service-scopes"
45+
)
4146
fun disposableCoroutineScope(disposable: Disposable, coroutineName: String): CoroutineScope {
4247
check(disposable !is Project && disposable !is Application) { "disposable should not be a project or application" }
4348
return PluginCoroutineScopeTracker.getInstance().applicationThreadPoolScope(coroutineName).also {
@@ -50,18 +55,23 @@ fun disposableCoroutineScope(disposable: Disposable, coroutineName: String): Cor
5055
/**
5156
* Version of [applicationCoroutineScope] the class name as the coroutine name.
5257
*/
58+
@Deprecated("Application x plugin intersection scope should not be used https://plugins.jetbrains.com/docs/intellij/coroutine-scopes.html#use-service-scopes")
5359
inline fun <reified T : Any> T.applicationCoroutineScope(): CoroutineScope =
5460
applicationCoroutineScope(T::class.java.name)
5561

5662
/**
5763
* Version of [projectCoroutineScope] the class name as the coroutine name.
5864
*/
65+
@Deprecated("Project x plugin intersection scope should not be used https://plugins.jetbrains.com/docs/intellij/coroutine-scopes.html#use-service-scopes")
5966
inline fun <reified T : Any> T.projectCoroutineScope(project: Project): CoroutineScope =
6067
projectCoroutineScope(project, T::class.java.name)
6168

6269
/**
6370
* Version of [disposableCoroutineScope] the class name as the coroutine name.
6471
*/
72+
@Deprecated(
73+
"Coroutine scope should not be shared across entire plugin lifecycle https://plugins.jetbrains.com/docs/intellij/coroutine-scopes.html#use-service-scopes"
74+
)
6575
inline fun <reified T : Any> T.disposableCoroutineScope(disposable: Disposable): CoroutineScope =
6676
disposableCoroutineScope(disposable, T::class.java.name)
6777

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/credentials/DefaultToolkitAuthManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class DefaultToolkitAuthManager : ToolkitAuthManager, PersistentStateComponent<T
224224
}
225225

226226
is DetectedDiskSsoSessionProfile -> DetectedDiskSsoSessionConnection(
227-
sessionProfileName = profile.profileName,
227+
sessionName = profile.profileName,
228228
startUrl = profile.startUrl,
229229
region = profile.ssoRegion,
230230
scopes = profile.scopes

0 commit comments

Comments
 (0)