Skip to content

Commit b3afbec

Browse files
committed
wip
1 parent e49fe05 commit b3afbec

File tree

10 files changed

+1418
-26
lines changed

10 files changed

+1418
-26
lines changed

webui/src/main/kotlin/com/simiacryptus/diff/AddApplyFileDiffLinks.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,16 +352,16 @@ private fun SocketManagerBase.renderDiffBlock(
352352
val fixTask = ui.newTask(root = false)
353353
val verifyFwdTabs = if (!newCode.isValid) displayMapInTabs(
354354
mapOf(
355-
"Code" to prevCodeTask.placeholder,
356-
"Preview" to newCodeTask.placeholder,
357355
"Echo" to patchTask.placeholder,
358356
"Fix" to fixTask.placeholder,
357+
"Code" to prevCodeTask.placeholder,
358+
"Preview" to newCodeTask.placeholder,
359359
)
360360
) else displayMapInTabs(
361361
mapOf(
362+
"Echo" to patchTask.placeholder,
362363
"Code" to prevCodeTask.placeholder,
363364
"Preview" to newCodeTask.placeholder,
364-
"Echo" to patchTask.placeholder,
365365
)
366366
)
367367

@@ -374,9 +374,9 @@ private fun SocketManagerBase.renderDiffBlock(
374374
val patch2TaskSB = patch2Task.add("")
375375
val verifyRevTabs = displayMapInTabs(
376376
mapOf(
377+
"Echo" to patch2Task.placeholder,
377378
"Code" to prevCode2Task.placeholder,
378379
"Preview" to newCode2Task.placeholder,
379-
"Echo" to patch2Task.placeholder,
380380
)
381381
)
382382

webui/src/main/kotlin/com/simiacryptus/skyenet/Discussable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ ${textInput(design, tabContent, history, task, feedbackSB, feedbackTask = this)}
195195
override fun call(): T {
196196
try {
197197
//log.info("Calling Discussable with heading: $heading")
198-
task.echo(heading)
198+
if(heading.isNotBlank()) task.echo(heading)
199199
val idx = tabs.size
200200
val newTask = ui.newTask(false)
201201
val header = newTask.header("Processing...")

webui/src/main/kotlin/com/simiacryptus/skyenet/apps/general/WebDevApp.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class WebDevAgent(
230230
},
231231
atomicRef = AtomicReference(),
232232
semaphore = Semaphore(0),
233-
heading = userMessage
233+
heading = renderMarkdown(userMessage)
234234
).call()
235235

236236

webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/PlanCoordinator.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class PlanCoordinator(
108108
MarkdownUtil.renderMarkdown(
109109
"## Task Dependency Graph\n${TRIPLE_TILDE}mermaid\n${buildMermaidGraph(planProcessingState.subTasks)}\n$TRIPLE_TILDE",
110110
ui = ui
111-
)
111+
), additionalClasses = "flow-chart"
112112
),
113113
subTasks = planProcessingState.subTasks,
114114
diagramTask = diagramTask,
@@ -154,7 +154,7 @@ class PlanCoordinator(
154154
sessionTask.verbose("API log: <a href=\"file:///$this\">$this</a>")
155155
}
156156
}
157-
val taskTabs = object : TabbedDisplay(sessionTask) {
157+
val taskTabs = object : TabbedDisplay(sessionTask, additionalClasses = "task-tabs") {
158158
override fun renderTabButtons(): String {
159159
diagramBuffer?.set(
160160
MarkdownUtil.renderMarkdown(
@@ -182,7 +182,7 @@ class PlanCoordinator(
182182
AbstractTask.TaskState.Pending -> " style='opacity: 30%;'"
183183
else -> ""
184184
}
185-
append("<label class='tab-button' data-for-tab='${idx}'$style><input type='checkbox' $isChecked disabled /> $taskId</label><br/>\n")
185+
append("<label class='tab-button' data-for-tab='${idx}'$style><input type='checkbox' $isChecked disabled />$taskId</label>\n")
186186
}
187187
append("</div>")
188188
}

webui/src/main/kotlin/com/simiacryptus/skyenet/apps/plan/Planner.kt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ open class Planner {
3333
}
3434
}
3535
val toInput = inputFn(codeFiles, files, root)
36+
task.echo(userMessage)
3637
return if (planSettings.allowBlocking)
3738
Discussable(
3839
task = task,
39-
heading = MarkdownUtil.renderMarkdown(userMessage, ui = ui),
40+
heading = "",
4041
userMessage = { userMessage },
4142
initialResponse = {
4243
newPlan(
@@ -75,18 +76,19 @@ open class Planner {
7576
planText = it.text
7677
)
7778
}
78-
else newPlan(
79-
api,
80-
planSettings,
81-
toInput(userMessage)
82-
).let {
83-
TaskBreakdownWithPrompt(
84-
prompt = userMessage,
85-
plan = PlanUtil.filterPlan { it.obj } ?: emptyMap(),
86-
planText = it.text
87-
)
88-
}
89-
}
79+
else {
80+
newPlan(
81+
api,
82+
planSettings,
83+
toInput(userMessage)
84+
).let {
85+
TaskBreakdownWithPrompt(
86+
prompt = userMessage,
87+
plan = PlanUtil.filterPlan { it.obj } ?: emptyMap(),
88+
planText = it.text
89+
)
90+
}
91+
} }
9092

9193
open fun newPlan(
9294
api: API,

webui/src/main/resources/application/asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.0b4c55b7.css",
4-
"main.js": "/static/js/main.bb1fe951.js",
4+
"main.js": "/static/js/main.77e58d23.js",
55
"static/js/9017.98ad007d.chunk.js": "/static/js/9017.98ad007d.chunk.js",
66
"static/js/5536.9c75127e.chunk.js": "/static/js/5536.9c75127e.chunk.js",
77
"static/js/7035.2bce51c5.chunk.js": "/static/js/7035.2bce51c5.chunk.js",
@@ -72,7 +72,7 @@
7272
"static/js/5195.756798f5.chunk.js": "/static/js/5195.756798f5.chunk.js",
7373
"index.html": "/index.html",
7474
"main.0b4c55b7.css.map": "/static/css/main.0b4c55b7.css.map",
75-
"main.bb1fe951.js.map": "/static/js/main.bb1fe951.js.map",
75+
"main.77e58d23.js.map": "/static/js/main.77e58d23.js.map",
7676
"9017.98ad007d.chunk.js.map": "/static/js/9017.98ad007d.chunk.js.map",
7777
"5536.9c75127e.chunk.js.map": "/static/js/5536.9c75127e.chunk.js.map",
7878
"7035.2bce51c5.chunk.js.map": "/static/js/7035.2bce51c5.chunk.js.map",
@@ -139,6 +139,6 @@
139139
},
140140
"entrypoints": [
141141
"static/css/main.0b4c55b7.css",
142-
"static/js/main.bb1fe951.js"
142+
"static/js/main.77e58d23.js"
143143
]
144144
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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>
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.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>

webui/src/main/resources/application/static/js/main.77e58d23.js

Lines changed: 1317 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*!
2+
* Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
3+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4+
* Copyright 2024 Fonticons, Inc.
5+
*/
6+
7+
/*! @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 */
8+
9+
/*! Bundled license information:
10+
11+
js-yaml/dist/js-yaml.mjs:
12+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
13+
*/
14+
15+
/**
16+
* @license React
17+
* react-dom.production.min.js
18+
*
19+
* Copyright (c) Facebook, Inc. and its affiliates.
20+
*
21+
* This source code is licensed under the MIT license found in the
22+
* LICENSE file in the root directory of this source tree.
23+
*/
24+
25+
/**
26+
* @license React
27+
* react-jsx-runtime.production.min.js
28+
*
29+
* Copyright (c) Facebook, Inc. and its affiliates.
30+
*
31+
* This source code is licensed under the MIT license found in the
32+
* LICENSE file in the root directory of this source tree.
33+
*/
34+
35+
/**
36+
* @license React
37+
* react.production.min.js
38+
*
39+
* Copyright (c) Facebook, Inc. and its affiliates.
40+
*
41+
* This source code is licensed under the MIT license found in the
42+
* LICENSE file in the root directory of this source tree.
43+
*/
44+
45+
/**
46+
* @license React
47+
* scheduler.production.min.js
48+
*
49+
* Copyright (c) Facebook, Inc. and its affiliates.
50+
*
51+
* This source code is licensed under the MIT license found in the
52+
* LICENSE file in the root directory of this source tree.
53+
*/
54+
55+
/**
56+
* @license React
57+
* use-sync-external-store-with-selector.production.min.js
58+
*
59+
* Copyright (c) Facebook, Inc. and its affiliates.
60+
*
61+
* This source code is licensed under the MIT license found in the
62+
* LICENSE file in the root directory of this source tree.
63+
*/
64+
65+
/**
66+
* Prism: Lightweight, robust, elegant syntax highlighting
67+
*
68+
* @license MIT <https://opensource.org/licenses/MIT>
69+
* @author Lea Verou <https://lea.verou.me>
70+
* @namespace
71+
* @public
72+
*/

webui/src/main/resources/application/static/js/main.77e58d23.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)