@optilogic/chat 1.3.4 → 1.3.6

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.d.cts CHANGED
@@ -332,6 +332,41 @@ interface AgentResponseClassNames {
332
332
  /** Classes for the response content section (background, padding) */
333
333
  response?: string;
334
334
  }
335
+ /**
336
+ * Tour anchors (`data-tour` attribute values) to attach to specific elements
337
+ * inside an AgentResponse so a tour or test harness can target them.
338
+ *
339
+ * Each value, when provided, is rendered as `data-tour={value}` on the
340
+ * corresponding element. Omit a field to skip stamping the attribute on that
341
+ * element. Pair with the matching CSS selector form:
342
+ *
343
+ * <AgentResponse anchors={{ copyAction: "chat-action-copy" }} />
344
+ * // selector: '[data-tour="chat-action-copy"]'
345
+ *
346
+ * This is the standard convention in the @optilogic component library for
347
+ * threading tour IDs into elements that are rendered by internal
348
+ * sub-components and not otherwise reachable from the caller.
349
+ */
350
+ interface AgentResponseAnchors {
351
+ /** Status updates popover trigger in the metadata row (live status indicator). */
352
+ statusUpdate?: string;
353
+ /** Thinking expand/collapse toggle button in the metadata row. */
354
+ thinkingToggle?: string;
355
+ /** Thinking section content panel (when expanded). */
356
+ thinkingSection?: string;
357
+ /** Tool calls popover trigger in the metadata row. */
358
+ toolCalls?: string;
359
+ /** Knowledge popover trigger in the metadata row. */
360
+ knowledge?: string;
361
+ /** Memory popover trigger in the metadata row. */
362
+ memory?: string;
363
+ /** Copy button in the action bar. */
364
+ copyAction?: string;
365
+ /** Thumbs up button in the action bar. */
366
+ thumbsUp?: string;
367
+ /** Thumbs down button in the action bar. */
368
+ thumbsDown?: string;
369
+ }
335
370
  interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
336
371
  /** The response state to render */
337
372
  state: AgentResponseState;
@@ -418,6 +453,21 @@ interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
418
453
  * />
419
454
  */
420
455
  classNames?: AgentResponseClassNames;
456
+ /**
457
+ * Tour anchors threaded into internal sub-components. See
458
+ * {@link AgentResponseAnchors} for the available element keys.
459
+ *
460
+ * @example
461
+ * <AgentResponse
462
+ * state={state}
463
+ * anchors={{
464
+ * copyAction: "chat-action-copy",
465
+ * thumbsUp: "chat-action-thumbs-up",
466
+ * thumbsDown: "chat-action-thumbs-down",
467
+ * }}
468
+ * />
469
+ */
470
+ anchors?: AgentResponseAnchors;
421
471
  }
422
472
  /**
423
473
  * AgentResponse Component
@@ -468,6 +518,14 @@ interface ActivityIndicatorsProps extends React.HTMLAttributes<HTMLDivElement> {
468
518
  memory: MemoryItem[];
469
519
  /** Status updates to display */
470
520
  statusUpdates?: StatusItem[];
521
+ /** Tour anchor (`data-tour`) on the status updates popover trigger. */
522
+ statusUpdateAnchor?: string;
523
+ /** Tour anchor (`data-tour`) on the tool calls popover trigger. */
524
+ toolCallsAnchor?: string;
525
+ /** Tour anchor (`data-tour`) on the knowledge popover trigger. */
526
+ knowledgeAnchor?: string;
527
+ /** Tour anchor (`data-tour`) on the memory popover trigger. */
528
+ memoryAnchor?: string;
471
529
  }
472
530
  /**
473
531
  * ActivityIndicators Component
@@ -511,6 +569,16 @@ interface MetadataRowProps extends React.HTMLAttributes<HTMLDivElement> {
511
569
  status: AgentResponseStatus;
512
570
  /** Elapsed time in seconds */
513
571
  elapsedTime: number;
572
+ /** Tour anchor (`data-tour`) on the thinking expand/collapse toggle button. */
573
+ thinkingToggleAnchor?: string;
574
+ /** Tour anchor forwarded to the status updates popover trigger inside ActivityIndicators. */
575
+ statusUpdateAnchor?: string;
576
+ /** Tour anchor forwarded to the tool calls popover trigger inside ActivityIndicators. */
577
+ toolCallsAnchor?: string;
578
+ /** Tour anchor forwarded to the knowledge popover trigger inside ActivityIndicators. */
579
+ knowledgeAnchor?: string;
580
+ /** Tour anchor forwarded to the memory popover trigger inside ActivityIndicators. */
581
+ memoryAnchor?: string;
514
582
  }
