@optilogic/chat 1.3.4 → 1.3.5

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/index.cjs CHANGED
@@ -28,7 +28,18 @@ var React11__namespace = /*#__PURE__*/_interopNamespace(React11);
28
28
 
29
29
  // src/components/agent-response/AgentResponse.tsx
30
30
  var ActivityIndicators = React11__namespace.forwardRef(
31
- ({ toolCalls, knowledge, memory, statusUpdates = [], className, ...props }, ref) => {
31
+ ({
32
+ toolCalls,
33
+ knowledge,
34
+ memory,
35
+ statusUpdates = [],
36
+ statusUpdateAnchor,
37
+ toolCallsAnchor,
38
+ knowledgeAnchor,
39
+ memoryAnchor,
40
+ className,
41
+ ...props
42
+ }, ref) => {
32
43
  const hasAnyActivity = toolCalls.length > 0 || knowledge.length > 0 || memory.length > 0 || statusUpdates.length > 0;
33
44
  if (!hasAnyActivity) return null;
34
45
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: core.cn("flex items-center gap-2", className), ...props, children: [
@@ -36,6 +47,7 @@ var ActivityIndicators = React11__namespace.forwardRef(
36
47
  /* @__PURE__ */ jsxRuntime.jsx(core.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
37
48
  "button",
38
49
  {
50
+ "data-tour": statusUpdateAnchor,
39
51
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
40
52
  onClick: (e) => e.stopPropagation(),
41
53
  children: [
@@ -56,6 +68,7 @@ var ActivityIndicators = React11__namespace.forwardRef(
56
68
  /* @__PURE__ */ jsxRuntime.jsx(core.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
57
69
  "button",
58
70
  {
71
+ "data-tour": toolCallsAnchor,
59
72
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
60
73
  onClick: (e) => e.stopPropagation(),
61
74
  children: [
@@ -76,6 +89,7 @@ var ActivityIndicators = React11__namespace.forwardRef(
76
89
  /* @__PURE__ */ jsxRuntime.jsx(core.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
77
90
  "button",
78
91
  {
92
+ "data-tour": knowledgeAnchor,
79
93
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
80
94
  onClick: (e) => e.stopPropagation(),
81
95
  children: [
@@ -96,6 +110,7 @@ var ActivityIndicators = React11__namespace.forwardRef(
96
110
  /* @__PURE__ */ jsxRuntime.jsx(core.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
97
111
  "button",
98
112
  {
113
+ "data-tour": memoryAnchor,
99
114
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
100
115
  onClick: (e) => e.stopPropagation(),
101
116
  children: [
@@ -158,6 +173,11 @@ var MetadataRow = React11__namespace.forwardRef(
158
173
  statusContent,
159
174
  status,
160
175
  elapsedTime,
176
+ thinkingToggleAnchor,
177
+ statusUpdateAnchor,
178
+ toolCallsAnchor,
179
+ knowledgeAnchor,
180
+ memoryAnchor,
161
181
  className,
162
182
  ...props
163
183
  }, ref) => {
@@ -193,6 +213,7 @@ var MetadataRow = React11__namespace.forwardRef(
193
213
  hasThinking ? /* @__PURE__ */ jsxRuntime.jsx(
194
214
  "button",
195
215
  {
216
+ "data-tour": thinkingToggleAnchor,
196
217
  onClick: onToggle,
197
218
  className: "flex items-center gap-1.5 hover:bg-muted/50 -ml-1.5 pl-1.5 pr-2 py-0.5 rounded transition-colors shrink-0",
198
219
  children: leftContent
@@ -205,7 +226,11 @@ var MetadataRow = React11__namespace.forwardRef(
205
226
  toolCalls,
206
227
  knowledge,
207
228
  memory,
208
- statusUpdates
229
+ statusUpdates,
230
+ statusUpdateAnchor,
231
+ toolCallsAnchor,
232
+ knowledgeAnchor,
233
+ memoryAnchor
209
234
  }
210
235
  )
211
236
  ]
@@ -276,6 +301,9 @@ var ActionBar = React11__namespace.forwardRef(
276
301
  feedback,
277
302
  onFeedbackChange,
278
303
  onResponseCopy,
304
+ copyAnchor,
305
+ thumbsUpAnchor,
306
+ thumbsDownAnchor,
279
307
  className,
280
308
  ...props
281
309
  }, ref) => {
@@ -316,6 +344,7 @@ var ActionBar = React11__namespace.forwardRef(
316
344
  /* @__PURE__ */ jsxRuntime.jsx(
317
345
  "button",
318
346
  {
347
+ "data-tour": copyAnchor,
319
348
  onClick: handleCopy,
320
349
  className: "p-1.5 rounded hover:bg-muted transition-colors text-muted-foreground hover:text-foreground",
321
350
  title: copied ? "Copied!" : "Copy response",
@@ -325,6 +354,7 @@ var ActionBar = React11__namespace.forwardRef(
325
354
  /* @__PURE__ */ jsxRuntime.jsx(
326
355
  "button",
327
356
  {
357
+ "data-tour": thumbsUpAnchor,
328
358
  onClick: handleThumbsUp,
329
359
  className: core.cn(
330
360
  "p-1.5 rounded hover:bg-muted transition-colors",
@@ -337,6 +367,7 @@ var ActionBar = React11__namespace.forwardRef(
337
367
  /* @__PURE__ */ jsxRuntime.jsx(
338
368
  "button",
339
369
  {
370
+ "data-tour": thumbsDownAnchor,
340
371
  onClick: handleThumbsDown,
341
372
  className: core.cn(
342
373
  "p-1.5 rounded hover:bg-muted transition-colors",
@@ -1350,6 +1381,7 @@ var AgentResponse = React11__namespace.forwardRef(
1350
1381
  renderThinkingMarkdown,
1351
1382
  timelineMaxHeight,
1352
1383
  classNames,
1384
+ anchors,
1353
1385
  className,
1354
1386
  ...props
1355
1387
  }, ref) => {
@@ -1408,10 +1440,15 @@ var AgentResponse = React11__namespace.forwardRef(
1408
1440
  statusUpdates: state.statusUpdates,
1409
1441
  statusContent,
1410
1442
  status: state.status,
1411
- elapsedTime
1443
+ elapsedTime,
1444
+ thinkingToggleAnchor: anchors?.thinkingToggle,
1445
+ statusUpdateAnchor: anchors?.statusUpdate,
1446
+ toolCallsAnchor: anchors?.toolCalls,
1447
+ knowledgeAnchor: anchors?.knowledge,
1448
+ memoryAnchor: anchors?.memory
1412
1449
  }
1413
1450
  ),
1414
- hasTimelineEntries ? thinkingExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-3 border-t border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
1451
+ hasTimelineEntries ? thinkingExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-3 border-t border-border", "data-tour": anchors?.thinkingSection, children: /* @__PURE__ */ jsxRuntime.jsx(
1415
1452
  AgentTimeline,
1416
1453
  {
1417
1454
  entries: state.timelineEntries,
@@ -1422,6 +1459,7 @@ var AgentResponse = React11__namespace.forwardRef(
1422
1459
  ) }) : /* @__PURE__ */ jsxRuntime.jsx(
1423
1460
  ThinkingSection,
1424
1461
  {
1462
+ "data-tour": anchors?.thinkingSection,
1425
1463
  content: state.thinkingSteps && state.thinkingSteps.length > 0 ? state.thinkingSteps : state.thinking,
1426
1464
  isExpanded: thinkingExpanded,
1427
1465
  renderMarkdown: renderThinkingMarkdown
@@ -1455,7 +1493,10 @@ var AgentResponse = React11__namespace.forwardRef(
1455
1493
  totalTimeSeconds,
1456
1494
  feedback,
1457
1495
  onFeedbackChange,
1458
- onResponseCopy
1496
+ onResponseCopy,
1497
+ copyAnchor: anchors?.copyAction,
1498
+ thumbsUpAnchor: anchors?.thumbsUp,
1499
+ thumbsDownAnchor: anchors?.thumbsDown
1459
1500
  }
1460
1501
  )
1461
1502
  ]
@@ -1585,6 +1626,7 @@ var UserPromptInput = React11__namespace.forwardRef(
1585
1626
  enableTags = false,
1586
1627
  onTagCreate,
1587
1628
  onTagDelete,
1629
+ anchors,
1588
1630
  className,
1589
1631
  ...props
1590
1632
  }, ref) => {
@@ -1704,6 +1746,7 @@ var UserPromptInput = React11__namespace.forwardRef(
1704
1746
  isSubmitting && onStop ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { content: stopTooltip, disabled: !stopTooltip, children: /* @__PURE__ */ jsxRuntime.jsx(
1705
1747
  core.IconButton,
1706
1748
  {
1749
+ "data-tour": anchors?.stopButton,
1707
1750
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Square, {}),
1708
1751
  variant: "filled",
1709
1752
  size: "sm",
@@ -1714,6 +1757,7 @@ var UserPromptInput = React11__namespace.forwardRef(
1714
1757
  ) }) : /* @__PURE__ */ jsxRuntime.jsx(
1715
1758
  core.IconButton,
1716
1759
  {
1760
+ "data-tour": anchors?.sendButton,
1717
1761
  icon: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, {}),
1718
1762
  variant: "filled",
1719
1763
  size: "sm",