@loopstack/loopstack-studio 0.29.5 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.js +3 -1
- package/dist/api/config.js +5 -4
- package/dist/api/environments.js +5 -1
- package/dist/api/processor.js +4 -1
- package/dist/app/EnvironmentEmbedRoot.js +22 -30
- package/dist/components/ai-elements/code-block.js +4 -4
- package/dist/components/dynamic-form/CodeContent.js +1 -1
- package/dist/components/dynamic-form/FormBody.js +1 -1
- package/dist/components/motion/FadeIn.js +72 -0
- package/dist/components/motion/StreamingText.js +49 -0
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui-widgets/UiWidget.js +11 -10
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
- package/dist/events/sse-client-events.js +7 -1
- package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
- package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
- package/dist/features/documents/DocumentRenderer.js +18 -17
- package/dist/features/documents/components/DocumentItem.js +42 -20
- package/dist/features/documents/components/DocumentList.js +34 -36
- package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
- package/dist/features/documents/document-details/DocumentDetails.js +577 -377
- package/dist/features/documents/document-details/PromptDetails.js +118 -130
- package/dist/features/documents/document-details/document-debug-utils.js +100 -0
- package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
- package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
- package/dist/features/documents/renderers/LlmMessage.js +52 -47
- package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
- package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
- package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
- package/dist/features/feature-registry/available-features.js +12 -0
- package/dist/features/feature-registry/index.js +2 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
- package/dist/features/git/components/GitBranchBadge.js +31 -0
- package/dist/features/git/components/GitCommitList.js +46 -0
- package/dist/features/git/components/GitRemoteStatus.js +84 -0
- package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
- package/dist/features/git/git-feature.js +12 -0
- package/dist/features/git/hooks/useGit.js +78 -0
- package/dist/features/git/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
- package/dist/features/runs/Runs.js +4 -4
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
- package/dist/features/workbench/Workbench.js +25 -33
- package/dist/features/workbench/WorkflowItem.js +9 -9
- package/dist/features/workbench/WorkflowList.js +61 -62
- package/dist/features/workbench/components/NewRunDialog.js +237 -209
- package/dist/features/workbench/components/RecentRunItem.js +3 -3
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +11 -10
- package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
- package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
- package/dist/features/workbench/index.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
- package/dist/features/workspaces/Workspaces.js +134 -125
- package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
- package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
- package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
- package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
- package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +43 -30
- package/dist/hooks/useConfig.js +28 -22
- package/dist/hooks/useEnvironments.js +27 -2
- package/dist/hooks/useProcessor.js +14 -1
- package/dist/hooks/useWorkflows.js +4 -4
- package/dist/index.d.ts +116 -15
- package/dist/index.js +9 -8
- package/dist/node_modules/d3/src/index.js +13 -13
- package/dist/node_modules/d3-scale/src/continuous.js +16 -16
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
- package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
- package/dist/node_modules/motion/dist/es/react.js +9 -2
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +76 -106
- package/dist/pages/EmbedWorkbenchPage.js +1 -1
- package/dist/pages/PreviewWorkbenchPage.js +6 -6
- package/dist/pages/WorkbenchPage.js +43 -47
- package/dist/pages/WorkflowDebugPage.js +6 -12
- package/dist/pages/WorkspacePage.js +40 -66
- package/dist/pages/WorkspaceRunsPage.js +24 -31
- package/package.json +2 -2
|
@@ -1,425 +1,625 @@
|
|
|
1
|
+
import { useDocumentConfigs } from "../../../hooks/useConfig.js";
|
|
1
2
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../components/ui/accordion.js";
|
|
3
|
+
import { Button } from "../../../components/ui/button.js";
|
|
2
4
|
import { Badge } from "../../../components/ui/badge.js";
|
|
3
|
-
import {
|
|
5
|
+
import { CodeBlock } from "../../../components/ai-elements/code-block.js";
|
|
6
|
+
import { extractApiResponseInfo, formatDurationMs, formatNumber, formatRelativeTime, summarizeDocumentContent } from "./document-debug-utils.js";
|
|
4
7
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
+
import React, { useState } from "react";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { AlertCircle, CheckIcon, CopyIcon, Cpu, FileJson, Settings2, Timer, Workflow } from "lucide-react";
|
|
8
11
|
var formatDate = (e) => {
|
|
9
12
|
try {
|
|
10
13
|
return new Date(e).toLocaleString();
|
|
11
14
|
} catch {
|
|
12
|
-
return e;
|
|
15
|
+
return String(e);
|
|
13
16
|
}
|
|
14
|
-
},
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
+
}, DetailRow = (e) => {
|
|
18
|
+
let t = c(7), { label: n, children: r } = e, i;
|
|
19
|
+
t[0] === n ? i = t[1] : (i = /* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: "text-muted-foreground font-medium",
|
|
21
|
+
children: n
|
|
22
|
+
}), t[0] = n, t[1] = i);
|
|
23
|
+
let a;
|
|
24
|
+
t[2] === r ? a = t[3] : (a = /* @__PURE__ */ jsx("span", {
|
|
25
|
+
className: "min-w-0 wrap-break-word",
|
|
26
|
+
children: r
|
|
27
|
+
}), t[2] = r, t[3] = a);
|
|
28
|
+
let o;
|
|
29
|
+
return t[4] !== i || t[5] !== a ? (o = /* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "grid min-w-0 grid-cols-[7.5rem_1fr] gap-x-3 gap-y-0.5 text-sm",
|
|
31
|
+
children: [i, a]
|
|
32
|
+
}), t[4] = i, t[5] = a, t[6] = o) : o = t[6], o;
|
|
33
|
+
}, CopyableId = (e) => {
|
|
34
|
+
let t = c(12), { value: n } = e, [r, i] = useState(!1), o;
|
|
35
|
+
t[0] === n ? o = t[1] : (o = async () => {
|
|
36
|
+
await navigator.clipboard.writeText(n), i(!0), setTimeout(() => i(!1), 1500);
|
|
37
|
+
}, t[0] = n, t[1] = o);
|
|
38
|
+
let s = o, l;
|
|
39
|
+
t[2] === n ? l = t[3] : (l = /* @__PURE__ */ jsx("code", {
|
|
40
|
+
className: "bg-muted min-w-0 flex-1 truncate rounded px-1.5 py-0.5 font-mono text-xs",
|
|
41
|
+
children: n
|
|
42
|
+
}), t[2] = n, t[3] = l);
|
|
43
|
+
let u;
|
|
44
|
+
t[4] === r ? u = t[5] : (u = jsx(r ? CheckIcon : CopyIcon, { className: "size-3" }), t[4] = r, t[5] = u);
|
|
45
|
+
let d;
|
|
46
|
+
t[6] !== s || t[7] !== u ? (d = /* @__PURE__ */ jsx(Button, {
|
|
47
|
+
type: "button",
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
size: "icon",
|
|
50
|
+
className: "size-6 shrink-0",
|
|
51
|
+
onClick: s,
|
|
52
|
+
children: u
|
|
53
|
+
}), t[6] = s, t[7] = u, t[8] = d) : d = t[8];
|
|
54
|
+
let f;
|
|
55
|
+
return t[9] !== l || t[10] !== d ? (f = /* @__PURE__ */ jsxs("span", {
|
|
56
|
+
className: "flex w-full min-w-0 items-center gap-1.5",
|
|
57
|
+
children: [l, d]
|
|
58
|
+
}), t[9] = l, t[10] = d, t[11] = f) : f = t[11], f;
|
|
59
|
+
}, BadgeList = (e) => {
|
|
60
|
+
let t = c(6), { items: n, emptyLabel: r } = e, i = r === void 0 ? "None" : r;
|
|
61
|
+
if (!n?.length) {
|
|
62
|
+
let e;
|
|
63
|
+
return t[0] === i ? e = t[1] : (e = /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: "text-muted-foreground",
|
|
65
|
+
children: i
|
|
66
|
+
}), t[0] = i, t[1] = e), e;
|
|
67
|
+
}
|
|
68
|
+
let a;
|
|
69
|
+
t[2] === n ? a = t[3] : (a = n.map(_temp), t[2] = n, t[3] = a);
|
|
70
|
+
let o;
|
|
71
|
+
return t[4] === a ? o = t[5] : (o = /* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: "flex flex-wrap gap-1",
|
|
73
|
+
children: a
|
|
74
|
+
}), t[4] = a, t[5] = o), o;
|
|
75
|
+
}, ContentSummarySection = (e) => {
|
|
76
|
+
let t = c(25), { summary: n } = e, r;
|
|
77
|
+
t[0] === n.kind ? r = t[1] : (r = /* @__PURE__ */ jsx(DetailRow, {
|
|
78
|
+
label: "Type",
|
|
79
|
+
children: n.kind
|
|
80
|
+
}), t[0] = n.kind, t[1] = r);
|
|
17
81
|
let i;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
82
|
+
t[2] === n.role ? i = t[3] : (i = n.role && /* @__PURE__ */ jsx(DetailRow, {
|
|
83
|
+
label: "Role",
|
|
84
|
+
children: n.role
|
|
85
|
+
}), t[2] = n.role, t[3] = i);
|
|
86
|
+
let a;
|
|
87
|
+
t[4] === n.messageId ? a = t[5] : (a = n.messageId && /* @__PURE__ */ jsx(DetailRow, {
|
|
88
|
+
label: "Message ID",
|
|
89
|
+
children: /* @__PURE__ */ jsx(CopyableId, { value: n.messageId })
|
|
90
|
+
}), t[4] = n.messageId, t[5] = a);
|
|
91
|
+
let o;
|
|
92
|
+
t[6] === n.stopReason ? o = t[7] : (o = n.stopReason && /* @__PURE__ */ jsx(DetailRow, {
|
|
93
|
+
label: "Stop reason",
|
|
94
|
+
children: n.stopReason
|
|
95
|
+
}), t[6] = n.stopReason, t[7] = o);
|
|
27
96
|
let s;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
children:
|
|
31
|
-
|
|
32
|
-
children: [/* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" }), "Document Information"]
|
|
33
|
-
})
|
|
34
|
-
}), n[5] = s) : s = n[5];
|
|
97
|
+
t[8] === n.charCount ? s = t[9] : (s = n.charCount != null && /* @__PURE__ */ jsxs(DetailRow, {
|
|
98
|
+
label: "Size",
|
|
99
|
+
children: [formatNumber(n.charCount), " chars"]
|
|
100
|
+
}), t[8] = n.charCount, t[9] = s);
|
|
35
101
|
let l;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
children:
|
|
39
|
-
}),
|
|
102
|
+
t[10] === n.itemCount ? l = t[11] : (l = n.itemCount != null && /* @__PURE__ */ jsx(DetailRow, {
|
|
103
|
+
label: "Items",
|
|
104
|
+
children: n.itemCount
|
|
105
|
+
}), t[10] = n.itemCount, t[11] = l);
|
|
40
106
|
let u;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
children:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}), n[7] = r.id, n[8] = u);
|
|
49
|
-
let d;
|
|
50
|
-
n[9] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx("span", {
|
|
51
|
-
className: "font-medium",
|
|
52
|
-
children: "Name:"
|
|
53
|
-
}), n[9] = d) : d = n[9];
|
|
107
|
+
t[12] === n.topLevelKeys ? u = t[13] : (u = n.topLevelKeys && n.topLevelKeys.length > 0 && /* @__PURE__ */ jsx(DetailRow, {
|
|
108
|
+
label: "Fields",
|
|
109
|
+
children: /* @__PURE__ */ jsx(BadgeList, {
|
|
110
|
+
items: n.topLevelKeys,
|
|
111
|
+
emptyLabel: "—"
|
|
112
|
+
})
|
|
113
|
+
}), t[12] = n.topLevelKeys, t[13] = u);
|
|
54
114
|
let f;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}), n[10] = r.name, n[11] = f);
|
|
115
|
+
t[14] === n.blocks ? f = t[15] : (f = n.blocks && n.blocks.length > 0 && /* @__PURE__ */ jsx(DetailRow, {
|
|
116
|
+
label: "Blocks",
|
|
117
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
118
|
+
className: "flex flex-col gap-1",
|
|
119
|
+
children: n.blocks.map(_temp3)
|
|
120
|
+
})
|
|
121
|
+
}), t[14] = n.blocks, t[15] = f);
|
|
63
122
|
let p;
|
|
64
|
-
|
|
65
|
-
className: "
|
|
66
|
-
children: "Version:"
|
|
67
|
-
}), n[12] = p) : p = n[12];
|
|
68
|
-
let m;
|
|
69
|
-
n[13] === r.version ? m = n[14] : (m = /* @__PURE__ */ jsxs("div", {
|
|
70
|
-
className: "text-sm",
|
|
123
|
+
return t[16] !== r || t[17] !== i || t[18] !== a || t[19] !== o || t[20] !== s || t[21] !== l || t[22] !== u || t[23] !== f ? (p = /* @__PURE__ */ jsxs("div", {
|
|
124
|
+
className: "space-y-2 pb-1",
|
|
71
125
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
126
|
+
r,
|
|
127
|
+
i,
|
|
128
|
+
a,
|
|
129
|
+
o,
|
|
130
|
+
s,
|
|
131
|
+
l,
|
|
132
|
+
u,
|
|
133
|
+
f
|
|
75
134
|
]
|
|
76
|
-
}),
|
|
135
|
+
}), t[16] = r, t[17] = i, t[18] = a, t[19] = o, t[20] = s, t[21] = l, t[22] = u, t[23] = f, t[24] = p) : p = t[24], p;
|
|
136
|
+
}, LlmMetadataSection = (e) => {
|
|
137
|
+
let a = c(21), { provider: o, apiInfo: l, rawResponse: u } = e, f;
|
|
138
|
+
a[0] === o ? f = a[1] : (f = o && /* @__PURE__ */ jsx(DetailRow, {
|
|
139
|
+
label: "Provider",
|
|
140
|
+
children: o
|
|
141
|
+
}), a[0] = o, a[1] = f);
|
|
142
|
+
let p;
|
|
143
|
+
a[2] === l.model ? p = a[3] : (p = l.model && /* @__PURE__ */ jsx(DetailRow, {
|
|
144
|
+
label: "Model",
|
|
145
|
+
children: l.model
|
|
146
|
+
}), a[2] = l.model, a[3] = p);
|
|
77
147
|
let h;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
children:
|
|
81
|
-
}),
|
|
148
|
+
a[4] === l.id ? h = a[5] : (h = l.id && /* @__PURE__ */ jsx(DetailRow, {
|
|
149
|
+
label: "Response ID",
|
|
150
|
+
children: /* @__PURE__ */ jsx(CopyableId, { value: l.id })
|
|
151
|
+
}), a[4] = l.id, a[5] = h);
|
|
82
152
|
let g;
|
|
83
|
-
|
|
84
|
-
|
|
153
|
+
a[6] === l.stopReason ? g = a[7] : (g = l.stopReason && /* @__PURE__ */ jsx(DetailRow, {
|
|
154
|
+
label: "Finish reason",
|
|
155
|
+
children: l.stopReason
|
|
156
|
+
}), a[6] = l.stopReason, a[7] = g);
|
|
157
|
+
let v;
|
|
158
|
+
a[8] === l.usage ? v = a[9] : (v = l.usage && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
159
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
160
|
+
label: "Input tokens",
|
|
161
|
+
children: formatNumber(l.usage.input)
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
164
|
+
label: "Output tokens",
|
|
165
|
+
children: formatNumber(l.usage.output)
|
|
166
|
+
}),
|
|
167
|
+
l.usage.cacheRead != null && l.usage.cacheRead > 0 && /* @__PURE__ */ jsx(DetailRow, {
|
|
168
|
+
label: "Cache read",
|
|
169
|
+
children: formatNumber(l.usage.cacheRead)
|
|
170
|
+
}),
|
|
171
|
+
l.usage.cacheWrite != null && l.usage.cacheWrite > 0 && /* @__PURE__ */ jsx(DetailRow, {
|
|
172
|
+
label: "Cache write",
|
|
173
|
+
children: formatNumber(l.usage.cacheWrite)
|
|
174
|
+
}),
|
|
175
|
+
l.usage.reasoning != null && l.usage.reasoning > 0 && /* @__PURE__ */ jsx(DetailRow, {
|
|
176
|
+
label: "Reasoning",
|
|
177
|
+
children: formatNumber(l.usage.reasoning)
|
|
178
|
+
})
|
|
179
|
+
] }), a[8] = l.usage, a[9] = v);
|
|
180
|
+
let y;
|
|
181
|
+
a[10] !== f || a[11] !== p || a[12] !== h || a[13] !== g || a[14] !== v ? (y = /* @__PURE__ */ jsxs("div", {
|
|
182
|
+
className: "space-y-2 pb-1",
|
|
85
183
|
children: [
|
|
184
|
+
f,
|
|
185
|
+
p,
|
|
86
186
|
h,
|
|
87
|
-
|
|
88
|
-
|
|
187
|
+
g,
|
|
188
|
+
v
|
|
89
189
|
]
|
|
90
|
-
}),
|
|
91
|
-
let _;
|
|
92
|
-
n[18] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("div", {
|
|
93
|
-
className: "mb-2 text-sm font-medium",
|
|
94
|
-
children: "Labels:"
|
|
95
|
-
}), n[18] = _) : _ = n[18];
|
|
96
|
-
let v;
|
|
97
|
-
n[19] === r.labels ? v = n[20] : (v = r.labels && r.labels.length > 0 ? r.labels.map(_temp) : /* @__PURE__ */ jsx("span", {
|
|
98
|
-
className: "text-muted-foreground text-sm",
|
|
99
|
-
children: "None"
|
|
100
|
-
}), n[19] = r.labels, n[20] = v);
|
|
101
|
-
let y;
|
|
102
|
-
n[21] === v ? y = n[22] : (y = /* @__PURE__ */ jsxs("div", {
|
|
103
|
-
className: "pt-2",
|
|
104
|
-
children: [_, /* @__PURE__ */ jsx("div", {
|
|
105
|
-
className: "flex flex-wrap gap-2",
|
|
106
|
-
children: v
|
|
107
|
-
})]
|
|
108
|
-
}), n[21] = v, n[22] = y);
|
|
190
|
+
}), a[10] = f, a[11] = p, a[12] = h, a[13] = g, a[14] = v, a[15] = y) : y = a[15];
|
|
109
191
|
let b;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
192
|
+
a[16] === u ? b = a[17] : (b = u != null && /* @__PURE__ */ jsx(Accordion, {
|
|
193
|
+
type: "single",
|
|
194
|
+
collapsible: !0,
|
|
195
|
+
className: "min-w-0",
|
|
196
|
+
children: /* @__PURE__ */ jsxs(AccordionItem, {
|
|
197
|
+
value: "raw-response",
|
|
198
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
199
|
+
className: "py-2 text-sm font-medium",
|
|
200
|
+
children: "Raw API response"
|
|
201
|
+
}), /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsx(CodeBlock, {
|
|
202
|
+
code: JSON.stringify(u, null, 2),
|
|
203
|
+
language: "json",
|
|
204
|
+
className: "max-h-48 min-w-0 max-w-full"
|
|
205
|
+
}) })]
|
|
206
|
+
})
|
|
207
|
+
}), a[16] = u, a[17] = b);
|
|
208
|
+
let pe;
|
|
209
|
+
return a[18] !== y || a[19] !== b ? (pe = /* @__PURE__ */ jsxs("div", {
|
|
210
|
+
className: "space-y-3",
|
|
211
|
+
children: [y, b]
|
|
212
|
+
}), a[18] = y, a[19] = b, a[20] = pe) : pe = a[20], pe;
|
|
213
|
+
}, DocumentDetails_default = (a) => {
|
|
214
|
+
let d = c(129), { data: h, content: g, workflowContext: _ } = a, y = useDocumentConfigs();
|
|
215
|
+
if (!h) return null;
|
|
216
|
+
let b, x, S, C, w, T, E, D, O, k, A, j, M, N;
|
|
217
|
+
if (d[0] !== g || d[1] !== h.createdAt || d[2] !== h.documentName || d[3] !== h.index || d[4] !== h.isInvalidated || d[5] !== h.labels || d[6] !== h.meta || d[7] !== h.place || d[8] !== h.tags || d[9] !== h.transition || d[10] !== h.updatedAt || d[11] !== h.validationError || d[12] !== y || d[13] !== _) {
|
|
218
|
+
let e = y.get(h.documentName), a = e?.meta, m = h.meta ?? {}, me = e?.ui?.widgets?.[0]?.widget ?? "form", P;
|
|
219
|
+
d[28] === g ? P = d[29] : (P = summarizeDocumentContent(g), d[28] = g, d[29] = P);
|
|
220
|
+
let F = P, I = extractApiResponseInfo(m.response), L = !!h.validationError, R = e?.schema && Object.keys(e.schema).length > 0, z = e?.ui && Object.keys(e.ui).length > 0, B = !!(m.provider || m.response || I.model || I.usage), V = F.kind !== "null", H, he;
|
|
221
|
+
if (d[30] !== h.createdAt || d[31] !== h.updatedAt) {
|
|
222
|
+
let e = new Date(h.createdAt);
|
|
223
|
+
d[34] === h.updatedAt ? H = d[35] : (H = new Date(h.updatedAt).getTime(), d[34] = h.updatedAt, d[35] = H), he = e.getTime(), d[30] = h.createdAt, d[31] = h.updatedAt, d[32] = H, d[33] = he;
|
|
224
|
+
} else H = d[32], he = d[33];
|
|
225
|
+
let ge = H - he, _e = Object.entries(m).filter(_temp4), U;
|
|
226
|
+
d[36] !== V || d[37] !== B || d[38] !== L || d[39] !== _ ? (U = ["overview", "context"], _ && U.push("workflow"), V && U.push("content-summary"), B && U.push("llm"), L && U.push("validation"), d[36] = V, d[37] = B, d[38] = L, d[39] = _, d[40] = U) : U = d[40], w = "min-w-0 space-y-3";
|
|
227
|
+
let ve;
|
|
228
|
+
d[41] === _?.isActive ? ve = d[42] : (ve = _?.isActive && /* @__PURE__ */ jsx(Badge, {
|
|
229
|
+
variant: "default",
|
|
230
|
+
className: "text-xs",
|
|
231
|
+
children: "Active"
|
|
232
|
+
}), d[41] = _?.isActive, d[42] = ve);
|
|
233
|
+
let ye;
|
|
234
|
+
d[43] === h.isInvalidated ? ye = d[44] : (ye = h.isInvalidated && /* @__PURE__ */ jsx(Badge, {
|
|
235
|
+
variant: "destructive",
|
|
236
|
+
className: "text-xs",
|
|
237
|
+
children: "Invalidated"
|
|
238
|
+
}), d[43] = h.isInvalidated, d[44] = ye);
|
|
239
|
+
let be;
|
|
240
|
+
d[45] === L ? be = d[46] : (be = L && /* @__PURE__ */ jsxs(Badge, {
|
|
241
|
+
variant: "destructive",
|
|
242
|
+
className: "gap-1 text-xs",
|
|
243
|
+
children: [/* @__PURE__ */ jsx(AlertCircle, { className: "size-3" }), "Validation error"]
|
|
244
|
+
}), d[45] = L, d[46] = be), T = /* @__PURE__ */ jsxs("div", {
|
|
123
245
|
className: "flex flex-wrap gap-2",
|
|
124
|
-
children:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
]
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
]
|
|
191
|
-
|
|
246
|
+
children: [
|
|
247
|
+
ve,
|
|
248
|
+
m.streaming && /* @__PURE__ */ jsx(Badge, {
|
|
249
|
+
variant: "secondary",
|
|
250
|
+
className: "text-xs",
|
|
251
|
+
children: "Streaming"
|
|
252
|
+
}),
|
|
253
|
+
ye,
|
|
254
|
+
be,
|
|
255
|
+
a?.level && /* @__PURE__ */ jsx(Badge, {
|
|
256
|
+
variant: "outline",
|
|
257
|
+
className: "text-xs capitalize",
|
|
258
|
+
children: a.level
|
|
259
|
+
}),
|
|
260
|
+
a?.hidden && /* @__PURE__ */ jsx(Badge, {
|
|
261
|
+
variant: "outline",
|
|
262
|
+
className: "text-xs",
|
|
263
|
+
children: "Hidden"
|
|
264
|
+
}),
|
|
265
|
+
m.invalidate && /* @__PURE__ */ jsx(Badge, {
|
|
266
|
+
variant: "outline",
|
|
267
|
+
className: "text-xs",
|
|
268
|
+
children: "Invalidates on update"
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
}), b = Accordion, x = "multiple", E = U, D = "min-w-0 space-y-1";
|
|
272
|
+
let xe;
|
|
273
|
+
d[47] === Symbol.for("react.memo_cache_sentinel") ? (xe = /* @__PURE__ */ jsx(AccordionTrigger, {
|
|
274
|
+
className: "py-3 text-sm font-semibold",
|
|
275
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
276
|
+
className: "flex items-center gap-2",
|
|
277
|
+
children: [/* @__PURE__ */ jsx(Workflow, { className: "size-4" }), "Overview"]
|
|
278
|
+
})
|
|
279
|
+
}), d[47] = xe) : xe = d[47];
|
|
280
|
+
let Se;
|
|
281
|
+
d[48] === h.documentName ? Se = d[49] : (Se = /* @__PURE__ */ jsx(DetailRow, {
|
|
282
|
+
label: "Document name",
|
|
283
|
+
children: h.documentName
|
|
284
|
+
}), d[48] = h.documentName, d[49] = Se);
|
|
285
|
+
let Ce;
|
|
286
|
+
d[50] === h.index ? Ce = d[51] : (Ce = /* @__PURE__ */ jsx(DetailRow, {
|
|
287
|
+
label: "Index",
|
|
288
|
+
children: h.index
|
|
289
|
+
}), d[50] = h.index, d[51] = Ce);
|
|
290
|
+
let we = /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
291
|
+
className: "space-y-2 pb-1",
|
|
292
|
+
children: [
|
|
293
|
+
Se,
|
|
294
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
295
|
+
label: "Widget",
|
|
296
|
+
children: /* @__PURE__ */ jsx(Badge, {
|
|
297
|
+
variant: "secondary",
|
|
298
|
+
className: "font-mono text-xs",
|
|
299
|
+
children: me
|
|
300
|
+
})
|
|
301
|
+
}),
|
|
302
|
+
Ce,
|
|
303
|
+
a?.mimeType && /* @__PURE__ */ jsx(DetailRow, {
|
|
304
|
+
label: "MIME",
|
|
305
|
+
children: a.mimeType
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
}) });
|
|
309
|
+
d[52] === we ? O = d[53] : (O = /* @__PURE__ */ jsxs(AccordionItem, {
|
|
310
|
+
value: "overview",
|
|
311
|
+
children: [xe, we]
|
|
312
|
+
}), d[52] = we, d[53] = O), d[54] !== h.place || d[55] !== _ ? (k = _ && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
313
|
+
value: "workflow",
|
|
314
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
315
|
+
className: "py-3 text-sm font-semibold",
|
|
316
|
+
children: "Workflow"
|
|
317
|
+
}), /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
318
|
+
className: "space-y-2 pb-1",
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
321
|
+
label: "Title",
|
|
322
|
+
children: _.title
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
325
|
+
label: "Workflow",
|
|
326
|
+
children: _.workflowName
|
|
327
|
+
}),
|
|
328
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
329
|
+
label: "Status",
|
|
330
|
+
children: /* @__PURE__ */ jsx(Badge, {
|
|
331
|
+
variant: "outline",
|
|
332
|
+
className: "text-xs capitalize",
|
|
333
|
+
children: _.status
|
|
334
|
+
})
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
337
|
+
label: "Current place",
|
|
338
|
+
children: _.place
|
|
339
|
+
}),
|
|
340
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
341
|
+
label: "Document place",
|
|
342
|
+
children: h.place ?? "—"
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
345
|
+
label: "Place match",
|
|
346
|
+
children: h.place === _.place ? "Same as current" : "Different place"
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ jsx(DetailRow, {
|
|
349
|
+
label: "Interactive",
|
|
350
|
+
children: _.isDocumentActive ? _.isActive ? "Yes — awaiting input" : "Eligible, workflow not waiting" : "No"
|
|
351
|
+
}),
|
|
352
|
+
_.parentTitle && /* @__PURE__ */ jsx(DetailRow, {
|
|
353
|
+
label: "Parent",
|
|
354
|
+
children: _.parentTitle
|
|
355
|
+
})
|
|
356
|
+
]
|
|
357
|
+
}) })]
|
|
358
|
+
}), d[54] = h.place, d[55] = _, d[56] = k) : k = d[56];
|
|
359
|
+
let Te;
|
|
360
|
+
d[57] === Symbol.for("react.memo_cache_sentinel") ? (Te = /* @__PURE__ */ jsx(AccordionTrigger, {
|
|
361
|
+
className: "py-3 text-sm font-semibold",
|
|
362
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
363
|
+
className: "flex items-center gap-2",
|
|
364
|
+
children: [/* @__PURE__ */ jsx(Timer, { className: "size-4" }), "Execution context"]
|
|
365
|
+
})
|
|
366
|
+
}), d[57] = Te) : Te = d[57];
|
|
367
|
+
let Ee = h.transition ?? "—", W;
|
|
368
|
+
d[58] === Ee ? W = d[59] : (W = /* @__PURE__ */ jsx(DetailRow, {
|
|
369
|
+
label: "Transition",
|
|
370
|
+
children: Ee
|
|
371
|
+
}), d[58] = Ee, d[59] = W);
|
|
372
|
+
let De = h.place ?? "—", G;
|
|
373
|
+
d[60] === De ? G = d[61] : (G = /* @__PURE__ */ jsx(DetailRow, {
|
|
374
|
+
label: "Place",
|
|
375
|
+
children: De
|
|
376
|
+
}), d[60] = De, d[61] = G);
|
|
377
|
+
let K;
|
|
378
|
+
d[62] === h.labels ? K = d[63] : (K = /* @__PURE__ */ jsx(DetailRow, {
|
|
379
|
+
label: "Labels",
|
|
380
|
+
children: /* @__PURE__ */ jsx(BadgeList, { items: h.labels })
|
|
381
|
+
}), d[62] = h.labels, d[63] = K);
|
|
382
|
+
let q;
|
|
383
|
+
d[64] === h.tags ? q = d[65] : (q = /* @__PURE__ */ jsx(DetailRow, {
|
|
384
|
+
label: "Tags",
|
|
385
|
+
children: /* @__PURE__ */ jsx(BadgeList, { items: h.tags })
|
|
386
|
+
}), d[64] = h.tags, d[65] = q);
|
|
387
|
+
let J;
|
|
388
|
+
d[66] === h.createdAt ? J = d[67] : (J = formatDate(h.createdAt), d[66] = h.createdAt, d[67] = J);
|
|
389
|
+
let Y;
|
|
390
|
+
d[68] === h.createdAt ? Y = d[69] : (Y = formatRelativeTime(h.createdAt), d[68] = h.createdAt, d[69] = Y);
|
|
391
|
+
let X;
|
|
392
|
+
d[70] === Y ? X = d[71] : (X = /* @__PURE__ */ jsxs("span", {
|
|
393
|
+
className: "text-muted-foreground ml-1 text-xs",
|
|
394
|
+
children: [
|
|
395
|
+
"(",
|
|
396
|
+
Y,
|
|
397
|
+
")"
|
|
398
|
+
]
|
|
399
|
+
}), d[70] = Y, d[71] = X);
|
|
400
|
+
let Z;
|
|
401
|
+
d[72] !== J || d[73] !== X ? (Z = /* @__PURE__ */ jsxs(DetailRow, {
|
|
402
|
+
label: "Created",
|
|
403
|
+
children: [J, X]
|
|
404
|
+
}), d[72] = J, d[73] = X, d[74] = Z) : Z = d[74];
|
|
405
|
+
let Q;
|
|
406
|
+
d[75] === h.updatedAt ? Q = d[76] : (Q = formatDate(h.updatedAt), d[75] = h.updatedAt, d[76] = Q);
|
|
407
|
+
let Oe;
|
|
408
|
+
d[77] === h.updatedAt ? Oe = d[78] : (Oe = formatRelativeTime(h.updatedAt), d[77] = h.updatedAt, d[78] = Oe);
|
|
409
|
+
let ke;
|
|
410
|
+
d[79] === Oe ? ke = d[80] : (ke = /* @__PURE__ */ jsxs("span", {
|
|
411
|
+
className: "text-muted-foreground ml-1 text-xs",
|
|
412
|
+
children: [
|
|
413
|
+
"(",
|
|
414
|
+
Oe,
|
|
415
|
+
")"
|
|
416
|
+
]
|
|
417
|
+
}), d[79] = Oe, d[80] = ke);
|
|
418
|
+
let Ae;
|
|
419
|
+
d[81] !== Q || d[82] !== ke ? (Ae = /* @__PURE__ */ jsxs(DetailRow, {
|
|
420
|
+
label: "Updated",
|
|
421
|
+
children: [Q, ke]
|
|
422
|
+
}), d[81] = Q, d[82] = ke, d[83] = Ae) : Ae = d[83];
|
|
423
|
+
let $;
|
|
424
|
+
d[84] === ge ? $ = d[85] : ($ = ge > 0 && /* @__PURE__ */ jsx(DetailRow, {
|
|
425
|
+
label: "Edit window",
|
|
426
|
+
children: formatDurationMs(ge)
|
|
427
|
+
}), d[84] = ge, d[85] = $), d[86] !== W || d[87] !== G || d[88] !== K || d[89] !== q || d[90] !== Z || d[91] !== Ae || d[92] !== $ ? (A = /* @__PURE__ */ jsxs(AccordionItem, {
|
|
428
|
+
value: "context",
|
|
429
|
+
children: [Te, /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
430
|
+
className: "space-y-2 pb-1",
|
|
431
|
+
children: [
|
|
432
|
+
W,
|
|
433
|
+
G,
|
|
434
|
+
K,
|
|
435
|
+
q,
|
|
436
|
+
Z,
|
|
437
|
+
Ae,
|
|
438
|
+
$
|
|
439
|
+
]
|
|
440
|
+
}) })]
|
|
441
|
+
}), d[86] = W, d[87] = G, d[88] = K, d[89] = q, d[90] = Z, d[91] = Ae, d[92] = $, d[93] = A) : A = d[93], d[94] !== F || d[95] !== V ? (j = V && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
442
|
+
value: "content-summary",
|
|
443
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
444
|
+
className: "py-3 text-sm font-semibold",
|
|
445
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
446
|
+
className: "flex items-center gap-2",
|
|
447
|
+
children: [/* @__PURE__ */ jsx(FileJson, { className: "size-4" }), "Content summary"]
|
|
448
|
+
})
|
|
449
|
+
}), /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsx(ContentSummarySection, { summary: F }) })]
|
|
450
|
+
}), d[94] = F, d[95] = V, d[96] = j) : j = d[96], M = B && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
451
|
+
value: "llm",
|
|
452
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
453
|
+
className: "py-3 text-sm font-semibold",
|
|
454
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
455
|
+
className: "flex items-center gap-2",
|
|
456
|
+
children: [/* @__PURE__ */ jsx(Cpu, { className: "size-4" }), "LLM / API"]
|
|
457
|
+
})
|
|
458
|
+
}), /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsx(LlmMetadataSection, {
|
|
459
|
+
provider: m.provider,
|
|
460
|
+
apiInfo: I,
|
|
461
|
+
rawResponse: m.response
|
|
462
|
+
}) })]
|
|
463
|
+
}), d[97] !== h.validationError || d[98] !== L ? (N = L && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
464
|
+
value: "validation",
|
|
465
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
466
|
+
className: "py-3 text-sm font-semibold text-destructive",
|
|
467
|
+
children: "Validation error"
|
|
468
|
+
}), /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsx(CodeBlock, {
|
|
469
|
+
code: JSON.stringify(h.validationError, null, 2),
|
|
470
|
+
language: "json",
|
|
471
|
+
className: "max-h-64 min-w-0 max-w-full"
|
|
472
|
+
}) })]
|
|
473
|
+
}), d[97] = h.validationError, d[98] = L, d[99] = N) : N = d[99], S = (z || R) && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
474
|
+
value: "config",
|
|
475
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
476
|
+
className: "py-3 text-sm font-semibold",
|
|
477
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
478
|
+
className: "flex items-center gap-2",
|
|
479
|
+
children: [/* @__PURE__ */ jsx(Settings2, { className: "size-4" }), "Configuration"]
|
|
480
|
+
})
|
|
481
|
+
}), /* @__PURE__ */ jsxs(AccordionContent, {
|
|
482
|
+
className: "space-y-3",
|
|
483
|
+
children: [z && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
484
|
+
className: "text-muted-foreground mb-1.5 text-xs font-medium uppercase tracking-wide",
|
|
485
|
+
children: "UI"
|
|
486
|
+
}), /* @__PURE__ */ jsx(CodeBlock, {
|
|
487
|
+
code: JSON.stringify(e?.ui, null, 2),
|
|
488
|
+
language: "json",
|
|
489
|
+
className: "max-h-48 min-w-0 max-w-full"
|
|
490
|
+
})] }), R && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
491
|
+
className: "text-muted-foreground mb-1.5 text-xs font-medium uppercase tracking-wide",
|
|
492
|
+
children: "Schema"
|
|
493
|
+
}), /* @__PURE__ */ jsx(CodeBlock, {
|
|
494
|
+
code: JSON.stringify(e?.schema, null, 2),
|
|
495
|
+
language: "json",
|
|
496
|
+
className: "max-h-48 min-w-0 max-w-full"
|
|
497
|
+
})] })]
|
|
498
|
+
})]
|
|
499
|
+
}), C = (a || _e.length > 0) && /* @__PURE__ */ jsxs(AccordionItem, {
|
|
500
|
+
value: "meta",
|
|
501
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
502
|
+
className: "py-3 text-sm font-semibold",
|
|
503
|
+
children: "Document meta"
|
|
504
|
+
}), /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
505
|
+
className: "space-y-2 pb-1",
|
|
506
|
+
children: [
|
|
507
|
+
a?.enableAtPlaces && /* @__PURE__ */ jsx(DetailRow, {
|
|
508
|
+
label: "Show at",
|
|
509
|
+
children: /* @__PURE__ */ jsx(BadgeList, {
|
|
510
|
+
items: a.enableAtPlaces,
|
|
511
|
+
emptyLabel: "—"
|
|
512
|
+
})
|
|
513
|
+
}),
|
|
514
|
+
a?.hideAtPlaces && /* @__PURE__ */ jsx(DetailRow, {
|
|
515
|
+
label: "Hide at",
|
|
516
|
+
children: /* @__PURE__ */ jsx(BadgeList, {
|
|
517
|
+
items: a.hideAtPlaces,
|
|
518
|
+
emptyLabel: "—"
|
|
519
|
+
})
|
|
520
|
+
}),
|
|
521
|
+
_e.map(_temp5)
|
|
522
|
+
]
|
|
523
|
+
}) })]
|
|
524
|
+
}), d[0] = g, d[1] = h.createdAt, d[2] = h.documentName, d[3] = h.index, d[4] = h.isInvalidated, d[5] = h.labels, d[6] = h.meta, d[7] = h.place, d[8] = h.tags, d[9] = h.transition, d[10] = h.updatedAt, d[11] = h.validationError, d[12] = y, d[13] = _, d[14] = b, d[15] = x, d[16] = S, d[17] = C, d[18] = w, d[19] = T, d[20] = E, d[21] = D, d[22] = O, d[23] = k, d[24] = A, d[25] = j, d[26] = M, d[27] = N;
|
|
525
|
+
} else b = d[14], x = d[15], S = d[16], C = d[17], w = d[18], T = d[19], E = d[20], D = d[21], O = d[22], k = d[23], A = d[24], j = d[25], M = d[26], N = d[27];
|
|
192
526
|
let P;
|
|
193
|
-
|
|
194
|
-
className: "font-
|
|
195
|
-
children: "
|
|
196
|
-
}),
|
|
527
|
+
d[100] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ jsx(AccordionTrigger, {
|
|
528
|
+
className: "py-3 text-sm font-semibold",
|
|
529
|
+
children: "Identifiers"
|
|
530
|
+
}), d[100] = P) : P = d[100];
|
|
197
531
|
let F;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
children:
|
|
201
|
-
|
|
202
|
-
" ",
|
|
203
|
-
r.workflowId
|
|
204
|
-
]
|
|
205
|
-
}), n[48] = r.workflowId, n[49] = F);
|
|
532
|
+
d[101] === h.id ? F = d[102] : (F = /* @__PURE__ */ jsx(DetailRow, {
|
|
533
|
+
label: "Document",
|
|
534
|
+
children: /* @__PURE__ */ jsx(CopyableId, { value: h.id })
|
|
535
|
+
}), d[101] = h.id, d[102] = F);
|
|
206
536
|
let I;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
children:
|
|
210
|
-
|
|
211
|
-
N,
|
|
212
|
-
F
|
|
213
|
-
]
|
|
214
|
-
}), n[50] = j, n[51] = N, n[52] = F, n[53] = I) : I = n[53];
|
|
537
|
+
d[103] === h.workflowId ? I = d[104] : (I = /* @__PURE__ */ jsx(DetailRow, {
|
|
538
|
+
label: "Workflow",
|
|
539
|
+
children: /* @__PURE__ */ jsx(CopyableId, { value: h.workflowId })
|
|
540
|
+
}), d[103] = h.workflowId, d[104] = I);
|
|
215
541
|
let L;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
children:
|
|
219
|
-
|
|
220
|
-
className: "font-medium",
|
|
221
|
-
children: "MIME Type:"
|
|
222
|
-
}),
|
|
223
|
-
" ",
|
|
224
|
-
r.meta.mimeType
|
|
225
|
-
]
|
|
226
|
-
}), n[54] = r.meta, n[55] = L);
|
|
542
|
+
d[105] === h.workspaceId ? L = d[106] : (L = /* @__PURE__ */ jsx(DetailRow, {
|
|
543
|
+
label: "Workspace",
|
|
544
|
+
children: /* @__PURE__ */ jsx(CopyableId, { value: h.workspaceId })
|
|
545
|
+
}), d[105] = h.workspaceId, d[106] = L);
|
|
227
546
|
let R;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
231
|
-
className: "
|
|
232
|
-
children: "Enable At Places:"
|
|
233
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
234
|
-
className: "flex flex-wrap gap-2",
|
|
235
|
-
children: r.meta.enableAtPlaces.map(_temp3)
|
|
236
|
-
})]
|
|
237
|
-
}), n[56] = r.meta, n[57] = R);
|
|
238
|
-
let z;
|
|
239
|
-
n[58] === r.meta ? z = n[59] : (z = r.meta && Object.entries(r.meta).filter(_temp4).map(_temp5), n[58] = r.meta, n[59] = z);
|
|
240
|
-
let B;
|
|
241
|
-
n[60] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ jsx("span", {
|
|
242
|
-
className: "font-medium",
|
|
243
|
-
children: "Invalidated:"
|
|
244
|
-
}), n[60] = B) : B = n[60];
|
|
245
|
-
let ve = r.isInvalidated ? "Yes" : "No", V;
|
|
246
|
-
n[61] === ve ? V = n[62] : (V = /* @__PURE__ */ jsxs("div", {
|
|
247
|
-
className: "text-sm",
|
|
248
|
-
children: [
|
|
249
|
-
B,
|
|
250
|
-
" ",
|
|
251
|
-
ve
|
|
252
|
-
]
|
|
253
|
-
}), n[61] = ve, n[62] = V);
|
|
254
|
-
let H;
|
|
255
|
-
n[63] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ jsx("span", {
|
|
256
|
-
className: "font-medium",
|
|
257
|
-
children: "Pending Removal:"
|
|
258
|
-
}), n[63] = H) : H = n[63];
|
|
259
|
-
let ye = r.isPendingRemoval ? "Yes" : "No", U;
|
|
260
|
-
n[64] === ye ? U = n[65] : (U = /* @__PURE__ */ jsxs("div", {
|
|
261
|
-
className: "text-sm",
|
|
262
|
-
children: [
|
|
263
|
-
H,
|
|
264
|
-
" ",
|
|
265
|
-
ye
|
|
266
|
-
]
|
|
267
|
-
}), n[64] = ye, n[65] = U);
|
|
268
|
-
let W;
|
|
269
|
-
n[66] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ jsx("span", {
|
|
270
|
-
className: "font-medium",
|
|
271
|
-
children: "Transition:"
|
|
272
|
-
}), n[66] = W) : W = n[66];
|
|
273
|
-
let G;
|
|
274
|
-
n[67] === r.transition ? G = n[68] : (G = /* @__PURE__ */ jsxs("div", {
|
|
275
|
-
className: "text-sm",
|
|
276
|
-
children: [
|
|
277
|
-
W,
|
|
278
|
-
" ",
|
|
279
|
-
r.transition
|
|
280
|
-
]
|
|
281
|
-
}), n[67] = r.transition, n[68] = G);
|
|
282
|
-
let K;
|
|
283
|
-
n[69] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ jsx("span", {
|
|
284
|
-
className: "font-medium",
|
|
285
|
-
children: "Place:"
|
|
286
|
-
}), n[69] = K) : K = n[69];
|
|
287
|
-
let q;
|
|
288
|
-
n[70] === r.place ? q = n[71] : (q = /* @__PURE__ */ jsxs("div", {
|
|
289
|
-
className: "text-sm",
|
|
290
|
-
children: [
|
|
291
|
-
K,
|
|
292
|
-
" ",
|
|
293
|
-
r.place
|
|
294
|
-
]
|
|
295
|
-
}), n[70] = r.place, n[71] = q);
|
|
296
|
-
let J;
|
|
297
|
-
n[72] !== V || n[73] !== U || n[74] !== G || n[75] !== q ? (J = /* @__PURE__ */ jsxs("div", {
|
|
298
|
-
className: "space-y-1 pt-2",
|
|
299
|
-
children: [
|
|
300
|
-
V,
|
|
301
|
-
U,
|
|
302
|
-
G,
|
|
303
|
-
q
|
|
304
|
-
]
|
|
305
|
-
}), n[72] = V, n[73] = U, n[74] = G, n[75] = q, n[76] = J) : J = n[76];
|
|
306
|
-
let Y;
|
|
307
|
-
n[77] !== m || n[78] !== g || n[79] !== y || n[80] !== S || n[81] !== k || n[82] !== I || n[83] !== L || n[84] !== R || n[85] !== z || n[86] !== J || n[87] !== u || n[88] !== f ? (Y = /* @__PURE__ */ jsxs(AccordionItem, {
|
|
308
|
-
value: "document-info",
|
|
309
|
-
children: [s, /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
310
|
-
className: "ml-6 space-y-2",
|
|
547
|
+
d[107] !== F || d[108] !== I || d[109] !== L ? (R = /* @__PURE__ */ jsxs(AccordionItem, {
|
|
548
|
+
value: "ids",
|
|
549
|
+
children: [P, /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
550
|
+
className: "space-y-2 pb-1",
|
|
311
551
|
children: [
|
|
312
|
-
|
|
313
|
-
f,
|
|
314
|
-
m,
|
|
315
|
-
g,
|
|
316
|
-
y,
|
|
317
|
-
S,
|
|
318
|
-
k,
|
|
552
|
+
F,
|
|
319
553
|
I,
|
|
320
|
-
L
|
|
321
|
-
R,
|
|
322
|
-
z,
|
|
323
|
-
J
|
|
554
|
+
L
|
|
324
555
|
]
|
|
325
556
|
}) })]
|
|
326
|
-
}),
|
|
327
|
-
let
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}),
|
|
349
|
-
let Q;
|
|
350
|
-
n[94] === Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ jsx(AccordionTrigger, {
|
|
351
|
-
className: "text-base font-semibold",
|
|
352
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
353
|
-
className: "flex items-center gap-2",
|
|
354
|
-
children: [/* @__PURE__ */ jsx(Code, { className: "h-4 w-4" }), "Schema"]
|
|
355
|
-
})
|
|
356
|
-
}), n[94] = Q) : Q = n[94];
|
|
357
|
-
let $;
|
|
358
|
-
n[95] === ge ? $ = n[96] : ($ = /* @__PURE__ */ jsxs(AccordionItem, {
|
|
359
|
-
value: "schema",
|
|
360
|
-
children: [Q, /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsx(Card, {
|
|
361
|
-
className: "bg-gray-50",
|
|
362
|
-
children: /* @__PURE__ */ jsx(CardContent, {
|
|
363
|
-
className: "p-4",
|
|
364
|
-
children: /* @__PURE__ */ jsx("pre", {
|
|
365
|
-
className: "rounded bg-gray-100 p-2 font-mono text-xs wrap-break-word whitespace-pre-wrap",
|
|
366
|
-
children: ge
|
|
367
|
-
})
|
|
368
|
-
})
|
|
369
|
-
}) })]
|
|
370
|
-
}), n[95] = ge, n[96] = $);
|
|
371
|
-
let xe;
|
|
372
|
-
return n[97] !== Y || n[98] !== Z || n[99] !== $ ? (xe = /* @__PURE__ */ jsx("div", {
|
|
373
|
-
className: "mt-4",
|
|
374
|
-
children: /* @__PURE__ */ jsxs(Accordion, {
|
|
375
|
-
type: "multiple",
|
|
376
|
-
defaultValue: o,
|
|
377
|
-
className: "space-y-2",
|
|
378
|
-
children: [
|
|
379
|
-
Y,
|
|
380
|
-
Z,
|
|
381
|
-
$
|
|
382
|
-
]
|
|
383
|
-
})
|
|
384
|
-
}), n[97] = Y, n[98] = Z, n[99] = $, n[100] = xe) : xe = n[100], xe;
|
|
557
|
+
}), d[107] = F, d[108] = I, d[109] = L, d[110] = R) : R = d[110];
|
|
558
|
+
let z;
|
|
559
|
+
d[111] !== b || d[112] !== x || d[113] !== S || d[114] !== C || d[115] !== R || d[116] !== E || d[117] !== D || d[118] !== O || d[119] !== k || d[120] !== A || d[121] !== j || d[122] !== M || d[123] !== N ? (z = /* @__PURE__ */ jsxs(b, {
|
|
560
|
+
type: x,
|
|
561
|
+
defaultValue: E,
|
|
562
|
+
className: D,
|
|
563
|
+
children: [
|
|
564
|
+
O,
|
|
565
|
+
k,
|
|
566
|
+
A,
|
|
567
|
+
j,
|
|
568
|
+
M,
|
|
569
|
+
N,
|
|
570
|
+
S,
|
|
571
|
+
C,
|
|
572
|
+
R
|
|
573
|
+
]
|
|
574
|
+
}), d[111] = b, d[112] = x, d[113] = S, d[114] = C, d[115] = R, d[116] = E, d[117] = D, d[118] = O, d[119] = k, d[120] = A, d[121] = j, d[122] = M, d[123] = N, d[124] = z) : z = d[124];
|
|
575
|
+
let B;
|
|
576
|
+
return d[125] !== w || d[126] !== T || d[127] !== z ? (B = /* @__PURE__ */ jsxs("div", {
|
|
577
|
+
className: w,
|
|
578
|
+
children: [T, z]
|
|
579
|
+
}), d[125] = w, d[126] = T, d[127] = z, d[128] = B) : B = d[128], B;
|
|
385
580
|
};
|
|
386
|
-
function _temp(e
|
|
581
|
+
function _temp(e) {
|
|
387
582
|
return /* @__PURE__ */ jsx(Badge, {
|
|
388
583
|
variant: "outline",
|
|
389
584
|
className: "text-xs",
|
|
390
585
|
children: e
|
|
391
|
-
},
|
|
586
|
+
}, e);
|
|
392
587
|
}
|
|
393
|
-
function _temp2(e
|
|
394
|
-
return /* @__PURE__ */ jsxs(Badge, {
|
|
395
|
-
variant: "secondary",
|
|
396
|
-
className: "text-xs",
|
|
397
|
-
children: [/* @__PURE__ */ jsx(Tag, { className: "mr-1 h-3 w-3" }), e]
|
|
398
|
-
}, t);
|
|
399
|
-
}
|
|
400
|
-
function _temp3(e, t) {
|
|
588
|
+
function _temp2(e) {
|
|
401
589
|
return /* @__PURE__ */ jsx(Badge, {
|
|
402
590
|
variant: "outline",
|
|
403
|
-
className: "
|
|
591
|
+
className: "text-xs",
|
|
404
592
|
children: e
|
|
405
|
-
},
|
|
593
|
+
}, e);
|
|
594
|
+
}
|
|
595
|
+
function _temp3(e) {
|
|
596
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
597
|
+
className: "flex flex-wrap items-center gap-1",
|
|
598
|
+
children: [/* @__PURE__ */ jsxs(Badge, {
|
|
599
|
+
variant: "secondary",
|
|
600
|
+
className: "font-mono text-xs",
|
|
601
|
+
children: [
|
|
602
|
+
e.type,
|
|
603
|
+
" × ",
|
|
604
|
+
e.count
|
|
605
|
+
]
|
|
606
|
+
}), e.labels?.map(_temp2)]
|
|
607
|
+
}, e.type);
|
|
406
608
|
}
|
|
407
609
|
function _temp4(e) {
|
|
408
|
-
let [t] = e;
|
|
409
|
-
return ![
|
|
610
|
+
let [t, n] = e;
|
|
611
|
+
return ![
|
|
612
|
+
"data",
|
|
613
|
+
"response",
|
|
614
|
+
"provider",
|
|
615
|
+
"streaming"
|
|
616
|
+
].includes(t) && n != null && n !== "";
|
|
410
617
|
}
|
|
411
618
|
function _temp5(e) {
|
|
412
|
-
let [t,
|
|
413
|
-
return /* @__PURE__ */
|
|
414
|
-
|
|
415
|
-
children:
|
|
416
|
-
/* @__PURE__ */ jsxs("span", {
|
|
417
|
-
className: "font-medium",
|
|
418
|
-
children: [t, ":"]
|
|
419
|
-
}),
|
|
420
|
-
" ",
|
|
421
|
-
typeof me == "object" ? JSON.stringify(me) : String(me)
|
|
422
|
-
]
|
|
619
|
+
let [t, n] = e;
|
|
620
|
+
return /* @__PURE__ */ jsx(DetailRow, {
|
|
621
|
+
label: t,
|
|
622
|
+
children: typeof n == "object" ? JSON.stringify(n) : String(n)
|
|
423
623
|
}, t);
|
|
424
624
|
}
|
|
425
625
|
export { DocumentDetails_default as default };
|