515
583
  /**
516
584
  * MetadataRow Component
@@ -591,6 +659,15 @@ interface ActionBarProps extends React.HTMLAttributes<HTMLDivElement> {
591
659
  onFeedbackChange?: (feedback: FeedbackValue) => void;
592
660
  /** Callback when response is copied */
593
661
  onResponseCopy?: (response: string) => void;
662
+ /**
663
+ * Tour anchor (rendered as `data-tour`) on the copy button.
664
+ * Use with the `data-tour` convention to target this button from a tour step.
665
+ */
666
+ copyAnchor?: string;
667
+ /** Tour anchor (`data-tour`) on the thumbs up button. */
668
+ thumbsUpAnchor?: string;
669
+ /** Tour anchor (`data-tour`) on the thumbs down button. */
670
+ thumbsDownAnchor?: string;
594
671
  }
595
672
  /**
596
673
  * ActionBar Component
@@ -873,6 +950,18 @@ interface UserPromptInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
873
950
  onTagCreate?: (tag: string) => void;
874
951
  /** Callback when a tag is deleted */
875
952
  onTagDelete?: (tag: string) => void;
953
+ /** Tour anchors threaded onto internal sub-elements. */
954
+ anchors?: UserPromptInputAnchors;
955
+ }
956
+ /**
957
+ * Tour anchors (`data-tour` attribute values) for elements inside the
958
+ * UserPromptInput that the caller cannot otherwise reach.
959
+ */
960
+ interface UserPromptInputAnchors {
961
+ /** Send button (rendered when not submitting). */
962
+ sendButton?: string;
963
+ /** Stop button (rendered while submitting if `onStop` is provided). */
964
+ stopButton?: string;
876
965
  }
