From 9e61fb576ada209a36d4847a6a05af51309057f1 Mon Sep 17 00:00:00 2001 From: Andrew Charneski Date: Wed, 8 May 2024 01:13:44 -0500 Subject: [PATCH] 1.0.67 (#72) * 1.0.66 * misc fixes * Update AddApplyFileDiffLinks.kt * 1.0.55 * Update UsageManager.kt * Update DataStorage.kt * Update WebDevApp.kt * Update README.md * Update UsageManager.kt * improve filename extract * wip * wip * move packages * Update Discussable.kt * Update gradle.properties --- gradle.properties | 2 +- .../simiacryptus/diff/AddApplyDiffLinks.kt | 2 +- .../simiacryptus/diff/AddApplyFileDiffLinks.kt | 14 +++++++------- .../{github => }/simiacryptus/diff/AddSaveLinks.kt | 2 +- .../{github => }/simiacryptus/diff/ApxPatchUtil.kt | 2 +- .../simiacryptus/diff/DiffMatchPatch.kt | 2 +- .../com/{github => }/simiacryptus/diff/DiffUtil.kt | 4 ++-- .../simiacryptus/diff/IterativePatchUtil.kt | 2 +- .../{github => }/simiacryptus/diff/PatchUtil.kt | 2 +- .../kotlin/com/simiacryptus/skyenet/Discussable.kt | 5 +++-- .../simiacryptus/skyenet/apps/general/WebDevApp.kt | 2 +- .../simiacryptus/diff/ApxPatchUtilTest.kt | 2 +- .../{github => }/simiacryptus/diff/DiffUtilTest.kt | 2 +- .../simiacryptus/diff/IterativePatchUtilTest.kt | 2 +- 14 files changed, 23 insertions(+), 22 deletions(-) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/AddApplyDiffLinks.kt (99%) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/AddApplyFileDiffLinks.kt (96%) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/AddSaveLinks.kt (98%) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/ApxPatchUtil.kt (99%) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/DiffMatchPatch.kt (99%) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/DiffUtil.kt (98%) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/IterativePatchUtil.kt (99%) rename webui/src/main/kotlin/com/{github => }/simiacryptus/diff/PatchUtil.kt (52%) rename webui/src/test/kotlin/com/{github => }/simiacryptus/diff/ApxPatchUtilTest.kt (96%) rename webui/src/test/kotlin/com/{github => }/simiacryptus/diff/DiffUtilTest.kt (99%) rename webui/src/test/kotlin/com/{github => }/simiacryptus/diff/IterativePatchUtilTest.kt (99%) diff --git a/gradle.properties b/gradle.properties index 1056e7fd..ac37dfbb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ # Gradle Releases -> https://github.com/gradle/gradle/releases libraryGroup = com.simiacryptus.skyenet -libraryVersion = 1.0.66 +libraryVersion = 1.0.67 gradleVersion = 7.6.1 diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/AddApplyDiffLinks.kt b/webui/src/main/kotlin/com/simiacryptus/diff/AddApplyDiffLinks.kt similarity index 99% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/AddApplyDiffLinks.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/AddApplyDiffLinks.kt index ee2e0fee..c531aeec 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/AddApplyDiffLinks.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/AddApplyDiffLinks.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import com.simiacryptus.skyenet.AgentPatterns.displayMapInTabs import com.simiacryptus.skyenet.set diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/AddApplyFileDiffLinks.kt b/webui/src/main/kotlin/com/simiacryptus/diff/AddApplyFileDiffLinks.kt similarity index 96% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/AddApplyFileDiffLinks.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/AddApplyFileDiffLinks.kt index ae61815b..331fb33d 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/AddApplyFileDiffLinks.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/AddApplyFileDiffLinks.kt @@ -1,6 +1,6 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff -import com.github.simiacryptus.diff.IterativePatchUtil.patch +import com.simiacryptus.diff.IterativePatchUtil.patch import com.simiacryptus.skyenet.AgentPatterns import com.simiacryptus.skyenet.set import com.simiacryptus.skyenet.webui.application.ApplicationInterface @@ -77,12 +77,12 @@ fun SocketManagerBase.addApplyFileDiffLinks( "Patch" to MarkdownUtil.renderMarkdown(""" |```diff |${ - DiffUtil.formatDiff( - DiffUtil.generateDiff( - prevCode.lines(), - codeValue.lines() - ) + DiffUtil.formatDiff( + DiffUtil.generateDiff( + prevCode.lines(), + codeValue.lines() ) + ) } |``` """.trimMargin(), ui = ui diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/AddSaveLinks.kt b/webui/src/main/kotlin/com/simiacryptus/diff/AddSaveLinks.kt similarity index 98% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/AddSaveLinks.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/AddSaveLinks.kt index 10a65815..d0410cdf 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/AddSaveLinks.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/AddSaveLinks.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import com.simiacryptus.skyenet.set import com.simiacryptus.skyenet.webui.application.ApplicationInterface diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/ApxPatchUtil.kt b/webui/src/main/kotlin/com/simiacryptus/diff/ApxPatchUtil.kt similarity index 99% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/ApxPatchUtil.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/ApxPatchUtil.kt index 0db758f7..2416888f 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/ApxPatchUtil.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/ApxPatchUtil.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import org.apache.commons.text.similarity.LevenshteinDistance diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/DiffMatchPatch.kt b/webui/src/main/kotlin/com/simiacryptus/diff/DiffMatchPatch.kt similarity index 99% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/DiffMatchPatch.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/DiffMatchPatch.kt index 638e4bd0..63cca27e 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/DiffMatchPatch.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/DiffMatchPatch.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import java.io.UnsupportedEncodingException import java.net.URLDecoder diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/DiffUtil.kt b/webui/src/main/kotlin/com/simiacryptus/diff/DiffUtil.kt similarity index 98% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/DiffUtil.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/DiffUtil.kt index 031a7abb..2c703e27 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/DiffUtil.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/DiffUtil.kt @@ -1,6 +1,6 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff -import com.github.simiacryptus.diff.PatchLineType.* +import com.simiacryptus.diff.PatchLineType.* enum class PatchLineType { Added, Deleted, Unchanged diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/IterativePatchUtil.kt b/webui/src/main/kotlin/com/simiacryptus/diff/IterativePatchUtil.kt similarity index 99% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/IterativePatchUtil.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/IterativePatchUtil.kt index ca3fe58c..9704b709 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/IterativePatchUtil.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/IterativePatchUtil.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import org.apache.commons.text.similarity.LevenshteinDistance diff --git a/webui/src/main/kotlin/com/github/simiacryptus/diff/PatchUtil.kt b/webui/src/main/kotlin/com/simiacryptus/diff/PatchUtil.kt similarity index 52% rename from webui/src/main/kotlin/com/github/simiacryptus/diff/PatchUtil.kt rename to webui/src/main/kotlin/com/simiacryptus/diff/PatchUtil.kt index 6ca10d24..709611a1 100644 --- a/webui/src/main/kotlin/com/github/simiacryptus/diff/PatchUtil.kt +++ b/webui/src/main/kotlin/com/simiacryptus/diff/PatchUtil.kt @@ -1,3 +1,3 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff typealias PatchUtil = IterativePatchUtil \ No newline at end of file diff --git a/webui/src/main/kotlin/com/simiacryptus/skyenet/Discussable.kt b/webui/src/main/kotlin/com/simiacryptus/skyenet/Discussable.kt index f3b1a4e8..93334019 100644 --- a/webui/src/main/kotlin/com/simiacryptus/skyenet/Discussable.kt +++ b/webui/src/main/kotlin/com/simiacryptus/skyenet/Discussable.kt @@ -52,8 +52,9 @@ class Discussable( val userMessage = userMessage() history.add(userMessage to Role.user) val design = initialResponse(userMessage) - history.add(outputFn(design) to Role.assistant) - val tabContent = task.add(outputFn(design))!! + val rendered = outputFn(design) + history.add(rendered to Role.assistant) + val tabContent = task.add(rendered)!! val feedbackForm = feedbackForm(tabIndex, tabContent, design, history, task) tabContent?.append("\n" + feedbackForm.placeholder) task.complete() diff --git a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/general/WebDevApp.kt b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/general/WebDevApp.kt index aebd8753..a2dc25a1 100644 --- a/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/general/WebDevApp.kt +++ b/webui/src/main/kotlin/com/simiacryptus/skyenet/apps/general/WebDevApp.kt @@ -1,7 +1,7 @@ package com.simiacryptus.skyenet.apps.general import com.github.simiacryptus.aicoder.actions.generic.commonRoot -import com.github.simiacryptus.diff.addApplyFileDiffLinks +import com.simiacryptus.diff.addApplyFileDiffLinks import com.simiacryptus.jopenai.API import com.simiacryptus.jopenai.ApiModel import com.simiacryptus.jopenai.ApiModel.Role diff --git a/webui/src/test/kotlin/com/github/simiacryptus/diff/ApxPatchUtilTest.kt b/webui/src/test/kotlin/com/simiacryptus/diff/ApxPatchUtilTest.kt similarity index 96% rename from webui/src/test/kotlin/com/github/simiacryptus/diff/ApxPatchUtilTest.kt rename to webui/src/test/kotlin/com/simiacryptus/diff/ApxPatchUtilTest.kt index 901913bd..ac0016dc 100644 --- a/webui/src/test/kotlin/com/github/simiacryptus/diff/ApxPatchUtilTest.kt +++ b/webui/src/test/kotlin/com/simiacryptus/diff/ApxPatchUtilTest.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/webui/src/test/kotlin/com/github/simiacryptus/diff/DiffUtilTest.kt b/webui/src/test/kotlin/com/simiacryptus/diff/DiffUtilTest.kt similarity index 99% rename from webui/src/test/kotlin/com/github/simiacryptus/diff/DiffUtilTest.kt rename to webui/src/test/kotlin/com/simiacryptus/diff/DiffUtilTest.kt index fd7858c8..4108d346 100644 --- a/webui/src/test/kotlin/com/github/simiacryptus/diff/DiffUtilTest.kt +++ b/webui/src/test/kotlin/com/simiacryptus/diff/DiffUtilTest.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/webui/src/test/kotlin/com/github/simiacryptus/diff/IterativePatchUtilTest.kt b/webui/src/test/kotlin/com/simiacryptus/diff/IterativePatchUtilTest.kt similarity index 99% rename from webui/src/test/kotlin/com/github/simiacryptus/diff/IterativePatchUtilTest.kt rename to webui/src/test/kotlin/com/simiacryptus/diff/IterativePatchUtilTest.kt index 405f4385..cb24cd6a 100644 --- a/webui/src/test/kotlin/com/github/simiacryptus/diff/IterativePatchUtilTest.kt +++ b/webui/src/test/kotlin/com/simiacryptus/diff/IterativePatchUtilTest.kt @@ -1,4 +1,4 @@ -package com.github.simiacryptus.diff +package com.simiacryptus.diff import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test