@workflow/web-shared 5.2.0 → 5.3.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/components/event-list/event-details-panel.d.ts.map +1 -1
- package/dist/components/event-list/event-details-panel.js +3 -3
- package/dist/components/event-list/event-list-toolbar.d.ts +2 -1
- package/dist/components/event-list/event-list-toolbar.d.ts.map +1 -1
- package/dist/components/event-list/event-list-toolbar.js +20 -11
- package/dist/components/event-list/event-row.d.ts +3 -3
- package/dist/components/event-list/event-row.d.ts.map +1 -1
- package/dist/components/event-list/event-row.js +15 -13
- package/dist/components/event-list/use-event-search.d.ts +3 -1
- package/dist/components/event-list/use-event-search.d.ts.map +1 -1
- package/dist/components/event-list/use-event-search.js +19 -20
- package/dist/components/event-list-view.d.ts.map +1 -1
- package/dist/components/event-list-view.js +53 -24
- package/dist/components/hook-actions.d.ts +0 -1
- package/dist/components/hook-actions.d.ts.map +1 -1
- package/dist/components/hook-actions.js +1 -3
- package/dist/components/index.d.ts +5 -9
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -9
- package/dist/components/sidebar/attribute-panel.d.ts +0 -13
- package/dist/components/sidebar/attribute-panel.d.ts.map +1 -1
- package/dist/components/sidebar/attribute-panel.js +5 -5
- package/dist/components/sidebar/attributes-block.d.ts +0 -7
- package/dist/components/sidebar/attributes-block.d.ts.map +1 -1
- package/dist/components/sidebar/attributes-block.js +5 -5
- package/dist/components/sidebar/conversation-view.d.ts.map +1 -1
- package/dist/components/sidebar/conversation-view.js +4 -3
- package/dist/components/sidebar/copyable-data-block.d.ts.map +1 -1
- package/dist/components/sidebar/copyable-data-block.js +8 -6
- package/dist/components/sidebar/entity-detail-panel.d.ts.map +1 -1
- package/dist/components/sidebar/entity-detail-panel.js +2 -3
- package/dist/components/stream-image-preview.js +2 -2
- package/dist/components/stream-viewer.js +3 -3
- package/dist/components/trace-viewer/components/middle-truncate/truncate.d.ts +1 -4
- package/dist/components/trace-viewer/components/middle-truncate/truncate.d.ts.map +1 -1
- package/dist/components/trace-viewer/components/middle-truncate/truncate.js +2 -2
- package/dist/components/trace-viewer/components/minimap.d.ts.map +1 -1
- package/dist/components/trace-viewer/components/minimap.js +6 -4
- package/dist/components/trace-viewer/components/timeline.d.ts +0 -11
- package/dist/components/trace-viewer/components/timeline.d.ts.map +1 -1
- package/dist/components/trace-viewer/components/timeline.js +1 -2
- package/dist/components/trace-viewer/trace-viewer.js +4 -10
- package/dist/components/ui/button.d.ts +28 -17
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +47 -43
- package/dist/components/ui/context-card.js +3 -3
- package/dist/components/ui/copy-button.d.ts +15 -0
- package/dist/components/ui/copy-button.d.ts.map +1 -0
- package/dist/components/ui/copy-button.js +41 -0
- package/dist/components/ui/data-inspector.d.ts.map +1 -1
- package/dist/components/ui/data-inspector.js +8 -38
- package/dist/components/ui/decrypt-button.d.ts +3 -2
- package/dist/components/ui/decrypt-button.d.ts.map +1 -1
- package/dist/components/ui/decrypt-button.js +13 -7
- package/dist/components/ui/duplicate-event-tooltip.d.ts +1 -9
- package/dist/components/ui/duplicate-event-tooltip.d.ts.map +1 -1
- package/dist/components/ui/duplicate-event-tooltip.js +2 -10
- package/dist/components/ui/error-stack-block.js +3 -3
- package/dist/components/ui/icon-button.d.ts +2 -2
- package/dist/components/ui/icon-button.d.ts.map +1 -1
- package/dist/components/ui/icon-button.js +2 -3
- package/dist/components/ui/kbd.d.ts +1 -1
- package/dist/components/ui/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd.js +1 -2
- package/dist/components/ui/search-input.d.ts +19 -0
- package/dist/components/ui/search-input.d.ts.map +1 -0
- package/dist/components/ui/search-input.js +61 -0
- package/dist/components/ui/spinner.d.ts +54 -6
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +84 -46
- package/dist/components/workflow-traces/trace-span-construction.d.ts +1 -22
- package/dist/components/workflow-traces/trace-span-construction.d.ts.map +1 -1
- package/dist/components/workflow-traces/trace-span-construction.js +3 -3
- package/dist/index.d.ts +9 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -11
- package/dist/lib/event-analysis.d.ts +1 -25
- package/dist/lib/event-analysis.d.ts.map +1 -1
- package/dist/lib/event-analysis.js +2 -75
- package/dist/lib/event-list-model.d.ts +4 -2
- package/dist/lib/event-list-model.d.ts.map +1 -1
- package/dist/lib/event-list-model.js +13 -11
- package/dist/lib/exact-event-search-id.d.ts +0 -2
- package/dist/lib/exact-event-search-id.d.ts.map +1 -1
- package/dist/lib/exact-event-search-id.js +1 -12
- package/dist/lib/hydration.d.ts +1 -12
- package/dist/lib/hydration.d.ts.map +1 -1
- package/dist/lib/hydration.js +8 -20
- package/dist/lib/stream-display.d.ts +0 -1
- package/dist/lib/stream-display.d.ts.map +1 -1
- package/dist/lib/stream-display.js +2 -2
- package/dist/lib/trace-builder.d.ts +0 -8
- package/dist/lib/trace-builder.d.ts.map +1 -1
- package/dist/lib/trace-builder.js +2 -2
- package/dist/lib/utils.d.ts +0 -22
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +1 -31
- package/dist/styles.css +268 -118
- package/package.json +4 -16
- package/src/components/event-list/event-details-panel.tsx +3 -4
- package/src/components/event-list/event-list-toolbar.tsx +35 -28
- package/src/components/event-list/event-row.tsx +33 -29
- package/src/components/event-list/use-event-search.ts +29 -22
- package/src/components/event-list-view.tsx +180 -52
- package/src/components/hook-actions.tsx +0 -1
- package/src/components/index.ts +4 -20
- package/src/components/sidebar/attribute-panel.tsx +4 -7
- package/src/components/sidebar/attributes-block.tsx +7 -6
- package/src/components/sidebar/conversation-view.tsx +3 -2
- package/src/components/sidebar/copyable-data-block.tsx +17 -14
- package/src/components/sidebar/entity-detail-panel.tsx +2 -7
- package/src/components/stream-image-preview.tsx +1 -1
- package/src/components/stream-viewer.tsx +4 -4
- package/src/components/trace-viewer/components/middle-truncate/truncate.ts +1 -2
- package/src/components/trace-viewer/components/minimap.tsx +4 -3
- package/src/components/trace-viewer/components/timeline.tsx +0 -2
- package/src/components/trace-viewer/trace-viewer.tsx +12 -38
- package/src/components/ui/button.tsx +144 -46
- package/src/components/ui/context-card.tsx +2 -2
- package/src/components/ui/copy-button.tsx +86 -0
- package/src/components/ui/data-inspector.tsx +23 -67
- package/src/components/ui/decrypt-button.tsx +23 -48
- package/src/components/ui/duplicate-event-tooltip.tsx +1 -22
- package/src/components/ui/error-stack-block.tsx +4 -4
- package/src/components/ui/icon-button.tsx +1 -3
- package/src/components/ui/kbd.tsx +0 -2
- package/src/components/ui/search-input.tsx +143 -0
- package/src/components/ui/spinner.tsx +105 -55
- package/src/components/workflow-traces/trace-span-construction.ts +2 -2
- package/src/index.ts +7 -55
- package/src/lib/event-analysis.ts +1 -104
- package/src/lib/event-list-model.ts +15 -12
- package/src/lib/exact-event-search-id.ts +0 -13
- package/src/lib/hydration.ts +6 -31
- package/src/lib/stream-display.ts +1 -1
- package/src/lib/trace-builder.ts +1 -1
- package/src/lib/utils.ts +0 -48
- package/src/styles.css +268 -118
- package/dist/components/trace-viewer/components/copy-button.d.ts +0 -9
- package/dist/components/trace-viewer/components/copy-button.d.ts.map +0 -1
- package/dist/components/trace-viewer/components/copy-button.js +0 -27
- package/dist/components/ui/alert.d.ts +0 -9
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/alert.js +0 -23
- package/dist/components/ui/card.d.ts +0 -9
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/card.js +0 -18
- package/dist/components/ui/load-more-button.d.ts +0 -13
- package/dist/components/ui/load-more-button.d.ts.map +0 -1
- package/dist/components/ui/load-more-button.js +0 -12
- package/dist/components/ui/menu-dropdown.d.ts +0 -16
- package/dist/components/ui/menu-dropdown.d.ts.map +0 -1
- package/dist/components/ui/menu-dropdown.js +0 -30
- package/dist/hooks/use-dark-mode.d.ts +0 -9
- package/dist/hooks/use-dark-mode.d.ts.map +0 -1
- package/dist/hooks/use-dark-mode.js +0 -30
- package/dist/lib/event-materialization.d.ts +0 -91
- package/dist/lib/event-materialization.d.ts.map +0 -1
- package/dist/lib/event-materialization.js +0 -219
- package/src/components/index.d.ts +0 -1
- package/src/components/trace-viewer/components/copy-button.tsx +0 -68
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/card.tsx +0 -79
- package/src/components/ui/load-more-button.tsx +0 -38
- package/src/components/ui/menu-dropdown.tsx +0 -97
- package/src/hooks/use-dark-mode.ts +0 -34
- package/src/index.d.ts +0 -1
- package/src/lib/event-materialization.ts +0 -304
package/src/components/index.ts
CHANGED
|
@@ -11,18 +11,10 @@ export type {
|
|
|
11
11
|
export {
|
|
12
12
|
HookResolveModalWrapper,
|
|
13
13
|
ResolveHookDropdownItem,
|
|
14
|
-
ResolveHookModal,
|
|
15
14
|
useHookActions,
|
|
16
15
|
} from './hook-actions';
|
|
17
|
-
export {
|
|
18
|
-
export type {
|
|
19
|
-
SelectedSpanInfo,
|
|
20
|
-
SpanSelectionInfo,
|
|
21
|
-
} from './sidebar/entity-detail-panel';
|
|
22
|
-
export {
|
|
23
|
-
type SidebarDataContextValue,
|
|
24
|
-
SidebarDataProvider,
|
|
25
|
-
} from './sidebar/sidebar-data-context';
|
|
16
|
+
export type { SpanSelectionInfo } from './sidebar/entity-detail-panel';
|
|
17
|
+
export type { SidebarDataContextValue } from './sidebar/sidebar-data-context';
|
|
26
18
|
export type {
|
|
27
19
|
DetailResource,
|
|
28
20
|
FetchSpanDetail,
|
|
@@ -32,17 +24,9 @@ export { StreamViewerSkeleton } from './stream-viewer-skeleton';
|
|
|
32
24
|
export { TraceViewer } from './trace-viewer';
|
|
33
25
|
export { TraceViewerSkeleton } from './trace-viewer/components/trace-viewer-skeleton';
|
|
34
26
|
export { Button, type ButtonProps, buttonVariants } from './ui/button';
|
|
35
|
-
export {
|
|
36
|
-
|
|
37
|
-
type DataInspectorProps,
|
|
38
|
-
DecryptClickContext,
|
|
39
|
-
type DecryptClickContextValue,
|
|
40
|
-
} from './ui/data-inspector';
|
|
27
|
+
export { CopyButton, type CopyButtonProps } from './ui/copy-button';
|
|
28
|
+
export { DataInspector, type DataInspectorProps } from './ui/data-inspector';
|
|
41
29
|
export { DecryptButton } from './ui/decrypt-button';
|
|
42
|
-
export { IconButton } from './ui/icon-button';
|
|
43
|
-
export { Kbd } from './ui/kbd';
|
|
44
|
-
export { LoadMoreButton } from './ui/load-more-button';
|
|
45
|
-
export { MenuDropdown, type MenuDropdownOption } from './ui/menu-dropdown';
|
|
46
30
|
export { Spinner } from './ui/spinner';
|
|
47
31
|
export {
|
|
48
32
|
Tooltip,
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
import { ErrorCard } from '../ui/error-card';
|
|
24
24
|
import { ErrorStackBlock, isStructuredError } from '../ui/error-stack-block';
|
|
25
25
|
import { Skeleton } from '../ui/skeleton';
|
|
26
|
+
import { Spinner } from '../ui/spinner';
|
|
26
27
|
import { TimestampTooltip } from '../ui/timestamp-tooltip';
|
|
27
28
|
import {
|
|
28
29
|
DetailMonoKeyValueRow,
|
|
@@ -191,8 +192,7 @@ function ConversationWithTabs({
|
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
/**
|
|
194
|
-
*
|
|
195
|
-
* custom theming, nodeRenderer for StreamRef/ClassInstanceRef, etc.)
|
|
195
|
+
* Placeholder for a field whose data is still encrypted.
|
|
196
196
|
*/
|
|
197
197
|
function EncryptedFieldBlock() {
|
|
198
198
|
return <EncryptedDataBlock />;
|
|
@@ -789,7 +789,7 @@ const loadingSectionLabels: Partial<Record<AttributeKey, string>> = {
|
|
|
789
789
|
dynamicWorkflowCode: 'Workflow Code',
|
|
790
790
|
};
|
|
791
791
|
|
|
792
|
-
|
|
792
|
+
const AttributeBlock = ({
|
|
793
793
|
attribute,
|
|
794
794
|
value,
|
|
795
795
|
isLoading,
|
|
@@ -861,10 +861,7 @@ export const AttributeBlock = ({
|
|
|
861
861
|
<div className="relative">
|
|
862
862
|
{typeof isLoading === 'boolean' && isLoading && (
|
|
863
863
|
<div className="absolute top-9 right-4">
|
|
864
|
-
<
|
|
865
|
-
className="animate-spin rounded-full h-4 w-4 border-b-2"
|
|
866
|
-
style={{ borderColor: 'var(--ds-gray-900)' }}
|
|
867
|
-
/>
|
|
864
|
+
<Spinner size="md" />
|
|
868
865
|
</div>
|
|
869
866
|
)}
|
|
870
867
|
<div key={attribute} className="my-2 flex flex-col gap-0">
|
|
@@ -8,13 +8,13 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
|
|
8
8
|
import { ArrowUpRight } from 'lucide-react';
|
|
9
9
|
import type { ReactNode } from 'react';
|
|
10
10
|
import { cn } from '../../lib/cn';
|
|
11
|
-
import { CopyButton } from '../trace-viewer/components/copy-button';
|
|
12
11
|
import { MiddleTruncate } from '../trace-viewer/components/middle-truncate/middle-truncate';
|
|
13
12
|
import {
|
|
14
13
|
CollapsibleContent,
|
|
15
14
|
CollapsibleRoot,
|
|
16
15
|
CollapsibleTrigger,
|
|
17
16
|
} from '../ui/collapsible';
|
|
17
|
+
import { CopyButton } from '../ui/copy-button';
|
|
18
18
|
import { CopyableDataBlock } from './copyable-data-block';
|
|
19
19
|
|
|
20
20
|
function isReservedAttributeKey(key: string): boolean {
|
|
@@ -106,9 +106,10 @@ function DetailKeyValueRowBase({
|
|
|
106
106
|
/>
|
|
107
107
|
)}
|
|
108
108
|
<CopyButton
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
textToCopy={copyText}
|
|
110
|
+
aria-label={`Copy ${label}`}
|
|
111
|
+
size="small"
|
|
112
|
+
className="-my-0.5 -mr-1"
|
|
112
113
|
/>
|
|
113
114
|
</div>
|
|
114
115
|
) : (
|
|
@@ -131,7 +132,7 @@ function DetailKeyValueRowBase({
|
|
|
131
132
|
);
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
function DetailKeyValueRow(props: DetailKeyValueRowProps) {
|
|
135
136
|
return <DetailKeyValueRowBase {...props} />;
|
|
136
137
|
}
|
|
137
138
|
|
|
@@ -158,7 +159,7 @@ function AttributeRow({
|
|
|
158
159
|
* reserved `$`-prefixed keys (alphabetical), so framework metadata doesn't
|
|
159
160
|
* crowd out user-set attributes.
|
|
160
161
|
*/
|
|
161
|
-
|
|
162
|
+
function sortAttributeKeys(keys: string[]): string[] {
|
|
162
163
|
return [...keys].sort((a, b) => {
|
|
163
164
|
const aReserved = isReservedAttributeKey(a);
|
|
164
165
|
const bReserved = isReservedAttributeKey(b);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ModelMessage } from 'ai';
|
|
2
|
+
import { Check, Wrench } from 'lucide-react';
|
|
2
3
|
import { Streamdown } from 'streamdown';
|
|
3
4
|
import { DataInspector } from '../ui/data-inspector';
|
|
4
5
|
|
|
@@ -80,7 +81,7 @@ function ContentPart({ part, role }: { part: ParsedPart; role: string }) {
|
|
|
80
81
|
return (
|
|
81
82
|
<div className="rounded border border-purple-300 bg-purple-100 px-2 py-1.5">
|
|
82
83
|
<div className="flex items-center gap-1.5 text-[10px] font-medium">
|
|
83
|
-
<
|
|
84
|
+
<Wrench className="size-3 shrink-0 text-purple-900" aria-hidden />
|
|
84
85
|
<span className="text-purple-900">{part.toolName}</span>
|
|
85
86
|
</div>
|
|
86
87
|
{part.input != null && (
|
|
@@ -100,7 +101,7 @@ function ContentPart({ part, role }: { part: ParsedPart; role: string }) {
|
|
|
100
101
|
return (
|
|
101
102
|
<div className="rounded border border-green-300 bg-green-100 px-2 py-1.5">
|
|
102
103
|
<div className="flex items-center gap-1.5 text-[10px] font-medium">
|
|
103
|
-
<
|
|
104
|
+
<Check className="size-3 shrink-0 text-green-900" aria-hidden />
|
|
104
105
|
<span className="text-green-900">{part.toolName} result</span>
|
|
105
106
|
</div>
|
|
106
107
|
{part.output != null && (
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { Lock } from 'lucide-react';
|
|
4
4
|
import { useContext } from 'react';
|
|
5
|
-
import { CopyButton } from '../trace-viewer/components/copy-button';
|
|
6
5
|
import { Button } from '../ui/button';
|
|
6
|
+
import { CopyButton } from '../ui/copy-button';
|
|
7
7
|
import { DataInspector, DecryptClickContext } from '../ui/data-inspector';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
9
8
|
|
|
10
9
|
const encryptedPlaceholderPreview = `{
|
|
11
10
|
"input": "[encrypted]",
|
|
@@ -27,18 +26,15 @@ export function EncryptedDataBlock() {
|
|
|
27
26
|
{ctx ? (
|
|
28
27
|
<Button
|
|
29
28
|
onClick={ctx.onDecrypt}
|
|
30
|
-
|
|
29
|
+
loading={ctx.isDecrypting}
|
|
30
|
+
disabled={ctx.isDecryptDisabled}
|
|
31
31
|
title={
|
|
32
32
|
ctx.isDecryptDisabled ? ctx.decryptDisabledReason : undefined
|
|
33
33
|
}
|
|
34
|
-
size="
|
|
34
|
+
size="small"
|
|
35
|
+
prefix={<Lock />}
|
|
35
36
|
>
|
|
36
|
-
|
|
37
|
-
<Spinner size={10} />
|
|
38
|
-
) : (
|
|
39
|
-
<Lock className="h-3 w-3" />
|
|
40
|
-
)}
|
|
41
|
-
<span>Decrypt</span>
|
|
37
|
+
Decrypt
|
|
42
38
|
</Button>
|
|
43
39
|
) : (
|
|
44
40
|
<span className="inline-flex items-center gap-1 rounded border border-gray-alpha-400 bg-gray-100 px-1.5 py-0.5 text-button-12 font-medium text-gray-700">
|
|
@@ -56,12 +52,19 @@ export const serializeForClipboard = (value: unknown): string => {
|
|
|
56
52
|
if (
|
|
57
53
|
typeof value === 'number' ||
|
|
58
54
|
typeof value === 'boolean' ||
|
|
55
|
+
typeof value === 'bigint' ||
|
|
59
56
|
value === null
|
|
60
57
|
) {
|
|
61
58
|
return String(value);
|
|
62
59
|
}
|
|
63
60
|
try {
|
|
64
|
-
|
|
61
|
+
// Hydrated payloads can contain BigInt values, which JSON.stringify rejects.
|
|
62
|
+
// Write them as decimal strings, matching the CLI's `stringifyJSON`.
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
value,
|
|
65
|
+
(_key, v) => (typeof v === 'bigint' ? v.toString() : v),
|
|
66
|
+
2
|
|
67
|
+
);
|
|
65
68
|
} catch {
|
|
66
69
|
return String(value);
|
|
67
70
|
}
|
|
@@ -71,9 +74,9 @@ export function CopyableDataBlock({ data }: { data: unknown }) {
|
|
|
71
74
|
return (
|
|
72
75
|
<div className="relative overflow-x-auto rounded-md border border-gray-alpha-400 p-3">
|
|
73
76
|
<CopyButton
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
className="absolute right-2 top-2 z-10
|
|
77
|
+
textToCopy={serializeForClipboard(data)}
|
|
78
|
+
aria-label="Copy data"
|
|
79
|
+
className="absolute right-2 top-2 z-10 border border-gray-alpha-400 bg-background-100 enabled:hover:bg-gray-200"
|
|
77
80
|
/>
|
|
78
81
|
<DataInspector data={data} />
|
|
79
82
|
</div>
|
|
@@ -11,7 +11,6 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
11
11
|
import { useToast } from '../../lib/toast';
|
|
12
12
|
import { Button } from '../ui/button';
|
|
13
13
|
import { DecryptClickContext } from '../ui/data-inspector';
|
|
14
|
-
import { Spinner } from '../ui/spinner';
|
|
15
14
|
import { AttributePanel } from './attribute-panel';
|
|
16
15
|
import { EventsList } from './events-list';
|
|
17
16
|
import { ResolveHookModal } from './resolve-hook-modal';
|
|
@@ -342,10 +341,8 @@ export function EntityDetailPanel({
|
|
|
342
341
|
size="small"
|
|
343
342
|
className="w-full"
|
|
344
343
|
onClick={handleWakeUp}
|
|
345
|
-
|
|
346
|
-
aria-busy={stoppingSleep}
|
|
344
|
+
loading={stoppingSleep}
|
|
347
345
|
>
|
|
348
|
-
{stoppingSleep ? <Spinner size={16} /> : null}
|
|
349
346
|
Wake Up Sleep
|
|
350
347
|
</Button>
|
|
351
348
|
)}
|
|
@@ -357,10 +354,8 @@ export function EntityDetailPanel({
|
|
|
357
354
|
size="small"
|
|
358
355
|
className="w-full"
|
|
359
356
|
onClick={() => setShowResolveHookModal(true)}
|
|
360
|
-
|
|
361
|
-
aria-busy={resolvingHook}
|
|
357
|
+
loading={resolvingHook}
|
|
362
358
|
>
|
|
363
|
-
{resolvingHook ? <Spinner size={16} /> : null}
|
|
364
359
|
Resolve Hook
|
|
365
360
|
</Button>
|
|
366
361
|
)}
|
|
@@ -26,7 +26,7 @@ export function StreamImagePreview({ data }: { data: Uint8Array }) {
|
|
|
26
26
|
<div className="mb-2 flex items-center justify-between gap-2">
|
|
27
27
|
<span className="text-label-12 text-gray-900">Image Preview</span>
|
|
28
28
|
{url ? (
|
|
29
|
-
<Button asChild size="
|
|
29
|
+
<Button asChild size="small" variant="secondary">
|
|
30
30
|
<a href={url} download={`workflow-stream.${type?.split('/')[1]}`}>
|
|
31
31
|
Download Image
|
|
32
32
|
</a>
|
|
@@ -6,7 +6,7 @@ import { getStreamImageType } from '../lib/stream-image';
|
|
|
6
6
|
import { serializeForClipboard } from './sidebar/copyable-data-block';
|
|
7
7
|
import { StreamImagePreview } from './stream-image-preview';
|
|
8
8
|
import { StreamViewerSkeleton } from './stream-viewer-skeleton';
|
|
9
|
-
import { CopyButton } from './
|
|
9
|
+
import { CopyButton } from './ui/copy-button';
|
|
10
10
|
import { DataInspector } from './ui/data-inspector';
|
|
11
11
|
|
|
12
12
|
// ──────────────────────────────────────────────────────────────────────────
|
|
@@ -55,9 +55,9 @@ const ChunkRow = React.memo(function ChunkRow({ chunk }: { chunk: Chunk }) {
|
|
|
55
55
|
</div>
|
|
56
56
|
{!image && (
|
|
57
57
|
<CopyButton
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
className="
|
|
58
|
+
textToCopy={serializeForClipboard(chunk.value)}
|
|
59
|
+
aria-label="Copy chunk"
|
|
60
|
+
className="-mr-1"
|
|
61
61
|
/>
|
|
62
62
|
)}
|
|
63
63
|
</div>
|
|
@@ -236,8 +236,9 @@ export const Minimap = memo(function Minimap({
|
|
|
236
236
|
const drawToken = (token: string): void => {
|
|
237
237
|
const rects = rectsByToken.get(token);
|
|
238
238
|
if (!rects) return;
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
const color = style.getPropertyValue(token).trim();
|
|
240
|
+
if (!color) return;
|
|
241
|
+
ctx.fillStyle = color;
|
|
241
242
|
ctx.beginPath();
|
|
242
243
|
for (const [x, y, w] of rects) {
|
|
243
244
|
ctx.roundRect(x, y, w, lineHeight, lineHeight / 2);
|
|
@@ -499,7 +500,7 @@ export const Minimap = memo(function Minimap({
|
|
|
499
500
|
<canvas
|
|
500
501
|
ref={canvasRef}
|
|
501
502
|
aria-hidden
|
|
502
|
-
className="pointer-events-none absolute inset-0 h-full w-full mix-blend-multiply
|
|
503
|
+
className="pointer-events-none absolute inset-0 h-full w-full mix-blend-multiply dark:mix-blend-screen"
|
|
503
504
|
/>
|
|
504
505
|
{selection ? (
|
|
505
506
|
<div
|
|
@@ -539,8 +539,6 @@ const TimelineBar = memo(function TimelineBar({
|
|
|
539
539
|
);
|
|
540
540
|
});
|
|
541
541
|
|
|
542
|
-
export { TimelineBar };
|
|
543
|
-
|
|
544
542
|
// ---------------------------------------------------------------------------
|
|
545
543
|
// DeltaMeasureLine (Alt-key measurement overlays: the selected ↔ hovered
|
|
546
544
|
// measurement, and the ambient consecutive-gap indicators shown without a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { RotateCcw,
|
|
3
|
+
import { RotateCcw, ZoomIn, ZoomOut } from 'lucide-react';
|
|
4
4
|
import {
|
|
5
5
|
type ReactNode,
|
|
6
6
|
useCallback,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import { useLoadMoreOnScroll } from '../../hooks/use-load-more-on-scroll';
|
|
14
14
|
import { useReducedMotion } from '../../hooks/use-reduced-motion';
|
|
15
15
|
import { IconButton } from '../ui/icon-button';
|
|
16
|
-
import {
|
|
16
|
+
import { SearchInput } from '../ui/search-input';
|
|
17
17
|
import { Spinner } from '../ui/spinner';
|
|
18
18
|
import { TooltipProvider } from '../ui/tooltip';
|
|
19
19
|
import { TraceDetailPanel } from './components/detail-panel';
|
|
@@ -497,38 +497,15 @@ function TraceViewerContent({
|
|
|
497
497
|
<SplitPane
|
|
498
498
|
scrollContainerRef={scrollContainerRef}
|
|
499
499
|
startHeader={
|
|
500
|
-
<
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
if (e.key === 'Escape' && searchQuery) {
|
|
510
|
-
e.preventDefault();
|
|
511
|
-
e.stopPropagation();
|
|
512
|
-
setSearchQuery('');
|
|
513
|
-
}
|
|
514
|
-
}}
|
|
515
|
-
placeholder="Search spans..."
|
|
516
|
-
aria-label="Search spans"
|
|
517
|
-
className="flex-1 min-w-0 bg-transparent text-label-14 text-gray-1000 placeholder:text-gray-800 outline-none"
|
|
518
|
-
/>
|
|
519
|
-
{searchQuery && (
|
|
520
|
-
<button
|
|
521
|
-
type="button"
|
|
522
|
-
aria-label="Clear search"
|
|
523
|
-
onClick={() => setSearchQuery('')}
|
|
524
|
-
className="-mr-2 hidden h-full max-w-full shrink-0 cursor-pointer items-center rounded-r-md border-0 bg-transparent px-2.5 font-inherit text-label-16 text-gray-900 no-underline transition-colors duration-150 ease-in hover:text-gray-1000 focus-visible:-outline-offset-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ds-focus-color)] min-[961px]:flex"
|
|
525
|
-
>
|
|
526
|
-
<Kbd variant="outline" size="search">
|
|
527
|
-
Esc
|
|
528
|
-
</Kbd>
|
|
529
|
-
</button>
|
|
530
|
-
)}
|
|
531
|
-
</div>
|
|
500
|
+
<SearchInput
|
|
501
|
+
id="trace-viewer-search"
|
|
502
|
+
name="trace-viewer-search"
|
|
503
|
+
label="Search spans"
|
|
504
|
+
placeholder="Search spans…"
|
|
505
|
+
value={searchQuery}
|
|
506
|
+
onValueChange={setSearchQuery}
|
|
507
|
+
className="pl-4"
|
|
508
|
+
/>
|
|
532
509
|
}
|
|
533
510
|
endHeader={
|
|
534
511
|
<TimelineHeader markers={timeMarkers} hoverInfo={hoverInfo} />
|
|
@@ -544,7 +521,7 @@ function TraceViewerContent({
|
|
|
544
521
|
<div ref={loadMoreSentinelRef} className="flex justify-center">
|
|
545
522
|
{isLoadingMore ? (
|
|
546
523
|
<div className="flex items-center justify-center gap-2 py-3 text-label-14 text-gray-800">
|
|
547
|
-
<Spinner size=
|
|
524
|
+
<Spinner size="md" />
|
|
548
525
|
<span>Loading spans…</span>
|
|
549
526
|
</div>
|
|
550
527
|
) : null}
|
|
@@ -579,7 +556,6 @@ function TraceViewerContent({
|
|
|
579
556
|
/>
|
|
580
557
|
<div className="pointer-events-auto flex items-center border border-gray-alpha-400 rounded-md bg-background-100 shadow-sm overflow-hidden divide-x divide-gray-alpha-400">
|
|
581
558
|
<IconButton
|
|
582
|
-
variant="muted"
|
|
583
559
|
size="small"
|
|
584
560
|
onClick={zoomOut}
|
|
585
561
|
disabled={isAtMinZoom}
|
|
@@ -588,7 +564,6 @@ function TraceViewerContent({
|
|
|
588
564
|
<ZoomOut className="w-4 h-4" />
|
|
589
565
|
</IconButton>
|
|
590
566
|
<IconButton
|
|
591
|
-
variant="muted"
|
|
592
567
|
size="small"
|
|
593
568
|
onClick={resetZoom}
|
|
594
569
|
aria-label="Reset zoom"
|
|
@@ -596,7 +571,6 @@ function TraceViewerContent({
|
|
|
596
571
|
<RotateCcw className="w-3.5 h-3.5" />
|
|
597
572
|
</IconButton>
|
|
598
573
|
<IconButton
|
|
599
|
-
variant="muted"
|
|
600
574
|
size="small"
|
|
601
575
|
onClick={zoomIn}
|
|
602
576
|
disabled={isAtMaxZoom}
|