877
966
  interface UserPromptInputRef {
878
967
  /** Focus the editor */
@@ -979,4 +1068,4 @@ declare function parseResponseSegments(text: string): ResponseSegment[];
979
1068
  */
980
1069
  declare const INLINE_ACTION_PROMPT = "\n<inline_actions>\nWhen your response should include interactive components (like query viewers,\ndata tables, or executable actions), embed them as fenced code blocks using\nthe `json:action` language tag:\n\n```json:action\n{\n \"type\": \"action-type-here\",\n ...action-specific fields\n}\n```\n\nRules:\n- Each block must contain valid JSON with a \"type\" field.\n- The \"type\" must match a registered action component on the frontend.\n- Multiple action blocks per response are allowed.\n- Surround action blocks with normal markdown text for user context.\n- The action block is rendered as an interactive component in the chat UI.\n- SQL strings inside JSON must be properly escaped (newlines as \\n, quotes as \\\").\n\nAvailable action types:\n\n- \"optimap-query\": Displays SQL queries with a button to execute them and\n update the 3D globe map.\n Required fields:\n - type: \"optimap-query\"\n - locations_sql: string (the validated locations SQL query)\n - routes_sql: string (the validated routes SQL query)\n - database_name: string (the target database name)\n</inline_actions>\n";
981
1070
 
982
- export { ActionBar, type ActionBarProps, type ActionComponentRegistry, ActionMarkdownRenderer, type ActionMarkdownRendererProps, type ActionSegment, ActivityIndicators, type ActivityIndicatorsProps, type AgentMessage, AgentResponse, type AgentResponseProps, type AgentResponseState, type AgentResponseStatus, type AgentRun, AgentTimeline, type DisplayEntry, type FeedbackValue, type GenericWebSocketMessage, type HITLInteraction, HITLInteractionRecord, type HITLInteractionRecordProps, type HITLQuestion, HITLQuestionPanel, type HITLQuestionPanelProps, type HITLResponseData, HITLSection, type HITLSectionProps, INLINE_ACTION_PROMPT, type InlineActionProps, type KnowledgeItem, type MarkdownSegment, type MemoryItem, MetadataRow, type MetadataRowProps, type PotentialResponse, type ResponseSegment, type StatusItem, type ThinkingContent, ThinkingSection, type ThinkingSectionProps, type ThinkingStep, type TimelineEntry, type TimelineEntryType, type TimelineUIState, type ToolCall, TruncatedMessage, type TruncatedMessageProps, type UseAgentResponseAccumulatorOptions, type UseAgentResponseAccumulatorReturn, type UseThinkingTimerOptions, UserPrompt, UserPromptInput, type UserPromptInputProps, type UserPromptInputRef, type UserPromptProps, buildResponseString, buildTimelineEntries, createTimelineUIState, deduplicateEntries, formatTime, formatTotalTime, groupIntoAgentRuns, initialAgentResponseState, parseResponseSegments, reduceAgentMessage, useAgentResponseAccumulator, useThinkingTimer };
1071
+ export { ActionBar, type ActionBarProps, type ActionComponentRegistry, ActionMarkdownRenderer, type ActionMarkdownRendererProps, type ActionSegment, ActivityIndicators, type ActivityIndicatorsProps, type AgentMessage, AgentResponse, type AgentResponseAnchors, type AgentResponseClassNames, type AgentResponseProps, type AgentResponseState, type AgentResponseStatus, type AgentRun, AgentTimeline, type DisplayEntry, type FeedbackValue, type GenericWebSocketMessage, type HITLInteraction, HITLInteractionRecord, type HITLInteractionRecordProps, type HITLQuestion, HITLQuestionPanel, type HITLQuestionPanelProps, type HITLResponseData, HITLSection, type HITLSectionProps, INLINE_ACTION_PROMPT, type InlineActionProps, type KnowledgeItem, type MarkdownSegment, type MemoryItem, MetadataRow, type MetadataRowProps, type PotentialResponse, type ResponseSegment, type StatusItem, type ThinkingContent, ThinkingSection, type ThinkingSectionProps, type ThinkingStep, type TimelineEntry, type TimelineEntryType, type TimelineUIState, type ToolCall, TruncatedMessage, type TruncatedMessageProps, type UseAgentResponseAccumulatorOptions, type UseAgentResponseAccumulatorReturn, type UseThinkingTimerOptions, UserPrompt, UserPromptInput, type UserPromptInputProps, type UserPromptInputRef, type UserPromptProps, buildResponseString, buildTimelineEntries, createTimelineUIState, deduplicateEntries, formatTime, formatTotalTime, groupIntoAgentRuns, initialAgentResponseState, parseResponseSegments, reduceAgentMessage, useAgentResponseAccumulator, useThinkingTimer };
package/dist/index.d.ts CHANGED
@@ -332,6 +332,41 @@ interface AgentResponseClassNames {
332
332
  /** Classes for the response content section (background, padding) */
333
333
  response?: string;
334
334
  }
335
+ /**
336
+ * Tour anchors (`data-tour` attribute values) to attach to specific elements
337
+ * inside an AgentResponse so a tour or test harness can target them.
338
+ *
339
+ * Each value, when provided, is rendered as `data-tour={value}` on the
340
+ * corresponding element. Omit a field to skip stamping the attribute on that
341
+ * element. Pair with the matching CSS selector form:
342
+ *
343
+ * <AgentResponse anchors={{ copyAction: "chat-action-copy" }} />
344
+ * // selector: '[data-tour="chat-action-copy"]'
345
+ *
346
+ * This is the standard convention in the @optilogic component library for
347
+ * threading tour IDs into elements that are rendered by internal
348
+ * sub-components and not otherwise reachable from the caller.
349
+ */
350
+ interface AgentResponseAnchors {
351
+ /** Status updates popover trigger in the metadata row (live status indicator). */
352
+ statusUpdate?: string;
353
+ /** Thinking expand/collapse toggle button in the metadata row. */
354
+ thinkingToggle?: string;
355
+ /** Thinking section content panel (when expanded). */
356
+ thinkingSection?: string;
357
+ /** Tool calls popover trigger in the metadata row. */
358
+ toolCalls?: string;
359
+ /** Knowledge popover trigger in the metadata row. */
360
+ knowledge?: string;
361
+ /** Memory popover trigger in the metadata row. */
362
+ memory?: string;
363
+ /** Copy button in the action bar. */
364
+ copyAction?: string;
365
+ /** Thumbs up button in the action bar. */
366
+ thumbsUp?: string;
367
+ /** Thumbs down button in the action bar. */
368
+ thumbsDown?: string;
369
+ }
335
370
  interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
336
371
  /** The response state to render */
337
372
  state: AgentResponseState;
@@ -418,6 +453,21 @@ interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
418
453
  * />
419
454
  */
420
455
  classNames?: AgentResponseClassNames;
456
+ /**
457
+ * Tour anchors threaded into internal sub-components. See
458
+ * {@link AgentResponseAnchors} for the available element keys.
459
+ *
460
+ * @example
461
+ * <AgentResponse
462
+ * state={state}
463
+ * anchors={{
464
+ * copyAction: "chat-action-copy",
465
+ * thumbsUp: "chat-action-thumbs-up",
466
+ * thumbsDown: "chat-action-thumbs-down",
467
+ * }}
468
+ * />
469
+ */
470
+ anchors?: AgentResponseAnchors;
421
471
  }
