Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
acharneski committed Dec 8, 2024
1 parent e49fe05 commit b3afbec
Show file tree
Hide file tree
Showing 10 changed files with 1,418 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,16 @@ private fun SocketManagerBase.renderDiffBlock(
val fixTask = ui.newTask(root = false)
val verifyFwdTabs = if (!newCode.isValid) displayMapInTabs(
mapOf(
"Code" to prevCodeTask.placeholder,
"Preview" to newCodeTask.placeholder,
"Echo" to patchTask.placeholder,
"Fix" to fixTask.placeholder,
"Code" to prevCodeTask.placeholder,
"Preview" to newCodeTask.placeholder,
)
) else displayMapInTabs(
mapOf(
"Echo" to patchTask.placeholder,
"Code" to prevCodeTask.placeholder,
"Preview" to newCodeTask.placeholder,
"Echo" to patchTask.placeholder,
)
)

Expand All @@ -374,9 +374,9 @@ private fun SocketManagerBase.renderDiffBlock(
val patch2TaskSB = patch2Task.add("")
val verifyRevTabs = displayMapInTabs(
mapOf(
"Echo" to patch2Task.placeholder,
"Code" to prevCode2Task.placeholder,
"Preview" to newCode2Task.placeholder,
"Echo" to patch2Task.placeholder,
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ ${textInput(design, tabContent, history, task, feedbackSB, feedbackTask = this)}
override fun call(): T {
try {
//log.info("Calling Discussable with heading: $heading")
task.echo(heading)
if(heading.isNotBlank()) task.echo(heading)
val idx = tabs.size
val newTask = ui.newTask(false)
val header = newTask.header("Processing...")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class WebDevAgent(
},
atomicRef = AtomicReference(),
semaphore = Semaphore(0),
heading = userMessage
heading = renderMarkdown(userMessage)
).call()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class PlanCoordinator(
MarkdownUtil.renderMarkdown(
"## Task Dependency Graph\n${TRIPLE_TILDE}mermaid\n${buildMermaidGraph(planProcessingState.subTasks)}\n$TRIPLE_TILDE",
ui = ui
)
), additionalClasses = "flow-chart"
),
subTasks = planProcessingState.subTasks,
diagramTask = diagramTask,
Expand Down Expand Up @@ -154,7 +154,7 @@ class PlanCoordinator(
sessionTask.verbose("API log: <a href=\"file:///$this\">$this</a>")
}
}
val taskTabs = object : TabbedDisplay(sessionTask) {
val taskTabs = object : TabbedDisplay(sessionTask, additionalClasses = "task-tabs") {
override fun renderTabButtons(): String {
diagramBuffer?.set(
MarkdownUtil.renderMarkdown(
Expand Down Expand Up @@ -182,7 +182,7 @@ class PlanCoordinator(
AbstractTask.TaskState.Pending -> " style='opacity: 30%;'"
else -> ""
}
append("<label class='tab-button' data-for-tab='${idx}'$style><input type='checkbox' $isChecked disabled /> $taskId</label><br/>\n")
append("<label class='tab-button' data-for-tab='${idx}'$style><input type='checkbox' $isChecked disabled />$taskId</label>\n")
}
append("</div>")
}
Expand Down
28 changes: 15 additions & 13 deletions webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/Planner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ open class Planner {
}
}
val toInput = inputFn(codeFiles, files, root)
task.echo(userMessage)
return if (planSettings.allowBlocking)
Discussable(
task = task,
heading = MarkdownUtil.renderMarkdown(userMessage, ui = ui),
heading = "",
userMessage = { userMessage },
initialResponse = {
newPlan(
Expand Down Expand Up @@ -75,18 +76,19 @@ open class Planner {
planText = it.text
)
}
else newPlan(
api,
planSettings,
toInput(userMessage)
).let {
TaskBreakdownWithPrompt(
prompt = userMessage,
plan = PlanUtil.filterPlan { it.obj } ?: emptyMap(),
planText = it.text
)
}
}
else {
newPlan(
api,
planSettings,
toInput(userMessage)
).let {
TaskBreakdownWithPrompt(
prompt = userMessage,
plan = PlanUtil.filterPlan { it.obj } ?: emptyMap(),
planText = it.text
)
}
} }

open fun newPlan(
api: API,
Expand Down
6 changes: 3 additions & 3 deletions webui/src/main/resources/application/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.0b4c55b7.css",
"main.js": "/static/js/main.bb1fe951.js",
"main.js": "/static/js/main.77e58d23.js",
"static/js/9017.98ad007d.chunk.js": "/static/js/9017.98ad007d.chunk.js",
"static/js/5536.9c75127e.chunk.js": "/static/js/5536.9c75127e.chunk.js",
"static/js/7035.2bce51c5.chunk.js": "/static/js/7035.2bce51c5.chunk.js",
Expand Down Expand Up @@ -72,7 +72,7 @@
"static/js/5195.756798f5.chunk.js": "/static/js/5195.756798f5.chunk.js",
"index.html": "/index.html",
"main.0b4c55b7.css.map": "/static/css/main.0b4c55b7.css.map",
"main.bb1fe951.js.map": "/static/js/main.bb1fe951.js.map",
"main.77e58d23.js.map": "/static/js/main.77e58d23.js.map",
"9017.98ad007d.chunk.js.map": "/static/js/9017.98ad007d.chunk.js.map",
"5536.9c75127e.chunk.js.map": "/static/js/5536.9c75127e.chunk.js.map",
"7035.2bce51c5.chunk.js.map": "/static/js/7035.2bce51c5.chunk.js.map",
Expand Down Expand Up @@ -139,6 +139,6 @@
},
"entrypoints": [
"static/css/main.0b4c55b7.css",
"static/js/main.bb1fe951.js"
"static/js/main.77e58d23.js"
]
}
2 changes: 1 addition & 1 deletion webui/src/main/resources/application/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.bb1fe951.js"></script><link href="/static/css/main.0b4c55b7.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.77e58d23.js"></script><link href="/static/css/main.0b4c55b7.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1,317 changes: 1,317 additions & 0 deletions webui/src/main/resources/application/static/js/main.77e58d23.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*!
* Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2024 Fonticons, Inc.
*/

/*! @license DOMPurify 3.2.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.2/LICENSE */

/*! Bundled license information:

js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/

/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* use-sync-external-store-with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/

Large diffs are not rendered by default.

0 comments on commit b3afbec

Please sign in to comment.