Skip to content

Commit 1628d33

Browse files
committed
lint
1 parent 5f3ea1a commit 1628d33

File tree

5 files changed

+6
-13
lines changed

5 files changed

+6
-13
lines changed

plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonq/workspace/context/ProjectContextProviderTest.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ class ProjectContextProviderTest {
7070
stubFor(any(urlPathEqualTo("/initialize")).willReturn(aResponse().withStatus(200).withResponseBody(Body("initialize response"))))
7171

7272
// build index
73-
stubFor(any(urlPathEqualTo("/indexFiles")).willReturn(aResponse().withStatus(200).withResponseBody(Body("initialize response"))))
7473
stubFor(any(urlPathEqualTo("/buildIndex")).willReturn(aResponse().withStatus(200).withResponseBody(Body("initialize response"))))
7574

7675
// update index
77-
stubFor(any(urlPathEqualTo("/updateIndex")).willReturn(aResponse().withStatus(200).withResponseBody(Body("initialize response"))))
7876
stubFor(any(urlPathEqualTo("/updateIndexV2")).willReturn(aResponse().withStatus(200).withResponseBody(Body("initialize response"))))
7977

8078
// query
@@ -109,7 +107,6 @@ class ProjectContextProviderTest {
109107
fun `Lsp endpoint correctness`() {
110108
assertThat(LspMessage.Initialize.endpoint).isEqualTo("initialize")
111109
assertThat(LspMessage.Index.endpoint).isEqualTo("buildIndex")
112-
assertThat(LspMessage.Index.endpoint).isEqualTo("indexFiles")
113110
assertThat(LspMessage.UpdateIndex.endpoint).isEqualTo("updateIndexV2")
114111
assertThat(LspMessage.QueryChat.endpoint).isEqualTo("query")
115112
assertThat(LspMessage.QueryInlineCompletion.endpoint).isEqualTo("queryInlineProjectContext")

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererFileContextProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class DefaultCodeWhispererFileContextProvider(private val project: Project) : Fi
231231
}
232232

233233
@VisibleForTesting
234-
suspend fun fetchProjectContext(query: String, psiFile: PsiFile, targetContext: FileContextInfo): SupplementalContextInfo {
234+
fun fetchProjectContext(query: String, psiFile: PsiFile, targetContext: FileContextInfo): SupplementalContextInfo {
235235
val response = ProjectContextController.getInstance(project).queryInline(query, psiFile.virtualFile?.path ?: "")
236236

237237
return SupplementalContextInfo(

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ class ProjectContextController(private val project: Project, private val cs: Cor
6464
emptyList()
6565
}
6666

67-
fun updateIndex(filePath: String) {
68-
updateIndex(listOf(filePath), ProjectContextProvider.IndexUpdateMode.UPDATE)
69-
}
70-
7167
fun updateIndex(filePaths: List<String>, mode: ProjectContextProvider.IndexUpdateMode) {
7268
try {
7369
return projectContextProvider.updateIndex(filePaths, mode)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class ProjectContextEditorListener : FileEditorManagerListener {
1313

1414
// TODO: should respect isIdeAutosave config
1515
with(FileDocumentManager.getInstance()) {
16-
getDocument(oldFile)?.let {
17-
saveDocument(it)
16+
this.getDocument(oldFile)?.let {
17+
this.saveDocument(it)
1818
}
1919
}
2020

2121
val project = event.manager.project
22-
ProjectContextController.getInstance(project).updateIndex(oldFile.path)
22+
ProjectContextController.getInstance(project).updateIndex(listOf(oldFile.path), ProjectContextProvider.IndexUpdateMode.UPDATE)
2323
}
2424
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import software.aws.toolkits.core.utils.warn
1414
import software.aws.toolkits.jetbrains.core.getTextFromUrl
1515

1616
class ManifestManager {
17-
private val cloudFrontUrl = "https://ducvaeoffl85c.cloudfront.net/manifest-0.1.17.json"
18-
val currentVersion = "0.1.17"
17+
private val cloudFrontUrl = "https://aws-toolkit-language-servers.amazonaws.com/q-context/manifest.json"
18+
val currentVersion = "0.1.13"
1919
val currentOs = getOs()
2020
private val arch = CpuArch.CURRENT
2121
private val mapper = jacksonObjectMapper()

0 commit comments

Comments
 (0)