@optilogic/chat 1.3.2 → 1.3.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optilogic/chat",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Chat UI components for Optilogic - AgentResponse and related components for LLM interactions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -24,8 +24,8 @@
24
24
  "README.md"
25
25
  ],
26
26
  "dependencies": {
27
- "@optilogic/core": "1.3.2",
28
- "@optilogic/editor": "1.3.2"
27
+ "@optilogic/editor": "1.3.3",
28
+ "@optilogic/core": "1.3.3"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^18.0.0 || ^19.0.0",
@@ -15,6 +15,13 @@ import type { HITLInteraction } from "../hitl-interactions";
15
15
  import { AgentTimeline, createTimelineUIState } from "../agent-timeline";
16
16
  import type { TimelineUIState } from "../agent-timeline";
17
17
 
18
+ export interface AgentResponseClassNames {
19
+ /** Classes for the inner container (border, rounded corners, overflow) */
20
+ container?: string;
21
+ /** Classes for the response content section (background, padding) */
22
+ response?: string;
23
+ }
24
+
18
25
  export interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
19
26
  /** The response state to render */
20
27
  state: AgentResponseState;
@@ -98,6 +105,22 @@ export interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement>
98
105
  * Defaults to "300px". Set to "none" to disable the constraint.
99
106
  */
100
107
  timelineMaxHeight?: string;
108
+
109
+ /**
110
+ * Class name overrides for internal elements.
111
+ * Use this to customize the container border/background or response section styling.
112
+ *
113
+ * @example
114
+ * // Transparent background and borders
115
+ * <AgentResponse
116
+ * state={state}
117
+ * classNames={{
118
+ * container: "border-transparent",
119
+ * response: "bg-transparent",
120
+ * }}
121
+ * />
122
+ */
123
+ classNames?: AgentResponseClassNames;
101
124
  }
102
125
 
103
126
  /**
@@ -151,6 +174,7 @@ const AgentResponse = React.forwardRef<HTMLDivElement, AgentResponseProps>(
151
174
  renderMarkdown,
152
175
  renderThinkingMarkdown,
153
176
  timelineMaxHeight,
177
+ classNames,
154
178
  className,
155
179
  ...props
156
180
  },
@@ -241,7 +265,7 @@ const AgentResponse = React.forwardRef<HTMLDivElement, AgentResponseProps>(
241
265
  {...props}
242
266
  >
243
267
  {/* Message Content Container */}
244
- <div className="border border-border rounded-lg overflow-hidden">
268
+ <div className={cn("border border-border rounded-lg overflow-hidden", classNames?.container)}>
245
269
  {/* Metadata Row - show if there's any metadata or thinking */}
246
270
  {showMetadataRow && (
247
271
  <>
@@ -297,7 +321,8 @@ const AgentResponse = React.forwardRef<HTMLDivElement, AgentResponseProps>(
297
321
  <div
298
322
  className={cn(
299
323
  "bg-muted/50 p-4",
300
- showMetadataRow && "border-t border-border"
324
+ showMetadataRow && "border-t border-border",
325
+ classNames?.response
301
326
  )}
302
327
  >
303
328
  {renderMarkdown ? (
@@ -7,7 +7,7 @@
7
7
 
8
8
  // Main component
9
9
  export { AgentResponse } from "./AgentResponse";
10
- export type { AgentResponseProps } from "./AgentResponse";
10
+ export type { AgentResponseProps, AgentResponseClassNames } from "./AgentResponse";
11
11
 
12
12
  // Sub-components (for advanced customization)
13
13
  export {