422
472
  /**
423
473
  * AgentResponse Component
@@ -468,6 +518,14 @@ interface ActivityIndicatorsProps extends React.HTMLAttributes<HTMLDivElement> {
468
518
  memory: MemoryItem[];
469
519
  /** Status updates to display */
470
520
  statusUpdates?: StatusItem[];
521
+ /** Tour anchor (`data-tour`) on the status updates popover trigger. */
522
+ statusUpdateAnchor?: string;
523
+ /** Tour anchor (`data-tour`) on the tool calls popover trigger. */
524
+ toolCallsAnchor?: string;
525
+ /** Tour anchor (`data-tour`) on the knowledge popover trigger. */
526
+ knowledgeAnchor?: string;
527
+ /** Tour anchor (`data-tour`) on the memory popover trigger. */
528
+ memoryAnchor?: string;
471
529
  }
472
530
  /**
473
531
  * ActivityIndicators Component
@@ -511,6 +569,16 @@ interface MetadataRowProps extends React.HTMLAttributes<HTMLDivElement> {
511
569
  status: AgentResponseStatus;
512
570
  /** Elapsed time in seconds */
513
571
  elapsedTime: number;
572
+ /** Tour anchor (`data-tour`) on the thinking expand/collapse toggle button. */
573
+ thinkingToggleAnchor?: string;
574
+ /** Tour anchor forwarded to the status updates popover trigger inside ActivityIndicators. */
575
+ statusUpdateAnchor?: string;
576
+ /** Tour anchor forwarded to the tool calls popover trigger inside ActivityIndicators. */
577
+ toolCallsAnchor?: string;
578
+ /** Tour anchor forwarded to the knowledge popover trigger inside ActivityIndicators. */
579
+ knowledgeAnchor?: string;
580
+ /** Tour anchor forwarded to the memory popover trigger inside ActivityIndicators. */
581
+ memoryAnchor?: string;
514
582
  }
515
583
  /**
516
584
  * MetadataRow Component
@@ -591,6 +659,15 @@ interface ActionBarProps extends React.HTMLAttributes<HTMLDivElement> {
591
659
  onFeedbackChange?: (feedback: FeedbackValue) => void;
592
660
  /** Callback when response is copied */
593
661
  onResponseCopy?: (response: string) => void;
662
+ /**
663
+ * Tour anchor (rendered as `data-tour`) on the copy button.
664
+ * Use with the `data-tour` convention to target this button from a tour step.
665
+ */
666
+ copyAnchor?: string;
667
+ /** Tour anchor (`data-tour`) on the thumbs up button. */
668
+ thumbsUpAnchor?: string;
669
+ /** Tour anchor (`data-tour`) on the thumbs down button. */
670
+ thumbsDownAnchor?: string;
594
671
  }
595
672
  /**
596
673
  * ActionBar Component
@@ -873,6 +950,18 @@ interface UserPromptInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
873
950
  onTagCreate?: (tag: string) => void;
874
951
  /** Callback when a tag is deleted */
875
952
  onTagDelete?: (tag: string) => void;
953
+ /** Tour anchors threaded onto internal sub-elements. */
954
+ anchors?: UserPromptInputAnchors;
955
+ }
956
+ /**
957
+ * Tour anchors (`data-tour` attribute values) for elements inside the
958
+ * UserPromptInput that the caller cannot otherwise reach.
959
+ */
960
+ interface UserPromptInputAnchors {
961
+ /** Send button (rendered when not submitting). */
962
+ sendButton?: string;
963
+ /** Stop button (rendered while submitting if `onStop` is provided). */
964
+ stopButton?: string;
876
965
  }
