@locusgraph/loop 0.3.0 → 0.4.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.
Files changed (130) hide show
  1. package/dist/agent/index.d.ts +1 -1
  2. package/dist/agent/pulse/gradient-label.js +70 -17
  3. package/dist/agent/pulse/marks/bars-mark.js +39 -15
  4. package/dist/agent/pulse/marks/glyph-mark.js +57 -16
  5. package/dist/agent/pulse/marks/locus-mark.js +39 -13
  6. package/dist/agent/pulse/marks/orb-mark.js +21 -9
  7. package/dist/agent/pulse/pulse.js +1 -1
  8. package/dist/agent/pulse/use-loop-animation.d.ts +0 -1
  9. package/dist/agent/pulse/use-loop-animation.js +36 -15
  10. package/dist/agent/steps/step-icon.js +20 -13
  11. package/dist/agent/steps/steps.js +39 -37
  12. package/dist/agent/thinking/thinking.js +65 -62
  13. package/dist/agent/tool/json-block.js +10 -7
  14. package/dist/agent/tool/tool-status.d.ts +2 -0
  15. package/dist/agent/tool/tool-status.js +16 -13
  16. package/dist/agent/tool/tool.d.ts +8 -1
  17. package/dist/agent/tool/tool.js +238 -119
  18. package/dist/approval/inbox/inbox-row.d.ts +3 -3
  19. package/dist/approval/inbox/inbox-row.js +248 -86
  20. package/dist/approval/inbox/inbox.d.ts +3 -3
  21. package/dist/approval/inbox/inbox.js +251 -57
  22. package/dist/approval/inbox/virtual-inbox-list.d.ts +3 -3
  23. package/dist/approval/inbox/virtual-inbox-list.js +107 -30
  24. package/dist/approval/memory/memory-review.js +228 -91
  25. package/dist/approval/memory/memory-row.js +192 -56
  26. package/dist/approval/plan/plan-review.js +241 -108
  27. package/dist/approval/plan/plan-step-row.js +184 -77
  28. package/dist/approval/plan/plan-steps.d.ts +1 -1
  29. package/dist/approval/plan/plan-steps.js +2 -2
  30. package/dist/approval/plan/question-choices.js +139 -48
  31. package/dist/approval/plan/question.js +189 -67
  32. package/dist/approval/run/run-bar.js +138 -49
  33. package/dist/approval/shared/approval-line.d.ts +27 -0
  34. package/dist/approval/shared/approval-line.js +85 -0
  35. package/dist/approval/shared/risk-badge.d.ts +3 -5
  36. package/dist/approval/shared/risk-badge.js +11 -19
  37. package/dist/approval/shared/time.d.ts +0 -1
  38. package/dist/approval/shared/time.js +0 -1
  39. package/dist/approval/shared/use-focus-on-mount.js +23 -5
  40. package/dist/approval/shared/use-focus-when-settled.d.ts +2 -0
  41. package/dist/approval/shared/use-focus-when-settled.js +18 -0
  42. package/dist/approval/spend/raise-cap-form.d.ts +2 -2
  43. package/dist/approval/spend/raise-cap-form.js +235 -52
  44. package/dist/approval/spend/spend-gate.js +200 -106
  45. package/dist/approval/spend/spend-math.d.ts +1 -0
  46. package/dist/approval/spend/spend-math.js +5 -2
  47. package/dist/approval/spend/spend-meter.js +5 -5
  48. package/dist/approval/tool/approval.js +157 -96
  49. package/dist/approval/tool/args/args-editor.js +232 -81
  50. package/dist/approval/tool/args/args-field.js +333 -60
  51. package/dist/approval/tool/deny-form.js +114 -32
  52. package/dist/approval/tool/tool-inputs.js +93 -33
  53. package/dist/chat/chat/chat.js +5 -4
  54. package/dist/chat/chat/use-stick-to-bottom.js +116 -63
  55. package/dist/chat/chat/virtual-chat-items.js +129 -34
  56. package/dist/chat/composer/composer-actions.d.ts +1 -2
  57. package/dist/chat/composer/composer-actions.js +136 -50
  58. package/dist/chat/composer/composer-status.d.ts +2 -0
  59. package/dist/chat/composer/composer-status.js +3 -0
  60. package/dist/chat/composer/composer.d.ts +1 -1
  61. package/dist/chat/composer/composer.js +6 -4
  62. package/dist/chat/composer/use-auto-grow.js +29 -8
  63. package/dist/chat/files/files.js +296 -67
  64. package/dist/chat/index.d.ts +1 -1
  65. package/dist/chat/index.js +1 -1
  66. package/dist/chat/reply/fenced-code.js +1 -1
  67. package/dist/chat/reply/markdown-components.js +9 -116
  68. package/dist/chat/reply/reply.js +2 -2
  69. package/dist/chat/turn/group-parts.d.ts +1 -0
  70. package/dist/chat/turn/group-parts.js +6 -3
  71. package/dist/chat/turn/turn.js +13 -4
  72. package/dist/cost/context.js +3 -3
  73. package/dist/cost/cost-steps.js +31 -30
  74. package/dist/cost/cost.js +39 -39
  75. package/dist/cost/model-picker.js +176 -43
  76. package/dist/cost/shared/context-breakdown.js +10 -11
  77. package/dist/cost/shared/model-option-row.js +4 -3
  78. package/dist/cost/shared/step-cost-row.js +11 -12
  79. package/dist/cost/shared/usage-totals.d.ts +1 -0
  80. package/dist/cost/shared/usage-totals.js +19 -1
  81. package/dist/memory/cite.js +190 -59
  82. package/dist/memory/memorized.js +231 -62
  83. package/dist/memory/recall.js +272 -85
  84. package/dist/memory/shared/host-label.d.ts +1 -1
  85. package/dist/memory/shared/host-label.js +2 -2
  86. package/dist/memory/shared/source-mark.js +1 -1
  87. package/dist/memory/sources.d.ts +2 -1
  88. package/dist/memory/sources.js +277 -62
  89. package/dist/shared/decision-summary.js +2 -1
  90. package/dist/shared/line.d.ts +10 -0
  91. package/dist/shared/line.js +11 -0
  92. package/dist/shared/live-status.d.ts +3 -0
  93. package/dist/shared/live-status.js +11 -0
  94. package/dist/shared/reduced-motion.d.ts +1 -0
  95. package/dist/shared/reduced-motion.js +3 -0
  96. package/dist/shared/virtual/use-list-virtualizer.js +2 -0
  97. package/dist/thread/actions/action-button.js +1 -1
  98. package/dist/thread/actions/actions.d.ts +3 -1
  99. package/dist/thread/actions/actions.js +100 -81
  100. package/dist/thread/actions/branch-switcher.js +129 -23
  101. package/dist/thread/canvas/canvas-meta.d.ts +9 -0
  102. package/dist/thread/canvas/canvas-meta.js +35 -0
  103. package/dist/thread/canvas/canvas.d.ts +1 -1
  104. package/dist/thread/canvas/canvas.js +64 -74
  105. package/dist/thread/canvas/version-switcher.d.ts +1 -0
  106. package/dist/thread/canvas/version-switcher.js +161 -45
  107. package/dist/thread/code/code.js +4 -6
  108. package/dist/thread/code/copy-code-button.d.ts +2 -1
  109. package/dist/thread/code/copy-code-button.js +91 -26
  110. package/dist/thread/history/history.d.ts +1 -1
  111. package/dist/thread/history/history.js +104 -104
  112. package/dist/thread/history/row/history-row.js +106 -22
  113. package/dist/thread/history/row/thread-item-menu.js +84 -20
  114. package/dist/thread/history/row/thread-title-editor.js +74 -29
  115. package/dist/thread/history/virtual-history-list.js +83 -46
  116. package/dist/thread/index.d.ts +1 -0
  117. package/dist/thread/index.js +1 -0
  118. package/dist/thread/starters/starters.js +91 -28
  119. package/dist/thread/use-copied.js +40 -10
  120. package/package.json +6 -6
  121. package/dist/agent/shared/status-dot.d.ts +0 -1
  122. package/dist/agent/shared/status-dot.js +0 -1
  123. package/dist/approval/shared/decision-line.d.ts +0 -1
  124. package/dist/approval/shared/decision-line.js +0 -1
  125. package/dist/memory/shared/disclosure.d.ts +0 -6
  126. package/dist/memory/shared/disclosure.js +0 -6
  127. package/dist/shared/panel.d.ts +0 -19
  128. package/dist/shared/panel.js +0 -77
  129. package/dist/shared/status-dot.d.ts +0 -6
  130. package/dist/shared/status-dot.js +0 -20
