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

wip: use json-rpc for local workspace context #5425

Draft
wants to merge 4 commits into
base: feature/q-lsp
Choose a base branch
from

Conversation

rli
Copy link
Contributor

@rli rli commented Feb 28, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

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

@rli
Copy link
Contributor Author

rli commented Feb 28, 2025

2025-02-28 10:45:22,437 [ 237657]   INFO - software.aws.toolkits.jetbrains.services.amazonq.lsp.AmazonQServerInstance - [Trace - 10:45:22 AM] Received response 'lsp/queryInlineProjectContext - (2)' in 4ms
Result: null
2025-02-28 10:45:22,437 [ 237657]   WARN - software.aws.toolkits.jetbrains.services.amazonq.project.ProjectContextProvider - error querying chat Request lsp/queryInlineProjectContext failed with message: Compact JWE must be a string or Uint8Array
2025-02-28 10:45:22,437 [ 237657]   WARN - software.aws.toolkits.jetbrains.services.codewhisperer.util.DefaultCodeWhispererFileContextProvider - Failed to fetch supplemental context, empty list.
Error: {
  "code": -32603,
  "message": "Request lsp/queryInlineProjectContext failed with message: Compact JWE must be a string or Uint8Array"
}

Copy link

github-actions bot commented Feb 28, 2025

Qodana Community for JVM

7 new problems were found

Inspection name Severity Problems
Constructor parameter is never used as a property 🔶 Warning 2
Local 'var' is never modified and can be declared as 'val' 🔶 Warning 1
Usage of redundant or deprecated syntax or deprecated symbols 🔶 Warning 1
Unused import directive 🔶 Warning 1
Unused symbol 🔶 Warning 1
Function or property has platform type ◽️ Notice 1

💡 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]

@@ -324,3 +347,193 @@
private val LOG = getLogger<AmazonQServerInstance>()
}
}


class EncoderServer2(private val encoderServer: EncoderServer, private val commandLine: GeneralCommandLine, private val project: Project, private val cs: CoroutineScope) : Disposable {

Check warning

Code scanning / QDJVMC

Constructor parameter is never used as a property Warning

Constructor parameter is never used as a property
@@ -324,3 +347,193 @@
private val LOG = getLogger<AmazonQServerInstance>()
}
}


class EncoderServer2(private val encoderServer: EncoderServer, private val commandLine: GeneralCommandLine, private val project: Project, private val cs: CoroutineScope) : Disposable {

Check warning

Code scanning / QDJVMC

Constructor parameter is never used as a property Warning

Constructor parameter is never used as a property

val initializeResult = try {
withTimeout(5.seconds) {
languageServer.initialize(createInitializeParams()).await()

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'await(): T' is deprecated. Please migrate to using kotlinx.coroutines.future.await instead. The deprecation level is going to be changed to ERROR in as soon as there's no more usages in the monorepo.
class EncoderServer(val project: Project) : Disposable {
private val cachePath = Paths.get(
class EncoderServer(val project: Project, private val cs: CoroutineScope) : Disposable {
val cachePath = Paths.get(

Check notice

Code scanning / QDJVMC

Function or property has platform type Note

Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable.
@@ -84,6 +84,7 @@
import software.aws.toolkits.telemetry.CwsprChatCommandType
import java.time.Instant
import java.util.UUID
import kotlin.time.Duration.Companion.milliseconds

Check warning

Code scanning / QDJVMC

Unused import directive Warning

Unused import directive
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.

1 participant