comfy-ts 2.10.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{LogsSt-DFxzQfDc.js → LogsSt-U1H0mP1m.js} +35 -5
- package/dist/LogsSt-U1H0mP1m.js.map +1 -0
- package/dist/cli.js +4 -4
- package/dist/index.cjs +565 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +210 -31
- package/dist/index.d.ts +210 -31
- package/dist/index.js +561 -63
- package/dist/index.js.map +1 -1
- package/dist/{run-serve-_nrvJYyt.js → run-serve-BeAznay5.js} +549 -43
- package/dist/run-serve-BeAznay5.js.map +1 -0
- package/dist/{run-tui-Atvf9vb3.js → run-tui-BTGjvnKk.js} +75 -18
- package/dist/run-tui-BTGjvnKk.js.map +1 -0
- package/dist/{DefinedWorkflow-BatWaZO1.js → schemaDrift-Cg39vs53.js} +644 -60
- package/dist/schemaDrift-Cg39vs53.js.map +1 -0
- package/dist/serve-web.js +523 -133
- package/dist/{state-6RFDIQwJ.js → state-C7REnHan.js} +18 -3
- package/dist/{state-6RFDIQwJ.js.map → state-C7REnHan.js.map} +1 -1
- package/dist/web.d.ts +210 -31
- package/dist/web.js +561 -63
- package/dist/web.js.map +1 -1
- package/examples/comfy-cloud/capybara-i2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-5b-t2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-i2v.cflow.ts +2 -0
- package/examples/comfy-cloud/wan22-t2v.cflow.ts +2 -0
- package/examples/rvion/06-qwen-image-edit.cflow.ts +3 -2
- package/examples/rvion/07-local-llm-text-gen.cflow.ts +2 -2
- package/examples/rvion/10-anima-t2i.cflow.ts +229 -0
- package/extra/README.md +4 -0
- package/extra/comfyui-fresh-model-lists/README.md +25 -0
- package/extra/comfyui-fresh-model-lists/__init__.py +36 -0
- package/extra/comfyui-fresh-model-lists/test_fresh_model_lists.py +97 -0
- package/package.json +17 -7
- package/src/cli/draftMeta.ts +39 -0
- package/src/cli/serve/ServeApp.ts +242 -12
- package/src/cli/serve/applyVarPayload.ts +50 -22
- package/src/cli/serve/describeVar.ts +49 -6
- package/src/cli/serve/favicon.ts +3 -0
- package/src/cli/serve/llmConfigShape.ts +51 -0
- package/src/cli/serve/llmConfigs.ts +52 -0
- package/src/cli/serve/tagList.ts +92 -0
- package/src/cli/serve/tagSource.ts +69 -0
- package/src/cli/serve/web/api.ts +60 -0
- package/src/cli/serve/web/components/App.tsx +336 -44
- package/src/cli/serve/web/components/Gallery.tsx +105 -28
- package/src/cli/serve/web/components/HistoryPicker.tsx +149 -0
- package/src/cli/serve/web/components/Icon.tsx +18 -2
- package/src/cli/serve/web/components/MenuButton.tsx +53 -0
- package/src/cli/serve/web/components/Omnibox.tsx +85 -0
- package/src/cli/serve/web/components/PromptEnhancer.tsx +476 -180
- package/src/cli/serve/web/components/TooltipLayer.tsx +45 -0
- package/src/cli/serve/web/components/VarIcon.tsx +24 -0
- package/src/cli/serve/web/components/VarsForm.tsx +341 -177
- package/src/cli/serve/web/components/controls/BasicControls.tsx +57 -32
- package/src/cli/serve/web/components/controls/LorasControl.tsx +708 -285
- package/src/cli/serve/web/components/controls/PresetPicker.tsx +1 -1
- package/src/cli/serve/web/components/controls/PromptControl.tsx +279 -0
- package/src/cli/serve/web/components/controls/PromptEditor.tsx +113 -0
- package/src/cli/serve/web/components/controls/SeedControl.tsx +17 -10
- package/src/cli/serve/web/components/controls/SizeControl.tsx +111 -18
- package/src/cli/serve/web/components/modKey.ts +2 -0
- package/src/cli/serve/web/llm.ts +23 -12
- package/src/cli/serve/web/promptEditor/promptExtensions.ts +281 -0
- package/src/cli/serve/web/state/EnhancerSt.ts +415 -100
- package/src/cli/serve/web/state/FormSt.ts +193 -29
- package/src/cli/serve/web/state/OmniboxSt.ts +57 -0
- package/src/cli/serve/web/state/WebSt.ts +281 -57
- package/src/cli/serve/web/state/choiceButtons.ts +61 -0
- package/src/cli/serve/web/state/generateButton.ts +16 -0
- package/src/cli/serve/web/state/history.ts +54 -0
- package/src/cli/serve/web/state/host.ts +5 -2
- package/src/cli/serve/web/state/keptLines.ts +53 -0
- package/src/cli/serve/web/state/latentMode.ts +20 -0
- package/src/cli/serve/web/state/loraSort.ts +57 -0
- package/src/cli/serve/web/state/moduleTree.ts +2 -2
- package/src/cli/serve/web/state/omnibox.ts +69 -0
- package/src/cli/serve/web/state/payload.ts +38 -58
- package/src/cli/serve/web/state/shortcuts.ts +54 -0
- package/src/cli/serve/web/state/sizeStars.ts +31 -0
- package/src/cli/serve/web/state/stableSlots.ts +21 -0
- package/src/cli/serve/web/state/varGroups.ts +24 -0
- package/src/cli/serve/web/styles.ts +472 -118
- package/src/cli/serve/webBundle.ts +54 -10
- package/src/cli/tui/components/Header.tsx +2 -0
- package/src/cli/tui/components/PickerOverlays.tsx +9 -2
- package/src/cli/tui/imagePicker/ImagePickerSt.ts +1 -1
- package/src/cli/tui/state/DraftsSt.ts +18 -2
- package/src/cli/tui/state/EditorSt.ts +1 -1
- package/src/cli/tui/state/HostSt.ts +34 -0
- package/src/cli/tui/state/LorasSt.ts +1 -1
- package/src/cli/tui/state/PickerSt.ts +25 -7
- package/src/cli/tui/state/SettingsSt.ts +1 -1
- package/src/cli/tui/state/TuiSt.ts +10 -0
- package/src/coreExports.ts +20 -0
- package/src/host/ComfyHost.ts +15 -0
- package/src/host/loraInfoCache.ts +70 -0
- package/src/host/loraManagerApi.ts +27 -0
- package/src/host/schemaDrift.ts +87 -0
- package/src/state.ts +5 -0
- package/src/vars/ComfyVars.ts +337 -67
- package/src/vars/DefinedWorkflow.ts +40 -19
- package/src/vars/lanes.ts +238 -0
- package/src/vars/loraEntry.ts +101 -0
- package/src/vars/promptSyntax.ts +382 -0
- package/dist/DefinedWorkflow-BatWaZO1.js.map +0 -1
- package/dist/LogsSt-DFxzQfDc.js.map +0 -1
- package/dist/run-serve-_nrvJYyt.js.map +0 -1
- package/dist/run-tui-Atvf9vb3.js.map +0 -1
- package/src/cli/serve/web/components/Sidebar.tsx +0 -66
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
// the var rows: each kind dispatches to its matching control (the point of the
|
|
2
2
|
// web ui — architecture item 12) + the sticky run bar
|
|
3
3
|
import { observer, useLocalObservable } from 'mobx-react-lite'
|
|
4
|
-
import { useEffect } from 'react'
|
|
4
|
+
import { useEffect, useRef, type ReactNode } from 'react'
|
|
5
|
+
import { MOD_KEY } from 'src/cli/serve/web/components/modKey.ts'
|
|
6
|
+
import { runChipText } from 'src/cli/serve/web/state/stableSlots.ts'
|
|
7
|
+
import { jumpTargets, SHORTCUT_KEYS, shortcutOf } from 'src/cli/serve/web/state/shortcuts.ts'
|
|
8
|
+
import { isPromptLanes } from 'src/vars/lanes.ts'
|
|
5
9
|
import {
|
|
6
10
|
ChoiceControl,
|
|
7
11
|
NumberControl,
|
|
8
|
-
PromptControl,
|
|
9
12
|
TextControl,
|
|
10
13
|
ToggleControl,
|
|
11
14
|
} from 'src/cli/serve/web/components/controls/BasicControls.tsx'
|
|
15
|
+
import { PromptControl } from 'src/cli/serve/web/components/controls/PromptControl.tsx'
|
|
12
16
|
import { Icon } from 'src/cli/serve/web/components/Icon.tsx'
|
|
17
|
+
import { VarIcon } from 'src/cli/serve/web/components/VarIcon.tsx'
|
|
18
|
+
import { generateButtonLook } from 'src/cli/serve/web/state/generateButton.ts'
|
|
19
|
+
import { groupPlaces, type GroupPlace } from 'src/cli/serve/web/state/varGroups.ts'
|
|
13
20
|
import { ImageControl } from 'src/cli/serve/web/components/controls/ImageControl.tsx'
|
|
14
21
|
import { LorasControl } from 'src/cli/serve/web/components/controls/LorasControl.tsx'
|
|
15
22
|
import { SeedControl } from 'src/cli/serve/web/components/controls/SeedControl.tsx'
|
|
16
23
|
import { SizeControl } from 'src/cli/serve/web/components/controls/SizeControl.tsx'
|
|
17
24
|
import type { FormSt, VarSt } from 'src/cli/serve/web/state/FormSt.ts'
|
|
18
|
-
import {
|
|
25
|
+
import type { WebSt } from 'src/cli/serve/web/state/WebSt.ts'
|
|
19
26
|
|
|
20
|
-
const VarControl = observer(function VarControl(p: {
|
|
27
|
+
const VarControl = observer(function VarControl(p: {
|
|
28
|
+
v: VarSt
|
|
29
|
+
host: string
|
|
30
|
+
st: WebSt
|
|
31
|
+
module: string
|
|
32
|
+
jumpTarget: boolean
|
|
33
|
+
}) {
|
|
21
34
|
switch (p.v.desc.kind) {
|
|
22
35
|
case 'prompt':
|
|
23
|
-
return <PromptControl v={p.v} st={p.st} module={p.module} />
|
|
36
|
+
return <PromptControl v={p.v} st={p.st} module={p.module} jumpTarget={p.jumpTarget} />
|
|
24
37
|
case 'text':
|
|
25
38
|
return <TextControl v={p.v} />
|
|
26
39
|
case 'int':
|
|
@@ -36,9 +49,17 @@ const VarControl = observer(function VarControl(p: { v: VarSt; host: string; st:
|
|
|
36
49
|
// the OVERRIDE host, like every other host-scoped read: with `host` fixed at form
|
|
37
50
|
// construction the previews, trigger words and details sheet came from the workflow's
|
|
38
51
|
// own box while the manager link opened the one actually selected
|
|
39
|
-
return
|
|
52
|
+
return (
|
|
53
|
+
<LorasControl
|
|
54
|
+
v={p.v}
|
|
55
|
+
host={p.st.hostFor(p.module)}
|
|
56
|
+
st={p.st}
|
|
57
|
+
hostUrl={p.st.hostUrlFor(p.module)}
|
|
58
|
+
jumpTarget={p.jumpTarget}
|
|
59
|
+
/>
|
|
60
|
+
)
|
|
40
61
|
case 'size':
|
|
41
|
-
return <SizeControl v={p.v} />
|
|
62
|
+
return <SizeControl v={p.v} st={p.st} module={p.module} />
|
|
42
63
|
case 'image':
|
|
43
64
|
return <ImageControl v={p.v} />
|
|
44
65
|
default:
|
|
@@ -54,12 +75,36 @@ const VarRow = observer(function VarRow(p: {
|
|
|
54
75
|
module: string
|
|
55
76
|
index: number
|
|
56
77
|
names: readonly string[]
|
|
78
|
+
/** where this row sits in a block of vars that go together, null outside any */
|
|
79
|
+
place: GroupPlace
|
|
80
|
+
/** the ⌘ key that jumps here (first prompt, first loras), null for every other var */
|
|
81
|
+
jumpKey: string | null
|
|
57
82
|
}) {
|
|
83
|
+
const rowRef = useRef<HTMLDivElement>(null)
|
|
84
|
+
const jump = p.st.jump
|
|
85
|
+
const jumpKind = p.jumpKey == null ? null : p.v.desc.kind
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (jump == null || jumpKind !== 'prompt' || jump.kind !== 'prompt') return
|
|
88
|
+
const editor = rowRef.current?.querySelector<HTMLElement>('.cm-content')
|
|
89
|
+
editor?.focus()
|
|
90
|
+
editor?.scrollIntoView({ block: 'nearest' })
|
|
91
|
+
}, [jump, jumpKind])
|
|
92
|
+
// the workflow's looks (VarUi): every slot optional, absent = the panel's own style. None
|
|
93
|
+
// of them moves anything: a background or a border never shifts the label off its column
|
|
94
|
+
const ui = p.v.desc.ui
|
|
95
|
+
const inactive = p.st.form?.inactiveReason(p.v) ?? null
|
|
96
|
+
const wide = p.v.desc.kind === 'loras' || p.v.desc.kind === 'prompt'
|
|
58
97
|
return (
|
|
59
98
|
<div
|
|
99
|
+
ref={rowRef}
|
|
60
100
|
/* loras and prompts need the whole width on a phone; every other kind keeps its
|
|
61
101
|
label beside the control, which is what makes the form readable at a glance */
|
|
62
|
-
className={
|
|
102
|
+
className={`var-row${wide ? ' wide' : ''}${inactive == null ? '' : ' inactive'}${p.place == null ? '' : ` in-group group-${p.place.pos}`}`}
|
|
103
|
+
style={{
|
|
104
|
+
background: ui?.background ?? (p.place == null ? undefined : (p.place.color ?? undefined)),
|
|
105
|
+
outline: ui?.border == null ? undefined : `1px solid ${ui.border}`,
|
|
106
|
+
outlineOffset: ui?.border == null ? undefined : '-1px',
|
|
107
|
+
}}
|
|
63
108
|
onDragOver={(e) => {
|
|
64
109
|
// only a row drag: a file dropped on an image var must still reach its own handler
|
|
65
110
|
if (e.dataTransfer.types.includes('application/x-comfy-var')) e.preventDefault()
|
|
@@ -76,7 +121,7 @@ const VarRow = observer(function VarRow(p: {
|
|
|
76
121
|
{/* the LABEL is the handle: a separate grip was one more piece of permanent chrome
|
|
77
122
|
for something the label itself can carry */}
|
|
78
123
|
<div
|
|
79
|
-
className=
|
|
124
|
+
className={p.jumpKey == null ? 'var-label' : 'var-label has-kbd'}
|
|
80
125
|
draggable
|
|
81
126
|
onDragStart={(e) => {
|
|
82
127
|
e.dataTransfer.effectAllowed = 'move'
|
|
@@ -85,7 +130,21 @@ const VarRow = observer(function VarRow(p: {
|
|
|
85
130
|
>
|
|
86
131
|
{/* the kind is a TOOLTIP, not a second line: printed under every label it was a
|
|
87
132
|
column of noise you read past, and it only ever answers a question you ask once */}
|
|
88
|
-
|
|
133
|
+
{/* the (?) LEADS: labels are right-aligned against their control, so what trails a
|
|
134
|
+
name is what touches the control, and a help mark there read as part of it */}
|
|
135
|
+
{ui?.description == null ? null : (
|
|
136
|
+
<span className="var-help" data-tip={ui.description}>
|
|
137
|
+
?
|
|
138
|
+
</span>
|
|
139
|
+
)}
|
|
140
|
+
{ui?.icon == null ? null : <VarIcon icon={ui.icon} color={ui.color} />}
|
|
141
|
+
<span
|
|
142
|
+
className="var-name"
|
|
143
|
+
data-tip={`${p.v.desc.label ?? p.v.name ?? ''}\n${inactive ?? p.v.desc.kind}\ndrag the label to reorder`}
|
|
144
|
+
style={ui?.labelColor == null ? undefined : { color: ui.labelColor }}
|
|
145
|
+
>
|
|
146
|
+
{p.v.desc.label ?? p.v.name}
|
|
147
|
+
</span>
|
|
89
148
|
{p.v.dirty ? (
|
|
90
149
|
<button
|
|
91
150
|
type="button"
|
|
@@ -96,23 +155,67 @@ const VarRow = observer(function VarRow(p: {
|
|
|
96
155
|
●
|
|
97
156
|
</button>
|
|
98
157
|
) : null}
|
|
158
|
+
{p.jumpKey == null ? null : (
|
|
159
|
+
<span
|
|
160
|
+
className="var-kbd-line"
|
|
161
|
+
data-tip={p.v.desc.kind === 'loras' ? 'opens the loras picker' : 'puts the cursor in this prompt'}
|
|
162
|
+
>
|
|
163
|
+
<span className="kbd-hint">
|
|
164
|
+
{MOD_KEY}
|
|
165
|
+
{p.jumpKey}
|
|
166
|
+
</span>
|
|
167
|
+
</span>
|
|
168
|
+
)}
|
|
99
169
|
</div>
|
|
100
|
-
|
|
101
|
-
|
|
170
|
+
{/* inert, not just dimmed: a disabled field must not take a click or a keystroke */}
|
|
171
|
+
<div className="var-control" inert={inactive != null}>
|
|
172
|
+
<VarControl v={p.v} host={p.host} st={p.st} module={p.module} jumpTarget={p.jumpKey != null} />
|
|
102
173
|
</div>
|
|
103
174
|
</div>
|
|
104
175
|
)
|
|
105
176
|
})
|
|
106
177
|
|
|
107
|
-
/** the
|
|
108
|
-
|
|
109
|
-
|
|
178
|
+
/** the handle on the label column's edge: drag to widen or narrow every label at once */
|
|
179
|
+
function LabelResizer(p: { st: WebSt }): ReactNode {
|
|
180
|
+
return (
|
|
181
|
+
<div
|
|
182
|
+
className="label-resizer"
|
|
183
|
+
style={{ left: p.st.labelWidth + 2 }}
|
|
184
|
+
data-tip="drag to resize the label column"
|
|
185
|
+
onPointerDown={(e) => {
|
|
186
|
+
e.preventDefault()
|
|
187
|
+
const startX = e.clientX
|
|
188
|
+
const startW = p.st.labelWidth
|
|
189
|
+
const move = (ev: PointerEvent): void => p.st.setLabelWidth(startW + ev.clientX - startX, false)
|
|
190
|
+
const up = (): void => {
|
|
191
|
+
window.removeEventListener('pointermove', move)
|
|
192
|
+
window.removeEventListener('pointerup', up)
|
|
193
|
+
p.st.setLabelWidth(p.st.labelWidth, true)
|
|
194
|
+
}
|
|
195
|
+
window.addEventListener('pointermove', move)
|
|
196
|
+
window.addEventListener('pointerup', up)
|
|
197
|
+
}}
|
|
198
|
+
/>
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** `new`, `new 2`, … the first name no draft of this workflow has */
|
|
203
|
+
function freeDraftName(drafts: readonly string[]): string {
|
|
204
|
+
if (!drafts.includes('new')) return 'new'
|
|
205
|
+
let n = 2
|
|
206
|
+
while (drafts.includes(`new ${n}`)) n++
|
|
207
|
+
return `new ${n}`
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/** the draft box: name, autosave state as its legend, and the actions that own this draft.
|
|
211
|
+
* new and duplicate ask for the name INLINE, window.prompt is silently suppressed by browsers
|
|
212
|
+
* after a few dialogs, which reads exactly like a dead button */
|
|
110
213
|
const DraftBox = observer(function DraftBox(p: { st: WebSt; form: FormSt }) {
|
|
111
214
|
const local = useLocalObservable(() => ({
|
|
112
215
|
/** null = showing the picker; otherwise the pending name and what it will do */
|
|
113
|
-
mode: null as null | 'duplicate' | 'rename',
|
|
216
|
+
mode: null as null | 'duplicate' | 'rename' | 'new',
|
|
114
217
|
name: '',
|
|
115
|
-
start(mode: 'duplicate' | 'rename', from: string) {
|
|
218
|
+
start(mode: 'duplicate' | 'rename' | 'new', from: string) {
|
|
116
219
|
this.mode = mode
|
|
117
220
|
this.name = mode === 'duplicate' ? `${from} copy` : from
|
|
118
221
|
},
|
|
@@ -130,6 +233,7 @@ const DraftBox = observer(function DraftBox(p: { st: WebSt; form: FormSt }) {
|
|
|
130
233
|
local.stop()
|
|
131
234
|
if (name === '' || mode == null) return
|
|
132
235
|
if (mode === 'duplicate') void p.st.duplicateDraft(name)
|
|
236
|
+
else if (mode === 'new') void p.st.newDraft(name)
|
|
133
237
|
else void p.st.renameDraft(name)
|
|
134
238
|
}
|
|
135
239
|
return (
|
|
@@ -149,53 +253,52 @@ const DraftBox = observer(function DraftBox(p: { st: WebSt; form: FormSt }) {
|
|
|
149
253
|
className="head-input"
|
|
150
254
|
value={local.name}
|
|
151
255
|
// enter is the ONLY commit now, so it has to be said
|
|
152
|
-
placeholder={
|
|
256
|
+
placeholder={
|
|
257
|
+
local.mode === 'rename'
|
|
258
|
+
? 'new name, then enter'
|
|
259
|
+
: local.mode === 'new'
|
|
260
|
+
? 'name of the new draft (workflow defaults), then enter'
|
|
261
|
+
: 'new draft name, then enter'
|
|
262
|
+
}
|
|
153
263
|
onFocus={(e) => e.currentTarget.select()}
|
|
154
264
|
onChange={(e) => local.set(e.target.value)}
|
|
155
265
|
onKeyDown={(e) => {
|
|
156
266
|
if (e.key === 'Enter') confirm()
|
|
157
267
|
if (e.key === 'Escape') local.stop()
|
|
158
268
|
}}
|
|
159
|
-
// blur CANCELS, it does not commit:
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
//
|
|
269
|
+
// blur CANCELS, it does not commit: picking another draft blurs this input, and a
|
|
270
|
+
// rename committed on blur raced that selection, renameDraft bails when the form
|
|
271
|
+
// has already moved on, leaving a duplicate instead of a rename, silently. enter
|
|
272
|
+
// commits, which is the only unambiguous signal
|
|
163
273
|
onBlur={() => local.stop()}
|
|
164
274
|
/>
|
|
165
275
|
) : (
|
|
166
|
-
/* the name IS the picker: every draft of this workflow, switching selects it
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
value={p.form.draft}
|
|
170
|
-
data-tip="switch draft"
|
|
171
|
-
onChange={(e) => void p.st.select({ module: p.form.moduleKey, draft: e.target.value })}
|
|
172
|
-
>
|
|
173
|
-
{drafts.map((d) => (
|
|
174
|
-
<option key={d} value={d}>
|
|
175
|
-
{d}
|
|
176
|
-
</option>
|
|
177
|
-
))}
|
|
178
|
-
</select>
|
|
179
|
-
)}
|
|
180
|
-
<span className="head-line">
|
|
181
|
-
<span className="btn-group head-group">
|
|
276
|
+
/* the name IS the picker: every draft of this workflow, switching selects it. Rename
|
|
277
|
+
sits before it and delete after it: the two actions ON this name, around it */
|
|
278
|
+
<span className="head-line draft-line">
|
|
182
279
|
<button
|
|
183
280
|
type="button"
|
|
281
|
+
className="head-icon"
|
|
184
282
|
data-tip="rename this draft (the file is renamed)"
|
|
185
|
-
onClick={() =>
|
|
283
|
+
onClick={() => local.start('rename', p.form.draft)}
|
|
186
284
|
>
|
|
187
285
|
<Icon name="pen" />
|
|
188
286
|
</button>
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
287
|
+
<select
|
|
288
|
+
className="head-select draft"
|
|
289
|
+
value={p.form.draft}
|
|
290
|
+
data-tip="switch draft"
|
|
291
|
+
onChange={(e) => void p.st.select({ module: p.form.moduleKey, draft: e.target.value })}
|
|
193
292
|
>
|
|
194
|
-
|
|
195
|
-
|
|
293
|
+
{drafts.map((d) => (
|
|
294
|
+
<option key={d} value={d}>
|
|
295
|
+
{d}
|
|
296
|
+
</option>
|
|
297
|
+
))}
|
|
298
|
+
</select>
|
|
196
299
|
<button
|
|
197
300
|
type="button"
|
|
198
|
-
className="danger"
|
|
301
|
+
className="head-icon danger"
|
|
199
302
|
data-tip="delete this draft's file (default resets to the workflow's own values)"
|
|
200
303
|
onClick={() => {
|
|
201
304
|
if (window.confirm(`delete draft '${p.form.draft}' of ${p.form.moduleKey}? the file is removed.`))
|
|
@@ -205,6 +308,28 @@ const DraftBox = observer(function DraftBox(p: { st: WebSt; form: FormSt }) {
|
|
|
205
308
|
<Icon name="trash" />
|
|
206
309
|
</button>
|
|
207
310
|
</span>
|
|
311
|
+
)}
|
|
312
|
+
<span className="head-line">
|
|
313
|
+
{/* the two ways to MAKE a draft, side by side: from the workflow's defaults, or from
|
|
314
|
+
what is on screen */}
|
|
315
|
+
<span className="btn-group">
|
|
316
|
+
<button
|
|
317
|
+
type="button"
|
|
318
|
+
className="accent"
|
|
319
|
+
data-tip="new draft with the workflow's own default values"
|
|
320
|
+
onClick={() => (local.mode != null ? confirm() : local.start('new', freeDraftName(drafts)))}
|
|
321
|
+
>
|
|
322
|
+
<Icon name="plus" /> new
|
|
323
|
+
</button>
|
|
324
|
+
<button
|
|
325
|
+
type="button"
|
|
326
|
+
className="accent"
|
|
327
|
+
data-tip="save these values as a new draft"
|
|
328
|
+
onClick={() => (local.mode != null ? confirm() : local.start('duplicate', p.form.draft))}
|
|
329
|
+
>
|
|
330
|
+
<Icon name="copy-plus" /> copy
|
|
331
|
+
</button>
|
|
332
|
+
</span>
|
|
208
333
|
{/* FAR RIGHT of the same line, outside the group: inside it, the broom appeared and
|
|
209
334
|
vanished with the dirty count and shoved the other buttons sideways */}
|
|
210
335
|
{p.form.dirtyCount > 0 ? (
|
|
@@ -222,55 +347,82 @@ const DraftBox = observer(function DraftBox(p: { st: WebSt; form: FormSt }) {
|
|
|
222
347
|
)
|
|
223
348
|
})
|
|
224
349
|
|
|
350
|
+
function RunChip(p: {
|
|
351
|
+
kind: 'queue' | 'results'
|
|
352
|
+
count: number
|
|
353
|
+
tip: string
|
|
354
|
+
clearTip: string
|
|
355
|
+
canClear: boolean
|
|
356
|
+
onClear(): void
|
|
357
|
+
}): ReactNode {
|
|
358
|
+
const t = runChipText({ kind: p.kind, count: p.count })
|
|
359
|
+
// an icon and a count, the word in the tooltip: the results panel can be narrow
|
|
360
|
+
return (
|
|
361
|
+
<span className={p.count > 0 ? 'run-chip' : 'run-chip empty'} data-tip={`${t.label}: ${p.tip}`}>
|
|
362
|
+
<Icon name={p.kind === 'queue' ? 'rows' : 'image'} size={0.95} />
|
|
363
|
+
<span className="run-chip-count">{t.count}</span>
|
|
364
|
+
<button
|
|
365
|
+
type="button"
|
|
366
|
+
className="run-chip-clear"
|
|
367
|
+
data-tip={p.clearTip}
|
|
368
|
+
aria-label={`clear the ${t.label}`}
|
|
369
|
+
disabled={!p.canClear}
|
|
370
|
+
onClick={() => p.onClear()}
|
|
371
|
+
>
|
|
372
|
+
<Icon name="close" size={0.8} />
|
|
373
|
+
</button>
|
|
374
|
+
</span>
|
|
375
|
+
)
|
|
376
|
+
}
|
|
377
|
+
|
|
225
378
|
/** everything about running on one line: the button, what is queued behind it, what it has
|
|
226
379
|
* produced. a count and one clear is the whole decision a queue offers */
|
|
227
380
|
export const GenerateButton = observer(function GenerateButton(p: { st: WebSt }) {
|
|
228
381
|
const run = p.st.run
|
|
382
|
+
// the text never changes, so the button never changes size: the progress is a fill sweeping
|
|
383
|
+
// across it, the exact percent is on the running card
|
|
384
|
+
const look = generateButtonLook({ isRunning: run.isRunning, percent: run.progressPercent })
|
|
229
385
|
return (
|
|
230
386
|
<span className="run-line">
|
|
231
387
|
<button
|
|
232
388
|
type="button"
|
|
233
|
-
className={
|
|
234
|
-
data-tip=
|
|
389
|
+
className={look.running ? 'primary running' : 'primary'}
|
|
390
|
+
data-tip={
|
|
391
|
+
look.running
|
|
392
|
+
? `running ${look.fill ?? 0}%: click again to queue another (⌘⏎ / ctrl+⏎)`
|
|
393
|
+
: '⌘⏎ / ctrl+⏎: click again to queue another'
|
|
394
|
+
}
|
|
395
|
+
style={
|
|
396
|
+
look.fill == null
|
|
397
|
+
? undefined
|
|
398
|
+
: {
|
|
399
|
+
background: `linear-gradient(90deg, var(--accent) ${look.fill}%, var(--accent-dim) ${look.fill}%)`,
|
|
400
|
+
}
|
|
401
|
+
}
|
|
235
402
|
onClick={() => p.st.generate()}
|
|
236
403
|
>
|
|
237
|
-
<Icon name="play" size={0.85} />{
|
|
238
|
-
{run.isRunning
|
|
239
|
-
? run.progressPercent != null
|
|
240
|
-
? `generating… ${Math.round(run.progressPercent)}%`
|
|
241
|
-
: 'generating…'
|
|
242
|
-
: 'generate'}
|
|
404
|
+
<Icon name="play" size={0.85} /> {look.label}
|
|
243
405
|
{/* the shortcut is SAID, not only tooltipped: nobody hovers a button they can click */}
|
|
244
|
-
|
|
406
|
+
<span className="kbd-hint">{MOD_KEY}⏎</span>
|
|
245
407
|
</button>
|
|
246
|
-
{
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
<button
|
|
265
|
-
type="button"
|
|
266
|
-
className="link"
|
|
267
|
-
data-tip="forget every run shown here"
|
|
268
|
-
onClick={() => run.clear()}
|
|
269
|
-
>
|
|
270
|
-
clear
|
|
271
|
-
</button>
|
|
272
|
-
</span>
|
|
273
|
-
) : null}
|
|
408
|
+
{/* both chips are ALWAYS here at one width: a chip appearing, or a count growing a
|
|
409
|
+
digit, moved everything beside it. An empty one is dimmed, its clear disabled */}
|
|
410
|
+
<RunChip
|
|
411
|
+
kind="queue"
|
|
412
|
+
count={run.queue.length}
|
|
413
|
+
tip="prompts waiting behind this one"
|
|
414
|
+
clearTip={`drop the ${run.pendingCount} not yet sent to the host`}
|
|
415
|
+
canClear={run.pendingCount > 0}
|
|
416
|
+
onClear={() => run.clearQueue()}
|
|
417
|
+
/>
|
|
418
|
+
<RunChip
|
|
419
|
+
kind="results"
|
|
420
|
+
count={run.results.length}
|
|
421
|
+
tip="runs kept in this page"
|
|
422
|
+
clearTip="forget every run shown here"
|
|
423
|
+
canClear={run.results.length > 0}
|
|
424
|
+
onClear={() => run.clear()}
|
|
425
|
+
/>
|
|
274
426
|
</span>
|
|
275
427
|
)
|
|
276
428
|
})
|
|
@@ -317,15 +469,32 @@ const SaveRow = observer(function SaveRow(p: { st: WebSt; module: string }) {
|
|
|
317
469
|
|
|
318
470
|
export const VarsForm = observer(function VarsForm(p: { st: WebSt }) {
|
|
319
471
|
const form = p.st.form
|
|
320
|
-
|
|
472
|
+
/** which var each jump lands on, as last rendered: the key handler reads it */
|
|
473
|
+
const targetsRef = useRef<{ prompt: string | null; loras: string | null }>({ prompt: null, loras: null })
|
|
474
|
+
// ⌘⏎ / ctrl+⏎ generates from anywhere, textarea and enhancer included: one key, one meaning
|
|
321
475
|
useEffect(() => {
|
|
322
476
|
const onKey = (e: KeyboardEvent): void => {
|
|
323
|
-
// the enhancer modal owns ⌘⏎ while it is open (refine), so a rewrite never queues a run
|
|
324
|
-
if (p.st.enhancer.isOpen) return
|
|
325
477
|
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
|
|
326
478
|
e.preventDefault()
|
|
327
|
-
|
|
479
|
+
// in the enhancer with a rewrite, generate TRIES it; the form keeps its own prompt
|
|
480
|
+
p.st.generate(p.st.enhancer.tryOverride)
|
|
481
|
+
return
|
|
482
|
+
}
|
|
483
|
+
const s = shortcutOf(e)
|
|
484
|
+
if (s == null) return
|
|
485
|
+
// the jumps land in the form, which the enhancer covers: only the blur still makes sense
|
|
486
|
+
if (p.st.enhancer.isOpen && s !== 'toggle-blur') return
|
|
487
|
+
e.preventDefault()
|
|
488
|
+
if (s === 'toggle-blur') return p.st.toggleBlur()
|
|
489
|
+
if (s === 'open-enhancer') {
|
|
490
|
+
const f = p.st.form
|
|
491
|
+
const v = f?.vars.find((x) => x.name === targetsRef.current.prompt)
|
|
492
|
+
// in lanes mode the enhancer opens on the first lane, the one its ✨ sits on
|
|
493
|
+
if (f != null && v != null)
|
|
494
|
+
p.st.enhancer.openFor({ v, module: f.moduleKey, lane: isPromptLanes(v.value) ? 0 : undefined })
|
|
495
|
+
return
|
|
328
496
|
}
|
|
497
|
+
p.st.requestJump(s === 'focus-prompt' ? 'prompt' : 'loras')
|
|
329
498
|
}
|
|
330
499
|
window.addEventListener('keydown', onKey)
|
|
331
500
|
return () => window.removeEventListener('keydown', onKey)
|
|
@@ -337,6 +506,17 @@ export const VarsForm = observer(function VarsForm(p: { st: WebSt }) {
|
|
|
337
506
|
form.vars.map((v) => v.name),
|
|
338
507
|
)
|
|
339
508
|
const orderedVars = orderedNames.map((n) => form.vars.find((v) => v.name === n)).filter((v) => v != null)
|
|
509
|
+
const places = groupPlaces(orderedVars.map((v) => v.desc.ui ?? {}))
|
|
510
|
+
const targets = jumpTargets(
|
|
511
|
+
orderedVars.map((v) => ({ name: v.name, kind: v.desc.kind, inactive: form.inactiveReason(v) != null })),
|
|
512
|
+
)
|
|
513
|
+
targetsRef.current = targets
|
|
514
|
+
const jumpKeyOf = (name: string): string | null =>
|
|
515
|
+
name === targets.prompt
|
|
516
|
+
? SHORTCUT_KEYS['focus-prompt']
|
|
517
|
+
: name === targets.loras
|
|
518
|
+
? SHORTCUT_KEYS['open-loras']
|
|
519
|
+
: null
|
|
340
520
|
return (
|
|
341
521
|
<div>
|
|
342
522
|
{/* the TUI header, on the web: labelled boxes for what you are editing and where it runs.
|
|
@@ -344,16 +524,15 @@ export const VarsForm = observer(function VarsForm(p: { st: WebSt }) {
|
|
|
344
524
|
column, which the results placement widens and narrows, not against the window */}
|
|
345
525
|
<div className="head-shell">
|
|
346
526
|
<div className="head-boxes">
|
|
347
|
-
{/* the workflow name IS the way into the
|
|
348
|
-
folder → workflow → draft tree, so a second dropdown would be a rival copy of it */}
|
|
527
|
+
{/* the workflow name IS the way into the omnibox, and so is ⌘K / ⌘J */}
|
|
349
528
|
<div className="head-box">
|
|
350
529
|
<span className="head-label">workflow</span>
|
|
351
530
|
<div className="head-line">
|
|
352
531
|
<button
|
|
353
532
|
type="button"
|
|
354
533
|
className="head-value app as-link"
|
|
355
|
-
data-tip=
|
|
356
|
-
onClick={() => p.st.
|
|
534
|
+
data-tip="search every workflow and draft (⌘K or ⌘J)"
|
|
535
|
+
onClick={() => p.st.omnibox.open()}
|
|
357
536
|
>
|
|
358
537
|
{form.moduleKey}
|
|
359
538
|
</button>
|
|
@@ -362,20 +541,51 @@ export const VarsForm = observer(function VarsForm(p: { st: WebSt }) {
|
|
|
362
541
|
<span className="btn-group">
|
|
363
542
|
<button
|
|
364
543
|
type="button"
|
|
365
|
-
data-tip=
|
|
366
|
-
onClick={() => p.st.
|
|
544
|
+
data-tip="search every workflow and draft (⌘K or ⌘J)"
|
|
545
|
+
onClick={() => p.st.omnibox.open()}
|
|
367
546
|
>
|
|
368
|
-
<Icon name="
|
|
547
|
+
<Icon name="search" /> search <span className="kbd-hint">{MOD_KEY}K</span>
|
|
369
548
|
</button>
|
|
370
549
|
</span>
|
|
371
|
-
|
|
550
|
+
{Object.keys(p.st.loadErrors).length > 0 ? (
|
|
551
|
+
<button
|
|
552
|
+
type="button"
|
|
553
|
+
className="link load-errors"
|
|
554
|
+
data-tip="some workflows failed to load: the list is at the bottom of the search"
|
|
555
|
+
onClick={() => p.st.omnibox.open()}
|
|
556
|
+
>
|
|
557
|
+
<Icon name="warn" /> {Object.keys(p.st.loadErrors).length} failed
|
|
558
|
+
</button>
|
|
559
|
+
) : null}
|
|
372
560
|
</div>
|
|
373
561
|
</div>
|
|
374
562
|
{/* duplicate and delete act on THIS draft, so they live in the draft box */}
|
|
375
563
|
<DraftBox st={p.st} form={form} />
|
|
376
564
|
<div className="head-box">
|
|
377
|
-
|
|
378
|
-
|
|
565
|
+
{/* a restart shows HERE, as the card's legend like the draft's `· saving`: a line
|
|
566
|
+
under the cards moved the whole form and read as unrelated to the host */}
|
|
567
|
+
<span className="head-label">
|
|
568
|
+
host
|
|
569
|
+
{p.st.hostWatch === 'down' ? <span className="save-state pulse">· restarting…</span> : null}
|
|
570
|
+
{p.st.hostWatch === 'back' ? <span className="save-state">· back up</span> : null}
|
|
571
|
+
</span>
|
|
572
|
+
{/* the box itself, like the draft: its name, with the two actions ON the box
|
|
573
|
+
around it. The ones on the RUNNING work sit on the line below, in words */}
|
|
574
|
+
<div className="head-line draft-line">
|
|
575
|
+
{/* the ONE refresh: models, nodes and the lora list. It also runs by itself when
|
|
576
|
+
the host changes, pulsing while it works */}
|
|
577
|
+
<button
|
|
578
|
+
type="button"
|
|
579
|
+
className={p.st.refreshing ? 'head-icon pulse' : 'head-icon'}
|
|
580
|
+
data-tip={
|
|
581
|
+
p.st.refreshing
|
|
582
|
+
? 'refreshing what the host has…'
|
|
583
|
+
: 'refresh what the host has (models, nodes, loras). It also refreshes by itself when something new appears'
|
|
584
|
+
}
|
|
585
|
+
onClick={() => void p.st.refreshHost()}
|
|
586
|
+
>
|
|
587
|
+
<Icon name="refresh" />
|
|
588
|
+
</button>
|
|
379
589
|
{/* pick where this workflow RUNS (the TUI's host override), remembered per module */}
|
|
380
590
|
{p.st.hosts.hosts.length > 1 ? (
|
|
381
591
|
<select
|
|
@@ -393,41 +603,38 @@ export const VarsForm = observer(function VarsForm(p: { st: WebSt }) {
|
|
|
393
603
|
) : (
|
|
394
604
|
<span className="head-value host">{p.st.hostFor(form.moduleKey) || form.host}</span>
|
|
395
605
|
)}
|
|
606
|
+
<button
|
|
607
|
+
type="button"
|
|
608
|
+
className="head-icon danger"
|
|
609
|
+
data-tip="restart ComfyUI on that host (manager reboot) — it reconnects when back"
|
|
610
|
+
onClick={() => {
|
|
611
|
+
if (window.confirm(`restart ComfyUI on '${p.st.hostFor(form.moduleKey)}'?`))
|
|
612
|
+
void p.st.hostAction('restart')
|
|
613
|
+
}}
|
|
614
|
+
>
|
|
615
|
+
<Icon name="power" />
|
|
616
|
+
</button>
|
|
396
617
|
</div>
|
|
397
|
-
{/* the TUI's host actions: they act on the box this workflow runs on */}
|
|
398
618
|
<div className="head-line">
|
|
619
|
+
{/* two separate buttons: stopping the run and emptying the queue are different
|
|
620
|
+
decisions, and the destructive one wears its warning color */}
|
|
399
621
|
<span className="btn-group">
|
|
400
622
|
<button
|
|
401
623
|
type="button"
|
|
402
624
|
data-tip="interrupt the prompt running now"
|
|
403
625
|
onClick={() => void p.st.hostAction('interrupt')}
|
|
404
626
|
>
|
|
405
|
-
<Icon name="pause" />
|
|
627
|
+
<Icon name="pause" /> stop
|
|
406
628
|
</button>
|
|
629
|
+
</span>
|
|
630
|
+
<span className="btn-group">
|
|
407
631
|
<button
|
|
408
632
|
type="button"
|
|
633
|
+
className="quiet-danger"
|
|
409
634
|
data-tip="drop everything still pending in the host queue"
|
|
410
635
|
onClick={() => void p.st.hostAction('clear-queue')}
|
|
411
636
|
>
|
|
412
|
-
<Icon name="trash" />
|
|
413
|
-
</button>
|
|
414
|
-
<button
|
|
415
|
-
type="button"
|
|
416
|
-
data-tip="refetch object_info from the host and rewrite sdk.d.ts (the var lists widen in place)"
|
|
417
|
-
onClick={() => void p.st.hostAction('refresh-schema')}
|
|
418
|
-
>
|
|
419
|
-
<Icon name="refresh" />
|
|
420
|
-
</button>
|
|
421
|
-
<button
|
|
422
|
-
type="button"
|
|
423
|
-
className="danger"
|
|
424
|
-
data-tip="restart ComfyUI on that host (manager reboot) — it reconnects when back"
|
|
425
|
-
onClick={() => {
|
|
426
|
-
if (window.confirm(`restart ComfyUI on '${p.st.hostFor(form.moduleKey)}'?`))
|
|
427
|
-
void p.st.hostAction('restart')
|
|
428
|
-
}}
|
|
429
|
-
>
|
|
430
|
-
<Icon name="power" />
|
|
637
|
+
<Icon name="trash" /> clear queue
|
|
431
638
|
</button>
|
|
432
639
|
</span>
|
|
433
640
|
{p.st.isHostOverridden(form.moduleKey) ? (
|
|
@@ -442,64 +649,18 @@ export const VarsForm = observer(function VarsForm(p: { st: WebSt }) {
|
|
|
442
649
|
) : null}
|
|
443
650
|
</div>
|
|
444
651
|
</div>
|
|
445
|
-
{/* its own box beside host: on a phone, scrolling between the knobs and the image
|
|
446
|
-
is the whole friction, so the corner placement floats the newest one */}
|
|
447
|
-
<div className="head-box">
|
|
448
|
-
<span className="head-label">preview</span>
|
|
449
|
-
{/* first line: WHERE the results sit. second: what shows up while it runs */}
|
|
450
|
-
<div className="head-line">
|
|
451
|
-
<span className="btn-group">
|
|
452
|
-
{LAYOUTS.map((l) => (
|
|
453
|
-
<button
|
|
454
|
-
key={l.id}
|
|
455
|
-
type="button"
|
|
456
|
-
className={p.st.layout === l.id ? 'sel' : ''}
|
|
457
|
-
data-tip={l.title}
|
|
458
|
-
onClick={() => p.st.setLayout(l.id)}
|
|
459
|
-
>
|
|
460
|
-
<Icon name={l.icon} />
|
|
461
|
-
</button>
|
|
462
|
-
))}
|
|
463
|
-
</span>
|
|
464
|
-
</div>
|
|
465
|
-
<div className="head-line">
|
|
466
|
-
<span className="btn-group">
|
|
467
|
-
<button
|
|
468
|
-
type="button"
|
|
469
|
-
className={p.st.showLatent ? 'sel' : ''}
|
|
470
|
-
data-tip={
|
|
471
|
-
p.st.showLatent ? 'hide the latent preview during a run' : 'show the latent preview'
|
|
472
|
-
}
|
|
473
|
-
onClick={() => p.st.toggleLatent()}
|
|
474
|
-
>
|
|
475
|
-
<Icon name="image" />
|
|
476
|
-
</button>
|
|
477
|
-
<button
|
|
478
|
-
type="button"
|
|
479
|
-
className={p.st.showLogs ? 'sel' : ''}
|
|
480
|
-
data-tip={p.st.showLogs ? 'hide the ComfyUI console' : 'show the ComfyUI console'}
|
|
481
|
-
onClick={() => p.st.toggleLogs()}
|
|
482
|
-
>
|
|
483
|
-
<Icon name="terminal" />
|
|
484
|
-
</button>
|
|
485
|
-
</span>
|
|
486
|
-
</div>
|
|
487
|
-
</div>
|
|
488
652
|
</div>
|
|
489
653
|
</div>
|
|
490
|
-
{/*
|
|
491
|
-
|
|
654
|
+
{/* a host action that FAILS says so on its own line; one that works says nothing here,
|
|
655
|
+
the ↻ pulse and the host card's legend show what runs */}
|
|
492
656
|
{p.st.hostError != null ? <div className="error">🔴 {p.st.hostError}</div> : null}
|
|
493
|
-
{p.st.hostWatch === 'down' ? (
|
|
494
|
-
<div className="host-note pulse">restarting… waiting for the host to answer again</div>
|
|
495
|
-
) : null}
|
|
496
|
-
{p.st.hostNote != null && p.st.hostWatch !== 'down' ? <div className="host-note">{p.st.hostNote}</div> : null}
|
|
497
657
|
{/* the autosave state is the draft box's legend now; only a FAILURE gets a line of
|
|
498
658
|
its own, because that one you must not miss */}
|
|
499
659
|
{form.saveState === 'error' ? <div className="error">🔴 draft save failed: {form.saveError}</div> : null}
|
|
500
|
-
{/* ONE grid for every row (rows are subgrids of it)
|
|
501
|
-
|
|
502
|
-
<div className="vars">
|
|
660
|
+
{/* ONE grid for every row (rows are subgrids of it). The label column is as wide as YOU
|
|
661
|
+
drag it (kept in this browser): labels never wrap, a cut one shows whole on hover */}
|
|
662
|
+
<div className="vars" style={{ gridTemplateColumns: `${p.st.labelWidth}px minmax(0, 1fr)` }}>
|
|
663
|
+
<LabelResizer st={p.st} />
|
|
503
664
|
{orderedVars.map((v, ix) => (
|
|
504
665
|
// keyed by MODULE and DRAFT: a switch must reset per-row ui state (lora filter,
|
|
505
666
|
// remembered strengths, paused set), not carry the other selection's over.
|
|
@@ -513,19 +674,22 @@ export const VarsForm = observer(function VarsForm(p: { st: WebSt }) {
|
|
|
513
674
|
module={form.moduleKey}
|
|
514
675
|
index={ix}
|
|
515
676
|
names={orderedNames}
|
|
677
|
+
place={places[ix] ?? null}
|
|
678
|
+
jumpKey={jumpKeyOf(v.name)}
|
|
516
679
|
/>
|
|
517
680
|
))}
|
|
518
681
|
{/* the OUTPUT is a knob like the others: a row, not a lone button in the header */}
|
|
519
682
|
<SaveRow st={p.st} module={form.moduleKey} />
|
|
520
683
|
</div>
|
|
521
|
-
{/* side and pinned put generate INSIDE the results panel
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
{p.st.generateInResults && p.st.run.error == null ? null : (
|
|
684
|
+
{/* side and pinned put generate INSIDE the results panel, with its error slot; the
|
|
685
|
+
form keeps both otherwise. The error is one reserved line either way, so a failed
|
|
686
|
+
run never adds a bar or pushes anything down */}
|
|
687
|
+
{p.st.generateInResults ? null : (
|
|
526
688
|
<div className="runbar">
|
|
527
|
-
|
|
528
|
-
|
|
689
|
+
<GenerateButton st={p.st} />
|
|
690
|
+
<span className="run-error" data-tip={p.st.run.error ?? undefined}>
|
|
691
|
+
{p.st.run.error == null ? '' : `🔴 ${p.st.run.error}`}
|
|
692
|
+
</span>
|
|
529
693
|
</div>
|
|
530
694
|
)}
|
|
531
695
|
</div>
|