@tangle-network/ui 11.10.0 → 11.11.1

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.
Files changed (132) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +4 -1
  3. package/dist/active-sessions-store-Gt1R0rFG.js +262 -0
  4. package/dist/{active-sessions-store-CeOmXgv5.d.ts → active-sessions-store-nl70ZnMC.d.ts} +40 -41
  5. package/dist/artifact-pane-BL_DFWNl.d.ts +32 -0
  6. package/dist/artifact-pane-DMXT9a8U.js +70 -0
  7. package/dist/auth-DOETfnd9.js +154 -0
  8. package/dist/auth.d.ts +2 -74
  9. package/dist/auth.js +2 -16
  10. package/dist/branding-26d5ARIr.d.ts +14 -0
  11. package/dist/button-C87nEe2R.js +78 -0
  12. package/dist/button-yoIv77e2.d.ts +16 -0
  13. package/dist/chat-D4jAfEmj.js +667 -0
  14. package/dist/chat.d.ts +2 -201
  15. package/dist/chat.js +2 -31
  16. package/dist/code-block-B36KVUSN.js +165 -0
  17. package/dist/code-block-B9miUPht.d.ts +23 -0
  18. package/dist/diff-preview-BcK3nRXb.js +533 -0
  19. package/dist/document-editor-pane-BcoABlhn.d.ts +131 -0
  20. package/dist/document-editor-pane-BxlPjaTP.js +1287 -0
  21. package/dist/dropdown-menu-BpcLa5vF.js +101 -0
  22. package/dist/editor.d.ts +76 -78
  23. package/dist/editor.js +2 -34
  24. package/dist/file-format-BgXbr-Ib.js +160 -0
  25. package/dist/files-Bug33qCl.js +743 -0
  26. package/dist/files.d.ts +2 -243
  27. package/dist/files.js +3 -41
  28. package/dist/focus-BcE_SHqz.js +57 -0
  29. package/dist/format-DfcLWqMa.js +54 -0
  30. package/dist/hooks.d.ts +30 -37
  31. package/dist/hooks.js +111 -46
  32. package/dist/index-2UntyjBb.d.ts +52 -0
  33. package/dist/index-BgUHilZm.d.ts +108 -0
  34. package/dist/index-COgqsFAQ.d.ts +42 -0
  35. package/dist/index-CPDET_s1.d.ts +549 -0
  36. package/dist/index-CUhfHT_V.d.ts +204 -0
  37. package/dist/index-Cg6gYAqh.d.ts +73 -0
  38. package/dist/index-Cq-EJzqW.d.ts +16 -0
  39. package/dist/index-DhYmSaLF.d.ts +245 -0
  40. package/dist/index-DjKxO357.d.ts +128 -0
  41. package/dist/index.d.ts +26 -43
  42. package/dist/index.js +35 -472
  43. package/dist/markdown-BGqicV82.js +45 -0
  44. package/dist/markdown.d.ts +3 -18
  45. package/dist/markdown.js +3 -15
  46. package/dist/message-vhUI0c5G.d.ts +16 -0
  47. package/dist/nav.d.ts +6 -8
  48. package/dist/nav.js +29 -11
  49. package/dist/openui-artifact-renderer-D3E5bIAI.d.ts +114 -0
  50. package/dist/openui-artifact-renderer-DrU1AdVk.js +266 -0
  51. package/dist/openui.d.ts +2 -115
  52. package/dist/openui.js +2 -13
  53. package/dist/parts-5mhy9yJ3.d.ts +37 -0
  54. package/dist/primitives-Cb8GGVKr.js +1239 -0
  55. package/dist/primitives.d.ts +5 -525
  56. package/dist/primitives.js +9 -212
  57. package/dist/redaction-CGGB2ENG.js +74 -0
  58. package/dist/redaction.d.ts +2 -42
  59. package/dist/redaction.js +2 -7
  60. package/dist/run-OyWmIDqu.d.ts +41 -0
  61. package/dist/run-ZsIKPA6J.js +17 -0
  62. package/dist/run-group-BACLbCFl.js +410 -0
  63. package/dist/run.d.ts +3 -126
  64. package/dist/run.js +5 -40
  65. package/dist/sdk-hooks.d.ts +2 -285
  66. package/dist/sdk-hooks.js +3 -36
  67. package/dist/stores.d.ts +13 -14
  68. package/dist/stores.js +34 -76
  69. package/dist/table-Bss73DhB.js +146 -0
  70. package/dist/tabs-BVHR6NkO.js +40 -0
  71. package/dist/text-shimmer-BUUo6I-g.js +64 -0
  72. package/dist/tool-call-feed-BeB1_4pX.d.ts +47 -0
  73. package/dist/tool-call-feed-Djt2q11V.js +109 -0
  74. package/dist/tool-call-step-DNebqhmX.js +434 -0
  75. package/dist/tool-display-BAuAVa43.js +158 -0
  76. package/dist/{tool-display-z4JcDmMQ.d.ts → tool-display-DgmL5rIU.d.ts} +16 -16
  77. package/dist/tool-previews.d.ts +2 -48
  78. package/dist/tool-previews.js +2 -23
  79. package/dist/types.d.ts +6 -19
  80. package/dist/types.js +0 -1
  81. package/dist/use-auto-scroll-C5Pjeqon.js +153 -0
  82. package/dist/use-sse-stream-BVgO1QBN.js +884 -0
  83. package/dist/use-sse-stream-Dm6R5YWz.d.ts +282 -0
  84. package/dist/utils-Bl_CZ0Qp.js +37 -0
  85. package/dist/{chunk-RQHJBTEU.js → utils-C_uf36nf.js} +4 -6
  86. package/dist/utils.d.ts +2 -104
  87. package/dist/utils.js +6 -44
  88. package/package.json +39 -41
  89. package/src/lib/focus.ts +2 -1
  90. package/dist/artifact-pane-DpuWcAiF.d.ts +0 -33
  91. package/dist/button-CMQuQEW_.d.ts +0 -17
  92. package/dist/chunk-34A66VBG.js +0 -214
  93. package/dist/chunk-3OI2QKFD.js +0 -0
  94. package/dist/chunk-3XXBZL53.js +0 -174
  95. package/dist/chunk-42PAH5D2.js +0 -112
  96. package/dist/chunk-4CLN43XT.js +0 -45
  97. package/dist/chunk-55WHV7SS.js +0 -1604
  98. package/dist/chunk-565EATZZ.js +0 -156
  99. package/dist/chunk-5Z5ZYMOJ.js +0 -0
  100. package/dist/chunk-6BGQA4BQ.js +0 -0
  101. package/dist/chunk-BEBXZPHW.js +0 -299
  102. package/dist/chunk-C5WF4WMV.js +0 -734
  103. package/dist/chunk-HFL6R6IF.js +0 -37
  104. package/dist/chunk-HGML45QH.js +0 -104
  105. package/dist/chunk-HMAPIH7L.js +0 -595
  106. package/dist/chunk-K5XFRUS4.js +0 -1401
  107. package/dist/chunk-KFQGHD73.js +0 -198
  108. package/dist/chunk-L57WRIND.js +0 -59
  109. package/dist/chunk-LTEKI7YJ.js +0 -59
  110. package/dist/chunk-M3QZK62R.js +0 -233
  111. package/dist/chunk-ND3ZFXQK.js +0 -179
  112. package/dist/chunk-OEX7NZE3.js +0 -321
  113. package/dist/chunk-OL5GYLHV.js +0 -60
  114. package/dist/chunk-QGFYBNSO.js +0 -133
  115. package/dist/chunk-R7B3UWPF.js +0 -550
  116. package/dist/chunk-R7SUY4E3.js +0 -65
  117. package/dist/chunk-REJESC5U.js +0 -117
  118. package/dist/chunk-RQGKSCEZ.js +0 -0
  119. package/dist/chunk-SNLR2AEA.js +0 -40
  120. package/dist/chunk-WKWBTL2V.js +0 -15
  121. package/dist/chunk-X7CU776B.js +0 -1048
  122. package/dist/chunk-XU3HB5QL.js +0 -127
  123. package/dist/chunk-YTO5V6QS.js +0 -19
  124. package/dist/chunk-YU4E5J2N.js +0 -437
  125. package/dist/chunk-YZ6AK25N.js +0 -886
  126. package/dist/code-block-0kSpWMnf.d.ts +0 -25
  127. package/dist/document-editor-pane-IAEQn_Dl.d.ts +0 -128
  128. package/dist/document-editor-pane-QHDOBA43.js +0 -13
  129. package/dist/message-BHWbxBtT.d.ts +0 -15
  130. package/dist/parts-dj7AcUg0.d.ts +0 -36
  131. package/dist/run-PfLmDAox.d.ts +0 -41
  132. package/dist/tool-call-feed-D9iofJgW.d.ts +0 -46