@@ -1,108 +1,295 @@
1
- import { ChevronRight as ChevronRightIcon, RecentlyViewed as HistoryIcon } from "@carbon/icons-react";
1
+ "use client";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
2
4
  import { Collapsible, CollapsibleContent, CollapsibleTrigger, cn } from "@locusgraph/components";
3
5
  import { pluralize } from "@locusgraph/utils";
4
- import { chevronClass, collapsibleTriggerClass, interactiveRowClass, ruledListClass } from "./shared/disclosure.js";
6
+ import { CaretRight as ChevronRightIcon, ClockCounterClockwise as HistoryIcon } from "@phosphor-icons/react/ssr";
7
+ import { useId } from "react";
8
+ import { lineChevronClass, lineDetailClass, lineDetailLinkClass, lineDetailRowClass, lineMemoryIconClass, lineMemoryObjectClass, lineTriggerClass } from "../shared/line.js";
5
9
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
6
10
  export function relevancePercent(relevance) {
7
11
  return Math.round(Math.min(Math.max(relevance, 0), 1) * 100);
8
12
  }
9
- export function Recall({
10
- memories,
11
- onOpenMemory,
12
- defaultOpen = false,
13
- className
14
- }) {
15
- if (memories.length === 0) return null;
16
- return /*#__PURE__*/_jsxs(Collapsible, {
17
- "data-slot": "recall",
18
- defaultOpen: defaultOpen,
19
- className: cn("flex min-w-0 flex-col gap-2", className),
20
- children: [/*#__PURE__*/_jsxs(CollapsibleTrigger, {
21
- className: collapsibleTriggerClass,
22
- children: [/*#__PURE__*/_jsx(HistoryIcon, {
13
+ export function Recall(t0) {
14
+ const $ = _c(23);
15
+ const {
16
+ memories,
17
+ onOpenMemory,
18
+ defaultOpen: t1,
19
+ className
20
+ } = t0;
21
+ const defaultOpen = t1 === undefined ? false : t1;
22
+ if (memories.length === 0) {
23
+ return null;
24
+ }
25
+ let t2;
26
+ if ($[0] !== className) {
27
+ t2 = cn("flex min-w-0 flex-col", className);
28
+ $[0] = className;
29
+ $[1] = t2;
30
+ } else {
31
+ t2 = $[1];
32
+ }
33
+ let t3;
34
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
35
+ t3 = /*#__PURE__*/_jsx("span", {
36
+ "aria-hidden": true,
37
+ className: lineMemoryIconClass,
38
+ children: /*#__PURE__*/_jsx(HistoryIcon, {
39
+ weight: "bold",
23
40
  "aria-hidden": true
24
- }), "Recalled ", pluralize(memories.length, "memory", "memories"), /*#__PURE__*/_jsx(ChevronRightIcon, {
25
- "aria-hidden": true,
26
- className: chevronClass
41
+ })
42
+ });
43
+ $[2] = t3;
44
+ } else {
45
+ t3 = $[2];
46
+ }
47
+ let t4;
48
+ if ($[3] !== memories.length) {
49
+ t4 = pluralize(memories.length, "memory", "memories");
50
+ $[3] = memories.length;
51
+ $[4] = t4;
52
+ } else {
53
+ t4 = $[4];
54
+ }
55
+ let t5;
56
+ if ($[5] !== t4) {
57
+ t5 = /*#__PURE__*/_jsxs("span", {
58
+ className: "truncate",
59
+ children: ["Recalled", " ", /*#__PURE__*/_jsx("span", {
60
+ className: lineMemoryObjectClass,
61
+ children: t4
27
62
  })]
28
- }), /*#__PURE__*/_jsx(CollapsibleContent, {
63
+ });
64
+ $[5] = t4;
65
+ $[6] = t5;
66
+ } else {
67
+ t5 = $[6];
68
+ }
69
+ let t6;
70
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
71
+ t6 = /*#__PURE__*/_jsx(ChevronRightIcon, {
72
+ weight: "bold",
73
+ "aria-hidden": true,
74
+ className: lineChevronClass
75
+ });
76
+ $[7] = t6;
77
+ } else {
78
+ t6 = $[7];
79
+ }
80
+ let t7;
81
+ if ($[8] !== t5) {
82
+ t7 = /*#__PURE__*/_jsxs(CollapsibleTrigger, {
83
+ className: lineTriggerClass,
84
+ children: [t3, t5, t6]
85
+ });
86
+ $[8] = t5;
87
+ $[9] = t7;
88
+ } else {
89
+ t7 = $[9];
90
+ }
91
+ let t8;
92
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
93
+ t8 = cn(lineDetailClass, "flex flex-col pb-2 text-muted-foreground");
94
+ $[10] = t8;
95
+ } else {
96
+ t8 = $[10];
97
+ }
98
+ let t9;
99
+ if ($[11] !== memories || $[12] !== onOpenMemory) {
100
+ let t10;
101
+ if ($[14] !== onOpenMemory) {
102
+ t10 = memory => /*#__PURE__*/_jsx(RecallRow, {
103
+ memory: memory,
104
+ onOpenMemory: onOpenMemory
105
+ }, memory.id);
106
+ $[14] = onOpenMemory;
107
+ $[15] = t10;
108
+ } else {
109
+ t10 = $[15];
110
+ }
111
+ t9 = memories.map(t10);
112
+ $[11] = memories;
113
+ $[12] = onOpenMemory;
114
+ $[13] = t9;
115
+ } else {
116
+ t9 = $[13];
117
+ }
118
+ let t10;
119
+ if ($[16] !== t9) {
120
+ t10 = /*#__PURE__*/_jsx(CollapsibleContent, {
29
121
  children: /*#__PURE__*/_jsx("ul", {
30
- className: ruledListClass,
31
- children: memories.map(memory => /*#__PURE__*/_jsx(RecallRow, {
32
- memory: memory,
33
- onOpenMemory: onOpenMemory
34
- }, memory.id))
122
+ className: t8,
123
+ children: t9
35
124
  })
36
- })]
37
- });
125
+ });
126
+ $[16] = t9;
127
+ $[17] = t10;
128
+ } else {
129
+ t10 = $[17];
130
+ }
131
+ let t11;
132
+ if ($[18] !== defaultOpen || $[19] !== t10 || $[20] !== t2 || $[21] !== t7) {
133
+ t11 = /*#__PURE__*/_jsxs(Collapsible, {
134
+ "data-slot": "recall",
135
+ defaultOpen: defaultOpen,
136
+ className: t2,
137
+ children: [t7, t10]
138
+ });
139
+ $[18] = defaultOpen;
140
+ $[19] = t10;
141
+ $[20] = t2;
142
+ $[21] = t7;
143
+ $[22] = t11;
144
+ } else {
145
+ t11 = $[22];
146
+ }
147
+ return t11;
38
148
  }
39
- function RelevanceMeter({
40
- memory
41
- }) {
42
- if (memory.relevance === undefined) return null;
43
- const percent = relevancePercent(memory.relevance);
44
- return /*#__PURE__*/_jsxs("span", {
45
- className: "flex shrink-0 items-center gap-2",
46
- children: [/*#__PURE__*/_jsx("span", {
149
+ function Relevance(t0) {
150
+ const $ = _c(6);
151
+ const {
152
+ memory
153
+ } = t0;
154
+ if (memory.relevance === undefined) {
155
+ return null;
156
+ }
157
+ let t1;
158
+ if ($[0] !== memory.relevance) {
159
+ t1 = relevancePercent(memory.relevance);
160
+ $[0] = memory.relevance;
161
+ $[1] = t1;
162
+ } else {
163
+ t1 = $[1];
164
+ }
165
+ const percent = t1;
166
+ const t2 = `Relevance of ${memory.label}`;
167
+ const t3 = `${percent}% relevant`;
168
+ let t4;
169
+ if ($[2] !== percent || $[3] !== t2 || $[4] !== t3) {
170
+ t4 = /*#__PURE__*/_jsxs("span", {
47
171
  role: "meter",
48
- "aria-label": `Relevance of ${memory.label}`,
172
+ "aria-label": t2,
49
173
  "aria-valuemin": 0,
50
174
  "aria-valuemax": 100,
51
175
  "aria-valuenow": percent,
52
- "aria-valuetext": `${percent}% relevant`,
53
- className: "relative h-[3px] w-10 overflow-hidden bg-muted",
54
- children: /*#__PURE__*/_jsx("span", {
55
- className: "absolute inset-y-0 left-0 bg-foreground/60 transition-[width] duration-300 motion-reduce:transition-none",
56
- style: {
57
- width: `${percent}%`
58
- }
59
- })
60
- }), /*#__PURE__*/_jsxs("span", {
61
- className: "w-8 text-right font-mono text-xs text-muted-foreground tabular-nums",
176
+ "aria-valuetext": t3,
177
+ className: "shrink-0 text-xs text-faint tabular-nums",
62
178
  children: [percent, "%"]
63
- })]
64
- });
179
+ });
180
+ $[2] = percent;
181
+ $[3] = t2;
182
+ $[4] = t3;
183
+ $[5] = t4;
184
+ } else {
185
+ t4 = $[5];
186
+ }
187
+ return t4;
188
+ }
189
+ function openMemoryLabel(memory) {
190
+ const relevance = memory.relevance === undefined ? "" : `, ${relevancePercent(memory.relevance)}% relevant`;
191
+ return `Open memory ${memory.label}${relevance}`;
65
192
  }
66
- function RecallRow({
67
- memory,
68
- onOpenMemory
69
- }) {
70
- const content = /*#__PURE__*/_jsxs(_Fragment, {
71
- children: [/*#__PURE__*/_jsxs("span", {
193
+ function RecallRow(t0) {
194
+ const $ = _c(21);
195
+ const {
196
+ memory,
197
+ onOpenMemory
198
+ } = t0;
199
+ const detailId = useId();
200
+ const hasDetail = Boolean(memory.kind || memory.snippet);
201
+ let t1;
202
+ if ($[0] !== memory.label) {
203
+ t1 = /*#__PURE__*/_jsx("span", {
204
+ className: "min-w-0 truncate",
205
+ children: memory.label
206
+ });
207
+ $[0] = memory.label;
208
+ $[1] = t1;
209
+ } else {
210
+ t1 = $[1];
211
+ }
212
+ let t2;
213
+ if ($[2] !== memory) {
214
+ t2 = /*#__PURE__*/_jsx(Relevance, {
215
+ memory: memory
216
+ });
217
+ $[2] = memory;
218
+ $[3] = t2;
219
+ } else {
220
+ t2 = $[3];
221
+ }
222
+ let t3;
223
+ if ($[4] !== t1 || $[5] !== t2) {
224
+ t3 = /*#__PURE__*/_jsxs("span", {
72
225
  className: "flex w-full items-baseline gap-3",
73
- children: [/*#__PURE__*/_jsx("span", {
74
- className: "min-w-0 flex-1 truncate text-sm font-medium",
75
- children: memory.label
76
- }), /*#__PURE__*/_jsx(RelevanceMeter, {
77
- memory: memory
78
- })]
79
- }), (memory.kind || memory.snippet) && /*#__PURE__*/_jsxs("span", {
80
- className: "flex w-full gap-2 text-xs text-muted-foreground",
226
+ children: [t1, t2]
227
+ });
228
+ $[4] = t1;
229
+ $[5] = t2;
230
+ $[6] = t3;
231
+ } else {
232
+ t3 = $[6];
233
+ }
234
+ let t4;
235
+ if ($[7] !== detailId || $[8] !== hasDetail || $[9] !== memory.kind || $[10] !== memory.snippet) {
236
+ t4 = hasDetail && /*#__PURE__*/_jsxs("span", {
237
+ id: detailId,
238
+ className: "line-clamp-2 w-full text-xs text-faint",
81
239
  children: [memory.kind && /*#__PURE__*/_jsx("span", {
82
- className: "shrink-0 font-mono",
240
+ className: "whitespace-nowrap",
83
241
  children: memory.kind
84
242
  }), memory.kind && memory.snippet && /*#__PURE__*/_jsx("span", {
85
243
  "aria-hidden": true,
86
- children: "\xB7"
87
- }), memory.snippet && /*#__PURE__*/_jsx("span", {
88
- className: "line-clamp-2 min-w-0",
89
- children: memory.snippet
90
- })]
91
- })]
92
- });
93
- const rowClass = "flex w-full flex-col items-start gap-1 px-3 py-2.5 text-left";
94
- return /*#__PURE__*/_jsx("li", {
95
- "data-slot": "recall-item",
96
- "data-id": memory.id,
97
- children: onOpenMemory ? /*#__PURE__*/_jsx("button", {
98
- type: "button",
99
- "aria-label": `Open memory ${memory.label}`,
100
- onClick: () => onOpenMemory(memory.id),
101
- className: cn(rowClass, interactiveRowClass),
102
- children: content
103
- }) : /*#__PURE__*/_jsx("div", {
104
- className: rowClass,
105
- children: content
106
- })
107
- });
244
+ children: " \xB7 "
245
+ }), memory.snippet]
246
+ });
247
+ $[7] = detailId;
248
+ $[8] = hasDetail;
249
+ $[9] = memory.kind;
250
+ $[10] = memory.snippet;
251
+ $[11] = t4;
252
+ } else {
253
+ t4 = $[11];
254
+ }
255
+ let t5;
256
+ if ($[12] !== t3 || $[13] !== t4) {
257
+ t5 = /*#__PURE__*/_jsxs(_Fragment, {
258
+ children: [t3, t4]
259
+ });
260
+ $[12] = t3;
261
+ $[13] = t4;
262
+ $[14] = t5;
263
+ } else {
264
+ t5 = $[14];
265
+ }
266
+ const content = t5;
267
+ let t6;
268
+ if ($[15] !== content || $[16] !== detailId || $[17] !== hasDetail || $[18] !== memory || $[19] !== onOpenMemory) {
269
+ const rowClass = cn(lineDetailRowClass, "flex-col items-start gap-0.5");
270
+ t6 = /*#__PURE__*/_jsx("li", {
271
+ "data-slot": "recall-item",
272
+ "data-id": memory.id,
273
+ children: onOpenMemory ? /*#__PURE__*/_jsx("button", {
274
+ type: "button",
275
+ "aria-label": openMemoryLabel(memory),
276
+ "aria-describedby": hasDetail ? detailId : undefined,
277
+ onClick: () => onOpenMemory(memory.id),
278
+ className: cn(rowClass, lineDetailLinkClass),
279
+ children: content
280
+ }) : /*#__PURE__*/_jsx("div", {
281
+ className: rowClass,
282
+ children: content
283
+ })
284
+ });
285
+ $[15] = content;
286
+ $[16] = detailId;
287
+ $[17] = hasDetail;
288
+ $[18] = memory;
289
+ $[19] = onOpenMemory;
290
+ $[20] = t6;
291
+ } else {
292
+ t6 = $[20];
293
+ }
294
+ return t6;
108
295
  }
