sisyphi 1.2.24 → 1.2.26
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/dist/cli.js +9 -57
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +15 -7
- package/dist/daemon.js.map +1 -1
- package/dist/tui.js +1 -3
- package/dist/tui.js.map +1 -1
- package/package.json +1 -1
package/dist/daemon.js
CHANGED
|
@@ -2919,7 +2919,6 @@ var init_ask_store = __esm({
|
|
|
2919
2919
|
init_notify();
|
|
2920
2920
|
init_state();
|
|
2921
2921
|
ACTIONABLE_KINDS = /* @__PURE__ */ new Set([
|
|
2922
|
-
"validation",
|
|
2923
2922
|
"decision",
|
|
2924
2923
|
"context",
|
|
2925
2924
|
"error",
|
|
@@ -11238,13 +11237,22 @@ var Compositor = class {
|
|
|
11238
11237
|
|
|
11239
11238
|
// src/daemon/segments/sessions.ts
|
|
11240
11239
|
function orderSessions(sessions, order) {
|
|
11241
|
-
|
|
11242
|
-
const
|
|
11240
|
+
const dividerIdx = order.indexOf("---");
|
|
11241
|
+
const front = dividerIdx === -1 ? order : order.slice(0, dividerIdx);
|
|
11242
|
+
const back = dividerIdx === -1 ? [] : order.slice(dividerIdx + 1);
|
|
11243
|
+
const frontMap = new Map(front.map((name, idx) => [name, idx]));
|
|
11244
|
+
const backMap = new Map(back.map((name, idx) => [name, idx]));
|
|
11245
|
+
const rank = (name) => {
|
|
11246
|
+
if (frontMap.has(name)) return { bucket: 0, idx: frontMap.get(name) };
|
|
11247
|
+
if (backMap.has(name)) return { bucket: 2, idx: backMap.get(name) };
|
|
11248
|
+
return { bucket: 1, idx: 0 };
|
|
11249
|
+
};
|
|
11243
11250
|
return [...sessions].sort((a, b) => {
|
|
11244
|
-
const
|
|
11245
|
-
const
|
|
11246
|
-
if (
|
|
11247
|
-
return a.localeCompare(b);
|
|
11251
|
+
const ra = rank(a);
|
|
11252
|
+
const rb = rank(b);
|
|
11253
|
+
if (ra.bucket !== rb.bucket) return ra.bucket - rb.bucket;
|
|
11254
|
+
if (ra.bucket === 1) return a.localeCompare(b);
|
|
11255
|
+
return ra.idx - rb.idx;
|
|
11248
11256
|
});
|
|
11249
11257
|
}
|
|
11250
11258
|
function renderNormalSession(name, color, activeBg, activeText, inactiveText, sectionBg, isActive) {
|