Skip to content

Commit 9279760

Browse files
committed
feat: Update completion text handling in Agent.kt
- Remove conditional assignment of completion text - Always use the original completion text value - Simplify logic in provideCompletions function
1 parent bffca63 commit 9279760

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/ai/devchat/plugin/completion/agent

1 file changed

+1
-1
lines changed

src/main/kotlin/ai/devchat/plugin/completion/agent/Agent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ suspend fun provideCompletions(
299299
val llmRequestElapse = System.currentTimeMillis() - startTime
300300
val offset = completionRequest.position
301301
val replaceRange = CompletionResponse.Choice.Range(start = offset, end = offset)
302-
val text = if (completion.text != prevCompletion) completion.text else ""
302+
val text = completion.text
303303
val choice = CompletionResponse.Choice(index = 0, text = text, replaceRange = replaceRange)
304304
val response = CompletionResponse(completion.id, model, listOf(choice), promptBuildingElapse, llmRequestElapse)
305305

0 commit comments

Comments
 (0)