diff --git a/unit-distillation/build.gradle.kts b/unit-distillation/build.gradle.kts index 459a19ee..6e3ff13d 100644 --- a/unit-distillation/build.gradle.kts +++ b/unit-distillation/build.gradle.kts @@ -7,10 +7,14 @@ plugins { } dependencies { + implementation(projects.unitCore) implementation(libs.clikt) implementation(libs.serialization.json) implementation(libs.cf.language) + implementation(libs.cf.connection) + implementation(libs.cf.openai) + implementation(libs.kaml) // Logging diff --git a/unit-distillation/src/main/kotlin/cc/unitmesh/distillate/Distillate.kt b/unit-distillation/src/main/kotlin/cc/unitmesh/distillate/Distillate.kt index 4d52c84f..5ac1c2fc 100644 --- a/unit-distillation/src/main/kotlin/cc/unitmesh/distillate/Distillate.kt +++ b/unit-distillation/src/main/kotlin/cc/unitmesh/distillate/Distillate.kt @@ -6,7 +6,6 @@ fun main(args: Array) = DistillateCommand().main(args) class DistillateCommand : CliktCommand() { override fun run() { - TODO("Not yet implemented") + // TODO: find some code smell and do refactor } - } diff --git a/unit-picker/src/main/kotlin/cc/unitmesh/pick/builder/bizcode/AfterBlockCodeTypedInsBuilder.kt b/unit-picker/src/main/kotlin/cc/unitmesh/pick/builder/bizcode/AfterBlockCodeTypedInsBuilder.kt index 4ab87a0b..9fcd33cc 100644 --- a/unit-picker/src/main/kotlin/cc/unitmesh/pick/builder/bizcode/AfterBlockCodeTypedInsBuilder.kt +++ b/unit-picker/src/main/kotlin/cc/unitmesh/pick/builder/bizcode/AfterBlockCodeTypedInsBuilder.kt @@ -7,7 +7,20 @@ import cc.unitmesh.pick.worker.job.JobContext import chapi.domain.core.CodeFunction +/** + * The `AfterBlockCodeTypedInsBuilder` class is responsible for building a list of code completion instructions + * after a block of code has been typed. + * + * @property context The job context associated with the code completion. + */ class AfterBlockCodeTypedInsBuilder(val context: JobContext) : TypedInsBuilder { + + /** + * Builds a list of code completion instructions based on the provided code function. + * + * @param function The code function for which the code completion instructions are to be built. + * @return A list of code completion instructions. + */ override fun build(function: CodeFunction): List { val position = function.Position val codeLines = context.job.codeLines