@@ -1,212 +1,9 @@
1
- import {
2
- Dialog,
3
- DialogClose,
4
- DialogContent,
5
- DialogDescription,
6
- DialogFooter,
7
- DialogHeader,
8
- DialogOverlay,
9
- DialogPortal,
10
- DialogTitle,
11
- DialogTrigger,
12
- DropZone,
13
- EmptyState,
14
- FilterField,
15
- Input,
16
- Label,
17
- Logo,
18
- Metric,
19
- MetricStrip,
20
- PageHeader,
21
- Progress,
22
- SegmentedControl,
23
- Select,
24
- SelectContent,
25
- SelectGroup,
26
- SelectItem,
27
- SelectLabel,
28
- SelectScrollDownButton,
29
- SelectScrollUpButton,
30
- SelectSeparator,
31
- SelectTrigger,
32
- SelectValue,
33
- SidebarDropZone,
34
- Skeleton,
35
- SkeletonCard,
36
- SkeletonTable,
37
- StatCard,
38
- StatusPill,
39
- Switch,
40
- TangleKnot,
41
- TerminalCursor,
42
- TerminalDisplay,
43
- TerminalInput,
44
- TerminalLine,
45
- Textarea,
46
- ThemeToggle,
47
- ToastContainer,
48
- ToastProvider,
49
- Toolbar,
50
- UploadProgress,
51
- useTheme,
52
- useToast
53
- } from "./chunk-55WHV7SS.js";
54
- import {
55
- Avatar,
56
- AvatarFallback,
57
- AvatarImage,
58
- DropdownMenu,
59
- DropdownMenuCheckboxItem,
60
- DropdownMenuContent,
61
- DropdownMenuGroup,
62
- DropdownMenuItem,
63
- DropdownMenuLabel,
64
- DropdownMenuPortal,
65
- DropdownMenuRadioGroup,
66
- DropdownMenuRadioItem,
67
- DropdownMenuSeparator,
68
- DropdownMenuShortcut,
69
- DropdownMenuSub,
70
- DropdownMenuSubContent,
71
- DropdownMenuSubTrigger,
72
- DropdownMenuTrigger
73
- } from "./chunk-34A66VBG.js";
74
- import {
75
- TextShimmer
76
- } from "./chunk-L57WRIND.js";
77
- import {
78
- Badge,
79
- Card,
80
- CardContent,
81
- CardDescription,
82
- CardFooter,
83
- CardHeader,
84
- CardTitle,
85
- InlineCode,
86
- Table,
87
- TableBody,
88
- TableCaption,
89
- TableCell,
90
- TableFooter,
91
- TableHead,
92
- TableHeader,
93
- TableRow,
94
- badgeVariants
95
- } from "./chunk-M3QZK62R.js";
96
- import {
97
- Button,
98
- buttonVariants
99
- } from "./chunk-42PAH5D2.js";
100
- import {
101
- Tabs,
102
- TabsContent,
103
- TabsList,
104
- TabsTrigger
105
- } from "./chunk-R7SUY4E3.js";
106
- import {
107
- ArtifactPane
108
- } from "./chunk-LTEKI7YJ.js";
109
- import {
110
- CodeBlock,
111
- CopyButton
112
- } from "./chunk-3XXBZL53.js";
113
- import "./chunk-WKWBTL2V.js";
114
- import "./chunk-RQHJBTEU.js";
115
- export {
116
- ArtifactPane,
117
- Avatar,
118
- AvatarFallback,
119
- AvatarImage,
120
- Badge,
121
- Button,
122
- Card,
123
- CardContent,
124
- CardDescription,
125
- CardFooter,
126
- CardHeader,
127
- CardTitle,
128
- CodeBlock,
129
- CopyButton,
130
- Dialog,
131
- DialogClose,
132
- DialogContent,
133
- DialogDescription,
134
- DialogFooter,
135
- DialogHeader,
136
- DialogOverlay,
137
- DialogPortal,
138
- DialogTitle,
139
- DialogTrigger,
140
- DropZone,
141
- DropdownMenu,
142
- DropdownMenuCheckboxItem,
143
- DropdownMenuContent,
144
- DropdownMenuGroup,
145
- DropdownMenuItem,
146
- DropdownMenuLabel,
147
- DropdownMenuPortal,
148
- DropdownMenuRadioGroup,
149
- DropdownMenuRadioItem,
150
- DropdownMenuSeparator,
151
- DropdownMenuShortcut,
152
- DropdownMenuSub,
153
- DropdownMenuSubContent,
154
- DropdownMenuSubTrigger,
155
- DropdownMenuTrigger,
156
- EmptyState,
157
- FilterField,
158
- InlineCode,
159
- Input,
160
- Label,
161
- Logo,
162
- Metric,
163
- MetricStrip,
164
- PageHeader,
165
- Progress,
166
- SegmentedControl,
167
- Select,
168
- SelectContent,
169
- SelectGroup,
170
- SelectItem,
171
- SelectLabel,
172
- SelectScrollDownButton,
173
- SelectScrollUpButton,
174
- SelectSeparator,
175
- SelectTrigger,
176
- SelectValue,
177
- SidebarDropZone,
178
- Skeleton,
179
- SkeletonCard,
180
- SkeletonTable,
181
- StatCard,
182
- StatusPill,
183
- Switch,
184
- Table,
185
- TableBody,
186
- TableCaption,
187
- TableCell,
188
- TableFooter,
189
- TableHead,
190
- TableHeader,
191
- TableRow,
192
- Tabs,
193
- TabsContent,
194
- TabsList,
195
- TabsTrigger,
196
- TangleKnot,
197
- TerminalCursor,
198
- TerminalDisplay,
199
- TerminalInput,
200
- TerminalLine,
201
- TextShimmer,
202
- Textarea,
203
- ThemeToggle,
204
- ToastContainer,
205
- ToastProvider,
206
- Toolbar,
207
- UploadProgress,
208
- badgeVariants,
209
- buttonVariants,
210
- useTheme,
211
- useToast
212
- };
1
+ import { n as buttonVariants, t as Button } from "./button-C87nEe2R.js";
2
+ import { a as TableFooter, c as TableRow, d as Card, f as CardContent, g as CardTitle, h as CardHeader, i as TableCell, l as Badge, m as CardFooter, n as TableBody, o as TableHead, p as CardDescription, r as TableCaption, s as TableHeader, t as Table, u as badgeVariants } from "./table-Bss73DhB.js";
3
+ import { A as SegmentedControl, B as SelectValue, C as ToastProvider, D as SkeletonTable, E as SkeletonCard, F as SelectLabel, G as DialogContent, H as Textarea, I as SelectScrollDownButton, J as DialogHeader, K as DialogDescription, L as SelectScrollUpButton, M as SelectContent, N as SelectGroup, O as Switch, P as SelectItem, Q as DialogTrigger, R as SelectSeparator, S as ToastContainer, T as Skeleton, U as Dialog, V as Input, W as DialogClose, X as DialogPortal, Y as DialogOverlay, Z as DialogTitle, _ as TerminalInput, a as Metric, b as EmptyState, c as PageHeader, d as InlineCode, f as SidebarDropZone, g as TerminalDisplay, h as TerminalCursor, i as Toolbar, j as Select, k as Progress, l as ThemeToggle, m as DropZone, n as TangleKnot, o as MetricStrip, p as UploadProgress, q as DialogFooter, r as FilterField, s as StatusPill, t as Logo, u as useTheme, v as TerminalLine, w as useToast, x as Label, y as StatCard, z as SelectTrigger } from "./primitives-Cb8GGVKr.js";
4
+ import { _ as AvatarFallback, a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, g as Avatar, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator, v as AvatarImage } from "./dropdown-menu-BpcLa5vF.js";
5
+ import { i as TabsTrigger, n as TabsContent, r as TabsList, t as Tabs } from "./tabs-BVHR6NkO.js";
6
+ import { t as TextShimmer } from "./text-shimmer-BUUo6I-g.js";
7
+ import { t as ArtifactPane } from "./artifact-pane-DMXT9a8U.js";
8
+ import { n as CopyButton, t as CodeBlock } from "./code-block-B36KVUSN.js";
9
+ export { ArtifactPane, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CodeBlock, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FilterField, InlineCode, Input, Label, Logo, Metric, MetricStrip, PageHeader, Progress, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatusPill, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ToastContainer, ToastProvider, Toolbar, UploadProgress, badgeVariants, buttonVariants, useTheme, useToast };
@@ -0,0 +1,74 @@
1
+ import { t as cn } from "./utils-C_uf36nf.js";
2
+ import { useCallback, useState } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Eye, EyeOff, Loader2, ShieldAlert } from "lucide-react";
5
+ //#region src/redaction/redacted-document.tsx
6
+ const defaultLabel = (kind) => kind.replace(/[-_]/g, " ").toUpperCase();
7
+ function RedactedChip({ kind, label, onReveal }) {
8
+ const [state, setState] = useState({ status: "masked" });
9
+ const reveal = useCallback(async () => {
10
+ setState({ status: "loading" });
11
+ try {
12
+ const r = await onReveal();
13
+ setState(r.ok && r.value !== void 0 ? {
14
+ status: "revealed",
15
+ value: r.value
16
+ } : {
17
+ status: "denied",
18
+ reason: r.reason
19
+ });
20
+ } catch {
21
+ setState({
22
+ status: "denied",
23
+ reason: "error"
24
+ });
25
+ }
26
+ }, [onReveal]);
27
+ if (state.status === "revealed") return /* @__PURE__ */ jsxs("button", {
28
+ type: "button",
29
+ onClick: () => setState({ status: "masked" }),
30
+ title: "Revealed — click to hide",
31
+ "aria-label": `${label}: revealed, click to hide`,
32
+ className: cn("inline-flex items-center gap-1 rounded-[var(--radius-sm)] px-1 font-medium", "bg-[color-mix(in_oklch,var(--color-warning,orange)_18%,transparent)] text-foreground ring-1 ring-warning/40"),
33
+ children: [state.value, /* @__PURE__ */ jsx(EyeOff, { className: "size-3 opacity-60" })]
34
+ });
35
+ if (state.status === "denied") return /* @__PURE__ */ jsxs("span", {
36
+ title: `Restricted${state.reason ? ` (${state.reason})` : ""}`,
37
+ "aria-label": `${label}: restricted`,
38
+ className: "inline-flex items-center gap-1 rounded-[var(--radius-sm)] bg-muted px-1 text-muted-foreground",
39
+ children: [
40
+ /* @__PURE__ */ jsx(ShieldAlert, { className: "size-3" }),
41
+ " ",
42
+ label
43
+ ]
44
+ });
45
+ return /* @__PURE__ */ jsxs("button", {
46
+ type: "button",
47
+ disabled: state.status === "loading",
48
+ onClick: reveal,
49
+ title: `${label} — click to reveal`,
50
+ "aria-label": `${label} redacted, click to reveal`,
51
+ className: cn("inline-flex items-center gap-1 rounded-[var(--radius-sm)] px-1 font-medium tracking-wide", "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground transition-colors", "cursor-pointer select-none"),
52
+ children: [
53
+ state.status === "loading" ? /* @__PURE__ */ jsx(Loader2, { className: "size-3 animate-spin" }) : /* @__PURE__ */ jsx(Eye, { className: "size-3 opacity-60" }),
54
+ /* @__PURE__ */ jsx("span", {
55
+ "aria-hidden": true,
56
+ children: "███"
57
+ }),
58
+ " ",
59
+ label
60
+ ]
61
+ });
62
+ }
63
+ function RedactedDocument({ document, onReveal, labelForKind = defaultLabel, className }) {
64
+ return /* @__PURE__ */ jsx("div", {
65
+ className: cn("whitespace-pre-wrap break-words leading-relaxed", className),
66
+ children: document.segments.map((seg, i) => seg.type === "text" ? /* @__PURE__ */ jsx("span", { children: seg.text }, i) : /* @__PURE__ */ jsx(RedactedChip, {
67
+ kind: seg.kind,
68
+ label: labelForKind(seg.kind),
69
+ onReveal: () => onReveal(seg.id)
70
+ }, seg.id))
71
+ });
72
+ }
73
+ //#endregion
74
+ export { RedactedDocument as t };
@@ -1,42 +1,2 @@
1
- import { ReactNode } from 'react';
2
-
3
- /**
4
- * Viewer for a server-produced redacted document. Renders text inline and each
5
- * redacted span as a masked chip; clicking a chip asks the server to reveal that
6
- * one span. The original plaintext is NEVER in the document the client holds —
7
- * the chip carries only an id + kind; `onReveal` round-trips to the server, where
8
- * `@tangle-network/agent-app/redact`'s `revealSpan` runs the authorization check
9
- * and writes the audit trail. So authz + audit are server-truth; this is display.
10
- *
11
- * Structural types (no `@tangle-network/agent-app` dependency) — the viewer needs
12
- * only `{ id, kind }` per span; the cipher stays server-side.
13
- */
14
- type RedactedDocSegment = {
15
- type: "text";
16
- text: string;
17
- } | {
18
- type: "redacted";
19
- id: string;
20
- kind: string;
21
- };
22
- interface RedactedDocumentData {
23
- segments: RedactedDocSegment[];
24
- }
25
- interface RevealResult {
26
- ok: boolean;
27
- value?: string;
28
- /** e.g. `forbidden` | `not_found` when `ok` is false. */
29
- reason?: string;
30
- }
31
- interface RedactedDocumentProps {
32
- document: RedactedDocumentData;
33
- /** Reveal one span by id. Wire to a server route that calls agent-app's
34
- * `revealSpan` (authz + audit happen there). Resolves with the original. */
35
- onReveal: (spanId: string) => Promise<RevealResult>;
36
- /** Display label for a redaction kind (default: the kind, upper-cased). */
37
- labelForKind?: (kind: string) => string;
38
- className?: string;
39
- }
40
- declare function RedactedDocument({ document, onReveal, labelForKind, className, }: RedactedDocumentProps): ReactNode;
41
-
42
- export { type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, type RevealResult };
1
+ import { a as RevealResult, i as RedactedDocumentProps, n as RedactedDocument, r as RedactedDocumentData, t as RedactedDocSegment } from "./index-COgqsFAQ.js";
2
+ export { type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, type RevealResult };
package/dist/redaction.js CHANGED
@@ -1,7 +1,2 @@
1
- import {
2
- RedactedDocument
3
- } from "./chunk-HGML45QH.js";
4
- import "./chunk-RQHJBTEU.js";
5
- export {
6
- RedactedDocument
7
- };
1
+ import { t as RedactedDocument } from "./redaction-CGGB2ENG.js";
2
+ export { RedactedDocument };
@@ -0,0 +1,41 @@
1
+ import { t as SessionMessage } from "./message-vhUI0c5G.js";
2
+ //#region src/types/run.d.ts
3
+ /** Broad category of a tool invocation, used for display grouping. */
4
+ type ToolCategory = "command" | "write" | "read" | "search" | "edit" | "task" | "web" | "todo" | "other";
5
+ interface RunStats {
6
+ toolCount: number;
7
+ messageCount: number;
8
+ thinkingDurationMs: number;
9
+ textPartCount: number;
10
+ toolCategories: Set<ToolCategory>;
11
+ }
12
+ interface FinalTextPart {
13
+ messageId: string;
14
+ partIndex: number;
15
+ text: string;
16
+ }
17
+ /**
18
+ * A Run is a consecutive group of assistant messages that form one
19
+ * logical "turn" of the agent. Runs are collapsible in the UI and
20
+ * show a summary header when collapsed.
21
+ */
22
+ interface Run {
23
+ id: string;
24
+ messages: SessionMessage[];
25
+ isComplete: boolean;
26
+ isStreaming: boolean;
27
+ stats: RunStats;
28
+ summaryText: string | null;
29
+ finalTextPart: FinalTextPart | null;
30
+ }
31
+ interface MessageRun {
32
+ type: "run";
33
+ run: Run;
34
+ }
35
+ interface MessageUser {
36
+ type: "user";
37
+ message: SessionMessage;
38
+ }
39
+ type GroupedMessage = MessageRun | MessageUser;
40
+ //#endregion
41
+ export { Run as a, MessageUser as i, GroupedMessage as n, RunStats as o, MessageRun as r, ToolCategory as s, FinalTextPart as t };
@@ -0,0 +1,17 @@
1
+ import { n as formatDuration } from "./format-DfcLWqMa.js";
2
+ import { useEffect, useState } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/run/run-item-primitives.tsx
5
+ function LiveDuration({ startTime }) {
6
+ const [elapsed, setElapsed] = useState(Date.now() - startTime);
7
+ useEffect(() => {
8
+ const id = setInterval(() => setElapsed(Date.now() - startTime), 100);
9
+ return () => clearInterval(id);
10
+ }, [startTime]);
11
+ return /* @__PURE__ */ jsx("span", {
12
+ className: "text-xs font-mono text-neutral-400 dark:text-neutral-500 tabular-nums",
13
+ children: formatDuration(elapsed)
14
+ });
15
+ }
16
+ //#endregion
17
+ export { LiveDuration as t };