Skip to content

Commit 97a793a

Browse files
committed
fix: disable file cache
1 parent 584fb12 commit 97a793a

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

java/src/main/kotlin/cc/unitmesh/idea/prompting/JavaContextPrompter.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ open class JavaContextPrompter : ContextPrompter() {
2727
private lateinit var mvcContextService: MvcContextService
2828
private var fileName = ""
2929
private lateinit var creationContext: ChatCreationContext
30-
private val promptCache = mutableMapOf<String, String>()
3130

3231
override fun appendAdditionContext(context: String) {
3332
additionContext += context
@@ -67,10 +66,6 @@ open class JavaContextPrompter : ContextPrompter() {
6766
}
6867

6968
override fun requestPrompt(): String {
70-
if (promptCache.containsKey(selectedText)) {
71-
return promptCache[selectedText]!!
72-
}
73-
7469
return runBlocking {
7570
val instruction = createPrompt(selectedText)
7671
val chatContext = collectionContext(creationContext)
@@ -90,7 +85,6 @@ open class JavaContextPrompter : ContextPrompter() {
9085
println("final prompt: $finalPrompt")
9186
logger.info("final prompt: $finalPrompt")
9287

93-
promptCache[selectedText] = finalPrompt
9488
return@runBlocking finalPrompt
9589
}
9690
}

0 commit comments

Comments
 (0)