@nice-code/action 0.2.17 → 0.2.19
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/build/devtools/browser/index.js +788 -335
- package/build/index.js +22 -1
- package/build/types/ActionRuntime/ActionRuntime.d.ts +1 -0
- package/build/types/ActionRuntime/Handler/ExternalClient/ActionExternalClientHandler.d.ts +1 -0
- package/build/types/devtools/browser/components/ActionErrorDisplay.d.ts +2 -1
- package/build/types/devtools/browser/components/DomainChip.d.ts +2 -1
- package/build/types/devtools/browser/components/HandlerChips.d.ts +2 -1
- package/build/types/devtools/browser/components/StackTraceSection.d.ts +4 -2
- package/build/types/devtools/browser/components/action_list/ActionEntryRow.d.ts +3 -3
- package/build/types/devtools/browser/devtools_storage.d.ts +6 -0
- package/build/types/devtools/core/ActionDevtools.types.d.ts +2 -5
- package/build/types/devtools/core/devtools_colors.d.ts +1 -0
- package/build/types/errors/err_nice_action.d.ts +2 -0
- package/package.json +4 -3
|
@@ -1957,7 +1957,7 @@ class ActionDevtoolsCore {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
}
|
|
1959
1959
|
// src/devtools/browser/NiceActionDevtools.tsx
|
|
1960
|
-
import { useEffect as useEffect3, useMemo as useMemo2, useRef, useState as useState9 } from "react";
|
|
1960
|
+
import { useEffect as useEffect3, useMemo as useMemo2, useRef as useRef2, useState as useState9 } from "react";
|
|
1961
1961
|
|
|
1962
1962
|
// src/devtools/core/devtools_colors.ts
|
|
1963
1963
|
var DEVTOOL_COLOR_SEMANTIC_ERROR = "#FF5C5C";
|
|
@@ -1974,6 +1974,7 @@ var DEVTOOL_COLOR_TEXT_SECONDARY = "#cbd5e1";
|
|
|
1974
1974
|
var DEVTOOL_COLOR_TEXT_MUTED = "#64748b";
|
|
1975
1975
|
var DEVTOOL_COLOR_TEXT_FAINT = "#334155";
|
|
1976
1976
|
var DEVTOOL_LIST_BASE_BACKGROUND = "#0f172a";
|
|
1977
|
+
var DEVTOOL_LIST_HEADER_SELECTED_BACKGROUND = "#1d2942";
|
|
1977
1978
|
var DEVTOOL_LIST_GROUP_DIVIDER = "#101109";
|
|
1978
1979
|
var DEVTOOL_DETAIL_BASE_BACKGROUND = "#0d1729";
|
|
1979
1980
|
var DEVTOOL_DETAIL_HEADER_BACKGROUND = "#131f35";
|
|
@@ -2027,7 +2028,8 @@ var SEMANTIC_COLORS = {
|
|
|
2027
2028
|
},
|
|
2028
2029
|
error: {
|
|
2029
2030
|
color: DEVTOOL_COLOR_SEMANTIC_ERROR,
|
|
2030
|
-
borderColor: DEVTOOL_COLOR_SEMANTIC_ERROR
|
|
2031
|
+
borderColor: DEVTOOL_COLOR_SEMANTIC_ERROR,
|
|
2032
|
+
subtle: { color: "#FF5C5C9f", borderColor: "transparent" }
|
|
2031
2033
|
},
|
|
2032
2034
|
domain: {
|
|
2033
2035
|
color: DEVTOOL_COLOR_SEMANTIC_SYSTEM,
|
|
@@ -2036,22 +2038,27 @@ var SEMANTIC_COLORS = {
|
|
|
2036
2038
|
},
|
|
2037
2039
|
handler_local: {
|
|
2038
2040
|
color: DEVTOOL_COLOR_HANDLER_LOCAL_TEXT,
|
|
2039
|
-
borderColor: DEVTOOL_COLOR_HANDLER_LOCAL_BORDER
|
|
2041
|
+
borderColor: DEVTOOL_COLOR_HANDLER_LOCAL_BORDER,
|
|
2042
|
+
subtle: { color: "#4b5563", borderColor: "transparent" }
|
|
2040
2043
|
},
|
|
2041
2044
|
handler_external: {
|
|
2042
2045
|
color: DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT,
|
|
2043
|
-
borderColor: DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER
|
|
2046
|
+
borderColor: DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER,
|
|
2047
|
+
subtle: { color: "#cfa12a9f", borderColor: "transparent" }
|
|
2044
2048
|
},
|
|
2045
2049
|
age: {
|
|
2046
2050
|
color: DEVTOOL_COLOR_SEMANTIC_METADATA,
|
|
2047
|
-
borderColor: DEVTOOL_SECTION_BACKGROUND
|
|
2051
|
+
borderColor: DEVTOOL_SECTION_BACKGROUND,
|
|
2052
|
+
subtle: { color: "#4b5563", borderColor: "transparent" }
|
|
2048
2053
|
},
|
|
2049
2054
|
io_input: {
|
|
2050
2055
|
color: "#fbbf24",
|
|
2056
|
+
subtle: { color: "#fbbe249f", borderColor: "transparent" },
|
|
2051
2057
|
borderColor: "#78350f"
|
|
2052
2058
|
},
|
|
2053
2059
|
io_output: {
|
|
2054
2060
|
color: "#a78bfa",
|
|
2061
|
+
subtle: { color: "#a78bfa9f", borderColor: "transparent" },
|
|
2055
2062
|
borderColor: "#4c1d95"
|
|
2056
2063
|
},
|
|
2057
2064
|
default: {
|
|
@@ -2061,7 +2068,7 @@ var SEMANTIC_COLORS = {
|
|
|
2061
2068
|
};
|
|
2062
2069
|
|
|
2063
2070
|
// src/devtools/browser/components/action_detail/ActionDetailPanel.tsx
|
|
2064
|
-
import { useMemo, useState as
|
|
2071
|
+
import { useMemo, useState as useState7 } from "react";
|
|
2065
2072
|
|
|
2066
2073
|
// src/devtools/browser/ui_util/size.ts
|
|
2067
2074
|
function getSizeValue(size) {
|
|
@@ -2310,11 +2317,12 @@ function NiceErrorBody({ error }) {
|
|
|
2310
2317
|
style: {
|
|
2311
2318
|
padding: "12px 14px",
|
|
2312
2319
|
color: DEVTOOL_COLOR_SEMANTIC_ERROR,
|
|
2313
|
-
fontSize: "
|
|
2320
|
+
fontSize: "1em",
|
|
2314
2321
|
fontWeight: "700",
|
|
2315
2322
|
lineHeight: "1.45",
|
|
2316
2323
|
wordBreak: "break-word",
|
|
2317
2324
|
fontFamily: SANS,
|
|
2325
|
+
textAlign: "left",
|
|
2318
2326
|
borderBottom: `1px solid ${DEVTOOL_ERROR_BADGE_BACKGROUND}`
|
|
2319
2327
|
},
|
|
2320
2328
|
children: error.message
|
|
@@ -2384,7 +2392,13 @@ function NiceErrorDisplay({
|
|
|
2384
2392
|
}
|
|
2385
2393
|
|
|
2386
2394
|
// src/devtools/browser/components/StackTraceSection.tsx
|
|
2387
|
-
import {
|
|
2395
|
+
import { ExternalLink } from "lucide-react";
|
|
2396
|
+
import { useEffect, useRef, useState as useState2 } from "react";
|
|
2397
|
+
|
|
2398
|
+
// src/devtools/browser/devtools_storage.ts
|
|
2399
|
+
import { createTypedWebLocalStorage } from "@nice-code/util";
|
|
2400
|
+
var devtools_storage = createTypedWebLocalStorage(window.localStorage, "nice-action-devtools::");
|
|
2401
|
+
devtools_storage.updateJsonWithDef("runtimeToProjectFilePath", {}, (prev) => prev);
|
|
2388
2402
|
|
|
2389
2403
|
// ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.js
|
|
2390
2404
|
var $SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
@@ -2499,7 +2513,7 @@ async function resolveSourceMapPositions(frames) {
|
|
|
2499
2513
|
const resolved = await resolveCompiledPosition(frame.file, frame.line, frame.col ?? 0);
|
|
2500
2514
|
if (resolved == null)
|
|
2501
2515
|
return frame;
|
|
2502
|
-
return { ...frame, file: resolved.file, line: resolved.line, col: resolved.col };
|
|
2516
|
+
return { ...frame, originalFile: frame.file, file: resolved.file, line: resolved.line, col: resolved.col };
|
|
2503
2517
|
}));
|
|
2504
2518
|
}
|
|
2505
2519
|
function formatFrameFile(file) {
|
|
@@ -2517,7 +2531,299 @@ function formatFrameFile(file) {
|
|
|
2517
2531
|
const tail = filtered.slice(-4);
|
|
2518
2532
|
return tail.join("/") || file;
|
|
2519
2533
|
}
|
|
2520
|
-
function
|
|
2534
|
+
function getOriginUrl(frame) {
|
|
2535
|
+
const candidate = frame.originalFile ?? frame.file;
|
|
2536
|
+
if (candidate == null)
|
|
2537
|
+
return null;
|
|
2538
|
+
try {
|
|
2539
|
+
new URL(candidate);
|
|
2540
|
+
return candidate;
|
|
2541
|
+
} catch {
|
|
2542
|
+
return null;
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
function frameNeedsProjectRoot(frame) {
|
|
2546
|
+
if (frame.isInternal)
|
|
2547
|
+
return false;
|
|
2548
|
+
const originUrl = getOriginUrl(frame);
|
|
2549
|
+
if (originUrl == null)
|
|
2550
|
+
return false;
|
|
2551
|
+
const path = new URL(originUrl).pathname.split("?")[0] ?? "";
|
|
2552
|
+
return !path.startsWith("/@fs/");
|
|
2553
|
+
}
|
|
2554
|
+
function buildVscodeUrl(frame, projectRoot) {
|
|
2555
|
+
if (frame.line == null)
|
|
2556
|
+
return null;
|
|
2557
|
+
const originUrl = getOriginUrl(frame);
|
|
2558
|
+
if (originUrl != null) {
|
|
2559
|
+
let path = new URL(originUrl).pathname.split("?")[0] ?? "";
|
|
2560
|
+
if (path.startsWith("/@fs/")) {
|
|
2561
|
+
path = path.slice(5);
|
|
2562
|
+
if (/^\/[a-zA-Z]:\//.test(path))
|
|
2563
|
+
path = path.slice(1);
|
|
2564
|
+
return `vscode://file/${path}:${frame.line}:${frame.col ?? 1}`;
|
|
2565
|
+
}
|
|
2566
|
+
if (projectRoot == null)
|
|
2567
|
+
return null;
|
|
2568
|
+
const normalRoot2 = projectRoot.replace(/[/\\]+$/, "").replace(/\\/g, "/");
|
|
2569
|
+
return `vscode://file/${normalRoot2}${path}:${frame.line}:${frame.col ?? 1}`;
|
|
2570
|
+
}
|
|
2571
|
+
const filePath = frame.file;
|
|
2572
|
+
if (filePath == null)
|
|
2573
|
+
return null;
|
|
2574
|
+
const normalPath = filePath.replace(/\\/g, "/");
|
|
2575
|
+
if (/^[a-zA-Z]:\//.test(normalPath)) {
|
|
2576
|
+
return `vscode://file/${normalPath}:${frame.line}:${frame.col ?? 1}`;
|
|
2577
|
+
}
|
|
2578
|
+
if (/^\/[a-zA-Z]:\//.test(normalPath)) {
|
|
2579
|
+
return `vscode://file/${normalPath.slice(1)}:${frame.line}:${frame.col ?? 1}`;
|
|
2580
|
+
}
|
|
2581
|
+
if (normalPath.startsWith("/")) {
|
|
2582
|
+
if (projectRoot == null)
|
|
2583
|
+
return null;
|
|
2584
|
+
const normalRoot2 = projectRoot.replace(/[/\\]+$/, "").replace(/\\/g, "/");
|
|
2585
|
+
return `vscode://file/${normalRoot2}${normalPath}:${frame.line}:${frame.col ?? 1}`;
|
|
2586
|
+
}
|
|
2587
|
+
if (projectRoot == null)
|
|
2588
|
+
return null;
|
|
2589
|
+
const normalRoot = projectRoot.replace(/[/\\]+$/, "").replace(/\\/g, "/");
|
|
2590
|
+
return `vscode://file/${normalRoot}/${normalPath}:${frame.line}:${frame.col ?? 1}`;
|
|
2591
|
+
}
|
|
2592
|
+
function ProjectRootSetupModal({
|
|
2593
|
+
envId,
|
|
2594
|
+
currentValue,
|
|
2595
|
+
onSave,
|
|
2596
|
+
onCancel
|
|
2597
|
+
}) {
|
|
2598
|
+
const [value, setValue] = useState2(currentValue);
|
|
2599
|
+
const inputRef = useRef(null);
|
|
2600
|
+
useEffect(() => {
|
|
2601
|
+
inputRef.current?.focus();
|
|
2602
|
+
inputRef.current?.select();
|
|
2603
|
+
}, []);
|
|
2604
|
+
useEffect(() => {
|
|
2605
|
+
const handler = (e) => {
|
|
2606
|
+
if (e.key === "Escape")
|
|
2607
|
+
onCancel();
|
|
2608
|
+
};
|
|
2609
|
+
window.addEventListener("keydown", handler);
|
|
2610
|
+
return () => window.removeEventListener("keydown", handler);
|
|
2611
|
+
}, [onCancel]);
|
|
2612
|
+
const handleSubmit = (e) => {
|
|
2613
|
+
e.preventDefault();
|
|
2614
|
+
const trimmed = value.trim();
|
|
2615
|
+
if (trimmed !== "")
|
|
2616
|
+
onSave(trimmed);
|
|
2617
|
+
};
|
|
2618
|
+
return /* @__PURE__ */ jsxDEV4("div", {
|
|
2619
|
+
style: {
|
|
2620
|
+
position: "fixed",
|
|
2621
|
+
inset: 0,
|
|
2622
|
+
zIndex: 2147483647,
|
|
2623
|
+
display: "flex",
|
|
2624
|
+
alignItems: "center",
|
|
2625
|
+
justifyContent: "center"
|
|
2626
|
+
},
|
|
2627
|
+
children: [
|
|
2628
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
2629
|
+
onClick: onCancel,
|
|
2630
|
+
style: { position: "absolute", inset: 0, background: "rgba(0, 0, 0, 0.72)" }
|
|
2631
|
+
}, undefined, false, undefined, this),
|
|
2632
|
+
/* @__PURE__ */ jsxDEV4("form", {
|
|
2633
|
+
onSubmit: handleSubmit,
|
|
2634
|
+
style: {
|
|
2635
|
+
position: "relative",
|
|
2636
|
+
background: DEVTOOL_TOOLTIP_BACKGROUND,
|
|
2637
|
+
border: `1px solid ${DEVTOOL_TOOLTIP_BORDER}`,
|
|
2638
|
+
borderRadius: "8px",
|
|
2639
|
+
width: "420px",
|
|
2640
|
+
maxWidth: "90vw",
|
|
2641
|
+
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.8)",
|
|
2642
|
+
overflow: "hidden",
|
|
2643
|
+
display: "flex",
|
|
2644
|
+
flexDirection: "column"
|
|
2645
|
+
},
|
|
2646
|
+
children: [
|
|
2647
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
2648
|
+
style: {
|
|
2649
|
+
background: DEVTOOL_TOOLTIP_TITLE_BACKGROUND,
|
|
2650
|
+
borderBottom: `1px solid ${DEVTOOL_TOOLTIP_BORDER}`,
|
|
2651
|
+
padding: "10px 14px"
|
|
2652
|
+
},
|
|
2653
|
+
children: [
|
|
2654
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
2655
|
+
style: {
|
|
2656
|
+
color: DEVTOOL_COLOR_TEXT_EMPHASIS,
|
|
2657
|
+
fontSize: "12px",
|
|
2658
|
+
fontWeight: 600,
|
|
2659
|
+
marginBottom: "2px"
|
|
2660
|
+
},
|
|
2661
|
+
children: "Set project root"
|
|
2662
|
+
}, undefined, false, undefined, this),
|
|
2663
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
2664
|
+
style: { color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px" },
|
|
2665
|
+
children: [
|
|
2666
|
+
"Runtime:",
|
|
2667
|
+
" ",
|
|
2668
|
+
/* @__PURE__ */ jsxDEV4("span", {
|
|
2669
|
+
style: {
|
|
2670
|
+
color: DEVTOOL_COLOR_SEMANTIC_SYSTEM,
|
|
2671
|
+
fontFamily: "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace"
|
|
2672
|
+
},
|
|
2673
|
+
children: envId
|
|
2674
|
+
}, undefined, false, undefined, this)
|
|
2675
|
+
]
|
|
2676
|
+
}, undefined, true, undefined, this)
|
|
2677
|
+
]
|
|
2678
|
+
}, undefined, true, undefined, this),
|
|
2679
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
2680
|
+
style: { padding: "14px", display: "flex", flexDirection: "column", gap: "8px" },
|
|
2681
|
+
children: [
|
|
2682
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
2683
|
+
style: { color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px", lineHeight: 1.4 },
|
|
2684
|
+
children: [
|
|
2685
|
+
"Provide the absolute path to this project's root so that root-relative source file paths (e.g.",
|
|
2686
|
+
" ",
|
|
2687
|
+
/* @__PURE__ */ jsxDEV4("span", {
|
|
2688
|
+
style: {
|
|
2689
|
+
fontFamily: "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace"
|
|
2690
|
+
},
|
|
2691
|
+
children: "src/App.tsx"
|
|
2692
|
+
}, undefined, false, undefined, this),
|
|
2693
|
+
") can be opened in VS Code."
|
|
2694
|
+
]
|
|
2695
|
+
}, undefined, true, undefined, this),
|
|
2696
|
+
/* @__PURE__ */ jsxDEV4("input", {
|
|
2697
|
+
ref: inputRef,
|
|
2698
|
+
value,
|
|
2699
|
+
onChange: (e) => setValue(e.currentTarget.value),
|
|
2700
|
+
placeholder: "e.g. C:/d/nice-code/packages/demo-frontend",
|
|
2701
|
+
style: {
|
|
2702
|
+
background: DEVTOOL_STACK_TRACE_BACKGROUND,
|
|
2703
|
+
border: `1px solid ${DEVTOOL_TOOLTIP_BORDER}`,
|
|
2704
|
+
borderRadius: "4px",
|
|
2705
|
+
color: DEVTOOL_COLOR_TEXT_SECONDARY,
|
|
2706
|
+
fontSize: "11px",
|
|
2707
|
+
fontFamily: "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace",
|
|
2708
|
+
padding: "7px 9px",
|
|
2709
|
+
outline: "none",
|
|
2710
|
+
width: "100%",
|
|
2711
|
+
boxSizing: "border-box"
|
|
2712
|
+
}
|
|
2713
|
+
}, undefined, false, undefined, this)
|
|
2714
|
+
]
|
|
2715
|
+
}, undefined, true, undefined, this),
|
|
2716
|
+
/* @__PURE__ */ jsxDEV4("div", {
|
|
2717
|
+
style: {
|
|
2718
|
+
display: "flex",
|
|
2719
|
+
justifyContent: "flex-end",
|
|
2720
|
+
gap: "8px",
|
|
2721
|
+
padding: "10px 14px",
|
|
2722
|
+
borderTop: `1px solid ${DEVTOOL_PANEL_BORDER}`
|
|
2723
|
+
},
|
|
2724
|
+
children: [
|
|
2725
|
+
/* @__PURE__ */ jsxDEV4("button", {
|
|
2726
|
+
type: "button",
|
|
2727
|
+
onClick: onCancel,
|
|
2728
|
+
style: {
|
|
2729
|
+
background: "transparent",
|
|
2730
|
+
border: `1px solid ${DEVTOOL_PANEL_BORDER}`,
|
|
2731
|
+
borderRadius: "4px",
|
|
2732
|
+
color: DEVTOOL_COLOR_TEXT_MUTED,
|
|
2733
|
+
fontSize: "11px",
|
|
2734
|
+
padding: "5px 12px",
|
|
2735
|
+
cursor: "pointer"
|
|
2736
|
+
},
|
|
2737
|
+
children: "Cancel"
|
|
2738
|
+
}, undefined, false, undefined, this),
|
|
2739
|
+
/* @__PURE__ */ jsxDEV4("button", {
|
|
2740
|
+
type: "submit",
|
|
2741
|
+
disabled: value.trim() === "",
|
|
2742
|
+
style: {
|
|
2743
|
+
background: `${DEVTOOL_COLOR_SEMANTIC_SYSTEM}22`,
|
|
2744
|
+
border: `1px solid ${DEVTOOL_COLOR_SEMANTIC_SYSTEM}66`,
|
|
2745
|
+
borderRadius: "4px",
|
|
2746
|
+
color: DEVTOOL_COLOR_SEMANTIC_SYSTEM,
|
|
2747
|
+
fontSize: "11px",
|
|
2748
|
+
padding: "5px 12px",
|
|
2749
|
+
cursor: value.trim() === "" ? "not-allowed" : "pointer",
|
|
2750
|
+
opacity: value.trim() === "" ? 0.5 : 1
|
|
2751
|
+
},
|
|
2752
|
+
children: "Save"
|
|
2753
|
+
}, undefined, false, undefined, this)
|
|
2754
|
+
]
|
|
2755
|
+
}, undefined, true, undefined, this)
|
|
2756
|
+
]
|
|
2757
|
+
}, undefined, true, undefined, this)
|
|
2758
|
+
]
|
|
2759
|
+
}, undefined, true, undefined, this);
|
|
2760
|
+
}
|
|
2761
|
+
function OpenInVscodeButton({
|
|
2762
|
+
frame,
|
|
2763
|
+
projectRoot,
|
|
2764
|
+
onNeedSetup
|
|
2765
|
+
}) {
|
|
2766
|
+
const [hovered, setHovered] = useState2(false);
|
|
2767
|
+
const needsSetup = frameNeedsProjectRoot(frame) && projectRoot == null;
|
|
2768
|
+
const url = buildVscodeUrl(frame, projectRoot);
|
|
2769
|
+
if (frame.file == null || frame.line == null)
|
|
2770
|
+
return null;
|
|
2771
|
+
if (!needsSetup && url == null)
|
|
2772
|
+
return null;
|
|
2773
|
+
const baseStyle = {
|
|
2774
|
+
position: "absolute",
|
|
2775
|
+
bottom: "3px",
|
|
2776
|
+
right: "4px",
|
|
2777
|
+
display: "flex",
|
|
2778
|
+
alignItems: "center",
|
|
2779
|
+
justifyContent: "center",
|
|
2780
|
+
width: "16px",
|
|
2781
|
+
height: "16px",
|
|
2782
|
+
opacity: hovered ? 0.85 : 0.25,
|
|
2783
|
+
transition: "opacity 0.15s ease",
|
|
2784
|
+
cursor: "pointer",
|
|
2785
|
+
flexShrink: 0
|
|
2786
|
+
};
|
|
2787
|
+
if (needsSetup) {
|
|
2788
|
+
return /* @__PURE__ */ jsxDEV4("button", {
|
|
2789
|
+
onClick: (e) => {
|
|
2790
|
+
e.stopPropagation();
|
|
2791
|
+
onNeedSetup();
|
|
2792
|
+
},
|
|
2793
|
+
onMouseEnter: () => setHovered(true),
|
|
2794
|
+
onMouseLeave: () => setHovered(false),
|
|
2795
|
+
title: "Set project root to open in VS Code",
|
|
2796
|
+
style: {
|
|
2797
|
+
...baseStyle,
|
|
2798
|
+
color: DEVTOOL_COLOR_SEMANTIC_WARNING,
|
|
2799
|
+
background: "none",
|
|
2800
|
+
border: "none",
|
|
2801
|
+
padding: 0
|
|
2802
|
+
},
|
|
2803
|
+
children: /* @__PURE__ */ jsxDEV4(ExternalLink, {
|
|
2804
|
+
size: 10,
|
|
2805
|
+
strokeWidth: 1.8
|
|
2806
|
+
}, undefined, false, undefined, this)
|
|
2807
|
+
}, undefined, false, undefined, this);
|
|
2808
|
+
}
|
|
2809
|
+
return /* @__PURE__ */ jsxDEV4("a", {
|
|
2810
|
+
href: url,
|
|
2811
|
+
onClick: (e) => e.stopPropagation(),
|
|
2812
|
+
onMouseEnter: () => setHovered(true),
|
|
2813
|
+
onMouseLeave: () => setHovered(false),
|
|
2814
|
+
title: "Open in VS Code",
|
|
2815
|
+
style: {
|
|
2816
|
+
...baseStyle,
|
|
2817
|
+
color: DEVTOOL_COLOR_TEXT_SECONDARY,
|
|
2818
|
+
textDecoration: "none"
|
|
2819
|
+
},
|
|
2820
|
+
children: /* @__PURE__ */ jsxDEV4(ExternalLink, {
|
|
2821
|
+
size: 10,
|
|
2822
|
+
strokeWidth: 1.8
|
|
2823
|
+
}, undefined, false, undefined, this)
|
|
2824
|
+
}, undefined, false, undefined, this);
|
|
2825
|
+
}
|
|
2826
|
+
function countUserFrames(_runtime, stack) {
|
|
2521
2827
|
if (stack == null)
|
|
2522
2828
|
return 0;
|
|
2523
2829
|
return parseStackFrames(stack).filter((f) => !f.isInternal).length;
|
|
@@ -2526,10 +2832,16 @@ function StackTraceSection({
|
|
|
2526
2832
|
label,
|
|
2527
2833
|
stack,
|
|
2528
2834
|
color = DEVTOOL_COLOR_SEMANTIC_SYSTEM,
|
|
2835
|
+
runtime,
|
|
2529
2836
|
minFrameCount
|
|
2530
2837
|
}) {
|
|
2531
2838
|
const [showAll, setShowAll] = useState2(false);
|
|
2532
2839
|
const [resolvedFrames, setResolvedFrames] = useState2(null);
|
|
2840
|
+
const [projectRootMap, setProjectRootMap] = useState2({});
|
|
2841
|
+
const [showSetupModal, setShowSetupModal] = useState2(false);
|
|
2842
|
+
useEffect(() => {
|
|
2843
|
+
devtools_storage.getJsonOrDef("runtimeToProjectFilePath", {}).then((map) => setProjectRootMap(map));
|
|
2844
|
+
}, []);
|
|
2533
2845
|
useEffect(() => {
|
|
2534
2846
|
if (stack == null)
|
|
2535
2847
|
return;
|
|
@@ -2553,6 +2865,16 @@ function StackTraceSection({
|
|
|
2553
2865
|
const phantomFrameCount = !showAll ? Math.max(0, (minFrameCount ?? 0) - displayFrames.length) : 0;
|
|
2554
2866
|
if (allFrames.length === 0)
|
|
2555
2867
|
return null;
|
|
2868
|
+
const runtimeKey = `envId[${runtime.envId}]`;
|
|
2869
|
+
const projectRoot = projectRootMap[runtimeKey] ?? null;
|
|
2870
|
+
const handleSaveProjectRoot = (path) => {
|
|
2871
|
+
setProjectRootMap((prev) => ({ ...prev, [runtimeKey]: path }));
|
|
2872
|
+
setShowSetupModal(false);
|
|
2873
|
+
devtools_storage.updateJsonWithDef("runtimeToProjectFilePath", {}, (prev) => ({
|
|
2874
|
+
...prev,
|
|
2875
|
+
[runtimeKey]: path
|
|
2876
|
+
}));
|
|
2877
|
+
};
|
|
2556
2878
|
return /* @__PURE__ */ jsxDEV4("div", {
|
|
2557
2879
|
children: [
|
|
2558
2880
|
/* @__PURE__ */ jsxDEV4("div", {
|
|
@@ -2584,7 +2906,12 @@ function StackTraceSection({
|
|
|
2584
2906
|
},
|
|
2585
2907
|
children: [
|
|
2586
2908
|
displayFrames.length === 0 ? /* @__PURE__ */ jsxDEV4("div", {
|
|
2587
|
-
style: {
|
|
2909
|
+
style: {
|
|
2910
|
+
padding: "6px 10px",
|
|
2911
|
+
color: DEVTOOL_COLOR_TEXT_MUTED,
|
|
2912
|
+
fontSize: "10px",
|
|
2913
|
+
fontStyle: "italic"
|
|
2914
|
+
},
|
|
2588
2915
|
children: "no user frames captured"
|
|
2589
2916
|
}, undefined, false, undefined, this) : displayFrames.map((frame, idx) => {
|
|
2590
2917
|
const displayFile = formatFrameFile(frame.file);
|
|
@@ -2596,10 +2923,12 @@ function StackTraceSection({
|
|
|
2596
2923
|
return /* @__PURE__ */ jsxDEV4("div", {
|
|
2597
2924
|
title: titleStr,
|
|
2598
2925
|
style: {
|
|
2926
|
+
position: "relative",
|
|
2599
2927
|
display: "flex",
|
|
2600
2928
|
flexDirection: "row",
|
|
2601
2929
|
gap: "0.5em",
|
|
2602
2930
|
padding: "4px",
|
|
2931
|
+
paddingRight: "22px",
|
|
2603
2932
|
borderBottom: `1px solid ${DEVTOOL_LIST_BASE_BACKGROUND}`
|
|
2604
2933
|
},
|
|
2605
2934
|
children: [
|
|
@@ -2676,7 +3005,12 @@ function StackTraceSection({
|
|
|
2676
3005
|
]
|
|
2677
3006
|
}, undefined, true, undefined, this)
|
|
2678
3007
|
]
|
|
2679
|
-
}, undefined, true, undefined, this)
|
|
3008
|
+
}, undefined, true, undefined, this),
|
|
3009
|
+
/* @__PURE__ */ jsxDEV4(OpenInVscodeButton, {
|
|
3010
|
+
frame,
|
|
3011
|
+
projectRoot,
|
|
3012
|
+
onNeedSetup: () => setShowSetupModal(true)
|
|
3013
|
+
}, undefined, false, undefined, this)
|
|
2680
3014
|
]
|
|
2681
3015
|
}, frame.raw, true, undefined, this);
|
|
2682
3016
|
}),
|
|
@@ -2711,18 +3045,27 @@ function StackTraceSection({
|
|
|
2711
3045
|
]
|
|
2712
3046
|
}, `phantom-${i}`, true, undefined, this))
|
|
2713
3047
|
]
|
|
2714
|
-
}, undefined, true, undefined, this)
|
|
3048
|
+
}, undefined, true, undefined, this),
|
|
3049
|
+
showSetupModal && /* @__PURE__ */ jsxDEV4(ProjectRootSetupModal, {
|
|
3050
|
+
envId: runtime.envId,
|
|
3051
|
+
currentValue: projectRoot ?? "",
|
|
3052
|
+
onSave: handleSaveProjectRoot,
|
|
3053
|
+
onCancel: () => setShowSetupModal(false)
|
|
3054
|
+
}, undefined, false, undefined, this)
|
|
2715
3055
|
]
|
|
2716
3056
|
}, undefined, true, undefined, this);
|
|
2717
3057
|
}
|
|
2718
3058
|
|
|
2719
3059
|
// src/devtools/browser/components/ActionErrorDisplay.tsx
|
|
2720
3060
|
import { jsxDEV as jsxDEV5, Fragment } from "react/jsx-dev-runtime";
|
|
3061
|
+
var MONO3 = "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace";
|
|
3062
|
+
var SANS2 = "ui-sans-serif, system-ui, -apple-system, sans-serif";
|
|
2721
3063
|
function FullErrorContent({
|
|
2722
3064
|
label,
|
|
2723
3065
|
error,
|
|
2724
3066
|
errorStack,
|
|
2725
|
-
color
|
|
3067
|
+
color,
|
|
3068
|
+
runtime
|
|
2726
3069
|
}) {
|
|
2727
3070
|
return /* @__PURE__ */ jsxDEV5(Fragment, {
|
|
2728
3071
|
children: [
|
|
@@ -2736,6 +3079,7 @@ function FullErrorContent({
|
|
|
2736
3079
|
color
|
|
2737
3080
|
}, undefined, false, undefined, this),
|
|
2738
3081
|
/* @__PURE__ */ jsxDEV5(StackTraceSection, {
|
|
3082
|
+
runtime,
|
|
2739
3083
|
label: "Error Stack",
|
|
2740
3084
|
stack: errorStack,
|
|
2741
3085
|
color
|
|
@@ -2743,11 +3087,67 @@ function FullErrorContent({
|
|
|
2743
3087
|
]
|
|
2744
3088
|
}, undefined, true, undefined, this);
|
|
2745
3089
|
}
|
|
2746
|
-
function
|
|
3090
|
+
function CompactErrorContent({ value, color }) {
|
|
3091
|
+
if (isNiceErrorJson(value)) {
|
|
3092
|
+
return /* @__PURE__ */ jsxDEV5("div", {
|
|
3093
|
+
style: { display: "flex", flexDirection: "column", gap: "1em" },
|
|
3094
|
+
children: [
|
|
3095
|
+
/* @__PURE__ */ jsxDEV5("div", {
|
|
3096
|
+
style: {
|
|
3097
|
+
color,
|
|
3098
|
+
fontFamily: SANS2,
|
|
3099
|
+
fontSize: "12px",
|
|
3100
|
+
fontWeight: 600,
|
|
3101
|
+
lineHeight: "1.4",
|
|
3102
|
+
wordBreak: "break-word",
|
|
3103
|
+
textAlign: "left"
|
|
3104
|
+
},
|
|
3105
|
+
children: value.message
|
|
3106
|
+
}, undefined, false, undefined, this),
|
|
3107
|
+
/* @__PURE__ */ jsxDEV5("div", {
|
|
3108
|
+
style: { display: "flex", flexWrap: "wrap", gap: "6px", alignItems: "center" },
|
|
3109
|
+
children: [
|
|
3110
|
+
value.ids.map((id) => /* @__PURE__ */ jsxDEV5("span", {
|
|
3111
|
+
style: { color, fontFamily: MONO3, fontSize: "10px", opacity: 0.8 },
|
|
3112
|
+
children: id
|
|
3113
|
+
}, id, false, undefined, this)),
|
|
3114
|
+
/* @__PURE__ */ jsxDEV5("span", {
|
|
3115
|
+
style: { color: DEVTOOL_COLOR_TEXT_MUTED, fontFamily: MONO3, fontSize: "10px" },
|
|
3116
|
+
children: value.def.domain
|
|
3117
|
+
}, undefined, false, undefined, this)
|
|
3118
|
+
]
|
|
3119
|
+
}, undefined, true, undefined, this)
|
|
3120
|
+
]
|
|
3121
|
+
}, undefined, true, undefined, this);
|
|
3122
|
+
}
|
|
3123
|
+
const text = typeof value === "string" ? value : value != null ? String(value) : null;
|
|
3124
|
+
if (text == null)
|
|
3125
|
+
return null;
|
|
3126
|
+
return /* @__PURE__ */ jsxDEV5("div", {
|
|
3127
|
+
style: {
|
|
3128
|
+
color,
|
|
3129
|
+
fontFamily: SANS2,
|
|
3130
|
+
fontSize: "12px",
|
|
3131
|
+
lineHeight: "1.4",
|
|
3132
|
+
wordBreak: "break-word"
|
|
3133
|
+
},
|
|
3134
|
+
children: text
|
|
3135
|
+
}, undefined, false, undefined, this);
|
|
3136
|
+
}
|
|
3137
|
+
function ActionErrorDisplay({
|
|
3138
|
+
entry,
|
|
3139
|
+
compact
|
|
3140
|
+
}) {
|
|
2747
3141
|
const { status, error, abortReason, errorStack } = entry;
|
|
2748
3142
|
if (status === "action-error") {
|
|
2749
|
-
const color =
|
|
3143
|
+
const color = DEVTOOL_COLOR_SEMANTIC_ERROR;
|
|
3144
|
+
if (compact)
|
|
3145
|
+
return /* @__PURE__ */ jsxDEV5(CompactErrorContent, {
|
|
3146
|
+
value: error,
|
|
3147
|
+
color
|
|
3148
|
+
}, undefined, false, undefined, this);
|
|
2750
3149
|
return /* @__PURE__ */ jsxDEV5(FullErrorContent, {
|
|
3150
|
+
runtime: entry.meta.originClient,
|
|
2751
3151
|
label: "Action Error",
|
|
2752
3152
|
error,
|
|
2753
3153
|
errorStack,
|
|
@@ -2756,7 +3156,13 @@ function ActionErrorDisplay({ entry }) {
|
|
|
2756
3156
|
}
|
|
2757
3157
|
if (status === "failed") {
|
|
2758
3158
|
const color = DEVTOOL_COLOR_SEMANTIC_ERROR;
|
|
3159
|
+
if (compact)
|
|
3160
|
+
return /* @__PURE__ */ jsxDEV5(CompactErrorContent, {
|
|
3161
|
+
value: error,
|
|
3162
|
+
color
|
|
3163
|
+
}, undefined, false, undefined, this);
|
|
2759
3164
|
return /* @__PURE__ */ jsxDEV5(FullErrorContent, {
|
|
3165
|
+
runtime: entry.meta.originClient,
|
|
2760
3166
|
label: "Error",
|
|
2761
3167
|
error,
|
|
2762
3168
|
errorStack,
|
|
@@ -2765,6 +3171,11 @@ function ActionErrorDisplay({ entry }) {
|
|
|
2765
3171
|
}
|
|
2766
3172
|
if (status === "aborted") {
|
|
2767
3173
|
const color = DEVTOOL_COLOR_SEMANTIC_METADATA;
|
|
3174
|
+
if (compact)
|
|
3175
|
+
return /* @__PURE__ */ jsxDEV5(CompactErrorContent, {
|
|
3176
|
+
value: abortReason,
|
|
3177
|
+
color
|
|
3178
|
+
}, undefined, false, undefined, this);
|
|
2768
3179
|
return /* @__PURE__ */ jsxDEV5(Fragment, {
|
|
2769
3180
|
children: [
|
|
2770
3181
|
abortReason != null && (isNiceErrorJson(abortReason) ? /* @__PURE__ */ jsxDEV5(NiceErrorDisplay, {
|
|
@@ -2777,6 +3188,7 @@ function ActionErrorDisplay({ entry }) {
|
|
|
2777
3188
|
color
|
|
2778
3189
|
}, undefined, false, undefined, this)),
|
|
2779
3190
|
/* @__PURE__ */ jsxDEV5(StackTraceSection, {
|
|
3191
|
+
runtime: entry.meta.originClient,
|
|
2780
3192
|
label: "Abort Stack",
|
|
2781
3193
|
stack: errorStack,
|
|
2782
3194
|
color
|
|
@@ -2787,6 +3199,9 @@ function ActionErrorDisplay({ entry }) {
|
|
|
2787
3199
|
return null;
|
|
2788
3200
|
}
|
|
2789
3201
|
|
|
3202
|
+
// src/devtools/browser/components/DomainChip.tsx
|
|
3203
|
+
import { Component } from "lucide-react";
|
|
3204
|
+
|
|
2790
3205
|
// src/devtools/browser/components/Chip.tsx
|
|
2791
3206
|
import { useState as useState3 } from "react";
|
|
2792
3207
|
|
|
@@ -2916,13 +3331,64 @@ function Chip({
|
|
|
2916
3331
|
}, undefined, true, undefined, this);
|
|
2917
3332
|
}
|
|
2918
3333
|
|
|
2919
|
-
// src/devtools/browser/components/
|
|
3334
|
+
// src/devtools/browser/components/Icon.tsx
|
|
3335
|
+
import { useState as useState4 } from "react";
|
|
2920
3336
|
import { jsxDEV as jsxDEV8, Fragment as Fragment3 } from "react/jsx-dev-runtime";
|
|
2921
|
-
|
|
3337
|
+
var ICON_SIZE_PX = {
|
|
3338
|
+
["sm" /* sm */]: 13,
|
|
3339
|
+
["md" /* md */]: 16,
|
|
3340
|
+
["lg" /* lg */]: 18
|
|
3341
|
+
};
|
|
3342
|
+
function Icon({
|
|
3343
|
+
icon: IconComponent,
|
|
3344
|
+
color,
|
|
3345
|
+
size = "md" /* md */,
|
|
3346
|
+
subtle = false,
|
|
3347
|
+
tooltip,
|
|
3348
|
+
style
|
|
3349
|
+
}) {
|
|
3350
|
+
const [anchor, setAnchor] = useState4(null);
|
|
3351
|
+
const hasTooltip = tooltip != null;
|
|
3352
|
+
const colorEntry = SEMANTIC_COLORS[color];
|
|
3353
|
+
const resolvedColor = subtle ? colorEntry.subtle?.color ?? colorEntry.color : colorEntry.color;
|
|
2922
3354
|
return /* @__PURE__ */ jsxDEV8(Fragment3, {
|
|
3355
|
+
children: [
|
|
3356
|
+
/* @__PURE__ */ jsxDEV8("div", {
|
|
3357
|
+
onMouseEnter: hasTooltip ? (e) => setAnchor(e.currentTarget.getBoundingClientRect()) : undefined,
|
|
3358
|
+
onMouseLeave: hasTooltip ? () => setAnchor(null) : undefined,
|
|
3359
|
+
style: {
|
|
3360
|
+
borderRadius: "0.4em",
|
|
3361
|
+
height: `${1.65 * getSizeValue(size)}em`,
|
|
3362
|
+
width: `${1.65 * getSizeValue(size)}em`,
|
|
3363
|
+
display: "flex",
|
|
3364
|
+
alignItems: "center",
|
|
3365
|
+
justifyContent: "center",
|
|
3366
|
+
background: "rgba(0,0,0,0.4)",
|
|
3367
|
+
color: resolvedColor,
|
|
3368
|
+
flexShrink: 0,
|
|
3369
|
+
cursor: hasTooltip ? "default" : undefined,
|
|
3370
|
+
...style
|
|
3371
|
+
},
|
|
3372
|
+
children: /* @__PURE__ */ jsxDEV8(IconComponent, {
|
|
3373
|
+
size: ICON_SIZE_PX[size],
|
|
3374
|
+
strokeWidth: 1.5
|
|
3375
|
+
}, undefined, false, undefined, this)
|
|
3376
|
+
}, undefined, false, undefined, this),
|
|
3377
|
+
anchor != null && hasTooltip && /* @__PURE__ */ jsxDEV8(Tooltip, {
|
|
3378
|
+
anchor,
|
|
3379
|
+
config: tooltip
|
|
3380
|
+
}, undefined, false, undefined, this)
|
|
3381
|
+
]
|
|
3382
|
+
}, undefined, true, undefined, this);
|
|
3383
|
+
}
|
|
3384
|
+
|
|
3385
|
+
// src/devtools/browser/components/DomainChip.tsx
|
|
3386
|
+
import { jsxDEV as jsxDEV9, Fragment as Fragment4 } from "react/jsx-dev-runtime";
|
|
3387
|
+
function DomainHierarchyContent({ allDomains }) {
|
|
3388
|
+
return /* @__PURE__ */ jsxDEV9(Fragment4, {
|
|
2923
3389
|
children: allDomains.map((d, i) => {
|
|
2924
3390
|
const isCurrent = i === allDomains.length - 1;
|
|
2925
|
-
return /* @__PURE__ */
|
|
3391
|
+
return /* @__PURE__ */ jsxDEV9("div", {
|
|
2926
3392
|
style: {
|
|
2927
3393
|
display: "flex",
|
|
2928
3394
|
alignItems: "center",
|
|
@@ -2931,7 +3397,7 @@ function DomainHierarchyContent({ allDomains }) {
|
|
|
2931
3397
|
paddingTop: i > 0 ? "0.1rem" : undefined
|
|
2932
3398
|
},
|
|
2933
3399
|
children: [
|
|
2934
|
-
/* @__PURE__ */
|
|
3400
|
+
/* @__PURE__ */ jsxDEV9("span", {
|
|
2935
3401
|
style: {
|
|
2936
3402
|
fontSize: "0.8rem",
|
|
2937
3403
|
height: "0.6em",
|
|
@@ -2944,7 +3410,7 @@ function DomainHierarchyContent({ allDomains }) {
|
|
|
2944
3410
|
},
|
|
2945
3411
|
children: "⬢"
|
|
2946
3412
|
}, undefined, false, undefined, this),
|
|
2947
|
-
/* @__PURE__ */
|
|
3413
|
+
/* @__PURE__ */ jsxDEV9("span", {
|
|
2948
3414
|
style: {
|
|
2949
3415
|
color: isCurrent ? DEVTOOL_COLOR_SEMANTIC_SYSTEM : "#4b5563",
|
|
2950
3416
|
fontSize: "0.7rem",
|
|
@@ -2958,18 +3424,32 @@ function DomainHierarchyContent({ allDomains }) {
|
|
|
2958
3424
|
}, undefined, false, undefined, this);
|
|
2959
3425
|
}
|
|
2960
3426
|
function DomainChip({
|
|
3427
|
+
compact = false,
|
|
2961
3428
|
subtle = false,
|
|
2962
3429
|
domain,
|
|
2963
3430
|
allDomains,
|
|
2964
3431
|
size
|
|
2965
3432
|
}) {
|
|
2966
|
-
|
|
3433
|
+
if (compact) {
|
|
3434
|
+
return /* @__PURE__ */ jsxDEV9(Icon, {
|
|
3435
|
+
icon: Component,
|
|
3436
|
+
color: "domain" /* domain */,
|
|
3437
|
+
tooltip: {
|
|
3438
|
+
content: /* @__PURE__ */ jsxDEV9(DomainHierarchyContent, {
|
|
3439
|
+
allDomains
|
|
3440
|
+
}, undefined, false, undefined, this),
|
|
3441
|
+
title: "Action Domain",
|
|
3442
|
+
align: "edge"
|
|
3443
|
+
}
|
|
3444
|
+
}, undefined, false, undefined, this);
|
|
3445
|
+
}
|
|
3446
|
+
return /* @__PURE__ */ jsxDEV9(Chip, {
|
|
2967
3447
|
color: "domain" /* domain */,
|
|
2968
3448
|
subtle,
|
|
2969
3449
|
size,
|
|
2970
3450
|
rounded: true,
|
|
2971
3451
|
tooltip: {
|
|
2972
|
-
content: /* @__PURE__ */
|
|
3452
|
+
content: /* @__PURE__ */ jsxDEV9(DomainHierarchyContent, {
|
|
2973
3453
|
allDomains
|
|
2974
3454
|
}, undefined, false, undefined, this),
|
|
2975
3455
|
title: "Action Domain",
|
|
@@ -2977,17 +3457,20 @@ function DomainChip({
|
|
|
2977
3457
|
},
|
|
2978
3458
|
style: { display: "flex", alignItems: "center", gap: "0.4em" },
|
|
2979
3459
|
children: [
|
|
2980
|
-
/* @__PURE__ */
|
|
3460
|
+
/* @__PURE__ */ jsxDEV9("span", {
|
|
2981
3461
|
style: {
|
|
2982
|
-
height: "
|
|
2983
|
-
width: "
|
|
3462
|
+
height: "1.2em",
|
|
3463
|
+
width: "1.2em",
|
|
2984
3464
|
display: "flex",
|
|
2985
3465
|
alignItems: "center",
|
|
2986
3466
|
justifyContent: "center"
|
|
2987
3467
|
},
|
|
2988
|
-
children:
|
|
3468
|
+
children: /* @__PURE__ */ jsxDEV9(Component, {
|
|
3469
|
+
height: "1.2em",
|
|
3470
|
+
width: "1.2em"
|
|
3471
|
+
}, undefined, false, undefined, this)
|
|
2989
3472
|
}, undefined, false, undefined, this),
|
|
2990
|
-
/* @__PURE__ */
|
|
3473
|
+
/* @__PURE__ */ jsxDEV9("span", {
|
|
2991
3474
|
children: domain
|
|
2992
3475
|
}, undefined, false, undefined, this)
|
|
2993
3476
|
]
|
|
@@ -2995,27 +3478,29 @@ function DomainChip({
|
|
|
2995
3478
|
}
|
|
2996
3479
|
|
|
2997
3480
|
// src/devtools/browser/components/HandlerChips.tsx
|
|
2998
|
-
import { jsxDEV as
|
|
3481
|
+
import { jsxDEV as jsxDEV10, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
|
2999
3482
|
function getExternalLabel(hop) {
|
|
3000
3483
|
if (hop.handlerType !== "external")
|
|
3001
3484
|
return null;
|
|
3002
3485
|
return hop.handlerClient != null ? `${hop.transport ?? "ext"} → ${hop.handlerClient.envId}` : `→ ${hop.transport ?? "ext"}`;
|
|
3003
3486
|
}
|
|
3004
|
-
function HandlerChips({ entry, size }) {
|
|
3487
|
+
function HandlerChips({ entry, size, subtle }) {
|
|
3005
3488
|
const firstHop = entry.meta.routing[0];
|
|
3006
3489
|
const localEnvId = firstHop != null ? firstHop.runtime.envId : null;
|
|
3007
3490
|
const externalLabel = firstHop != null ? getExternalLabel(firstHop) : null;
|
|
3008
3491
|
const firstHopIsLocal = firstHop != null && firstHop.handlerType === "local";
|
|
3009
|
-
return /* @__PURE__ */
|
|
3492
|
+
return /* @__PURE__ */ jsxDEV10(Fragment5, {
|
|
3010
3493
|
children: [
|
|
3011
|
-
localEnvId != null && (firstHopIsLocal || externalLabel == null) && /* @__PURE__ */
|
|
3494
|
+
localEnvId != null && (firstHopIsLocal || externalLabel == null) && /* @__PURE__ */ jsxDEV10(Chip, {
|
|
3012
3495
|
color: "handler_local" /* handler_local */,
|
|
3013
3496
|
size,
|
|
3497
|
+
subtle,
|
|
3014
3498
|
children: localEnvId
|
|
3015
3499
|
}, undefined, false, undefined, this),
|
|
3016
|
-
externalLabel != null && /* @__PURE__ */
|
|
3500
|
+
externalLabel != null && /* @__PURE__ */ jsxDEV10(Chip, {
|
|
3017
3501
|
color: "handler_external" /* handler_external */,
|
|
3018
3502
|
size,
|
|
3503
|
+
subtle,
|
|
3019
3504
|
children: externalLabel
|
|
3020
3505
|
}, undefined, false, undefined, this)
|
|
3021
3506
|
]
|
|
@@ -3023,15 +3508,15 @@ function HandlerChips({ entry, size }) {
|
|
|
3023
3508
|
}
|
|
3024
3509
|
|
|
3025
3510
|
// src/devtools/browser/components/RunningTimer.tsx
|
|
3026
|
-
import { useEffect as useEffect2, useState as
|
|
3027
|
-
import { jsxDEV as
|
|
3511
|
+
import { useEffect as useEffect2, useState as useState5 } from "react";
|
|
3512
|
+
import { jsxDEV as jsxDEV11, Fragment as Fragment6 } from "react/jsx-dev-runtime";
|
|
3028
3513
|
function RunningTimer({ startTime }) {
|
|
3029
|
-
const [elapsed, setElapsed] =
|
|
3514
|
+
const [elapsed, setElapsed] = useState5(() => Date.now() - startTime);
|
|
3030
3515
|
useEffect2(() => {
|
|
3031
3516
|
const interval = setInterval(() => setElapsed(Date.now() - startTime), 100);
|
|
3032
3517
|
return () => clearInterval(interval);
|
|
3033
3518
|
}, [startTime]);
|
|
3034
|
-
return /* @__PURE__ */
|
|
3519
|
+
return /* @__PURE__ */ jsxDEV11(Fragment6, {
|
|
3035
3520
|
children: [
|
|
3036
3521
|
elapsed,
|
|
3037
3522
|
"ms"
|
|
@@ -3040,15 +3525,15 @@ function RunningTimer({ startTime }) {
|
|
|
3040
3525
|
}
|
|
3041
3526
|
function DurationDisplay({ entry }) {
|
|
3042
3527
|
const d = formatDuration(entry);
|
|
3043
|
-
return /* @__PURE__ */
|
|
3044
|
-
children: d ?? /* @__PURE__ */
|
|
3528
|
+
return /* @__PURE__ */ jsxDEV11(Fragment6, {
|
|
3529
|
+
children: d ?? /* @__PURE__ */ jsxDEV11(RunningTimer, {
|
|
3045
3530
|
startTime: entry.startTime
|
|
3046
3531
|
}, undefined, false, undefined, this)
|
|
3047
3532
|
}, undefined, false, undefined, this);
|
|
3048
3533
|
}
|
|
3049
3534
|
|
|
3050
3535
|
// src/devtools/browser/components/CallStackSection.tsx
|
|
3051
|
-
import { jsxDEV as
|
|
3536
|
+
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
|
3052
3537
|
function getCalledLabel(entry) {
|
|
3053
3538
|
const firstHop = entry.meta.routing[0];
|
|
3054
3539
|
if (firstHop == null)
|
|
@@ -3076,7 +3561,7 @@ function CallStackLink({
|
|
|
3076
3561
|
const symbol = STATUS_SYMBOL[entry.status];
|
|
3077
3562
|
const labelColor = entryRole === "caller" ? DEVTOOL_COLOR_TEXT_SECONDARY : getCalledColor(entry);
|
|
3078
3563
|
const label = entryRole === "caller" ? "↑ from" : getCalledLabel(entry);
|
|
3079
|
-
return /* @__PURE__ */
|
|
3564
|
+
return /* @__PURE__ */ jsxDEV12("div", {
|
|
3080
3565
|
onClick,
|
|
3081
3566
|
style: {
|
|
3082
3567
|
background: isFocused ? DEVTOOL_SECTION_BACKGROUND : DEVTOOL_DETAIL_HEADER_BACKGROUND,
|
|
@@ -3090,21 +3575,21 @@ function CallStackLink({
|
|
|
3090
3575
|
cursor: "pointer"
|
|
3091
3576
|
},
|
|
3092
3577
|
children: [
|
|
3093
|
-
/* @__PURE__ */
|
|
3578
|
+
/* @__PURE__ */ jsxDEV12("span", {
|
|
3094
3579
|
style: { display: "flex", alignItems: "center", gap: "1em", flexShrink: 0 },
|
|
3095
3580
|
children: [
|
|
3096
|
-
/* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ jsxDEV12("span", {
|
|
3097
3582
|
style: { color, fontSize: "10px", flexShrink: 0 },
|
|
3098
3583
|
children: symbol
|
|
3099
3584
|
}, undefined, false, undefined, this),
|
|
3100
|
-
/* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ jsxDEV12("span", {
|
|
3101
3586
|
style: { color: labelColor, fontSize: "9px", flexShrink: 0 },
|
|
3102
3587
|
children: label
|
|
3103
3588
|
}, undefined, false, undefined, this),
|
|
3104
|
-
/* @__PURE__ */
|
|
3589
|
+
/* @__PURE__ */ jsxDEV12("span", {
|
|
3105
3590
|
style: { display: "flex", alignItems: "center", gap: "5px" },
|
|
3106
3591
|
children: [
|
|
3107
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ jsxDEV12("span", {
|
|
3108
3593
|
style: {
|
|
3109
3594
|
color: DEVTOOL_COLOR_TEXT_SECONDARY,
|
|
3110
3595
|
fontSize: "11px",
|
|
@@ -3114,7 +3599,7 @@ function CallStackLink({
|
|
|
3114
3599
|
},
|
|
3115
3600
|
children: entry.actionId
|
|
3116
3601
|
}, undefined, false, undefined, this),
|
|
3117
|
-
/* @__PURE__ */
|
|
3602
|
+
/* @__PURE__ */ jsxDEV12(DomainChip, {
|
|
3118
3603
|
domain: entry.domain,
|
|
3119
3604
|
allDomains: entry.allDomains,
|
|
3120
3605
|
size: "sm" /* sm */
|
|
@@ -3123,14 +3608,14 @@ function CallStackLink({
|
|
|
3123
3608
|
}, undefined, true, undefined, this)
|
|
3124
3609
|
]
|
|
3125
3610
|
}, undefined, true, undefined, this),
|
|
3126
|
-
/* @__PURE__ */
|
|
3611
|
+
/* @__PURE__ */ jsxDEV12("span", {
|
|
3127
3612
|
style: {
|
|
3128
3613
|
color: DEVTOOL_COLOR_TEXT_FAINT,
|
|
3129
3614
|
fontSize: "10px",
|
|
3130
3615
|
textAlign: "right",
|
|
3131
3616
|
whiteSpace: "nowrap"
|
|
3132
3617
|
},
|
|
3133
|
-
children: /* @__PURE__ */
|
|
3618
|
+
children: /* @__PURE__ */ jsxDEV12(DurationDisplay, {
|
|
3134
3619
|
entry
|
|
3135
3620
|
}, undefined, false, undefined, this)
|
|
3136
3621
|
}, undefined, false, undefined, this)
|
|
@@ -3146,15 +3631,15 @@ function CallStackSection({
|
|
|
3146
3631
|
}) {
|
|
3147
3632
|
if (parent == null && childEntries.length === 0)
|
|
3148
3633
|
return null;
|
|
3149
|
-
return /* @__PURE__ */
|
|
3634
|
+
return /* @__PURE__ */ jsxDEV12("div", {
|
|
3150
3635
|
children: [
|
|
3151
|
-
parent != null && /* @__PURE__ */
|
|
3636
|
+
parent != null && /* @__PURE__ */ jsxDEV12(CallStackLink, {
|
|
3152
3637
|
entry: parent,
|
|
3153
3638
|
entryRole: "caller",
|
|
3154
3639
|
isFocused: false,
|
|
3155
3640
|
onClick: () => onSelectParent(parent.cuid)
|
|
3156
3641
|
}, undefined, false, undefined, this),
|
|
3157
|
-
childEntries.map((child) => /* @__PURE__ */
|
|
3642
|
+
childEntries.map((child) => /* @__PURE__ */ jsxDEV12(CallStackLink, {
|
|
3158
3643
|
entry: child,
|
|
3159
3644
|
entryRole: "called",
|
|
3160
3645
|
isFocused: focusedChildCuid === child.cuid,
|
|
@@ -3165,7 +3650,7 @@ function CallStackSection({
|
|
|
3165
3650
|
}
|
|
3166
3651
|
|
|
3167
3652
|
// src/devtools/browser/components/ChildDispatchChips.tsx
|
|
3168
|
-
import { jsxDEV as
|
|
3653
|
+
import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
|
|
3169
3654
|
function ChildDispatchChips({
|
|
3170
3655
|
childRouteItems,
|
|
3171
3656
|
size = "sm" /* sm */
|
|
@@ -3185,12 +3670,12 @@ function ChildDispatchChips({
|
|
|
3185
3670
|
group.transports.push(transport);
|
|
3186
3671
|
}
|
|
3187
3672
|
}
|
|
3188
|
-
return /* @__PURE__ */
|
|
3673
|
+
return /* @__PURE__ */ jsxDEV13("div", {
|
|
3189
3674
|
style: { display: "flex", alignItems: "center", gap: "4px", flexWrap: "wrap" },
|
|
3190
3675
|
children: Array.from(groups.values()).map((group) => {
|
|
3191
3676
|
const transportStr = group.transports.length > 0 ? group.transports.join(", ") : "ext";
|
|
3192
3677
|
const label = group.hasClient ? `${transportStr} → ${group.runtimeId}` : `→ ${transportStr}`;
|
|
3193
|
-
return /* @__PURE__ */
|
|
3678
|
+
return /* @__PURE__ */ jsxDEV13(Chip, {
|
|
3194
3679
|
color: "handler_external" /* handler_external */,
|
|
3195
3680
|
size,
|
|
3196
3681
|
children: label
|
|
@@ -3200,20 +3685,20 @@ function ChildDispatchChips({
|
|
|
3200
3685
|
}
|
|
3201
3686
|
|
|
3202
3687
|
// src/devtools/browser/components/MetaSection.tsx
|
|
3203
|
-
import { useState as
|
|
3204
|
-
import { jsxDEV as
|
|
3688
|
+
import { useState as useState6 } from "react";
|
|
3689
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
|
3205
3690
|
function MetaChip({ label, value }) {
|
|
3206
|
-
return /* @__PURE__ */
|
|
3691
|
+
return /* @__PURE__ */ jsxDEV14("span", {
|
|
3207
3692
|
style: { whiteSpace: "nowrap" },
|
|
3208
3693
|
children: [
|
|
3209
|
-
/* @__PURE__ */
|
|
3694
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
3210
3695
|
style: { color: DEVTOOL_COLOR_TEXT_MUTED },
|
|
3211
3696
|
children: [
|
|
3212
3697
|
label,
|
|
3213
3698
|
" "
|
|
3214
3699
|
]
|
|
3215
3700
|
}, undefined, true, undefined, this),
|
|
3216
|
-
/* @__PURE__ */
|
|
3701
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
3217
3702
|
style: { color: DEVTOOL_COLOR_TEXT_SECONDARY },
|
|
3218
3703
|
children: value
|
|
3219
3704
|
}, undefined, false, undefined, this)
|
|
@@ -3221,7 +3706,7 @@ function MetaChip({ label, value }) {
|
|
|
3221
3706
|
}, undefined, true, undefined, this);
|
|
3222
3707
|
}
|
|
3223
3708
|
function MetaSection({ entry }) {
|
|
3224
|
-
const [expanded, setExpanded] =
|
|
3709
|
+
const [expanded, setExpanded] = useState6(false);
|
|
3225
3710
|
const { meta, cuid } = entry;
|
|
3226
3711
|
const expandedRows = [
|
|
3227
3712
|
{ label: "cuid", value: cuid },
|
|
@@ -3229,9 +3714,9 @@ function MetaSection({ entry }) {
|
|
|
3229
3714
|
...meta.originClient.perId != null ? [{ label: "perId", value: meta.originClient.perId }] : [],
|
|
3230
3715
|
...meta.originClient.insId != null ? [{ label: "insId", value: meta.originClient.insId }] : []
|
|
3231
3716
|
];
|
|
3232
|
-
return /* @__PURE__ */
|
|
3717
|
+
return /* @__PURE__ */ jsxDEV14("div", {
|
|
3233
3718
|
children: [
|
|
3234
|
-
/* @__PURE__ */
|
|
3719
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
3235
3720
|
style: {
|
|
3236
3721
|
display: "flex",
|
|
3237
3722
|
alignItems: "center",
|
|
@@ -3239,7 +3724,7 @@ function MetaSection({ entry }) {
|
|
|
3239
3724
|
marginBottom: "3px"
|
|
3240
3725
|
},
|
|
3241
3726
|
children: [
|
|
3242
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
3243
3728
|
style: {
|
|
3244
3729
|
color: DEVTOOL_COLOR_SEMANTIC_SYSTEM,
|
|
3245
3730
|
fontSize: "10px",
|
|
@@ -3248,13 +3733,13 @@ function MetaSection({ entry }) {
|
|
|
3248
3733
|
},
|
|
3249
3734
|
children: "Meta"
|
|
3250
3735
|
}, undefined, false, undefined, this),
|
|
3251
|
-
/* @__PURE__ */
|
|
3736
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
3252
3737
|
style: { color: DEVTOOL_COLOR_TEXT_FAINT, fontSize: "11px" },
|
|
3253
3738
|
children: expanded ? "▾" : "▸"
|
|
3254
3739
|
}, undefined, false, undefined, this)
|
|
3255
3740
|
]
|
|
3256
3741
|
}, undefined, true, undefined, this),
|
|
3257
|
-
expanded ? /* @__PURE__ */
|
|
3742
|
+
expanded ? /* @__PURE__ */ jsxDEV14("div", {
|
|
3258
3743
|
onClick: () => setExpanded(false),
|
|
3259
3744
|
style: {
|
|
3260
3745
|
background: DEVTOOL_SECTION_BACKGROUND,
|
|
@@ -3262,7 +3747,7 @@ function MetaSection({ entry }) {
|
|
|
3262
3747
|
overflow: "hidden",
|
|
3263
3748
|
cursor: "pointer"
|
|
3264
3749
|
},
|
|
3265
|
-
children: expandedRows.map(({ label, value }, i) => /* @__PURE__ */
|
|
3750
|
+
children: expandedRows.map(({ label, value }, i) => /* @__PURE__ */ jsxDEV14("div", {
|
|
3266
3751
|
style: {
|
|
3267
3752
|
display: "grid",
|
|
3268
3753
|
gridTemplateColumns: "52px 1fr",
|
|
@@ -3272,11 +3757,11 @@ function MetaSection({ entry }) {
|
|
|
3272
3757
|
alignItems: "start"
|
|
3273
3758
|
},
|
|
3274
3759
|
children: [
|
|
3275
|
-
/* @__PURE__ */
|
|
3760
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
3276
3761
|
style: { textAlign: "left", color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px", paddingTop: "1px" },
|
|
3277
3762
|
children: label
|
|
3278
3763
|
}, undefined, false, undefined, this),
|
|
3279
|
-
/* @__PURE__ */
|
|
3764
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
3280
3765
|
style: {
|
|
3281
3766
|
textAlign: "left",
|
|
3282
3767
|
color: DEVTOOL_COLOR_TEXT_SECONDARY,
|
|
@@ -3287,7 +3772,7 @@ function MetaSection({ entry }) {
|
|
|
3287
3772
|
}, undefined, false, undefined, this)
|
|
3288
3773
|
]
|
|
3289
3774
|
}, label, true, undefined, this))
|
|
3290
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
3775
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV14("div", {
|
|
3291
3776
|
onClick: () => setExpanded(true),
|
|
3292
3777
|
style: {
|
|
3293
3778
|
background: DEVTOOL_SECTION_BACKGROUND,
|
|
@@ -3301,19 +3786,19 @@ function MetaSection({ entry }) {
|
|
|
3301
3786
|
cursor: "pointer"
|
|
3302
3787
|
},
|
|
3303
3788
|
children: [
|
|
3304
|
-
/* @__PURE__ */
|
|
3789
|
+
/* @__PURE__ */ jsxDEV14(MetaChip, {
|
|
3305
3790
|
label: "cuid",
|
|
3306
3791
|
value: `…${cuid.slice(-8)}`
|
|
3307
3792
|
}, undefined, false, undefined, this),
|
|
3308
|
-
/* @__PURE__ */
|
|
3793
|
+
/* @__PURE__ */ jsxDEV14(MetaChip, {
|
|
3309
3794
|
label: "runtime",
|
|
3310
3795
|
value: meta.originClient.envId
|
|
3311
3796
|
}, undefined, false, undefined, this),
|
|
3312
|
-
meta.originClient.perId != null && /* @__PURE__ */
|
|
3797
|
+
meta.originClient.perId != null && /* @__PURE__ */ jsxDEV14(MetaChip, {
|
|
3313
3798
|
label: "perId",
|
|
3314
3799
|
value: meta.originClient.perId.length > 10 ? `${meta.originClient.perId.slice(0, 10)}…` : meta.originClient.perId
|
|
3315
3800
|
}, undefined, false, undefined, this),
|
|
3316
|
-
meta.originClient.insId != null && /* @__PURE__ */
|
|
3801
|
+
meta.originClient.insId != null && /* @__PURE__ */ jsxDEV14(MetaChip, {
|
|
3317
3802
|
label: "insId",
|
|
3318
3803
|
value: meta.originClient.insId.length > 10 ? `${meta.originClient.insId.slice(0, 10)}…` : meta.originClient.insId
|
|
3319
3804
|
}, undefined, false, undefined, this)
|
|
@@ -3324,7 +3809,7 @@ function MetaSection({ entry }) {
|
|
|
3324
3809
|
}
|
|
3325
3810
|
|
|
3326
3811
|
// src/devtools/browser/components/RoutingSection.tsx
|
|
3327
|
-
import { jsxDEV as
|
|
3812
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
|
3328
3813
|
function RoutingSection({
|
|
3329
3814
|
entry,
|
|
3330
3815
|
minHopCount = 0
|
|
@@ -3334,12 +3819,12 @@ function RoutingSection({
|
|
|
3334
3819
|
const phantomCount = Math.max(0, minHopCount - hopCount);
|
|
3335
3820
|
if (hopCount === 0 && phantomCount === 0)
|
|
3336
3821
|
return null;
|
|
3337
|
-
return /* @__PURE__ */
|
|
3822
|
+
return /* @__PURE__ */ jsxDEV15("div", {
|
|
3338
3823
|
children: [
|
|
3339
|
-
/* @__PURE__ */
|
|
3824
|
+
/* @__PURE__ */ jsxDEV15(SectionLabel, {
|
|
3340
3825
|
label: hopCount > 0 ? `Routing · ${hopCount} hop${hopCount !== 1 ? "s" : ""}` : "Routing"
|
|
3341
3826
|
}, undefined, false, undefined, this),
|
|
3342
|
-
/* @__PURE__ */
|
|
3827
|
+
/* @__PURE__ */ jsxDEV15("div", {
|
|
3343
3828
|
style: { display: "flex", flexDirection: "column", gap: "2px" },
|
|
3344
3829
|
children: [
|
|
3345
3830
|
meta.routing.map((hop, i) => {
|
|
@@ -3348,7 +3833,7 @@ function RoutingSection({
|
|
|
3348
3833
|
const badgeColor = isLocal ? DEVTOOL_COLOR_SEMANTIC_SUCCESS : DEVTOOL_COLOR_SEMANTIC_WARNING;
|
|
3349
3834
|
const badgeText = isLocal ? "● exec" : `→ ${hop.transport ?? "ext"}`;
|
|
3350
3835
|
const runtimeTitle = [hop.runtime.perId, hop.runtime.insId].filter(Boolean).join(" · ") || undefined;
|
|
3351
|
-
return /* @__PURE__ */
|
|
3836
|
+
return /* @__PURE__ */ jsxDEV15("div", {
|
|
3352
3837
|
style: {
|
|
3353
3838
|
background: DEVTOOL_SECTION_BACKGROUND,
|
|
3354
3839
|
borderRadius: "4px",
|
|
@@ -3361,14 +3846,14 @@ function RoutingSection({
|
|
|
3361
3846
|
padding: "4px 8px"
|
|
3362
3847
|
},
|
|
3363
3848
|
children: [
|
|
3364
|
-
/* @__PURE__ */
|
|
3849
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3365
3850
|
style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "10px" },
|
|
3366
3851
|
children: [
|
|
3367
|
-
/* @__PURE__ */
|
|
3852
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3368
3853
|
style: { color: DEVTOOL_COLOR_TEXT_FAINT, fontSize: "10px", width: "16px", textAlign: "right" },
|
|
3369
3854
|
children: i + 1
|
|
3370
3855
|
}, undefined, false, undefined, this),
|
|
3371
|
-
/* @__PURE__ */
|
|
3856
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3372
3857
|
title: runtimeTitle,
|
|
3373
3858
|
style: {
|
|
3374
3859
|
color: DEVTOOL_COLOR_TEXT_SECONDARY,
|
|
@@ -3382,11 +3867,11 @@ function RoutingSection({
|
|
|
3382
3867
|
}, undefined, false, undefined, this)
|
|
3383
3868
|
]
|
|
3384
3869
|
}, undefined, true, undefined, this),
|
|
3385
|
-
/* @__PURE__ */
|
|
3870
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3386
3871
|
style: { color: badgeColor, fontSize: "10px", whiteSpace: "nowrap" },
|
|
3387
3872
|
children: badgeText
|
|
3388
3873
|
}, undefined, false, undefined, this),
|
|
3389
|
-
/* @__PURE__ */
|
|
3874
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3390
3875
|
style: {
|
|
3391
3876
|
display: "flex",
|
|
3392
3877
|
alignItems: "center",
|
|
@@ -3395,7 +3880,7 @@ function RoutingSection({
|
|
|
3395
3880
|
overflow: "hidden"
|
|
3396
3881
|
},
|
|
3397
3882
|
children: [
|
|
3398
|
-
/* @__PURE__ */
|
|
3883
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3399
3884
|
style: {
|
|
3400
3885
|
color: DEVTOOL_COLOR_TEXT_MUTED,
|
|
3401
3886
|
fontSize: "10px",
|
|
@@ -3405,7 +3890,7 @@ function RoutingSection({
|
|
|
3405
3890
|
},
|
|
3406
3891
|
children: hop.handlerClient != null ? `↳ ${hop.handlerClient.envId}` : ""
|
|
3407
3892
|
}, undefined, false, undefined, this),
|
|
3408
|
-
/* @__PURE__ */
|
|
3893
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3409
3894
|
style: { color: DEVTOOL_COLOR_TEXT_FAINT, fontSize: "10px", flexShrink: 0, marginLeft: "auto" },
|
|
3410
3895
|
children: [
|
|
3411
3896
|
"+",
|
|
@@ -3418,7 +3903,7 @@ function RoutingSection({
|
|
|
3418
3903
|
]
|
|
3419
3904
|
}, `${hop.time}-${hop.runtime.envId}`, true, undefined, this);
|
|
3420
3905
|
}),
|
|
3421
|
-
Array.from({ length: phantomCount }, (_, i) => `routing-phantom-${hopCount + i}`).map((key) => /* @__PURE__ */
|
|
3906
|
+
Array.from({ length: phantomCount }, (_, i) => `routing-phantom-${hopCount + i}`).map((key) => /* @__PURE__ */ jsxDEV15("div", {
|
|
3422
3907
|
"aria-hidden": "true",
|
|
3423
3908
|
style: {
|
|
3424
3909
|
visibility: "hidden",
|
|
@@ -3431,24 +3916,24 @@ function RoutingSection({
|
|
|
3431
3916
|
padding: "4px 8px"
|
|
3432
3917
|
},
|
|
3433
3918
|
children: [
|
|
3434
|
-
/* @__PURE__ */
|
|
3919
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3435
3920
|
style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "10px" },
|
|
3436
3921
|
children: [
|
|
3437
|
-
/* @__PURE__ */
|
|
3922
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3438
3923
|
style: { fontSize: "10px", width: "16px" },
|
|
3439
3924
|
children: "0"
|
|
3440
3925
|
}, undefined, false, undefined, this),
|
|
3441
|
-
/* @__PURE__ */
|
|
3926
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3442
3927
|
style: { fontSize: "11px" },
|
|
3443
3928
|
children: "placeholder"
|
|
3444
3929
|
}, undefined, false, undefined, this)
|
|
3445
3930
|
]
|
|
3446
3931
|
}, undefined, true, undefined, this),
|
|
3447
|
-
/* @__PURE__ */
|
|
3932
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
3448
3933
|
style: { fontSize: "10px" },
|
|
3449
3934
|
children: "placeholder"
|
|
3450
3935
|
}, undefined, false, undefined, this),
|
|
3451
|
-
/* @__PURE__ */
|
|
3936
|
+
/* @__PURE__ */ jsxDEV15("span", {}, undefined, false, undefined, this)
|
|
3452
3937
|
]
|
|
3453
3938
|
}, key, true, undefined, this))
|
|
3454
3939
|
]
|
|
@@ -3458,7 +3943,7 @@ function RoutingSection({
|
|
|
3458
3943
|
}
|
|
3459
3944
|
|
|
3460
3945
|
// src/devtools/browser/components/action_detail/ActionDetailPanel.tsx
|
|
3461
|
-
import { jsxDEV as
|
|
3946
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
|
3462
3947
|
var STATUS_BADGE_LABEL = {
|
|
3463
3948
|
running: "RUNNING",
|
|
3464
3949
|
success: "SUCCESS",
|
|
@@ -3489,7 +3974,7 @@ function DetailHeader({
|
|
|
3489
3974
|
const color = STATUS_COLOR[entry.status];
|
|
3490
3975
|
const StatusIconComponent = STATUS_ICON[entry.status];
|
|
3491
3976
|
const timestamp = formatTimestamp(entry.startTime);
|
|
3492
|
-
return /* @__PURE__ */
|
|
3977
|
+
return /* @__PURE__ */ jsxDEV16("div", {
|
|
3493
3978
|
onClick: !isActive ? onClick : undefined,
|
|
3494
3979
|
style: {
|
|
3495
3980
|
padding: "0.5em 1em",
|
|
@@ -3503,13 +3988,13 @@ function DetailHeader({
|
|
|
3503
3988
|
gap: "1em",
|
|
3504
3989
|
cursor: isActive ? "default" : "pointer"
|
|
3505
3990
|
},
|
|
3506
|
-
children: /* @__PURE__ */
|
|
3991
|
+
children: /* @__PURE__ */ jsxDEV16("div", {
|
|
3507
3992
|
style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "0.5em" },
|
|
3508
3993
|
children: [
|
|
3509
|
-
/* @__PURE__ */
|
|
3994
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3510
3995
|
style: { display: "flex", alignItems: "center", minWidth: 0, gap: "0.5em" },
|
|
3511
3996
|
children: [
|
|
3512
|
-
/* @__PURE__ */
|
|
3997
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3513
3998
|
style: {
|
|
3514
3999
|
color,
|
|
3515
4000
|
flexShrink: 0,
|
|
@@ -3517,12 +4002,12 @@ function DetailHeader({
|
|
|
3517
4002
|
alignItems: "center",
|
|
3518
4003
|
animation: entry.status === "running" ? "__nice-action-pulse 1.2s ease-in-out infinite" : undefined
|
|
3519
4004
|
},
|
|
3520
|
-
children: /* @__PURE__ */
|
|
4005
|
+
children: /* @__PURE__ */ jsxDEV16(StatusIconComponent, {
|
|
3521
4006
|
size: 20,
|
|
3522
4007
|
strokeWidth: 1.75
|
|
3523
4008
|
}, undefined, false, undefined, this)
|
|
3524
4009
|
}, undefined, false, undefined, this),
|
|
3525
|
-
/* @__PURE__ */
|
|
4010
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3526
4011
|
style: {
|
|
3527
4012
|
color: DEVTOOL_COLOR_TEXT_EMPHASIS,
|
|
3528
4013
|
fontSize: "1.2em",
|
|
@@ -3536,7 +4021,7 @@ function DetailHeader({
|
|
|
3536
4021
|
},
|
|
3537
4022
|
children: entry.actionId
|
|
3538
4023
|
}, undefined, false, undefined, this),
|
|
3539
|
-
/* @__PURE__ */
|
|
4024
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3540
4025
|
style: {
|
|
3541
4026
|
flexShrink: 0,
|
|
3542
4027
|
padding: "2px 9px",
|
|
@@ -3551,14 +4036,14 @@ function DetailHeader({
|
|
|
3551
4036
|
},
|
|
3552
4037
|
children: STATUS_BADGE_LABEL[entry.status]
|
|
3553
4038
|
}, undefined, false, undefined, this),
|
|
3554
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ jsxDEV16(DomainChip, {
|
|
3555
4040
|
domain: entry.domain,
|
|
3556
4041
|
allDomains: entry.allDomains,
|
|
3557
4042
|
size: "md" /* md */
|
|
3558
4043
|
}, undefined, false, undefined, this)
|
|
3559
4044
|
]
|
|
3560
4045
|
}, undefined, true, undefined, this),
|
|
3561
|
-
/* @__PURE__ */
|
|
4046
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3562
4047
|
style: {
|
|
3563
4048
|
display: "flex",
|
|
3564
4049
|
alignItems: "center",
|
|
@@ -3566,7 +4051,7 @@ function DetailHeader({
|
|
|
3566
4051
|
gap: "8px"
|
|
3567
4052
|
},
|
|
3568
4053
|
children: [
|
|
3569
|
-
/* @__PURE__ */
|
|
4054
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3570
4055
|
style: {
|
|
3571
4056
|
display: "flex",
|
|
3572
4057
|
alignItems: "center",
|
|
@@ -3575,20 +4060,20 @@ function DetailHeader({
|
|
|
3575
4060
|
overflow: "hidden"
|
|
3576
4061
|
},
|
|
3577
4062
|
children: [
|
|
3578
|
-
/* @__PURE__ */
|
|
4063
|
+
/* @__PURE__ */ jsxDEV16(HandlerChips, {
|
|
3579
4064
|
entry,
|
|
3580
4065
|
size: "md" /* md */
|
|
3581
4066
|
}, undefined, false, undefined, this),
|
|
3582
|
-
/* @__PURE__ */
|
|
4067
|
+
/* @__PURE__ */ jsxDEV16(ChildDispatchChips, {
|
|
3583
4068
|
childRouteItems: childExternalRouteItems,
|
|
3584
4069
|
size: "md" /* md */
|
|
3585
4070
|
}, undefined, false, undefined, this)
|
|
3586
4071
|
]
|
|
3587
4072
|
}, undefined, true, undefined, this),
|
|
3588
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3589
4074
|
style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 },
|
|
3590
4075
|
children: [
|
|
3591
|
-
/* @__PURE__ */
|
|
4076
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3592
4077
|
style: {
|
|
3593
4078
|
color: DEVTOOL_COLOR_SEMANTIC_METADATA,
|
|
3594
4079
|
fontSize: "10px",
|
|
@@ -3597,9 +4082,9 @@ function DetailHeader({
|
|
|
3597
4082
|
},
|
|
3598
4083
|
children: timestamp
|
|
3599
4084
|
}, undefined, false, undefined, this),
|
|
3600
|
-
/* @__PURE__ */
|
|
4085
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3601
4086
|
style: { color, fontSize: "12px", fontWeight: "500" },
|
|
3602
|
-
children: /* @__PURE__ */
|
|
4087
|
+
children: /* @__PURE__ */ jsxDEV16(DurationDisplay, {
|
|
3603
4088
|
entry
|
|
3604
4089
|
}, undefined, false, undefined, this)
|
|
3605
4090
|
}, undefined, false, undefined, this)
|
|
@@ -3617,10 +4102,10 @@ function ActionDetailPanel({
|
|
|
3617
4102
|
childEntries,
|
|
3618
4103
|
onSelectEntry
|
|
3619
4104
|
}) {
|
|
3620
|
-
const [focusedChildCuid, setFocusedChildCuid] =
|
|
4105
|
+
const [focusedChildCuid, setFocusedChildCuid] = useState7(null);
|
|
3621
4106
|
const focusedEntry = focusedChildCuid != null ? childEntries.find((e) => e.cuid === focusedChildCuid) ?? entry : entry;
|
|
3622
4107
|
const maxRoutingHops = Math.max(entry.meta.routing.length, ...childEntries.map((e) => e.meta.routing.length), 0);
|
|
3623
|
-
const maxCallSiteFrames = Math.max(countUserFrames(entry.callSite), ...childEntries.map((e) => countUserFrames(e.callSite)), 0);
|
|
4108
|
+
const maxCallSiteFrames = Math.max(countUserFrames(entry.meta.originClient, entry.callSite), ...childEntries.map((e) => countUserFrames(e.meta.originClient, e.callSite)), 0);
|
|
3624
4109
|
const childExternalRouteItems = useMemo(() => {
|
|
3625
4110
|
const seen = new Set;
|
|
3626
4111
|
const result = [];
|
|
@@ -3639,7 +4124,7 @@ function ActionDetailPanel({
|
|
|
3639
4124
|
const handleFocusChild = (cuid) => {
|
|
3640
4125
|
setFocusedChildCuid((prev) => prev === cuid ? null : cuid);
|
|
3641
4126
|
};
|
|
3642
|
-
return /* @__PURE__ */
|
|
4127
|
+
return /* @__PURE__ */ jsxDEV16("div", {
|
|
3643
4128
|
style: {
|
|
3644
4129
|
flex: 1,
|
|
3645
4130
|
display: "flex",
|
|
@@ -3649,20 +4134,20 @@ function ActionDetailPanel({
|
|
|
3649
4134
|
background: DEVTOOL_DETAIL_BASE_BACKGROUND
|
|
3650
4135
|
},
|
|
3651
4136
|
children: [
|
|
3652
|
-
/* @__PURE__ */
|
|
4137
|
+
/* @__PURE__ */ jsxDEV16(DetailHeader, {
|
|
3653
4138
|
entry,
|
|
3654
4139
|
isActive: focusedChildCuid === null,
|
|
3655
4140
|
onClick: () => setFocusedChildCuid(null),
|
|
3656
4141
|
childExternalRouteItems
|
|
3657
4142
|
}, undefined, false, undefined, this),
|
|
3658
|
-
/* @__PURE__ */
|
|
4143
|
+
/* @__PURE__ */ jsxDEV16(CallStackSection, {
|
|
3659
4144
|
parent,
|
|
3660
4145
|
childEntries,
|
|
3661
4146
|
focusedChildCuid,
|
|
3662
4147
|
onFocusChild: handleFocusChild,
|
|
3663
4148
|
onSelectParent: onSelectEntry
|
|
3664
4149
|
}, undefined, false, undefined, this),
|
|
3665
|
-
/* @__PURE__ */
|
|
4150
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3666
4151
|
style: {
|
|
3667
4152
|
flex: 1,
|
|
3668
4153
|
overflowY: "auto",
|
|
@@ -3673,36 +4158,37 @@ function ActionDetailPanel({
|
|
|
3673
4158
|
gap: "8px"
|
|
3674
4159
|
},
|
|
3675
4160
|
children: [
|
|
3676
|
-
focusedEntry.input !== undefined ? /* @__PURE__ */
|
|
4161
|
+
focusedEntry.input !== undefined ? /* @__PURE__ */ jsxDEV16(DetailSection, {
|
|
3677
4162
|
label: "Input",
|
|
3678
4163
|
value: focusedEntry.input
|
|
3679
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
4164
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV16(DetailSection, {
|
|
3680
4165
|
label: "Input",
|
|
3681
4166
|
value: "No input required or given"
|
|
3682
4167
|
}, undefined, false, undefined, this),
|
|
3683
|
-
focusedEntry.status === "success" && /* @__PURE__ */
|
|
4168
|
+
focusedEntry.status === "success" && /* @__PURE__ */ jsxDEV16(DetailSection, {
|
|
3684
4169
|
label: "Output",
|
|
3685
4170
|
value: focusedEntry.output,
|
|
3686
4171
|
color: DEVTOOL_COLOR_SEMANTIC_SUCCESS
|
|
3687
4172
|
}, undefined, false, undefined, this),
|
|
3688
|
-
(focusedEntry.status === "action-error" || focusedEntry.status === "failed" || focusedEntry.status === "aborted") && /* @__PURE__ */
|
|
4173
|
+
(focusedEntry.status === "action-error" || focusedEntry.status === "failed" || focusedEntry.status === "aborted") && /* @__PURE__ */ jsxDEV16(ActionErrorDisplay, {
|
|
3689
4174
|
entry: focusedEntry
|
|
3690
4175
|
}, undefined, false, undefined, this),
|
|
3691
|
-
focusedEntry.progressUpdates.length > 0 && /* @__PURE__ */
|
|
4176
|
+
focusedEntry.progressUpdates.length > 0 && /* @__PURE__ */ jsxDEV16(DetailSection, {
|
|
3692
4177
|
label: `Progress (${focusedEntry.progressUpdates.length})`,
|
|
3693
4178
|
value: focusedEntry.progressUpdates
|
|
3694
4179
|
}, undefined, false, undefined, this),
|
|
3695
|
-
/* @__PURE__ */
|
|
4180
|
+
/* @__PURE__ */ jsxDEV16(StackTraceSection, {
|
|
4181
|
+
runtime: entry.meta.originClient,
|
|
3696
4182
|
label: "Dispatch Site",
|
|
3697
4183
|
stack: focusedEntry.callSite,
|
|
3698
4184
|
color: DEVTOOL_COLOR_TEXT_SECONDARY,
|
|
3699
4185
|
minFrameCount: maxCallSiteFrames
|
|
3700
4186
|
}, undefined, false, undefined, this),
|
|
3701
|
-
/* @__PURE__ */
|
|
4187
|
+
/* @__PURE__ */ jsxDEV16(RoutingSection, {
|
|
3702
4188
|
entry: focusedEntry,
|
|
3703
4189
|
minHopCount: maxRoutingHops
|
|
3704
4190
|
}, undefined, false, undefined, this),
|
|
3705
|
-
/* @__PURE__ */
|
|
4191
|
+
/* @__PURE__ */ jsxDEV16(MetaSection, {
|
|
3706
4192
|
entry: focusedEntry
|
|
3707
4193
|
}, undefined, false, undefined, this)
|
|
3708
4194
|
]
|
|
@@ -3713,61 +4199,8 @@ function ActionDetailPanel({
|
|
|
3713
4199
|
|
|
3714
4200
|
// src/devtools/browser/components/action_list/ActionEntryRow.tsx
|
|
3715
4201
|
import { Box, CircleX as CircleX2, Variable } from "lucide-react";
|
|
3716
|
-
import { useState as useState8 } from "react";
|
|
3717
|
-
|
|
3718
|
-
// src/devtools/browser/components/Icon.tsx
|
|
3719
|
-
import { useState as useState7 } from "react";
|
|
3720
|
-
import { jsxDEV as jsxDEV16, Fragment as Fragment6 } from "react/jsx-dev-runtime";
|
|
3721
|
-
var ICON_SIZE_PX = {
|
|
3722
|
-
["sm" /* sm */]: 13,
|
|
3723
|
-
["md" /* md */]: 16,
|
|
3724
|
-
["lg" /* lg */]: 18
|
|
3725
|
-
};
|
|
3726
|
-
function Icon({
|
|
3727
|
-
icon: IconComponent,
|
|
3728
|
-
color,
|
|
3729
|
-
size = "md" /* md */,
|
|
3730
|
-
subtle = false,
|
|
3731
|
-
tooltip,
|
|
3732
|
-
style
|
|
3733
|
-
}) {
|
|
3734
|
-
const [anchor, setAnchor] = useState7(null);
|
|
3735
|
-
const hasTooltip = tooltip != null;
|
|
3736
|
-
const colorEntry = SEMANTIC_COLORS[color];
|
|
3737
|
-
const resolvedColor = subtle ? colorEntry.subtle?.color ?? colorEntry.color : colorEntry.color;
|
|
3738
|
-
return /* @__PURE__ */ jsxDEV16(Fragment6, {
|
|
3739
|
-
children: [
|
|
3740
|
-
/* @__PURE__ */ jsxDEV16("div", {
|
|
3741
|
-
onMouseEnter: hasTooltip ? (e) => setAnchor(e.currentTarget.getBoundingClientRect()) : undefined,
|
|
3742
|
-
onMouseLeave: hasTooltip ? () => setAnchor(null) : undefined,
|
|
3743
|
-
style: {
|
|
3744
|
-
borderRadius: "0.4em",
|
|
3745
|
-
height: `${1.65 * getSizeValue(size)}em`,
|
|
3746
|
-
width: `${1.65 * getSizeValue(size)}em`,
|
|
3747
|
-
display: "flex",
|
|
3748
|
-
alignItems: "center",
|
|
3749
|
-
justifyContent: "center",
|
|
3750
|
-
background: "rgba(0,0,0,0.4)",
|
|
3751
|
-
color: resolvedColor,
|
|
3752
|
-
flexShrink: 0,
|
|
3753
|
-
cursor: hasTooltip ? "default" : undefined,
|
|
3754
|
-
...style
|
|
3755
|
-
},
|
|
3756
|
-
children: /* @__PURE__ */ jsxDEV16(IconComponent, {
|
|
3757
|
-
size: ICON_SIZE_PX[size],
|
|
3758
|
-
strokeWidth: 1.5
|
|
3759
|
-
}, undefined, false, undefined, this)
|
|
3760
|
-
}, undefined, false, undefined, this),
|
|
3761
|
-
anchor != null && hasTooltip && /* @__PURE__ */ jsxDEV16(Tooltip, {
|
|
3762
|
-
anchor,
|
|
3763
|
-
config: tooltip
|
|
3764
|
-
}, undefined, false, undefined, this)
|
|
3765
|
-
]
|
|
3766
|
-
}, undefined, true, undefined, this);
|
|
3767
|
-
}
|
|
3768
|
-
|
|
3769
|
-
// src/devtools/browser/components/action_list/ActionEntryRow.tsx
|
|
3770
|
-
import { jsxDEV as jsxDEV17, Fragment as Fragment7 } from "react/jsx-dev-runtime";
|
|
4202
|
+
import { Fragment as Fragment7, useState as useState8 } from "react";
|
|
4203
|
+
import { jsxDEV as jsxDEV17, Fragment as Fragment8 } from "react/jsx-dev-runtime";
|
|
3771
4204
|
function getLatestChipColor(status) {
|
|
3772
4205
|
if (status === "failed")
|
|
3773
4206
|
return "failed" /* failed */;
|
|
@@ -3775,7 +4208,7 @@ function getLatestChipColor(status) {
|
|
|
3775
4208
|
return "action_error" /* action_error */;
|
|
3776
4209
|
if (status === "aborted")
|
|
3777
4210
|
return "aborted" /* aborted */;
|
|
3778
|
-
return "
|
|
4211
|
+
return "success" /* success */;
|
|
3779
4212
|
}
|
|
3780
4213
|
var JSON_TOKEN_RE2 = /("(?:\\.|[^"\\])*")(\s*:)?|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|(\btrue\b|\bfalse\b|\bnull\b|\bundefined\b)|([{}[\],])/g;
|
|
3781
4214
|
function renderColoredJson2(text) {
|
|
@@ -3865,7 +4298,7 @@ function GroupDotTooltip({
|
|
|
3865
4298
|
config: {
|
|
3866
4299
|
align: "center",
|
|
3867
4300
|
maxWidth: 240,
|
|
3868
|
-
content: /* @__PURE__ */ jsxDEV17(
|
|
4301
|
+
content: /* @__PURE__ */ jsxDEV17(Fragment8, {
|
|
3869
4302
|
children: [
|
|
3870
4303
|
/* @__PURE__ */ jsxDEV17("div", {
|
|
3871
4304
|
style: { color: dotColor, marginBottom: "1px" },
|
|
@@ -3910,7 +4343,7 @@ function GroupDot({
|
|
|
3910
4343
|
const [anchor, setAnchor] = useState8(null);
|
|
3911
4344
|
const dotColor = STATUS_COLOR[entry.status];
|
|
3912
4345
|
const hovered = anchor != null;
|
|
3913
|
-
return /* @__PURE__ */ jsxDEV17(
|
|
4346
|
+
return /* @__PURE__ */ jsxDEV17(Fragment8, {
|
|
3914
4347
|
children: [
|
|
3915
4348
|
/* @__PURE__ */ jsxDEV17("button", {
|
|
3916
4349
|
"data-cuid": entry.cuid,
|
|
@@ -3951,29 +4384,28 @@ function ActionEntryRow({
|
|
|
3951
4384
|
onClick,
|
|
3952
4385
|
isLatest = false,
|
|
3953
4386
|
latestTime,
|
|
3954
|
-
|
|
4387
|
+
childEntries,
|
|
3955
4388
|
breakReasons,
|
|
3956
4389
|
groupEntries,
|
|
3957
4390
|
selectedGroupCuid,
|
|
3958
4391
|
onSelectGroupEntry
|
|
3959
4392
|
}) {
|
|
3960
|
-
const statusSemantic = STATUS_THING[entry.status];
|
|
3961
|
-
const statusIcon = STATUS_ICON[entry.status];
|
|
3962
4393
|
const timestamp = formatTimestamp(entry.startTime);
|
|
3963
4394
|
const hasGroup = groupEntries != null && groupEntries.length > 1;
|
|
4395
|
+
const hasBottomContent = childEntries != null && childEntries.length > 0 || (breakReasons?.some((r) => r !== "new input" && r !== "new output") ?? false) || entry.error != null || entry.abortReason != null;
|
|
3964
4396
|
return /* @__PURE__ */ jsxDEV17("div", {
|
|
3965
4397
|
"data-cuid": entry.cuid,
|
|
3966
4398
|
onClick,
|
|
3967
4399
|
style: {
|
|
3968
4400
|
position: "relative",
|
|
3969
4401
|
display: "flex",
|
|
3970
|
-
|
|
3971
|
-
gap: "
|
|
3972
|
-
padding: "
|
|
4402
|
+
flexDirection: "column",
|
|
4403
|
+
gap: "5px",
|
|
4404
|
+
padding: "0.5em 0.6em",
|
|
3973
4405
|
cursor: "pointer",
|
|
3974
|
-
background: isSelected ?
|
|
4406
|
+
background: isSelected ? DEVTOOL_LIST_HEADER_SELECTED_BACKGROUND : "transparent",
|
|
3975
4407
|
border: `1px solid ${DEVTOOL_PANEL_BORDER}`,
|
|
3976
|
-
borderLeft: isSelected ? `2px solid ${STATUS_COLOR[entry.status]}` : entry.status === "failed" || entry.status === "action-error" ? `2px solid ${STATUS_COLOR[entry.status]}55` : `2px solid
|
|
4408
|
+
borderLeft: isSelected ? `2px solid ${STATUS_COLOR[entry.status]}` : entry.status === "failed" || entry.status === "action-error" ? `2px solid ${STATUS_COLOR[entry.status]}55` : `2px solid ${DEVTOOL_PANEL_BORDER}`,
|
|
3977
4409
|
borderRadius: "3px",
|
|
3978
4410
|
margin: "2px 4px"
|
|
3979
4411
|
},
|
|
@@ -3981,7 +4413,7 @@ function ActionEntryRow({
|
|
|
3981
4413
|
/* @__PURE__ */ jsxDEV17("div", {
|
|
3982
4414
|
style: {
|
|
3983
4415
|
position: "absolute",
|
|
3984
|
-
left: "
|
|
4416
|
+
left: "2em",
|
|
3985
4417
|
top: 0,
|
|
3986
4418
|
bottom: 0,
|
|
3987
4419
|
width: "1px",
|
|
@@ -3991,76 +4423,65 @@ function ActionEntryRow({
|
|
|
3991
4423
|
}
|
|
3992
4424
|
}, undefined, false, undefined, this),
|
|
3993
4425
|
/* @__PURE__ */ jsxDEV17("div", {
|
|
3994
|
-
style: {
|
|
3995
|
-
position: "relative",
|
|
3996
|
-
zIndex: 1,
|
|
3997
|
-
flexShrink: 0,
|
|
3998
|
-
minWidth: "3.5em",
|
|
3999
|
-
display: "flex",
|
|
4000
|
-
alignItems: "center",
|
|
4001
|
-
justifyContent: "flex-start"
|
|
4002
|
-
},
|
|
4003
|
-
children: isLatest ? /* @__PURE__ */ jsxDEV17(Chip, {
|
|
4004
|
-
color: getLatestChipColor(entry.status),
|
|
4005
|
-
children: "latest"
|
|
4006
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV17(Chip, {
|
|
4007
|
-
color: "age" /* age */,
|
|
4008
|
-
children: [
|
|
4009
|
-
"+",
|
|
4010
|
-
latestTime != null ? formatRelativeAge(latestTime - entry.startTime) : "?"
|
|
4011
|
-
]
|
|
4012
|
-
}, undefined, true, undefined, this)
|
|
4013
|
-
}, undefined, false, undefined, this),
|
|
4014
|
-
/* @__PURE__ */ jsxDEV17("span", {
|
|
4015
|
-
style: {
|
|
4016
|
-
position: "relative",
|
|
4017
|
-
zIndex: 1,
|
|
4018
|
-
color: statusSemantic,
|
|
4019
|
-
flexShrink: 0,
|
|
4020
|
-
display: "flex",
|
|
4021
|
-
alignItems: "center",
|
|
4022
|
-
animation: entry.status === "running" ? "__nice-action-pulse 1.2s ease-in-out infinite" : undefined
|
|
4023
|
-
},
|
|
4024
|
-
children: /* @__PURE__ */ jsxDEV17(Icon, {
|
|
4025
|
-
icon: statusIcon,
|
|
4026
|
-
color: statusSemantic
|
|
4027
|
-
}, undefined, false, undefined, this)
|
|
4028
|
-
}, undefined, false, undefined, this),
|
|
4029
|
-
/* @__PURE__ */ jsxDEV17("div", {
|
|
4030
|
-
style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "0.3em" },
|
|
4426
|
+
style: { display: "flex", alignItems: "center", gap: "8px" },
|
|
4031
4427
|
children: [
|
|
4032
4428
|
/* @__PURE__ */ jsxDEV17("div", {
|
|
4033
4429
|
style: {
|
|
4430
|
+
position: "relative",
|
|
4431
|
+
zIndex: 1,
|
|
4432
|
+
flexShrink: 0,
|
|
4433
|
+
minWidth: "3.4em",
|
|
4034
4434
|
display: "flex",
|
|
4035
4435
|
alignItems: "center",
|
|
4036
|
-
|
|
4037
|
-
overflow: "hidden",
|
|
4038
|
-
gap: "0.5em"
|
|
4436
|
+
justifyContent: "flex-start"
|
|
4039
4437
|
},
|
|
4438
|
+
children: isLatest ? /* @__PURE__ */ jsxDEV17(Chip, {
|
|
4439
|
+
size: "sm" /* sm */,
|
|
4440
|
+
color: getLatestChipColor(entry.status),
|
|
4441
|
+
children: "latest"
|
|
4442
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV17(Chip, {
|
|
4443
|
+
size: "sm" /* sm */,
|
|
4444
|
+
color: getLatestChipColor(entry.status),
|
|
4445
|
+
children: [
|
|
4446
|
+
"+",
|
|
4447
|
+
latestTime != null ? formatRelativeAge(latestTime - entry.startTime) : "?"
|
|
4448
|
+
]
|
|
4449
|
+
}, undefined, true, undefined, this)
|
|
4450
|
+
}, undefined, false, undefined, this),
|
|
4451
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
4452
|
+
style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: "0.5em" },
|
|
4040
4453
|
children: [
|
|
4041
4454
|
/* @__PURE__ */ jsxDEV17("span", {
|
|
4042
4455
|
style: {
|
|
4043
4456
|
color: DEVTOOL_COLOR_TEXT_SECONDARY,
|
|
4044
|
-
fontSize: "
|
|
4457
|
+
fontSize: "1em",
|
|
4458
|
+
fontWeight: 400,
|
|
4045
4459
|
fontFamily: "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace",
|
|
4046
4460
|
overflow: "hidden",
|
|
4047
4461
|
textOverflow: "ellipsis",
|
|
4048
4462
|
whiteSpace: "nowrap",
|
|
4049
4463
|
flexShrink: 1,
|
|
4050
|
-
minWidth: "
|
|
4464
|
+
minWidth: "3em"
|
|
4051
4465
|
},
|
|
4052
4466
|
children: entry.actionId
|
|
4053
4467
|
}, undefined, false, undefined, this),
|
|
4054
|
-
/* @__PURE__ */ jsxDEV17(
|
|
4055
|
-
domain: entry.domain,
|
|
4056
|
-
allDomains: entry.allDomains
|
|
4057
|
-
}, undefined, false, undefined, this),
|
|
4058
|
-
entry.input !== undefined && /* @__PURE__ */ jsxDEV17(Icon, {
|
|
4468
|
+
/* @__PURE__ */ jsxDEV17(Icon, {
|
|
4059
4469
|
icon: Variable,
|
|
4060
|
-
color: "io_input" /* io_input */,
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4470
|
+
color: entry.input !== undefined ? "io_input" /* io_input */ : "default" /* default */,
|
|
4471
|
+
subtle: entry.input === undefined,
|
|
4472
|
+
tooltip: {
|
|
4473
|
+
content: entry.input !== undefined ? /* @__PURE__ */ jsxDEV17(IoTooltipContent, {
|
|
4474
|
+
value: entry.input
|
|
4475
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV17("span", {
|
|
4476
|
+
style: { color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px" },
|
|
4477
|
+
children: "No input required or given"
|
|
4478
|
+
}, undefined, false, undefined, this),
|
|
4479
|
+
title: "Input"
|
|
4480
|
+
}
|
|
4481
|
+
}, undefined, false, undefined, this),
|
|
4482
|
+
/* @__PURE__ */ jsxDEV17(HandlerChips, {
|
|
4483
|
+
entry,
|
|
4484
|
+
size: "sm" /* sm */
|
|
4064
4485
|
}, undefined, false, undefined, this),
|
|
4065
4486
|
entry.status === "success" && entry.output !== undefined && /* @__PURE__ */ jsxDEV17(Icon, {
|
|
4066
4487
|
icon: Box,
|
|
@@ -4073,96 +4494,118 @@ function ActionEntryRow({
|
|
|
4073
4494
|
icon: CircleX2,
|
|
4074
4495
|
color: entry.status === "aborted" ? "aborted" /* aborted */ : "error" /* error */,
|
|
4075
4496
|
tooltip: {
|
|
4076
|
-
content: /* @__PURE__ */ jsxDEV17(
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
flexDirection: "column",
|
|
4080
|
-
gap: "1em"
|
|
4081
|
-
},
|
|
4082
|
-
children: /* @__PURE__ */ jsxDEV17(ActionErrorDisplay, {
|
|
4083
|
-
entry
|
|
4084
|
-
}, undefined, false, undefined, this)
|
|
4497
|
+
content: /* @__PURE__ */ jsxDEV17(ActionErrorDisplay, {
|
|
4498
|
+
entry,
|
|
4499
|
+
compact: true
|
|
4085
4500
|
}, undefined, false, undefined, this),
|
|
4086
4501
|
title: entry.status === "aborted" ? "Aborted" : "Error",
|
|
4087
|
-
maxWidth:
|
|
4502
|
+
maxWidth: 340
|
|
4088
4503
|
}
|
|
4089
|
-
}, undefined, false, undefined, this)
|
|
4090
|
-
]
|
|
4091
|
-
}, undefined, true, undefined, this),
|
|
4092
|
-
/* @__PURE__ */ jsxDEV17("div", {
|
|
4093
|
-
style: {
|
|
4094
|
-
display: "flex",
|
|
4095
|
-
alignItems: "center",
|
|
4096
|
-
justifyContent: "space-between",
|
|
4097
|
-
gap: "6px"
|
|
4098
|
-
},
|
|
4099
|
-
children: [
|
|
4504
|
+
}, undefined, false, undefined, this),
|
|
4100
4505
|
/* @__PURE__ */ jsxDEV17("div", {
|
|
4506
|
+
style: { flex: 1 }
|
|
4507
|
+
}, undefined, false, undefined, this),
|
|
4508
|
+
/* @__PURE__ */ jsxDEV17("span", {
|
|
4101
4509
|
style: {
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
overflow: "hidden"
|
|
4510
|
+
color: DEVTOOL_COLOR_SEMANTIC_METADATA,
|
|
4511
|
+
fontSize: "10px",
|
|
4512
|
+
letterSpacing: "0.02em",
|
|
4513
|
+
fontFamily: "ui-sans-serif, system-ui, sans-serif",
|
|
4514
|
+
flexShrink: 0
|
|
4108
4515
|
},
|
|
4109
|
-
children:
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4516
|
+
children: timestamp
|
|
4517
|
+
}, undefined, false, undefined, this),
|
|
4518
|
+
/* @__PURE__ */ jsxDEV17("span", {
|
|
4519
|
+
style: { color: DEVTOOL_COLOR_SEMANTIC_WARNING, fontSize: "11px", flexShrink: 0 },
|
|
4520
|
+
children: /* @__PURE__ */ jsxDEV17(DurationDisplay, {
|
|
4521
|
+
entry
|
|
4522
|
+
}, undefined, false, undefined, this)
|
|
4523
|
+
}, undefined, false, undefined, this)
|
|
4524
|
+
]
|
|
4525
|
+
}, undefined, true, undefined, this)
|
|
4526
|
+
]
|
|
4527
|
+
}, undefined, true, undefined, this),
|
|
4528
|
+
hasBottomContent && /* @__PURE__ */ jsxDEV17("div", {
|
|
4529
|
+
style: {
|
|
4530
|
+
display: "flex",
|
|
4531
|
+
flexWrap: "wrap",
|
|
4532
|
+
alignItems: "center",
|
|
4533
|
+
gap: "4px",
|
|
4534
|
+
paddingLeft: "4.5em"
|
|
4535
|
+
},
|
|
4536
|
+
children: [
|
|
4537
|
+
childEntries?.map((child) => /* @__PURE__ */ jsxDEV17(Fragment7, {
|
|
4538
|
+
children: [
|
|
4539
|
+
/* @__PURE__ */ jsxDEV17(Icon, {
|
|
4540
|
+
icon: Variable,
|
|
4541
|
+
color: "io_input" /* io_input */,
|
|
4542
|
+
subtle: true,
|
|
4543
|
+
tooltip: {
|
|
4544
|
+
content: child.input !== undefined ? /* @__PURE__ */ jsxDEV17(IoTooltipContent, {
|
|
4545
|
+
value: child.input
|
|
4546
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV17("span", {
|
|
4547
|
+
style: { color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px" },
|
|
4548
|
+
children: "No input required or given"
|
|
4117
4549
|
}, undefined, false, undefined, this),
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
},
|
|
4134
|
-
children: timestamp
|
|
4550
|
+
title: `Input · ${child.actionId}`
|
|
4551
|
+
}
|
|
4552
|
+
}, undefined, false, undefined, this),
|
|
4553
|
+
/* @__PURE__ */ jsxDEV17(HandlerChips, {
|
|
4554
|
+
entry: child,
|
|
4555
|
+
size: "sm" /* sm */,
|
|
4556
|
+
subtle: true
|
|
4557
|
+
}, undefined, false, undefined, this),
|
|
4558
|
+
child.status === "success" && child.output !== undefined && /* @__PURE__ */ jsxDEV17(Icon, {
|
|
4559
|
+
icon: Box,
|
|
4560
|
+
color: "io_output" /* io_output */,
|
|
4561
|
+
subtle: true,
|
|
4562
|
+
tooltip: {
|
|
4563
|
+
content: /* @__PURE__ */ jsxDEV17(IoTooltipContent, {
|
|
4564
|
+
value: child.output
|
|
4135
4565
|
}, undefined, false, undefined, this),
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
entry
|
|
4140
|
-
}, undefined, false, undefined, this)
|
|
4141
|
-
}, undefined, false, undefined, this)
|
|
4142
|
-
]
|
|
4143
|
-
}, undefined, true, undefined, this)
|
|
4566
|
+
title: `Output · ${child.actionId}`
|
|
4567
|
+
}
|
|
4568
|
+
}, undefined, false, undefined, this)
|
|
4144
4569
|
]
|
|
4145
|
-
},
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
}
|
|
4570
|
+
}, child.actionId, true, undefined, this)),
|
|
4571
|
+
breakReasons?.filter((r) => r !== "new input" && r !== "new output").map((reason) => /* @__PURE__ */ jsxDEV17(Chip, {
|
|
4572
|
+
color: "default" /* default */,
|
|
4573
|
+
subtle: true,
|
|
4574
|
+
children: reason
|
|
4575
|
+
}, reason, false, undefined, this)),
|
|
4576
|
+
(childEntries?.length ?? 0) > 0 && (entry.error != null || entry.abortReason != null) && /* @__PURE__ */ jsxDEV17(Icon, {
|
|
4577
|
+
icon: CircleX2,
|
|
4578
|
+
color: entry.status === "aborted" ? "aborted" /* aborted */ : "error" /* error */,
|
|
4579
|
+
subtle: true,
|
|
4580
|
+
tooltip: {
|
|
4581
|
+
content: /* @__PURE__ */ jsxDEV17(ActionErrorDisplay, {
|
|
4582
|
+
entry,
|
|
4583
|
+
compact: true
|
|
4584
|
+
}, undefined, false, undefined, this),
|
|
4585
|
+
title: entry.status === "aborted" ? "Aborted" : "Error",
|
|
4586
|
+
maxWidth: 340
|
|
4587
|
+
}
|
|
4163
4588
|
}, undefined, false, undefined, this)
|
|
4164
4589
|
]
|
|
4165
|
-
}, undefined, true, undefined, this)
|
|
4590
|
+
}, undefined, true, undefined, this),
|
|
4591
|
+
hasGroup && /* @__PURE__ */ jsxDEV17("div", {
|
|
4592
|
+
style: {
|
|
4593
|
+
display: "flex",
|
|
4594
|
+
flexWrap: "wrap",
|
|
4595
|
+
alignItems: "center",
|
|
4596
|
+
gap: "5px",
|
|
4597
|
+
paddingLeft: "4.6em",
|
|
4598
|
+
paddingBottom: "2px"
|
|
4599
|
+
},
|
|
4600
|
+
children: groupEntries.map((e, i) => /* @__PURE__ */ jsxDEV17(GroupDot, {
|
|
4601
|
+
entry: e,
|
|
4602
|
+
index: i,
|
|
4603
|
+
total: groupEntries.length,
|
|
4604
|
+
refTime: groupEntries[0].startTime,
|
|
4605
|
+
isActive: selectedGroupCuid === e.cuid,
|
|
4606
|
+
onSelect: () => onSelectGroupEntry?.(e.cuid)
|
|
4607
|
+
}, e.cuid, false, undefined, this))
|
|
4608
|
+
}, undefined, false, undefined, this)
|
|
4166
4609
|
]
|
|
4167
4610
|
}, undefined, true, undefined, this);
|
|
4168
4611
|
}
|
|
@@ -4318,7 +4761,7 @@ function ResizeHandle({
|
|
|
4318
4761
|
}
|
|
4319
4762
|
|
|
4320
4763
|
// src/devtools/browser/NiceActionDevtools.tsx
|
|
4321
|
-
import { jsxDEV as jsxDEV19, Fragment as
|
|
4764
|
+
import { jsxDEV as jsxDEV19, Fragment as Fragment9 } from "react/jsx-dev-runtime";
|
|
4322
4765
|
if (typeof document !== "undefined" && !document.getElementById("__nice-action-devtools-styles")) {
|
|
4323
4766
|
const style = document.createElement("style");
|
|
4324
4767
|
style.id = "__nice-action-devtools-styles";
|
|
@@ -4429,19 +4872,16 @@ function NiceActionDevtools_Panel({
|
|
|
4429
4872
|
const roots = entries.filter((e) => e.status !== "running" && (e.parentCuid == null || !byCuid.has(e.parentCuid)));
|
|
4430
4873
|
return groupEntries(roots);
|
|
4431
4874
|
}, [entries]);
|
|
4432
|
-
const
|
|
4875
|
+
const childEntriesMap = useMemo2(() => {
|
|
4433
4876
|
const map = new Map;
|
|
4434
4877
|
for (const entry of entries) {
|
|
4435
4878
|
if (entry.parentCuid == null)
|
|
4436
4879
|
continue;
|
|
4437
|
-
const firstHop = entry.meta.routing[0];
|
|
4438
|
-
if (firstHop == null || firstHop.handlerType !== "external")
|
|
4439
|
-
continue;
|
|
4440
4880
|
const existing = map.get(entry.parentCuid) ?? [];
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4881
|
+
map.set(entry.parentCuid, [...existing, entry]);
|
|
4882
|
+
}
|
|
4883
|
+
for (const arr of map.values()) {
|
|
4884
|
+
arr.sort((a, b) => a.startTime - b.startTime);
|
|
4445
4885
|
}
|
|
4446
4886
|
return map;
|
|
4447
4887
|
}, [entries]);
|
|
@@ -4593,7 +5033,7 @@ function NiceActionDevtools_Panel({
|
|
|
4593
5033
|
onSubClick: (cuid, isSelected) => {
|
|
4594
5034
|
setSelectedCuid(isSelected ? null : cuid);
|
|
4595
5035
|
},
|
|
4596
|
-
|
|
5036
|
+
childEntriesMap
|
|
4597
5037
|
};
|
|
4598
5038
|
return /* @__PURE__ */ jsxDEV19("div", {
|
|
4599
5039
|
id: "__nice-action-devtools-panel",
|
|
@@ -4661,7 +5101,7 @@ function NiceActionDevtools_Panel({
|
|
|
4661
5101
|
}, undefined, false, undefined, this)
|
|
4662
5102
|
}, undefined, false, undefined, this)
|
|
4663
5103
|
]
|
|
4664
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV19(
|
|
5104
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV19(Fragment9, {
|
|
4665
5105
|
children: [
|
|
4666
5106
|
/* @__PURE__ */ jsxDEV19("div", {
|
|
4667
5107
|
style: { position: "relative", flex: 1, minHeight: "80px" },
|
|
@@ -4715,6 +5155,19 @@ function getBreakReasons(current, previous) {
|
|
|
4715
5155
|
reasons.push("new output");
|
|
4716
5156
|
return reasons;
|
|
4717
5157
|
}
|
|
5158
|
+
function getGroupChildEntries(group, childEntriesMap) {
|
|
5159
|
+
const seen = new Set;
|
|
5160
|
+
const result = [];
|
|
5161
|
+
for (const e of [group.representative, ...group.rest]) {
|
|
5162
|
+
for (const child of childEntriesMap.get(e.cuid) ?? []) {
|
|
5163
|
+
if (!seen.has(child.actionId)) {
|
|
5164
|
+
seen.add(child.actionId);
|
|
5165
|
+
result.push(child);
|
|
5166
|
+
}
|
|
5167
|
+
}
|
|
5168
|
+
}
|
|
5169
|
+
return result.length > 0 ? result.sort((a, b) => a.startTime - b.startTime) : undefined;
|
|
5170
|
+
}
|
|
4718
5171
|
function getFlatItemKey(item) {
|
|
4719
5172
|
const oldestCuid = item.group.rest[item.group.rest.length - 1]?.cuid ?? item.group.representative.cuid;
|
|
4720
5173
|
return `g:${oldestCuid}`;
|
|
@@ -4724,10 +5177,10 @@ function ActionList({
|
|
|
4724
5177
|
selectedCuid,
|
|
4725
5178
|
onGroupClick,
|
|
4726
5179
|
onSubClick,
|
|
4727
|
-
|
|
5180
|
+
childEntriesMap,
|
|
4728
5181
|
style
|
|
4729
5182
|
}) {
|
|
4730
|
-
const containerRef =
|
|
5183
|
+
const containerRef = useRef2(null);
|
|
4731
5184
|
const latestTime = groups[0]?.representative.startTime;
|
|
4732
5185
|
const flatItems = useMemo2(() => {
|
|
4733
5186
|
return groups.map((group, gi) => {
|
|
@@ -4741,7 +5194,7 @@ function ActionList({
|
|
|
4741
5194
|
return { group, groupIndex: gi, breakReasons };
|
|
4742
5195
|
});
|
|
4743
5196
|
}, [groups]);
|
|
4744
|
-
const prevSelectedRef =
|
|
5197
|
+
const prevSelectedRef = useRef2(selectedCuid);
|
|
4745
5198
|
useEffect3(() => {
|
|
4746
5199
|
if (selectedCuid === prevSelectedRef.current)
|
|
4747
5200
|
return;
|
|
@@ -4793,7 +5246,7 @@ function ActionList({
|
|
|
4793
5246
|
isSelected: selectedCuid === group.representative.cuid || group.rest.some((e) => e.cuid === selectedCuid),
|
|
4794
5247
|
isLatest: item.groupIndex === 0,
|
|
4795
5248
|
latestTime,
|
|
4796
|
-
|
|
5249
|
+
childEntries: getGroupChildEntries(group, childEntriesMap),
|
|
4797
5250
|
breakReasons: item.breakReasons,
|
|
4798
5251
|
groupEntries: group.rest.length > 0 ? [group.representative, ...group.rest] : undefined,
|
|
4799
5252
|
selectedGroupCuid: selectedCuid,
|