@@ -1,6 +1,6 @@
1
1
  import type { Citation, SourceUrlPart } from "../../types.js";
2
2
  export declare function hostLabel(url: string | undefined): string | undefined;
3
3
  export type SourceItem = Citation | SourceUrlPart;
4
- export declare function toCitation(item: SourceItem, position: number): Citation;
4
+ export declare function toCitation(item: SourceItem, position: number, firstIndex?: number): Citation;
5
5
  export declare function sourceKey(item: SourceItem, position: number): string;
6
6
  export declare function sourceInitial(citation: Citation): string;
@@ -9,10 +9,10 @@ export function hostLabel(url) {
9
9
  function isSourceUrlPart(item) {
10
10
  return "type" in item && item.type === "source-url";
11
11
  }
12
- export function toCitation(item, position) {
12
+ export function toCitation(item, position, firstIndex = 1) {
13
13
  if (!isSourceUrlPart(item)) return item;
14
14
  return {
15
- index: position + 1,
15
+ index: firstIndex + position,
16
16
  title: item.title ?? hostLabel(item.url) ?? item.url,
17
17
  url: item.url
18
18
  };
@@ -8,7 +8,7 @@ export function SourceMark({
8
8
  return /*#__PURE__*/_jsx("span", {
9
9
  "aria-hidden": true,
10
10
  "data-slot": "source-mark",
11
- className: cn("flex size-4 shrink-0 items-center justify-center bg-muted font-mono text-[11px] leading-none font-medium text-muted-foreground ring-1 ring-border", className),
11
+ className: cn("flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-2xs leading-none font-medium text-muted-foreground uppercase", className),
12
12
  children: sourceInitial(citation)
13
13
  });
14
14
  }
@@ -4,6 +4,7 @@ export type SourcesProps = {
4
4
  sources: SourceItem[];
5
5
  onOpen?: (citation: Citation) => void;
6
6
  defaultOpen?: boolean;
7
+ firstIndex?: number;
7
8
  className?: string;
8
9
  };
9
- export declare function Sources({ sources, onOpen, defaultOpen, className }: SourcesProps): import("react").JSX.Element | null;
10
+ export declare function Sources({ sources, onOpen, defaultOpen, firstIndex, className, }: SourcesProps): import("react").JSX.Element | null;