@d86e/hive-panel 1.0.18 → 1.0.20
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/package.json +1 -1
- package/public/panel.css +6 -6
- package/public/panel.js +22 -37
package/package.json
CHANGED
package/public/panel.css
CHANGED
|
@@ -1323,12 +1323,12 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
1323
1323
|
|
|
1324
1324
|
|
|
1325
1325
|
/* Human-readable event rows with collapsed raw details. */
|
|
1326
|
-
.hive-event { display: flex; flex-direction: row; align-items: center; gap: 8px; height: 28px; min-height: 28px; padding: 0 7px; overflow: hidden; font-size: 11px; line-height: 1.5; }
|
|
1326
|
+
.hive-event { display: flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; height: 28px; min-height: 28px; padding: 0 7px; overflow: hidden; font-size: 11px; line-height: 1.5; }
|
|
1327
1327
|
.hive-event-sentence { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--hive-fg-soft); text-overflow: ellipsis; white-space: nowrap; }
|
|
1328
|
-
.hive-event-raw { flex: 0 0 auto; }
|
|
1328
|
+
.hive-event-raw { position: static; flex: 0 0 auto; }
|
|
1329
1329
|
.hive-event-summary { width: fit-content; color: var(--hive-fg-faint); font-size: 10px; line-height: 1.5; cursor: pointer; white-space: nowrap; }
|
|
1330
|
-
.hive-event-json { max-height:
|
|
1331
|
-
.hive-event
|
|
1332
|
-
.hive-event
|
|
1333
|
-
.hive-event
|
|
1330
|
+
.hive-event-json { max-height: none; margin: 4px 0 0; padding: 6px; overflow: visible; font-size: 10px; }
|
|
1331
|
+
.hive-event.is-expanded { flex-wrap: wrap; align-items: flex-start; height: auto; min-height: 28px; padding: 5px 7px; overflow: visible; }
|
|
1332
|
+
.hive-event.is-expanded .hive-event-sentence { flex-basis: 100%; white-space: normal; }
|
|
1333
|
+
.hive-event.is-expanded .hive-event-raw { flex-basis: 100%; }
|
|
1334
1334
|
|
package/public/panel.js
CHANGED
|
@@ -2142,14 +2142,14 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
2142
2142
|
.hive-event-list { flex: 1 1 auto; min-height: 0; max-height: none; padding: 8px 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: auto; }
|
|
2143
2143
|
.hive-event-error { color: var(--hive-danger); font-size: 11px; line-height: 1.5; }
|
|
2144
2144
|
/* Human-readable event rows with collapsed raw details. */
|
|
2145
|
-
.hive-event { display: flex; flex-direction: row; align-items: center; gap: 8px; height: 28px; min-height: 28px; padding: 0 7px; overflow: hidden; font-size: 11px; line-height: 1.5; }
|
|
2145
|
+
.hive-event { display: flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; height: 28px; min-height: 28px; padding: 0 7px; overflow: hidden; font-size: 11px; line-height: 1.5; }
|
|
2146
2146
|
.hive-event-sentence { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--hive-fg-soft); text-overflow: ellipsis; white-space: nowrap; }
|
|
2147
|
-
.hive-event-raw { flex: 0 0 auto; }
|
|
2147
|
+
.hive-event-raw { position: static; flex: 0 0 auto; }
|
|
2148
2148
|
.hive-event-summary { width: fit-content; color: var(--hive-fg-faint); font-size: 10px; line-height: 1.5; cursor: pointer; white-space: nowrap; }
|
|
2149
|
-
.hive-event-json { max-height:
|
|
2150
|
-
.hive-event
|
|
2151
|
-
.hive-event
|
|
2152
|
-
.hive-event
|
|
2149
|
+
.hive-event-json { max-height: none; margin: 4px 0 0; padding: 6px; overflow: visible; font-size: 10px; }
|
|
2150
|
+
.hive-event.is-expanded { flex-wrap: wrap; align-items: flex-start; height: auto; min-height: 28px; padding: 5px 7px; overflow: visible; }
|
|
2151
|
+
.hive-event.is-expanded .hive-event-sentence { flex-basis: 100%; white-space: normal; }
|
|
2152
|
+
.hive-event.is-expanded .hive-event-raw { flex-basis: 100%; }
|
|
2153
2153
|
`;
|
|
2154
2154
|
|
|
2155
2155
|
const LANE_LABEL_KEYS = Object.freeze({
|
|
@@ -2297,13 +2297,6 @@ export const messages = Object.freeze({
|
|
|
2297
2297
|
"events.details": "Details",
|
|
2298
2298
|
"events.actor.queen": "Queen",
|
|
2299
2299
|
"events.actor.supervisor": "Supervisor",
|
|
2300
|
-
"events.role.coder": "Coder agent",
|
|
2301
|
-
"events.role.tester": "Tester agent",
|
|
2302
|
-
"events.role.reviewer": "Reviewer agent",
|
|
2303
|
-
"events.role.architect": "Architect agent",
|
|
2304
|
-
"events.role.worker": "Executor agent",
|
|
2305
|
-
"events.role.service": "Service agent",
|
|
2306
|
-
"events.actor.role": "Agent",
|
|
2307
2300
|
"events.unknown": "Other event: {kind}",
|
|
2308
2301
|
"events.say.task_add": "created task \"{title}\"",
|
|
2309
2302
|
"events.say.task_claim": "claimed task \"{title}\"",
|
|
@@ -2646,13 +2639,6 @@ export const messages = Object.freeze({
|
|
|
2646
2639
|
"events.details": "详情",
|
|
2647
2640
|
"events.actor.queen": "女王",
|
|
2648
2641
|
"events.actor.supervisor": "监督器",
|
|
2649
|
-
"events.role.coder": "编码智能体",
|
|
2650
|
-
"events.role.tester": "测试智能体",
|
|
2651
|
-
"events.role.reviewer": "评审智能体",
|
|
2652
|
-
"events.role.architect": "架构智能体",
|
|
2653
|
-
"events.role.worker": "执行智能体",
|
|
2654
|
-
"events.role.service": "服务智能体",
|
|
2655
|
-
"events.actor.role": "智能体",
|
|
2656
2642
|
"events.unknown": "其它事件:{kind}",
|
|
2657
2643
|
"events.say.task_add": "创建了任务《{title}》",
|
|
2658
2644
|
"events.say.task_claim": "认领了任务《{title}》",
|
|
@@ -7894,25 +7880,13 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
7894
7880
|
return task && task.title ? task.title : id;
|
|
7895
7881
|
}
|
|
7896
7882
|
|
|
7897
|
-
function eventRoleName(role) {
|
|
7898
|
-
const name = asString(role);
|
|
7899
|
-
const key = "events.role." + name;
|
|
7900
|
-
const translated = translate(key);
|
|
7901
|
-
if (translated !== key) return translated;
|
|
7902
|
-
return translate("events.actor.role");
|
|
7903
|
-
}
|
|
7904
|
-
|
|
7905
7883
|
function eventActor(event) {
|
|
7906
7884
|
const actor = asString(event.actor || (event.raw && event.raw.actor));
|
|
7907
7885
|
if (!actor) return "—";
|
|
7908
7886
|
if (actor === "queen") return translate("events.actor.queen");
|
|
7909
7887
|
if (actor === "supervisor") return translate("events.actor.supervisor");
|
|
7910
|
-
if (actor === "worker") return eventRoleName("worker");
|
|
7911
7888
|
const worker = /^worker:(.+)$/.exec(actor);
|
|
7912
|
-
if (worker) return
|
|
7913
|
-
if (["coder", "tester", "reviewer", "architect", "service"].includes(actor)) {
|
|
7914
|
-
return eventRoleName(actor);
|
|
7915
|
-
}
|
|
7889
|
+
if (worker) return worker[1];
|
|
7916
7890
|
return actor;
|
|
7917
7891
|
}
|
|
7918
7892
|
|
|
@@ -8035,6 +8009,7 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
8035
8009
|
const rect = row.getBoundingClientRect();
|
|
8036
8010
|
if (rect && Number(rect.height) > 0) return Number(rect.height);
|
|
8037
8011
|
}
|
|
8012
|
+
if (Number(row.offsetHeight) > 0) return Number(row.offsetHeight);
|
|
8038
8013
|
return 28;
|
|
8039
8014
|
}
|
|
8040
8015
|
|
|
@@ -8048,9 +8023,13 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
8048
8023
|
return Number(rowRect.top) - Number(listRect.top);
|
|
8049
8024
|
}
|
|
8050
8025
|
}
|
|
8051
|
-
const index = (eventsList.children || []).indexOf(row);
|
|
8052
8026
|
if (Number.isFinite(Number(row.offsetTop))) return Number(row.offsetTop) - (Number(eventsList.scrollTop) || 0);
|
|
8053
|
-
|
|
8027
|
+
let offset = -(Number(eventsList.scrollTop) || 0);
|
|
8028
|
+
for (const child of eventsList.children || []) {
|
|
8029
|
+
if (child === row) break;
|
|
8030
|
+
offset += eventRowHeight(child);
|
|
8031
|
+
}
|
|
8032
|
+
return offset;
|
|
8054
8033
|
}
|
|
8055
8034
|
|
|
8056
8035
|
function captureEventAnchor() {
|
|
@@ -8148,10 +8127,16 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
8148
8127
|
if (eventState.expanded.has(key)) {
|
|
8149
8128
|
details.open = true;
|
|
8150
8129
|
setAttr(details, "open", "");
|
|
8130
|
+
row.className = "hive-event is-expanded";
|
|
8151
8131
|
}
|
|
8152
8132
|
details.addEventListener("toggle", () => {
|
|
8153
|
-
if (details.open)
|
|
8154
|
-
|
|
8133
|
+
if (details.open) {
|
|
8134
|
+
row.className = "hive-event is-expanded";
|
|
8135
|
+
eventState.expanded.add(key);
|
|
8136
|
+
} else {
|
|
8137
|
+
row.className = "hive-event";
|
|
8138
|
+
eventState.expanded.delete(key);
|
|
8139
|
+
}
|
|
8155
8140
|
});
|
|
8156
8141
|
row.appendChild(details);
|
|
8157
8142
|
return { row, details, key };
|