877
966
  interface UserPromptInputRef {
878
967
  /** Focus the editor */
@@ -979,4 +1068,4 @@ declare function parseResponseSegments(text: string): ResponseSegment[];
979
1068
  */
980
1069
  declare const INLINE_ACTION_PROMPT = "\n<inline_actions>\nWhen your response should include interactive components (like query viewers,\ndata tables, or executable actions), embed them as fenced code blocks using\nthe `json:action` language tag:\n\n```json:action\n{\n \"type\": \"action-type-here\",\n ...action-specific fields\n}\n```\n\nRules:\n- Each block must contain valid JSON with a \"type\" field.\n- The \"type\" must match a registered action component on the frontend.\n- Multiple action blocks per response are allowed.\n- Surround action blocks with normal markdown text for user context.\n- The action block is rendered as an interactive component in the chat UI.\n- SQL strings inside JSON must be properly escaped (newlines as \\n, quotes as \\\").\n\nAvailable action types:\n\n- \"optimap-query\": Displays SQL queries with a button to execute them and\n update the 3D globe map.\n Required fields:\n - type: \"optimap-query\"\n - locations_sql: string (the validated locations SQL query)\n - routes_sql: string (the validated routes SQL query)\n - database_name: string (the target database name)\n</inline_actions>\n";
981
1070
 
982
- export { ActionBar, type ActionBarProps, type ActionComponentRegistry, ActionMarkdownRenderer, type ActionMarkdownRendererProps, type ActionSegment, ActivityIndicators, type ActivityIndicatorsProps, type AgentMessage, AgentResponse, type AgentResponseProps, type AgentResponseState, type AgentResponseStatus, type AgentRun, AgentTimeline, type DisplayEntry, type FeedbackValue, type GenericWebSocketMessage, type HITLInteraction, HITLInteractionRecord, type HITLInteractionRecordProps, type HITLQuestion, HITLQuestionPanel, type HITLQuestionPanelProps, type HITLResponseData, HITLSection, type HITLSectionProps, INLINE_ACTION_PROMPT, type InlineActionProps, type KnowledgeItem, type MarkdownSegment, type MemoryItem, MetadataRow, type MetadataRowProps, type PotentialResponse, type ResponseSegment, type StatusItem, type ThinkingContent, ThinkingSection, type ThinkingSectionProps, type ThinkingStep, type TimelineEntry, type TimelineEntryType, type TimelineUIState, type ToolCall, TruncatedMessage, type TruncatedMessageProps, type UseAgentResponseAccumulatorOptions, type UseAgentResponseAccumulatorReturn, type UseThinkingTimerOptions, UserPrompt, UserPromptInput, type UserPromptInputProps, type UserPromptInputRef, type UserPromptProps, buildResponseString, buildTimelineEntries, createTimelineUIState, deduplicateEntries, formatTime, formatTotalTime, groupIntoAgentRuns, initialAgentResponseState, parseResponseSegments, reduceAgentMessage, useAgentResponseAccumulator, useThinkingTimer };
1071
+ export { ActionBar, type ActionBarProps, type ActionComponentRegistry, ActionMarkdownRenderer, type ActionMarkdownRendererProps, type ActionSegment, ActivityIndicators, type ActivityIndicatorsProps, type AgentMessage, AgentResponse, type AgentResponseAnchors, type AgentResponseClassNames, type AgentResponseProps, type AgentResponseState, type AgentResponseStatus, type AgentRun, AgentTimeline, type DisplayEntry, type FeedbackValue, type GenericWebSocketMessage, type HITLInteraction, HITLInteractionRecord, type HITLInteractionRecordProps, type HITLQuestion, HITLQuestionPanel, type HITLQuestionPanelProps, type HITLResponseData, HITLSection, type HITLSectionProps, INLINE_ACTION_PROMPT, type InlineActionProps, type KnowledgeItem, type MarkdownSegment, type MemoryItem, MetadataRow, type MetadataRowProps, type PotentialResponse, type ResponseSegment, type StatusItem, type ThinkingContent, ThinkingSection, type ThinkingSectionProps, type ThinkingStep, type TimelineEntry, type TimelineEntryType, type TimelineUIState, type ToolCall, TruncatedMessage, type TruncatedMessageProps, type UseAgentResponseAccumulatorOptions, type UseAgentResponseAccumulatorReturn, type UseThinkingTimerOptions, UserPrompt, UserPromptInput, type UserPromptInputProps, type UserPromptInputRef, type UserPromptProps, buildResponseString, buildTimelineEntries, createTimelineUIState, deduplicateEntries, formatTime, formatTotalTime, groupIntoAgentRuns, initialAgentResponseState, parseResponseSegments, reduceAgentMessage, useAgentResponseAccumulator, useThinkingTimer };
package/dist/index.js CHANGED
@@ -7,7 +7,18 @@ import { SlateEditor, Text } from '@optilogic/editor';
7
7
 
8
8
  // src/components/agent-response/AgentResponse.tsx
9
9
  var ActivityIndicators = React11.forwardRef(
10
- ({ toolCalls, knowledge, memory, statusUpdates = [], className, ...props }, ref) => {
10
+ ({
11
+ toolCalls,
12
+ knowledge,
13
+ memory,
14
+ statusUpdates = [],
15
+ statusUpdateAnchor,
16
+ toolCallsAnchor,
17
+ knowledgeAnchor,
18
+ memoryAnchor,
19
+ className,
20
+ ...props
21
+ }, ref) => {
11
22
  const hasAnyActivity = toolCalls.length > 0 || knowledge.length > 0 || memory.length > 0 || statusUpdates.length > 0;
12
23
  if (!hasAnyActivity) return null;
13
24
  return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: [
@@ -15,6 +26,7 @@ var ActivityIndicators = React11.forwardRef(
15
26
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
16
27
  "button",
17
28
  {
29
+ "data-tour": statusUpdateAnchor,
18
30
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
19
31
  onClick: (e) => e.stopPropagation(),
20
32
  children: [
@@ -35,6 +47,7 @@ var ActivityIndicators = React11.forwardRef(
35
47
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
36
48
  "button",
37
49
  {
50
+ "data-tour": toolCallsAnchor,
38
51
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
39
52
  onClick: (e) => e.stopPropagation(),
40
53
  children: [
@@ -55,6 +68,7 @@ var ActivityIndicators = React11.forwardRef(
55
68
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
56
69
  "button",
57
70
  {
71
+ "data-tour": knowledgeAnchor,
58
72
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
59
73
  onClick: (e) => e.stopPropagation(),
60
74
  children: [
@@ -75,6 +89,7 @@ var ActivityIndicators = React11.forwardRef(
75
89
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
76
90
  "button",
77
91
  {
92
+ "data-tour": memoryAnchor,
78
93
  className: "flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",
79
94
  onClick: (e) => e.stopPropagation(),
80
95
  children: [
@@ -137,6 +152,11 @@ var MetadataRow = React11.forwardRef(
137
152
  statusContent,
138
153
  status,
139
154
  elapsedTime,
155
+ thinkingToggleAnchor,
156
+ statusUpdateAnchor,
157
+ toolCallsAnchor,
158
+ knowledgeAnchor,
159
+ memoryAnchor,
140
160
  className,
141
161
  ...props
142
162
  }, ref) => {
@@ -172,8 +192,9 @@ var MetadataRow = React11.forwardRef(
172
192
  hasThinking ? /* @__PURE__ */ jsx(
173
193
  "button",
174
194
  {
195
+ "data-tour": thinkingToggleAnchor,
175
196
  onClick: onToggle,
176
- 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",
197
+ className: "flex items-center gap-1.5 hover:bg-hover -ml-1.5 pl-1.5 pr-2 py-0.5 rounded transition-colors shrink-0",
177
198
  children: leftContent
178
199
  }
179
200
  ) : /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 shrink-0", children: leftContent }),
@@ -184,7 +205,11 @@ var MetadataRow = React11.forwardRef(
184
205
  toolCalls,
185
206
  knowledge,
186
207
  memory,
187
- statusUpdates
208
+ statusUpdates,
209
+ statusUpdateAnchor,
210
+ toolCallsAnchor,
211
+ knowledgeAnchor,
212
+ memoryAnchor
188
213
  }
189
214
  )
190
215
  ]
@@ -204,7 +229,7 @@ var ThinkingStepItem = ({ step, renderMarkdown }) => {
204
229
  "button",
205
230
  {
206
231
  onClick: toggleCollapse,
207
- className: "w-full flex items-center gap-1.5 py-1.5 px-2 hover:bg-muted/50 transition-colors text-left",
232
+ className: "w-full flex items-center gap-1.5 py-1.5 px-2 hover:bg-hover transition-colors text-left",
208
233
  style: { paddingLeft: `${indentPadding + 8}px` },
209
234
  children: [
210
235
  isCollapsed ? /* @__PURE__ */ jsx(ChevronRight, { className: "w-3 h-3 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3 text-muted-foreground flex-shrink-0" }),
@@ -255,6 +280,9 @@ var ActionBar = React11.forwardRef(
255
280
  feedback,
256
281
  onFeedbackChange,
257
282
  onResponseCopy,
283
+ copyAnchor,
284
+ thumbsUpAnchor,
285
+ thumbsDownAnchor,
258
286
  className,
259
287
  ...props
260
288
  }, ref) => {
@@ -295,8 +323,9 @@ var ActionBar = React11.forwardRef(
295
323
  /* @__PURE__ */ jsx(
296
324
  "button",
297
325
  {
326
+ "data-tour": copyAnchor,
298
327
  onClick: handleCopy,
299
- className: "p-1.5 rounded hover:bg-muted transition-colors text-muted-foreground hover:text-foreground",
328
+ className: "p-1.5 rounded hover:bg-hover transition-colors text-muted-foreground hover:text-foreground",
300
329
  title: copied ? "Copied!" : "Copy response",
301
330
  children: copied ? /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-green-500" }) : /* @__PURE__ */ jsx(Copy, { className: "w-4 h-4" })
302
331
  }
@@ -304,9 +333,10 @@ var ActionBar = React11.forwardRef(
304
333
  /* @__PURE__ */ jsx(
305
334
  "button",
306
335
  {
336
+ "data-tour": thumbsUpAnchor,
307
337
  onClick: handleThumbsUp,
308
338
  className: cn(
309
- "p-1.5 rounded hover:bg-muted transition-colors",
339
+ "p-1.5 rounded hover:bg-hover transition-colors",
310
340
  isThumbsUp ? "text-green-500" : "text-muted-foreground hover:text-foreground"
311
341
  ),
312
342
  title: "Good response",
@@ -316,9 +346,10 @@ var ActionBar = React11.forwardRef(
316
346
  /* @__PURE__ */ jsx(
317
347
  "button",
318
348
  {
349
+ "data-tour": thumbsDownAnchor,
319
350
  onClick: handleThumbsDown,
320
351
  className: cn(
321
- "p-1.5 rounded hover:bg-muted transition-colors",
352
+ "p-1.5 rounded hover:bg-hover transition-colors",
322
353
  isThumbsDown ? "text-red-500" : "text-muted-foreground hover:text-foreground"
323
354
  ),
324
355
  title: "Poor response",
@@ -606,7 +637,7 @@ var HITLSection = React11.forwardRef(
606
637
  "button",
607
638
  {
608
639
  onClick: toggleExpanded,
609
- className: "w-full flex items-center gap-2 py-2 px-3 hover:bg-muted/50 transition-colors text-left",
640
+ className: "w-full flex items-center gap-2 py-2 px-3 hover:bg-hover transition-colors text-left",
610
641
  children: [
611
642
  isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
612
643
  /* @__PURE__ */ jsx(MessageCircleQuestion, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
@@ -1123,7 +1154,7 @@ function TimelineAgentBlock({
1123
1154
  "button",
1124
1155
  {
1125
1156
  onClick: onToggleCollapsed,
1126
- className: "w-full flex items-center gap-1.5 py-1 hover:bg-muted/50 -ml-1 pl-1 pr-2 rounded transition-colors text-left",
1157
+ className: "w-full flex items-center gap-1.5 py-1 hover:bg-hover -ml-1 pl-1 pr-2 rounded transition-colors text-left",
1127
1158
  children: [
1128
1159
  isCollapsed ? /* @__PURE__ */ jsx(ChevronRight, { className: "w-3 h-3 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3 text-muted-foreground flex-shrink-0" }),
1129
1160
  /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-foreground/80", children: block.agentName }),
@@ -1239,7 +1270,7 @@ function AgentTimeline({ entries, renderMarkdown, uiState, maxHeight = "300px" }
1239
1270
  "button",
1240
1271
  {
1241
1272
  onClick: () => toggleFilter(tc.type),
1242
- className: `inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] transition-colors ${isActive ? "bg-accent text-accent-foreground ring-1 ring-accent-foreground/20" : "text-muted-foreground/60 hover:text-muted-foreground hover:bg-muted/50"}`,
1273
+ className: `inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] transition-colors ${isActive ? "bg-accent text-accent-foreground ring-1 ring-accent-foreground/20" : "text-muted-foreground/60 hover:text-muted-foreground hover:bg-hover"}`,
1243
1274
  title: `${isActive ? "Hide" : "Show only"} ${tc.label}`,
1244
1275
  children: [
1245
1276
  /* @__PURE__ */ jsx(tc.icon, { className: "w-3 h-3" }),
@@ -1263,7 +1294,7 @@ function AgentTimeline({ entries, renderMarkdown, uiState, maxHeight = "300px" }
1263
1294
  "button",
1264
1295
  {
1265
1296
  onClick: collapseAll,
1266
- className: "inline-flex items-center gap-0.5 text-[10px] text-muted-foreground/60 hover:text-muted-foreground px-1 py-0.5 rounded hover:bg-muted/50 transition-colors",
1297
+ className: "inline-flex items-center gap-0.5 text-[10px] text-muted-foreground/60 hover:text-muted-foreground px-1 py-0.5 rounded hover:bg-hover transition-colors",
1267
1298
  title: "Collapse all",
1268
1299
  children: /* @__PURE__ */ jsx(ChevronsDownUp, { className: "w-3 h-3" })
1269
1300
  }
@@ -1272,7 +1303,7 @@ function AgentTimeline({ entries, renderMarkdown, uiState, maxHeight = "300px" }
1272
1303
  "button",
1273
1304
  {
1274
1305
  onClick: expandAll,
1275
- className: "inline-flex items-center gap-0.5 text-[10px] text-muted-foreground/60 hover:text-muted-foreground px-1 py-0.5 rounded hover:bg-muted/50 transition-colors",
1306
+ className: "inline-flex items-center gap-0.5 text-[10px] text-muted-foreground/60 hover:text-muted-foreground px-1 py-0.5 rounded hover:bg-hover transition-colors",
1276
1307
  title: "Expand all",
1277
1308
  children: /* @__PURE__ */ jsx(ChevronsUpDown, { className: "w-3 h-3" })
1278
1309
  }
@@ -1329,6 +1360,7 @@ var AgentResponse = React11.forwardRef(
1329
1360
  renderThinkingMarkdown,
1330
1361
  timelineMaxHeight,
1331
1362
  classNames,
1363
+ anchors,
1332
1364
  className,
1333
1365
  ...props
1334
1366
  }, ref) => {
@@ -1387,10 +1419,15 @@ var AgentResponse = React11.forwardRef(
1387
1419
  statusUpdates: state.statusUpdates,
1388
1420
  statusContent,
1389
1421
  status: state.status,
1390
- elapsedTime
1422
+ elapsedTime,
1423
+ thinkingToggleAnchor: anchors?.thinkingToggle,
1424
+ statusUpdateAnchor: anchors?.statusUpdate,
1425
+ toolCallsAnchor: anchors?.toolCalls,
1426
+ knowledgeAnchor: anchors?.knowledge,
1427
+ memoryAnchor: anchors?.memory
1391
1428
  }
1392
1429
  ),
1393
- hasTimelineEntries ? thinkingExpanded && /* @__PURE__ */ jsx("div", { className: "pb-3 border-t border-border", children: /* @__PURE__ */ jsx(
1430
+ hasTimelineEntries ? thinkingExpanded && /* @__PURE__ */ jsx("div", { className: "pb-3 border-t border-border", "data-tour": anchors?.thinkingSection, children: /* @__PURE__ */ jsx(
1394
1431
  AgentTimeline,
1395
1432
  {
1396
1433
  entries: state.timelineEntries,
@@ -1401,6 +1438,7 @@ var AgentResponse = React11.forwardRef(
1401
1438
  ) }) : /* @__PURE__ */ jsx(
1402
1439
  ThinkingSection,
1403
1440
  {
1441
+ "data-tour": anchors?.thinkingSection,
1404
1442
  content: state.thinkingSteps && state.thinkingSteps.length > 0 ? state.thinkingSteps : state.thinking,
1405
1443
  isExpanded: thinkingExpanded,
1406
1444
  renderMarkdown: renderThinkingMarkdown
@@ -1434,7 +1472,10 @@ var AgentResponse = React11.forwardRef(
1434
1472
  totalTimeSeconds,
1435
1473
  feedback,
1436
1474
  onFeedbackChange,
1437
- onResponseCopy
1475
+ onResponseCopy,
1476
+ copyAnchor: anchors?.copyAction,
1477
+ thumbsUpAnchor: anchors?.thumbsUp,
1478
+ thumbsDownAnchor: anchors?.thumbsDown
1438
1479
  }
1439
1480
  )
1440
1481
  ]
@@ -1564,6 +1605,7 @@ var UserPromptInput = React11.forwardRef(
1564
1605
  enableTags = false,
1565
1606
  onTagCreate,
1566
1607
  onTagDelete,
1608
+ anchors,
1567
1609
  className,
1568
1610
  ...props
1569
1611
  }, ref) => {
@@ -1683,6 +1725,7 @@ var UserPromptInput = React11.forwardRef(
1683
1725
  isSubmitting && onStop ? /* @__PURE__ */ jsx(Tooltip, { content: stopTooltip, disabled: !stopTooltip, children: /* @__PURE__ */ jsx(
1684
1726
  IconButton,
1685
1727
  {
1728
+ "data-tour": anchors?.stopButton,
1686
1729
  icon: /* @__PURE__ */ jsx(Square, {}),
1687
1730
  variant: "filled",
1688
1731
  size: "sm",
@@ -1693,6 +1736,7 @@ var UserPromptInput = React11.forwardRef(
1693
1736
  ) }) : /* @__PURE__ */ jsx(
1694
1737
  IconButton,
1695
1738
  {
1739
+ "data-tour": anchors?.sendButton,
1696
1740
  icon: isSubmitting ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx(Send, {}),
1697
1741
  variant: "filled",
1698
1742
  size: "sm",