@vectara/vectara-ui 16.3.1 → 16.4.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.
@@ -0,0 +1,118 @@
1
+ export type FakeSpan = {
2
+ id: string;
3
+ parentId: string | null;
4
+ name: string;
5
+ kind: "workflow" | "tool" | "llm" | "search" | "embedding";
6
+ status: "ok" | "error" | "running";
7
+ startAt: string;
8
+ durationMs: number;
9
+ hasChildren?: boolean;
10
+ };
11
+
12
+ export const ROOT_SPANS: FakeSpan[] = [
13
+ {
14
+ id: "wf-1",
15
+ parentId: null,
16
+ name: "Run search workflow",
17
+ kind: "workflow",
18
+ status: "ok",
19
+ startAt: "10:42:17.103",
20
+ durationMs: 3420
21
+ },
22
+ {
23
+ id: "wf-1-c1",
24
+ parentId: "wf-1",
25
+ name: "Generate query embeddings",
26
+ kind: "embedding",
27
+ status: "ok",
28
+ startAt: "10:42:17.110",
29
+ durationMs: 142
30
+ },
31
+ {
32
+ id: "wf-1-c2",
33
+ parentId: "wf-1",
34
+ name: "Vector search (corpus: support_docs)",
35
+ kind: "search",
36
+ status: "ok",
37
+ startAt: "10:42:17.260",
38
+ durationMs: 980,
39
+ // Lazy: chevron shown but no child rows present in initial fetch.
40
+ hasChildren: true
41
+ },
42
+ {
43
+ id: "wf-1-c3",
44
+ parentId: "wf-1",
45
+ name: "Re-rank top-25 candidates",
46
+ kind: "tool",
47
+ status: "ok",
48
+ startAt: "10:42:18.250",
49
+ durationMs: 412
50
+ },
51
+ {
52
+ id: "wf-1-c4",
53
+ parentId: "wf-1",
54
+ name: "Generate summary",
55
+ kind: "llm",
56
+ status: "running",
57
+ startAt: "10:42:18.670",
58
+ durationMs: 1850
59
+ },
60
+ {
61
+ id: "wf-1-c4-c1",
62
+ parentId: "wf-1-c4",
63
+ name: "Build prompt context",
64
+ kind: "tool",
65
+ status: "ok",
66
+ startAt: "10:42:18.671",
67
+ durationMs: 12
68
+ },
69
+ {
70
+ id: "wf-1-c4-c2",
71
+ parentId: "wf-1-c4",
72
+ name: "claude-haiku-4-5 streaming call",
73
+ kind: "llm",
74
+ status: "running",
75
+ startAt: "10:42:18.700",
76
+ durationMs: 1820
77
+ },
78
+ {
79
+ id: "wf-2",
80
+ parentId: null,
81
+ name: "Persist trace",
82
+ kind: "tool",
83
+ status: "error",
84
+ startAt: "10:42:20.523",
85
+ durationMs: 38
86
+ }
87
+ ];
88
+
89
+ // Children of "wf-1-c2"
90
+ export const LAZY_CHILDREN: FakeSpan[] = [
91
+ {
92
+ id: "wf-1-c2-c1",
93
+ parentId: "wf-1-c2",
94
+ name: "Search Vectara API",
95
+ kind: "search",
96
+ status: "ok",
97
+ startAt: "10:42:17.262",
98
+ durationMs: 940
99
+ },
100
+ {
101
+ id: "wf-1-c2-c2",
102
+ parentId: "wf-1-c2",
103
+ name: "Parse filter expression",
104
+ kind: "tool",
105
+ status: "ok",
106
+ startAt: "10:42:17.265",
107
+ durationMs: 4
108
+ },
109
+ {
110
+ id: "wf-1-c2-c3",
111
+ parentId: "wf-1-c2",
112
+ name: "Apply MMR diversification",
113
+ kind: "tool",
114
+ status: "ok",
115
+ startAt: "10:42:18.205",
116
+ durationMs: 32
117
+ }
118
+ ];
@@ -0,0 +1,11 @@
1
+ import { Spans } from "./Spans";
2
+ const SpansSource = require("!!raw-loader!./Spans");
3
+
4
+ export const spans = {
5
+ name: "Spans",
6
+ path: "/spans",
7
+ example: {
8
+ component: <Spans />,
9
+ source: SpansSource.default.toString()
10
+ }
11
+ };
@@ -57,6 +57,7 @@ import { summary } from "./pages/summary";
57
57
  import { skeleton } from "./pages/skeleton";
58
58
  import { superCheckboxGroup } from "./pages/superCheckboxGroup";
59
59
  import { superRadioGroup } from "./pages/superRadioGroup";
60
+ import { spans } from "./pages/spans";
60
61
  import { table } from "./pages/table";
61
62
  import { tabs } from "./pages/tabs";
62
63
  import { text } from "./pages/text";
@@ -87,7 +88,7 @@ export const categories: Category[] = [
87
88
  },
88
89
  {
89
90
  name: "Info",
90
- pages: [table, infoTable, infoList, statList, list, pagination]
91
+ pages: [table, spans, infoTable, infoList, statList, list, pagination]
91
92
  },
92
93
  {
93
94
  name: "Layout",