@volter-ai-dev/supercode-ui 0.1.36 → 0.1.37

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.
@@ -0,0 +1,319 @@
1
+ // src/settings.jsx
2
+ import { useEffect as useEffect2, useId, useMemo, useRef, useState } from "react";
3
+
4
+ // core.mjs
5
+ var HARNESS_NAMES = Object.freeze({
6
+ "claude-code": "Claude Code",
7
+ codex: "Codex",
8
+ gemini: "Gemini CLI",
9
+ goose: "Goose",
10
+ opencode: "OpenCode",
11
+ pi: "Pi",
12
+ grok: "Grok"
13
+ });
14
+ var DEFAULT_LABELS = Object.freeze({
15
+ chats: "Chats",
16
+ newChat: "New chat",
17
+ searchChats: "Search chats",
18
+ askAgent: "Ask your agent\u2026",
19
+ continueHere: "Continue here",
20
+ continueWithTerminal: "Continue with terminal",
21
+ joinLive: "Join live",
22
+ forkHere: "Fork here"
23
+ });
24
+ var EMPTY_UI_STATE = Object.freeze({
25
+ pill: Object.freeze({ tone: "off", label: "connecting\u2026" }),
26
+ startup: "connecting",
27
+ transcript: Object.freeze([]),
28
+ busy: false,
29
+ operation: null,
30
+ needsInput: false,
31
+ harness: "",
32
+ mode: "none",
33
+ strategy: null,
34
+ canSend: false,
35
+ canSteer: false,
36
+ canResume: false,
37
+ continuationModes: Object.freeze([]),
38
+ canBranch: false,
39
+ canAttach: false,
40
+ canDetach: false,
41
+ canOpenTerminal: false,
42
+ canExport: false,
43
+ canReduce: false,
44
+ canInterrupt: false,
45
+ canRespond: false,
46
+ canConfigureSettings: false,
47
+ messaging: null,
48
+ workspace: "",
49
+ taskPlan: Object.freeze({ source: "none", items: Object.freeze([]), residueCount: 0, observedAt: null }),
50
+ semantics: Object.freeze({ fidelity: null, residue: Object.freeze([]), residueCount: 0, parseErrors: 0, rawRecords: 0, subagents: Object.freeze([]) }),
51
+ terminalHandoff: null,
52
+ exportBackTarget: null,
53
+ exportReceipt: null,
54
+ reductionReceipt: null,
55
+ interopSettings: null,
56
+ interopSettingsError: null,
57
+ error: null,
58
+ recoverable: false,
59
+ harnesses: Object.freeze([]),
60
+ history: Object.freeze({ sessionLimit: 0, hasMoreSessions: false, transcriptLimit: 120, hasEarlier: false }),
61
+ savedDraft: "",
62
+ attention: Object.freeze([]),
63
+ sessions: Object.freeze([]),
64
+ attached: null,
65
+ owned: null,
66
+ attachError: null
67
+ });
68
+ function harnessDisplayName(id) {
69
+ return HARNESS_NAMES[id] ?? id;
70
+ }
71
+ var ACTIVITY_PRIORITY = Object.freeze({
72
+ "needs-input": 70,
73
+ failed: 60,
74
+ working: 50,
75
+ unseen: 40,
76
+ finished: 30,
77
+ running: 20,
78
+ recent: 10,
79
+ idle: 0
80
+ });
81
+
82
+ // src/logo.jsx
83
+ import { useEffect } from "react";
84
+ import { jsx, jsxs } from "react/jsx-runtime";
85
+ var LOGOS = {
86
+ "claude-code": {
87
+ viewBox: "-1 3.5 26 18",
88
+ paths: [
89
+ ["path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z" }]
90
+ ]
91
+ },
92
+ codex: {
93
+ viewBox: "-1 -1 26 26",
94
+ paths: [
95
+ ["path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z" }]
96
+ ]
97
+ },
98
+ gemini: {
99
+ viewBox: "0 0 24 24",
100
+ paths: [["path", { d: "M12 24C12 17.373 6.627 12 0 12 6.627 12 12 6.627 12 0c0 6.627 5.373 12 12 12-6.627 0-12 5.373-12 12z" }]]
101
+ },
102
+ grok: {
103
+ viewBox: "-1 -1 26 26",
104
+ paths: [["path", { d: "M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815" }]]
105
+ },
106
+ // Canonical mark from block/goose's documentation/static/img/goose.svg.
107
+ goose: {
108
+ viewBox: "0 0 45 45",
109
+ paths: [["path", { d: "M43.2098 39.2492L39.8118 36.4522C37.9646 34.9318 36.3923 33.1051 35.1631 31.0529C33.4647 28.2172 31.1178 25.8243 28.3164 24.071L26.9482 23.2744C26.4794 22.9485 26.1525 22.4405 26.106 21.8675C26.0762 21.4981 26.1647 21.1678 26.3712 20.8771C27.0837 19.873 30.9617 15.6995 31.6365 15.1411C32.5056 14.4228 33.4739 13.8253 34.3724 13.1412C34.5001 13.0438 34.6283 12.9469 34.7545 12.8481C35.0574 12.6088 35.3295 12.3671 35.5458 12.0803C36.5993 10.8604 36.5783 9.82938 36.5783 9.82938C36.4677 9.5534 36.0645 8.69902 35.2449 8.29825C35.9696 8.28406 36.7872 8.55564 37.1582 8.91873C37.6039 8.21947 37.8922 7.76585 38.3404 7.00347C38.4471 6.82241 38.5038 6.48771 38.2998 6.30029C38.1114 6.11287 37.6416 6.01697 37.4606 6.12364C36.4692 6.70693 35.5047 7.33475 34.6351 7.88525C34.6351 7.88525 33.6046 7.86372 32.3842 8.91775C32.097 9.13452 31.8552 9.4066 31.6282 9.69433C31.5171 9.83476 31.4202 9.96297 31.3233 10.0912C30.6387 10.9901 30.0417 11.958 29.3234 12.8271C28.7656 13.5023 24.5915 17.3798 23.5874 18.0923C23.2967 18.2988 22.9669 18.3879 22.597 18.3575C22.0245 18.3115 21.5161 17.9842 21.1902 17.5154L20.3935 16.1472C18.6402 13.3448 16.2474 10.9989 13.4117 9.30041C11.3594 8.0712 9.5332 6.49847 8.01234 4.65172L5.2153 1.25377C5.0773 1.08642 4.81306 1.11382 4.71422 1.30662C4.39615 1.92612 3.78888 3.23411 3.32353 4.99327C3.92786 5.81095 5.26717 7.35089 6.8624 8.65351C6.97348 8.74403 6.88246 8.92313 6.74447 8.88496C5.36846 8.51013 4.03062 7.90825 3.02944 7.39542C2.94772 7.35383 2.84887 7.4057 2.83713 7.49672C2.68152 8.74354 2.64139 10.1127 2.80581 11.5562C4.02572 12.1596 5.85143 12.8804 7.76816 13.3389C7.90713 13.3722 7.90273 13.5723 7.76229 13.5992C6.26982 13.8801 4.70688 13.9427 3.43656 13.9261C3.3475 13.9251 3.28193 14.0093 3.30591 14.0949C3.56085 14.9958 3.90632 15.9118 4.3619 16.8342C4.55029 17.2487 4.75532 17.6553 4.97504 18.0532C6.21207 18.107 7.47946 17.9964 8.75369 17.7713C8.97095 17.7331 9.08741 18.0189 8.90391 18.1417C8.03877 18.7201 7.11588 19.2183 6.25758 19.6283C6.14259 19.6836 6.1054 19.8304 6.18125 19.9327C6.69114 20.6236 7.25191 21.2774 7.86114 21.8866C7.86114 21.8866 10.8608 24.9763 10.9425 25.2185C12.6928 23.4261 15.5701 21.4394 18.7474 19.7047C14.4921 23.1672 12.1198 25.7235 10.9258 27.1758L10.0935 28.3439C9.66091 28.9507 9.2856 29.5951 8.97193 30.2709C7.92231 32.5292 6.19201 37.0966 6.19201 37.0966C6.0594 37.4543 6.16755 37.8072 6.39753 38.0371C6.66031 38.2999 7.01263 38.4076 7.37033 38.275C7.37033 38.275 11.9368 36.5447 14.1961 35.495C14.8719 35.1814 15.5168 34.8056 16.1231 34.3735L17.4095 33.457C18.0907 32.9715 19.0234 33.0489 19.615 33.6405L22.5804 36.6058C23.1896 37.2151 23.8433 37.7758 24.5343 38.2857C24.637 38.3611 24.7833 38.3244 24.8386 38.2094C25.2492 37.3516 25.7473 36.4277 26.3252 35.5631C26.4481 35.3796 26.7343 35.4965 26.6957 35.7133C26.4701 36.988 26.3605 38.2554 26.3086 39.3035C27.2178 39.9172 28.5551 40.5606 30.3721 41.1611C30.4577 41.185 30.5419 41.1195 30.5409 41.0304C30.5237 39.7596 30.5864 38.1967 30.8677 36.7047C30.8942 36.5638 31.0943 36.5593 31.1281 36.6988C31.5861 38.616 32.3069 40.4417 32.8041 41.5829C34.3543 41.8256 35.7234 41.7855 36.9703 41.6298C37.0618 41.6186 37.1136 41.5197 37.0715 41.4375C36.5587 40.4364 35.9568 39.0975 35.582 37.7225C35.5443 37.584 35.7229 37.4935 35.8135 37.6046C37.1161 39.1998 38.656 40.5391 39.3548 41.1175C41.2333 40.6786 42.5413 40.0713 43.1604 39.7528C43.3532 39.6539 43.3806 39.3897 43.2132 39.2517Z" }]]
110
+ },
111
+ opencode: { viewBox: "2.5 0 19 24", paths: [["path", { d: "M16 6H8v12h8V6zm4 16H4V2h16v20z" }]] },
112
+ pi: {
113
+ viewBox: "0 0 24 24",
114
+ paths: [
115
+ ["path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 1h16.5v11H12v5.5H6.5V23H1V1zm5.5 5.5V12H12V6.5H6.5z" }],
116
+ ["path", { d: "M17.5 12H23v11h-5.5V12z" }]
117
+ ]
118
+ },
119
+ // Product mark shared with the first-party browser frontend favicon.
120
+ supercode: {
121
+ viewBox: "0 0 64 64",
122
+ paths: [
123
+ ["rect", { width: "64", height: "64", rx: "14", fill: "#111923" }],
124
+ ["path", { d: "M18 21h28v6H18zm0 13h18v6H18z", fill: "#5f8fff" }],
125
+ ["circle", { cx: "46", cy: "37", r: "7", fill: "none", stroke: "#8ce0aa", strokeWidth: "4" }]
126
+ ]
127
+ }
128
+ };
129
+ var SVG_ATTRIBUTE_NAMES = Object.freeze({
130
+ clipRule: "clip-rule",
131
+ fillRule: "fill-rule",
132
+ strokeWidth: "stroke-width"
133
+ });
134
+ function HarnessLogo({ id, activity, size = 28, onMissingLogo }) {
135
+ const logo = LOGOS[id];
136
+ useEffect(() => {
137
+ if (!logo) onMissingLogo?.(id);
138
+ }, [id, logo, onMissingLogo]);
139
+ if (!logo) return null;
140
+ return /* @__PURE__ */ jsxs("span", { className: "scui-logo", "data-harness": id, "data-activity": activity, style: { "--scui-logo-size": `${size}px` }, "aria-hidden": "true", children: [
141
+ /* @__PURE__ */ jsx("svg", { viewBox: logo.viewBox, preserveAspectRatio: "xMidYMid meet", focusable: "false", children: logo.paths.map(([Tag, props], index) => /* @__PURE__ */ jsx(Tag, { ...props }, index)) }),
142
+ activity && activity !== "idle" ? /* @__PURE__ */ jsx("i", {}) : null
143
+ ] });
144
+ }
145
+
146
+ // src/icon.jsx
147
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
148
+ var ICONS = {
149
+ attach: () => /* @__PURE__ */ jsx2("path", { d: "M6.25 9.75 10.6 5.4a2.1 2.1 0 0 1 2.97 2.97l-5.4 5.4a3.3 3.3 0 0 1-4.67-4.66l5.52-5.52" }),
150
+ back: () => /* @__PURE__ */ jsx2("path", { d: "m11.5 4.5-4.5 4.5 4.5 4.5" }),
151
+ check: () => /* @__PURE__ */ jsx2("path", { d: "m4 9 3.25 3.25L14 5.5" }),
152
+ chevron: () => /* @__PURE__ */ jsx2("path", { d: "m7 4.5 4.5 4.5L7 13.5" }),
153
+ close: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
154
+ /* @__PURE__ */ jsx2("path", { d: "m4.75 4.75 8.5 8.5" }),
155
+ /* @__PURE__ */ jsx2("path", { d: "m13.25 4.75-8.5 8.5" })
156
+ ] }),
157
+ copy: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
158
+ /* @__PURE__ */ jsx2("rect", { x: "5", y: "5", width: "8", height: "8", rx: "1.5" }),
159
+ /* @__PURE__ */ jsx2("path", { d: "M3 10.5V4.25C3 3.56 3.56 3 4.25 3h6.25" })
160
+ ] }),
161
+ down: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
162
+ /* @__PURE__ */ jsx2("path", { d: "M9 3.5v10" }),
163
+ /* @__PURE__ */ jsx2("path", { d: "m4.75 9.5 4.25 4 4.25-4" })
164
+ ] }),
165
+ image: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
166
+ /* @__PURE__ */ jsx2("rect", { x: "3", y: "3.5", width: "12", height: "11", rx: "1.75" }),
167
+ /* @__PURE__ */ jsx2("circle", { cx: "6.5", cy: "7", r: "1.25" }),
168
+ /* @__PURE__ */ jsx2("path", { d: "m4.5 13 3.25-3 2.1 1.85 1.65-1.5L14 13" })
169
+ ] }),
170
+ menu: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
171
+ /* @__PURE__ */ jsx2("circle", { cx: "4", cy: "9", r: "1.25", fill: "currentColor", stroke: "none" }),
172
+ /* @__PURE__ */ jsx2("circle", { cx: "9", cy: "9", r: "1.25", fill: "currentColor", stroke: "none" }),
173
+ /* @__PURE__ */ jsx2("circle", { cx: "14", cy: "9", r: "1.25", fill: "currentColor", stroke: "none" })
174
+ ] }),
175
+ plus: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
176
+ /* @__PURE__ */ jsx2("path", { d: "M9 3.5v11" }),
177
+ /* @__PURE__ */ jsx2("path", { d: "M3.5 9h11" })
178
+ ] }),
179
+ search: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
180
+ /* @__PURE__ */ jsx2("circle", { cx: "7.75", cy: "7.75", r: "4.25" }),
181
+ /* @__PURE__ */ jsx2("path", { d: "m11 11 3.5 3.5" })
182
+ ] }),
183
+ send: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
184
+ /* @__PURE__ */ jsx2("path", { d: "M9 14.5v-11" }),
185
+ /* @__PURE__ */ jsx2("path", { d: "m4.75 7.75 4.25-4.25 4.25 4.25" })
186
+ ] }),
187
+ stop: () => /* @__PURE__ */ jsx2("rect", { x: "4.5", y: "4.5", width: "9", height: "9", rx: "1.5", fill: "currentColor", stroke: "none" })
188
+ };
189
+ function UiIcon({ name, size = 16, class: className = "" }) {
190
+ const Glyph = ICONS[name];
191
+ if (!Glyph) return null;
192
+ return /* @__PURE__ */ jsx2("svg", { className: `scui-icon ${className}`, style: { "--scui-icon-size": `${size}px` }, viewBox: "0 0 18 18", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(Glyph, {}) });
193
+ }
194
+
195
+ // src/settings.jsx
196
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
197
+ function HarnessAdvisory({ state, onReview }) {
198
+ const advisory = state.interopSettings?.advisories[0];
199
+ if (!advisory && !state.interopSettingsError) return null;
200
+ return /* @__PURE__ */ jsxs3("div", { className: "scui-advisory", "data-severity": advisory?.severity ?? "error", role: advisory?.severity === "error" || !advisory ? "alert" : "status", children: [
201
+ /* @__PURE__ */ jsx3("span", { "aria-hidden": "true", children: "!" }),
202
+ /* @__PURE__ */ jsxs3("span", { children: [
203
+ /* @__PURE__ */ jsx3("strong", { children: advisory?.title ?? "Could not inspect harness settings" }),
204
+ /* @__PURE__ */ jsx3("small", { children: advisory?.message ?? state.interopSettingsError })
205
+ ] }),
206
+ advisory && state.canConfigureSettings ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => onReview(advisory.recommendation.change), children: "Review" }) : null
207
+ ] });
208
+ }
209
+ function initialValues(report, recommendedChange) {
210
+ return Object.fromEntries(report.controls.map((control) => [
211
+ control.key,
212
+ recommendedChange?.key === control.key ? recommendedChange.value : control.configuredValue ?? control.effectiveValue ?? control.choices[0]?.value ?? null
213
+ ]));
214
+ }
215
+ function HarnessSettingsPanel({ state, adapter, onClose, recommendedChange = null }) {
216
+ const report = state.interopSettings;
217
+ const titleId = useId();
218
+ const panel = useRef(null);
219
+ const valuesKey = `${report?.revision ?? ""}:${recommendedChange?.key ?? ""}:${recommendedChange?.value ?? ""}`;
220
+ const defaults = useMemo(() => report ? initialValues(report, recommendedChange) : {}, [valuesKey]);
221
+ const [values, setValues] = useState(defaults);
222
+ useEffect2(() => setValues(defaults), [defaults]);
223
+ useEffect2(() => {
224
+ panel.current?.querySelector("select, button")?.focus({ preventScroll: true });
225
+ const dismiss = (event) => {
226
+ if (event.key === "Escape") {
227
+ event.preventDefault();
228
+ onClose();
229
+ }
230
+ };
231
+ document.addEventListener("keydown", dismiss);
232
+ return () => document.removeEventListener("keydown", dismiss);
233
+ }, [onClose]);
234
+ if (!report) return /* @__PURE__ */ jsx3("section", { ref: panel, className: "scui-settings", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, children: /* @__PURE__ */ jsxs3("header", { children: [
235
+ /* @__PURE__ */ jsx3("button", { type: "button", "aria-label": "Close settings", onClick: onClose, children: /* @__PURE__ */ jsx3(UiIcon, { name: "close", size: 18 }) }),
236
+ /* @__PURE__ */ jsxs3("span", { children: [
237
+ /* @__PURE__ */ jsx3("strong", { id: titleId, children: "Harness settings" }),
238
+ /* @__PURE__ */ jsx3("small", { children: state.interopSettingsError ?? "No interoperability controls are available." })
239
+ ] })
240
+ ] }) });
241
+ const changed = report.controls.flatMap((control) => values[control.key] !== (control.configuredValue ?? control.effectiveValue ?? control.choices[0]?.value ?? null) ? [{ key: control.key, value: values[control.key] ?? null }] : []);
242
+ const submit = (event) => {
243
+ event.preventDefault();
244
+ if (!changed.length || !state.canConfigureSettings) return;
245
+ adapter.onIntent({ action: "configureHarness", harness: report.harness, changes: changed, expectedRevision: report.revision });
246
+ };
247
+ return /* @__PURE__ */ jsxs3("section", { ref: panel, className: "scui-settings", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, children: [
248
+ /* @__PURE__ */ jsxs3("header", { children: [
249
+ /* @__PURE__ */ jsx3("button", { type: "button", "aria-label": "Close settings", onClick: onClose, children: /* @__PURE__ */ jsx3(UiIcon, { name: "close", size: 18 }) }),
250
+ /* @__PURE__ */ jsxs3("span", { children: [
251
+ /* @__PURE__ */ jsxs3("strong", { id: titleId, children: [
252
+ harnessDisplayName(report.harness),
253
+ " interoperability"
254
+ ] }),
255
+ /* @__PURE__ */ jsx3("small", { children: "Native harness settings used by Supercode" })
256
+ ] })
257
+ ] }),
258
+ /* @__PURE__ */ jsxs3("form", { onSubmit: submit, children: [
259
+ report.controls.map((control) => {
260
+ const choice = control.choices.find((item) => item.value === values[control.key]);
261
+ const recommendation = report.advisories.map((advisory) => advisory.recommendation).find((item) => item.change.key === control.key && item.change.value === values[control.key]);
262
+ const consequence = choice?.risk ?? recommendation?.consequence;
263
+ return /* @__PURE__ */ jsxs3("fieldset", { disabled: !control.writable || Boolean(state.operation), children: [
264
+ /* @__PURE__ */ jsxs3("label", { htmlFor: `scui-setting-${control.key}`, children: [
265
+ /* @__PURE__ */ jsx3("strong", { children: control.label }),
266
+ /* @__PURE__ */ jsx3("small", { children: control.description })
267
+ ] }),
268
+ /* @__PURE__ */ jsxs3("select", { id: `scui-setting-${control.key}`, value: values[control.key] ?? "@default", onChange: (event) => setValues((current) => ({ ...current, [control.key]: event.currentTarget.value === "@default" ? null : event.currentTarget.value })), children: [
269
+ control.resettable ? /* @__PURE__ */ jsx3("option", { value: "@default", children: "Use harness default" }) : null,
270
+ control.choices.map((item) => /* @__PURE__ */ jsx3("option", { value: item.value, children: item.label }, item.value))
271
+ ] }),
272
+ choice ? /* @__PURE__ */ jsx3("p", { children: choice.description }) : null,
273
+ consequence ? /* @__PURE__ */ jsxs3("p", { className: "scui-setting-risk", children: [
274
+ /* @__PURE__ */ jsx3("strong", { children: "Security consequence" }),
275
+ consequence
276
+ ] }) : null,
277
+ /* @__PURE__ */ jsxs3("small", { className: "scui-setting-source", children: [
278
+ control.effectiveNote,
279
+ control.sourcePath ? ` Source: ${control.sourcePath}` : ""
280
+ ] })
281
+ ] }, control.key);
282
+ }),
283
+ /* @__PURE__ */ jsxs3("footer", { children: [
284
+ /* @__PURE__ */ jsx3("button", { type: "button", onClick: onClose, children: "Cancel" }),
285
+ /* @__PURE__ */ jsx3("button", { type: "submit", disabled: !changed.length || !state.canConfigureSettings || Boolean(state.operation), children: state.operation === "configureHarness" ? "Applying\u2026" : "Apply changes" })
286
+ ] })
287
+ ] })
288
+ ] });
289
+ }
290
+ function HarnessReadiness({ harnesses, adapter }) {
291
+ const blocked = harnesses.filter((item) => !item.startable);
292
+ if (!blocked.length) return null;
293
+ return /* @__PURE__ */ jsxs3("details", { className: "scui-readiness", open: !harnesses.some((item) => item.startable), children: [
294
+ /* @__PURE__ */ jsxs3("summary", { children: [
295
+ blocked.length,
296
+ " ",
297
+ blocked.length === 1 ? "harness needs" : "harnesses need",
298
+ " setup"
299
+ ] }),
300
+ /* @__PURE__ */ jsx3("div", { children: blocked.map((item) => /* @__PURE__ */ jsxs3("section", { children: [
301
+ /* @__PURE__ */ jsx3(HarnessLogo, { id: item.id, size: 25 }),
302
+ /* @__PURE__ */ jsxs3("span", { children: [
303
+ /* @__PURE__ */ jsx3("strong", { children: item.label }),
304
+ /* @__PURE__ */ jsx3("small", { children: item.reason || (item.auth === "required" ? "Authentication required" : "Unavailable") }),
305
+ item.protocol ? /* @__PURE__ */ jsxs3("em", { children: [
306
+ item.protocol,
307
+ " \xB7 ",
308
+ item.runtime
309
+ ] }) : null
310
+ ] }),
311
+ item.repair ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => adapter.copyText?.(item.repair), children: "Copy fix" }) : null
312
+ ] }, item.id)) })
313
+ ] });
314
+ }
315
+ export {
316
+ HarnessAdvisory,
317
+ HarnessReadiness,
318
+ HarnessSettingsPanel
319
+ };
package/sessions.mjs CHANGED
@@ -32,6 +32,7 @@ var EMPTY_UI_STATE = Object.freeze({
32
32
  mode: "none",
33
33
  strategy: null,
34
34
  canSend: false,
35
+ canSteer: false,
35
36
  canResume: false,
36
37
  continuationModes: Object.freeze([]),
37
38
  canBranch: false,
@@ -90,6 +91,16 @@ function sessionActivity(state, row) {
90
91
  if (row.live || row.runtimeStatus === "idle") return "recent";
91
92
  return "idle";
92
93
  }
94
+ var ACTIVITY_PRIORITY = Object.freeze({
95
+ "needs-input": 70,
96
+ failed: 60,
97
+ working: 50,
98
+ unseen: 40,
99
+ finished: 30,
100
+ running: 20,
101
+ recent: 10,
102
+ idle: 0
103
+ });
93
104
  function filterSessions(rows, query) {
94
105
  const needle = query.trim().toLocaleLowerCase();
95
106
  if (!needle) return [...rows];
@@ -204,7 +215,7 @@ var ICONS = {
204
215
  function UiIcon({ name, size = 16, class: className = "" }) {
205
216
  const Glyph = ICONS[name];
206
217
  if (!Glyph) return null;
207
- return /* @__PURE__ */ jsx2("svg", { class: `scui-icon ${className}`, style: { "--scui-icon-size": `${size}px` }, viewBox: "0 0 18 18", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(Glyph, {}) });
218
+ return /* @__PURE__ */ jsx2("svg", { className: `scui-icon ${className}`, style: { "--scui-icon-size": `${size}px` }, viewBox: "0 0 18 18", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(Glyph, {}) });
208
219
  }
209
220
 
210
221
  // src/context.jsx
@@ -222,13 +233,13 @@ function LoadingStatus({ state, compact = false }) {
222
233
  discovering: ["Loading recent sessions", "Scanning native session stores without loading full transcripts.", 2],
223
234
  ready: ["Ready", "Coding sessions are up to date.", 3]
224
235
  }[state.startup];
225
- return /* @__PURE__ */ jsxs3("div", { class: `scui-loading${compact ? " scui-loading-compact" : ""}`, role: "status", "aria-busy": state.startup !== "ready", children: [
226
- /* @__PURE__ */ jsx4("span", { class: "scui-orbit", "aria-hidden": "true", children: /* @__PURE__ */ jsx4("i", {}) }),
227
- /* @__PURE__ */ jsxs3("span", { class: "scui-loading-copy", children: [
236
+ return /* @__PURE__ */ jsxs3("div", { className: `scui-loading${compact ? " scui-loading-compact" : ""}`, role: "status", "aria-busy": state.startup !== "ready", children: [
237
+ /* @__PURE__ */ jsx4("span", { className: "scui-orbit", "aria-hidden": "true", children: /* @__PURE__ */ jsx4("i", {}) }),
238
+ /* @__PURE__ */ jsxs3("span", { className: "scui-loading-copy", children: [
228
239
  /* @__PURE__ */ jsx4("strong", { children: copy[0] }),
229
240
  /* @__PURE__ */ jsx4("small", { children: copy[1] })
230
241
  ] }),
231
- /* @__PURE__ */ jsx4("span", { class: "scui-progress", "aria-hidden": "true", children: [1, 2, 3].map((step) => /* @__PURE__ */ jsx4("i", { "data-progress": step <= copy[2] ? "done" : step === copy[2] + 1 ? "current" : "waiting" }, step)) })
242
+ /* @__PURE__ */ jsx4("span", { className: "scui-progress", "aria-hidden": "true", children: [1, 2, 3].map((step) => /* @__PURE__ */ jsx4("i", { "data-progress": step <= copy[2] ? "done" : step === copy[2] + 1 ? "current" : "waiting" }, step)) })
232
243
  ] });
233
244
  }
234
245
 
@@ -239,13 +250,13 @@ var LOGOS = {
239
250
  "claude-code": {
240
251
  viewBox: "-1 3.5 26 18",
241
252
  paths: [
242
- ["path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z" }]
253
+ ["path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z" }]
243
254
  ]
244
255
  },
245
256
  codex: {
246
257
  viewBox: "-1 -1 26 26",
247
258
  paths: [
248
- ["path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z" }]
259
+ ["path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z" }]
249
260
  ]
250
261
  },
251
262
  gemini: {
@@ -265,7 +276,7 @@ var LOGOS = {
265
276
  pi: {
266
277
  viewBox: "0 0 24 24",
267
278
  paths: [
268
- ["path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1 1h16.5v11H12v5.5H6.5V23H1V1zm5.5 5.5V12H12V6.5H6.5z" }],
279
+ ["path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 1h16.5v11H12v5.5H6.5V23H1V1zm5.5 5.5V12H12V6.5H6.5z" }],
269
280
  ["path", { d: "M17.5 12H23v11h-5.5V12z" }]
270
281
  ]
271
282
  },
@@ -275,17 +286,22 @@ var LOGOS = {
275
286
  paths: [
276
287
  ["rect", { width: "64", height: "64", rx: "14", fill: "#111923" }],
277
288
  ["path", { d: "M18 21h28v6H18zm0 13h18v6H18z", fill: "#5f8fff" }],
278
- ["circle", { cx: "46", cy: "37", r: "7", fill: "none", stroke: "#8ce0aa", "stroke-width": "4" }]
289
+ ["circle", { cx: "46", cy: "37", r: "7", fill: "none", stroke: "#8ce0aa", strokeWidth: "4" }]
279
290
  ]
280
291
  }
281
292
  };
293
+ var SVG_ATTRIBUTE_NAMES = Object.freeze({
294
+ clipRule: "clip-rule",
295
+ fillRule: "fill-rule",
296
+ strokeWidth: "stroke-width"
297
+ });
282
298
  function HarnessLogo({ id, activity, size = 28, onMissingLogo }) {
283
299
  const logo = LOGOS[id];
284
300
  useEffect4(() => {
285
301
  if (!logo) onMissingLogo?.(id);
286
302
  }, [id, logo, onMissingLogo]);
287
303
  if (!logo) return null;
288
- return /* @__PURE__ */ jsxs4("span", { class: "scui-logo", "data-harness": id, "data-activity": activity, style: `--scui-logo-size:${size}px`, "aria-hidden": "true", children: [
304
+ return /* @__PURE__ */ jsxs4("span", { className: "scui-logo", "data-harness": id, "data-activity": activity, style: { "--scui-logo-size": `${size}px` }, "aria-hidden": "true", children: [
289
305
  /* @__PURE__ */ jsx5("svg", { viewBox: logo.viewBox, preserveAspectRatio: "xMidYMid meet", focusable: "false", children: logo.paths.map(([Tag, props], index) => /* @__PURE__ */ jsx5(Tag, { ...props }, index)) }),
290
306
  activity && activity !== "idle" ? /* @__PURE__ */ jsx5("i", {}) : null
291
307
  ] });
@@ -315,20 +331,20 @@ function SessionRow({ row, state, onOpen, now = Date.now() }) {
315
331
  const unreadCount = attention?.unreadCount ?? 0;
316
332
  const unreadLabel = unreadCount > 99 ? "99+" : String(unreadCount);
317
333
  const age = relativeAge(row.previewUpdatedAt ?? row.updatedAt, now) || row.age;
318
- return /* @__PURE__ */ jsxs5("button", { class: "scui-session", "data-active": row.active, "data-activity": activity, "data-session-key": row.key, type: "button", "aria-label": `${title} \xB7 ${harnessDisplayName(row.harness)}${working ? " \xB7 Working" : ""}${path.complete ? ` \xB7 ${path.complete}` : ""}${preview ? ` \xB7 ${preview}` : ""}${unreadCount ? ` \xB7 ${unreadCount} unread` : ""}${age ? ` \xB7 ${age}` : ""}`, "aria-current": row.active ? "true" : void 0, onClick: () => onOpen(row), children: [
334
+ return /* @__PURE__ */ jsxs5("button", { className: "scui-session", "data-active": row.active, "data-activity": activity, "data-session-key": row.key, type: "button", "aria-label": `${title} \xB7 ${harnessDisplayName(row.harness)}${working ? " \xB7 Working" : ""}${path.complete ? ` \xB7 ${path.complete}` : ""}${preview ? ` \xB7 ${preview}` : ""}${unreadCount ? ` \xB7 ${unreadCount} unread` : ""}${age ? ` \xB7 ${age}` : ""}`, "aria-current": row.active ? "true" : void 0, onClick: () => onOpen(row), children: [
319
335
  /* @__PURE__ */ jsx6(HarnessLogo, { id: row.harness, activity, size: 34 }),
320
- /* @__PURE__ */ jsxs5("span", { class: "scui-session-copy", children: [
321
- /* @__PURE__ */ jsxs5("span", { class: "scui-session-title", children: [
336
+ /* @__PURE__ */ jsxs5("span", { className: "scui-session-copy", children: [
337
+ /* @__PURE__ */ jsxs5("span", { className: "scui-session-title", children: [
322
338
  /* @__PURE__ */ jsx6("strong", { children: title }),
323
- /* @__PURE__ */ jsx6("span", { class: "scui-session-meta", children: age ? /* @__PURE__ */ jsx6("time", { children: age }) : null })
339
+ /* @__PURE__ */ jsx6("span", { className: "scui-session-meta", children: age ? /* @__PURE__ */ jsx6("time", { children: age }) : null })
324
340
  ] }),
325
- path.complete ? /* @__PURE__ */ jsxs5("small", { class: "scui-session-path", title: row.cwd, children: [
326
- /* @__PURE__ */ jsx6("span", { class: "scui-session-path-leading", children: path.leading }),
327
- path.separator ? /* @__PURE__ */ jsx6("span", { class: "scui-session-path-separator", children: path.separator }) : null,
328
- path.trailing ? /* @__PURE__ */ jsx6("span", { class: "scui-session-path-trailing", children: path.trailing }) : null
341
+ path.complete ? /* @__PURE__ */ jsxs5("small", { className: "scui-session-path", title: row.cwd, children: [
342
+ /* @__PURE__ */ jsx6("span", { className: "scui-session-path-leading", children: path.leading }),
343
+ path.separator ? /* @__PURE__ */ jsx6("span", { className: "scui-session-path-separator", children: path.separator }) : null,
344
+ path.trailing ? /* @__PURE__ */ jsx6("span", { className: "scui-session-path-trailing", children: path.trailing }) : null
329
345
  ] }) : null,
330
- working || preview || unreadCount ? /* @__PURE__ */ jsxs5("span", { class: "scui-session-preview", children: [
331
- working ? /* @__PURE__ */ jsxs5("span", { class: "scui-session-working", "aria-hidden": "true", children: [
346
+ working || preview || unreadCount ? /* @__PURE__ */ jsxs5("span", { className: "scui-session-preview", children: [
347
+ working ? /* @__PURE__ */ jsxs5("span", { className: "scui-session-working", "aria-hidden": "true", children: [
332
348
  /* @__PURE__ */ jsx6("i", {}),
333
349
  /* @__PURE__ */ jsx6("i", {}),
334
350
  /* @__PURE__ */ jsx6("i", {})
@@ -340,7 +356,7 @@ function SessionRow({ row, state, onOpen, now = Date.now() }) {
340
356
  ] })
341
357
  ] });
342
358
  }
343
- function SessionList({ state, adapter, onOpen, onNew, onClose, components = {}, labels = DEFAULT_LABELS, focusKey = null, memoryKey = state.workspace || "@default", headerActions: HeaderActions }) {
359
+ function SessionList({ state, adapter, onOpen, onNew, onClose, components = {}, slots = {}, labels = DEFAULT_LABELS, focusKey = null, memoryKey = state.workspace || "@default", headerActions: HeaderActions }) {
344
360
  const remembered = sessionListMemory.get(memoryKey) ?? { query: "", top: 0 };
345
361
  const [query, setQuery] = useState3(remembered.query);
346
362
  const [loadingMore, setLoadingMore] = useState3(false);
@@ -349,6 +365,8 @@ function SessionList({ state, adapter, onOpen, onNew, onClose, components = {},
349
365
  const rowScroller = useRef4(null);
350
366
  const rows = filterSessions(state.sessions, query);
351
367
  const Row = components.SessionRow ?? SessionRow;
368
+ const BeforeSessions = slots.beforeSessions;
369
+ const AfterSessions = slots.afterSessions;
352
370
  useLayoutEffect2(() => {
353
371
  if (rowScroller.current) rowScroller.current.scrollTop = remembered.top;
354
372
  }, [memoryKey]);
@@ -372,9 +390,9 @@ function SessionList({ state, adapter, onOpen, onNew, onClose, components = {},
372
390
  Promise.resolve(result).then(() => setLoadingMore(false), () => setLoadingMore(false));
373
391
  }
374
392
  };
375
- return /* @__PURE__ */ jsxs5("section", { class: "scui-list", ref: root, children: [
376
- /* @__PURE__ */ jsxs5("header", { class: "scui-head", children: [
377
- /* @__PURE__ */ jsxs5("span", { class: "scui-head-copy", children: [
393
+ return /* @__PURE__ */ jsxs5("section", { className: "scui-list", ref: root, children: [
394
+ /* @__PURE__ */ jsxs5("header", { className: "scui-head", children: [
395
+ /* @__PURE__ */ jsxs5("span", { className: "scui-head-copy", children: [
378
396
  /* @__PURE__ */ jsx6("strong", { children: labels.chats }),
379
397
  /* @__PURE__ */ jsxs5("small", { children: [
380
398
  state.sessions.length,
@@ -386,7 +404,7 @@ function SessionList({ state, adapter, onOpen, onNew, onClose, components = {},
386
404
  onClose ? /* @__PURE__ */ jsx6("button", { type: "button", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx6(UiIcon, { name: "close", size: 18 }) }) : null
387
405
  ] }),
388
406
  state.startup !== "ready" ? /* @__PURE__ */ jsx6(LoadingStatus, { state, compact: rows.length > 0 }) : null,
389
- state.sessions.length > 4 ? /* @__PURE__ */ jsxs5("label", { class: "scui-search", children: [
407
+ state.sessions.length > 4 ? /* @__PURE__ */ jsxs5("label", { className: "scui-search", children: [
390
408
  /* @__PURE__ */ jsx6(UiIcon, { name: "search", size: 15 }),
391
409
  /* @__PURE__ */ jsx6("input", { type: "search", "aria-label": labels.searchChats, placeholder: labels.searchChats, value: query, onInput: (event) => {
392
410
  const value = event.currentTarget.value;
@@ -396,10 +414,12 @@ function SessionList({ state, adapter, onOpen, onNew, onClose, components = {},
396
414
  } }),
397
415
  /* @__PURE__ */ jsx6("small", { children: rows.length })
398
416
  ] }) : null,
399
- /* @__PURE__ */ jsxs5("div", { class: "scui-session-rows", ref: rowScroller, onScroll: (event) => boundedSet(sessionListMemory, memoryKey, { query, top: event.currentTarget.scrollTop }), children: [
400
- !rows.length && state.startup === "ready" ? /* @__PURE__ */ jsx6("div", { class: "scui-empty", children: query ? "No chats match your search." : state.error ?? "No coding chats found." }) : null,
417
+ /* @__PURE__ */ jsxs5("div", { className: "scui-session-rows", ref: rowScroller, onScroll: (event) => boundedSet(sessionListMemory, memoryKey, { query, top: event.currentTarget.scrollTop }), children: [
418
+ BeforeSessions ? /* @__PURE__ */ jsx6(BeforeSessions, { state, adapter, value: { query, rows } }) : null,
419
+ !rows.length && state.startup === "ready" ? /* @__PURE__ */ jsx6("div", { className: "scui-empty", children: query ? "No chats match your search." : state.error ?? "No coding chats found." }) : null,
401
420
  rows.map((row) => /* @__PURE__ */ jsx6(Row, { value: row, row, state, adapter, onOpen, now }, row.key)),
402
- state.history.hasMoreSessions ? /* @__PURE__ */ jsx6("button", { class: "scui-load", type: "button", disabled: loadingMore, onClick: loadMore, children: loadingMore ? "Loading older chats\u2026" : "Load older chats" }) : null
421
+ state.history.hasMoreSessions ? /* @__PURE__ */ jsx6("button", { className: "scui-load", type: "button", disabled: loadingMore, onClick: loadMore, children: loadingMore ? "Loading older chats\u2026" : "Load older chats" }) : null,
422
+ AfterSessions ? /* @__PURE__ */ jsx6(AfterSessions, { state, adapter, value: { query, rows } }) : null
403
423
  ] })
404
424
  ] });
405
425
  }