Skip to content

Commit

Permalink
fix: fix import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 7, 2023
1 parent b71938e commit 68e0ba3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import cc.unitmesh.pick.prompt.Instruction
import cc.unitmesh.pick.prompt.InstructionBuilder
import cc.unitmesh.pick.prompt.InstructionContext
import chapi.domain.core.CodeDataStruct
import chapi.domain.core.CodePosition

class RelatedCodeCompletionBuilder(private val context: InstructionContext) : InstructionBuilder {
private val instruction: String = "";
Expand All @@ -16,7 +17,7 @@ class RelatedCodeCompletionBuilder(private val context: InstructionContext) : In
val container = context.job.container ?: return emptyList()

val relatedDataStructure = container.Imports.mapNotNull {
context.fileTree[it.AsName]?.container?.DataStructures
context.fileTree[it.Source]?.container?.DataStructures
}.flatten()

val relatedCode = relatedDataStructure.joinToString("\n") {
Expand Down

0 comments on commit 68e0ba3

Please sign in to comment.