dsh-neotui 0.1.15 → 0.1.16
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/src/panels.js +6 -4
package/package.json
CHANGED
package/src/panels.js
CHANGED
|
@@ -950,14 +950,16 @@ export class TrajectoryPanel extends Widget {
|
|
|
950
950
|
lines.push(segs);
|
|
951
951
|
this.stepLines[lines.length - 1] = si;
|
|
952
952
|
if (open) {
|
|
953
|
-
// 详细 mode: the step's events inline under its color
|
|
954
|
-
// with its
|
|
955
|
-
|
|
953
|
+
// 详细 mode = deep dive: the step's events inline under its color
|
|
954
|
+
// block, each with its OWN duration (web-style Δ timer: time since
|
|
955
|
+
// the previous event; the first is measured from the step start).
|
|
956
956
|
const evs = step.events.slice(0, 12);
|
|
957
|
+
let prev = null;
|
|
957
958
|
for (const e of evs) {
|
|
958
|
-
const dt =
|
|
959
|
+
const dt = prev != null && e.time != null ? ` Δ${fmtMs(e.time - prev)}` : "";
|
|
959
960
|
lines.push([{ t: ` #${String(e.seq).padStart(4)}${dt} ${truncate(this.#eventSummary(e), w - 12 - strWidth(dt))}`, fg: K.DIM, bg }]);
|
|
960
961
|
this.stepLines[lines.length - 1] = si;
|
|
962
|
+
prev = e.time;
|
|
961
963
|
}
|
|
962
964
|
if (step.events.length > evs.length) {
|
|
963
965
|
lines.push([{ t: ` …共 ${step.events.length} 个事件(右键 → 查看详情)`, fg: K.FAINT, bg }]);
|