diff --git a/unit-core/src/main/kotlin/cc/unitmesh/core/intelli/SimilarChunkContext.kt b/unit-core/src/main/kotlin/cc/unitmesh/core/intelli/SimilarChunkContext.kt index c5a13f8a..bf982fd5 100644 --- a/unit-core/src/main/kotlin/cc/unitmesh/core/intelli/SimilarChunkContext.kt +++ b/unit-core/src/main/kotlin/cc/unitmesh/core/intelli/SimilarChunkContext.kt @@ -2,7 +2,7 @@ package cc.unitmesh.core.intelli import cc.unitmesh.core.base.LLMCodeContext -class SimilarChunkContext(val language: String, val paths: List?, val chunks: List?) : LLMCodeContext { +class SimilarChunkContext(val language: String, private val paths: List?, private val chunks: List?) : LLMCodeContext { override fun format(): String { val commentPrefix = CommentService.getInstance().lineComment(language) diff --git a/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/WorkerContext.kt b/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/WorkerContext.kt index edec3446..c9fa517b 100644 --- a/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/WorkerContext.kt +++ b/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/WorkerContext.kt @@ -21,7 +21,6 @@ data class WorkerContext( val qualityThreshold: InsQualityThreshold = InsQualityThreshold(), var compositionDependency: List = listOf(), ) { - companion object { @TestOnly fun default(): WorkerContext { diff --git a/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/KotlinWorker.kt b/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/KotlinWorker.kt index 26c3c3a3..2730742c 100644 --- a/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/KotlinWorker.kt +++ b/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/KotlinWorker.kt @@ -11,7 +11,7 @@ class KotlinWorker(override val context: WorkerContext) : JavaWorker(context), L override val jobs: MutableList = mutableListOf() override val fileTree: HashMap = hashMapOf() - override val logger: Logger = org.slf4j.LoggerFactory.getLogger(JavaWorker::class.java) + override val logger: Logger = org.slf4j.LoggerFactory.getLogger(KotlinWorker::class.java) override val packageRegex = Regex("package\\s+([a-zA-Z0-9_.]+)") override val extLength = ".kt".length diff --git a/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/TypescriptWorker.kt b/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/TypescriptWorker.kt index 9b651b5a..834fbca8 100644 --- a/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/TypescriptWorker.kt +++ b/unit-picker/src/main/kotlin/cc/unitmesh/pick/worker/lang/TypescriptWorker.kt @@ -14,8 +14,6 @@ class TypescriptWorker(override val context: WorkerContext) : LangWorker { override fun prepareJob(job: InstructionFileJob) { this.jobs.add(job) - - // since the Java Analyser imports will be in data structures try { val container = TypeScriptAnalyser().analysis(job.code, job.fileSummary.location) job.codeLines = job.code.lines()