Skip to content

Commit 4f2b7c9

Browse files
authored
Merge branch 'main' into rli/move-cw-tel-service-otel
2 parents 8cfb058 + 0b83303 commit 4f2b7c9

File tree

7 files changed

+35
-4
lines changed

7 files changed

+35
-4
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Improve `@workspace` index start stop strategy"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fixed an issue where Q inline won't appear in JetBrains remote 2024.2+"
4+
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/startup/AmazonQStartupActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class AmazonQStartupActivity : ProjectActivity {
5353
// In the future we will decouple LSP start and indexing start to let LSP perform other tasks.
5454
val startLspIndexingDuration = Duration.ofMinutes(30)
5555
project.waitForSmartMode()
56+
delay(30_000) // Wait for 30 seconds for systemLoadAverage to be more accurate
5657
try {
5758
withTimeout(startLspIndexingDuration) {
5859
while (true) {

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import software.aws.toolkits.core.utils.debug
4646
import software.aws.toolkits.core.utils.getLogger
4747
import software.aws.toolkits.core.utils.info
4848
import software.aws.toolkits.core.utils.warn
49+
import software.aws.toolkits.jetbrains.core.coroutines.EDT
4950
import software.aws.toolkits.jetbrains.core.coroutines.disposableCoroutineScope
5051
import software.aws.toolkits.jetbrains.core.coroutines.getCoroutineBgContext
5152
import software.aws.toolkits.jetbrains.core.coroutines.projectCoroutineScope
@@ -206,9 +207,12 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
206207
invokeCodeWhispererInBackground(requestContext)
207208
}
208209

209-
internal fun invokeCodeWhispererInBackground(requestContext: RequestContext): Job {
210-
val popup = CodeWhispererPopupManager.getInstance().initPopup()
211-
Disposer.register(popup) { CodeWhispererInvocationStatus.getInstance().finishInvocation() }
210+
internal suspend fun invokeCodeWhispererInBackground(requestContext: RequestContext): Job {
211+
val popup = withContext(EDT) {
212+
CodeWhispererPopupManager.getInstance().initPopup().also {
213+
Disposer.register(it) { CodeWhispererInvocationStatus.getInstance().finishInvocation() }
214+
}
215+
}
212216

213217
val workerContexts = mutableListOf<WorkerContext>()
214218
// When popup is disposed we will cancel this coroutine. The only places popup can get disposed should be

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project/manifest/ManifestManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import software.aws.toolkits.jetbrains.core.getTextFromUrl
1515

1616
class ManifestManager {
1717
private val cloudFrontUrl = "https://aws-toolkit-language-servers.amazonaws.com/q-context/manifest.json"
18-
val currentVersion = "0.1.19"
18+
val currentVersion = "0.1.26"
1919
val currentOs = getOs()
2020
private val arch = CpuArch.CURRENT
2121
private val mapper = jacksonObjectMapper()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package software.aws.toolkits.jetbrains.services.telemetry
5+
6+
import com.intellij.ide.util.RunOnceUtil
7+
import com.intellij.openapi.project.Project
8+
import com.intellij.openapi.startup.ProjectActivity
9+
import software.aws.toolkits.telemetry.SessionTelemetry
10+
11+
internal class AwsToolkitStartupMetrics : ProjectActivity {
12+
override suspend fun execute(project: Project) {
13+
RunOnceUtil.runOnceForApp(this::class.qualifiedName.toString()) {
14+
SessionTelemetry.start(project)
15+
}
16+
}
17+
}

plugins/toolkit/jetbrains-core/resources/META-INF/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@
196196
<statusBarWidgetFactory id="CawsSpaceProjectInfo" implementation="software.aws.toolkits.jetbrains.services.caws.CawsStatusBarInstaller"/>
197197

198198
<postStartupActivity implementation="software.aws.toolkits.jetbrains.core.executables.ExecutableLoader"/>
199+
<postStartupActivity implementation="software.aws.toolkits.jetbrains.services.telemetry.AwsToolkitStartupMetrics"/>
199200
<postStartupActivity implementation="software.aws.toolkits.jetbrains.core.startup.QMigrationActivity"/>
200201
<postStartupActivity implementation="software.aws.toolkits.jetbrains.core.startup.ToolWindowStartupActivity"/>
201202

0 commit comments

Comments
 (0)