@volter-ai-dev/supercode-ui 0.1.54 → 0.1.55
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/activity.mjs +19 -1
- package/components.d.ts +1 -0
- package/components.mjs +271 -166
- package/composer.mjs +7 -0
- package/controller.d.ts +8 -0
- package/controller.mjs +48 -1
- package/conversation.mjs +7 -0
- package/core.mjs +28 -2
- package/embed.mjs +272 -168
- package/icon.mjs +6 -0
- package/index.d.ts +24 -3
- package/messenger.mjs +270 -166
- package/package.json +11 -1
- package/react/activity.mjs +19 -1
- package/react/components.mjs +271 -166
- package/react/composer.mjs +7 -0
- package/react/conversation.mjs +7 -0
- package/react/icon.mjs +6 -0
- package/react/index.d.ts +3 -2
- package/react/messenger.mjs +270 -166
- package/react/sessions.d.ts +1 -1
- package/react/sessions.mjs +41 -25
- package/react/settings.mjs +7 -0
- package/react/subagents.d.ts +2 -0
- package/react/subagents.mjs +1464 -0
- package/sessions.d.ts +1 -1
- package/sessions.mjs +41 -25
- package/settings.mjs +7 -0
- package/styles.css +6 -1
- package/subagents.d.ts +2 -0
- package/subagents.mjs +1464 -0
package/activity.mjs
CHANGED
|
@@ -62,6 +62,7 @@ var EMPTY_UI_STATE = Object.freeze({
|
|
|
62
62
|
savedDraft: "",
|
|
63
63
|
attention: Object.freeze([]),
|
|
64
64
|
sessions: Object.freeze([]),
|
|
65
|
+
subagentInspector: null,
|
|
65
66
|
attached: null,
|
|
66
67
|
owned: null,
|
|
67
68
|
attachError: null
|
|
@@ -559,10 +560,25 @@ function readSessions(value) {
|
|
|
559
560
|
active: row.active === true,
|
|
560
561
|
writable: row.writable === true,
|
|
561
562
|
live: row.live === true,
|
|
562
|
-
runtimeStatus: row.runtimeStatus === "running" || row.runtimeStatus === "busy" || row.runtimeStatus === "idle" ? row.runtimeStatus : null
|
|
563
|
+
runtimeStatus: row.runtimeStatus === "running" || row.runtimeStatus === "busy" || row.runtimeStatus === "idle" ? row.runtimeStatus : null,
|
|
564
|
+
...Number.isSafeInteger(row.subagentCount) && row.subagentCount > 0 ? { subagentCount: row.subagentCount } : {},
|
|
565
|
+
activity: ACTIVITY_PRIORITY[row.activity] !== void 0 ? row.activity : void 0
|
|
563
566
|
}];
|
|
564
567
|
});
|
|
565
568
|
}
|
|
569
|
+
function readSubagentInspector(value) {
|
|
570
|
+
const inspector = record(value);
|
|
571
|
+
if (!inspector || typeof inspector.parentKey !== "string" || !inspector.parentKey) return null;
|
|
572
|
+
return {
|
|
573
|
+
parentKey: inspector.parentKey,
|
|
574
|
+
parentTitle: boundedString(string(inspector.parentTitle), 500),
|
|
575
|
+
status: ["loading", "ready", "error"].includes(inspector.status) ? inspector.status : "loading",
|
|
576
|
+
items: readSessions(inspector.items).slice(0, 100),
|
|
577
|
+
selectedKey: typeof inspector.selectedKey === "string" && inspector.selectedKey ? inspector.selectedKey : null,
|
|
578
|
+
transcript: readTranscript(inspector.transcript).slice(-120),
|
|
579
|
+
error: typeof inspector.error === "string" ? boundedString(inspector.error) : null
|
|
580
|
+
};
|
|
581
|
+
}
|
|
566
582
|
function readAttached(value) {
|
|
567
583
|
const item = record(value);
|
|
568
584
|
if (!item || typeof item.harness !== "string") return null;
|
|
@@ -777,6 +793,7 @@ function normalizeUiState(value) {
|
|
|
777
793
|
return item && typeof item.key === "string" && ["unseen", "finished", "failed"].includes(item.kind) ? [{ key: item.key, kind: item.kind, ...typeof item.preview === "string" ? { preview: item.preview } : {}, ...Number.isSafeInteger(item.afterMessages) && item.afterMessages >= 0 ? { afterMessages: item.afterMessages } : {}, ...Number.isSafeInteger(item.unreadCount) && item.unreadCount > 0 ? { unreadCount: item.unreadCount } : {} }] : [];
|
|
778
794
|
}) : [],
|
|
779
795
|
sessions: readSessions(raw.sessions),
|
|
796
|
+
subagentInspector: readSubagentInspector(raw.subagentInspector),
|
|
780
797
|
attached: readAttached(raw.attached),
|
|
781
798
|
owned: readAttached(raw.owned),
|
|
782
799
|
attachError: attachError && typeof attachError.key === "string" && typeof attachError.message === "string" ? { key: attachError.key, message: attachError.message } : null
|
|
@@ -790,6 +807,7 @@ function sessionDisplayName(session) {
|
|
|
790
807
|
return title && title !== session.name ? title : session.name || "Untitled chat";
|
|
791
808
|
}
|
|
792
809
|
function sessionActivity(state, row) {
|
|
810
|
+
if (row.activity && ACTIVITY_PRIORITY[row.activity] !== void 0) return row.activity;
|
|
793
811
|
if (state.needsInput && row.active) return "needs-input";
|
|
794
812
|
if (state.busy && row.active) return "working";
|
|
795
813
|
if (row.runtimeStatus === "busy") return "working";
|