@optilogic/chat 1.3.1 → 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/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/agent-response/AgentResponse.tsx +27 -2
- package/src/components/agent-response/index.ts +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -318,6 +318,12 @@ declare const HITLInteractionRecord: React.ForwardRefExoticComponent<HITLInterac
|
|
|
318
318
|
* Displays thinking, tool calls, knowledge retrieval, memory access, and final response.
|
|
319
319
|
*/
|
|
320
320
|
|
|
321
|
+
interface AgentResponseClassNames {
|
|
322
|
+
/** Classes for the inner container (border, rounded corners, overflow) */
|
|
323
|
+
container?: string;
|
|
324
|
+
/** Classes for the response content section (background, padding) */
|
|
325
|
+
response?: string;
|
|
326
|
+
}
|
|
321
327
|
interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
322
328
|
/** The response state to render */
|
|
323
329
|
state: AgentResponseState;
|
|
@@ -389,6 +395,21 @@ interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
389
395
|
* Defaults to "300px". Set to "none" to disable the constraint.
|
|
390
396
|
*/
|
|
391
397
|
timelineMaxHeight?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Class name overrides for internal elements.
|
|
400
|
+
* Use this to customize the container border/background or response section styling.
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* // Transparent background and borders
|
|
404
|
+
* <AgentResponse
|
|
405
|
+
* state={state}
|
|
406
|
+
* classNames={{
|
|
407
|
+
* container: "border-transparent",
|
|
408
|
+
* response: "bg-transparent",
|
|
409
|
+
* }}
|
|
410
|
+
* />
|
|
411
|
+
*/
|
|
412
|
+
classNames?: AgentResponseClassNames;
|
|
392
413
|
}
|
|
393
414
|
/**
|
|
394
415
|
* AgentResponse Component
|
package/dist/index.d.ts
CHANGED
|
@@ -318,6 +318,12 @@ declare const HITLInteractionRecord: React.ForwardRefExoticComponent<HITLInterac
|
|
|
318
318
|
* Displays thinking, tool calls, knowledge retrieval, memory access, and final response.
|
|
319
319
|
*/
|
|
320
320
|
|
|
321
|
+
interface AgentResponseClassNames {
|
|
322
|
+
/** Classes for the inner container (border, rounded corners, overflow) */
|
|
323
|
+
container?: string;
|
|
324
|
+
/** Classes for the response content section (background, padding) */
|
|
325
|
+
response?: string;
|
|
326
|
+
}
|
|
321
327
|
interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
322
328
|
/** The response state to render */
|
|
323
329
|
state: AgentResponseState;
|
|
@@ -389,6 +395,21 @@ interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
389
395
|
* Defaults to "300px". Set to "none" to disable the constraint.
|
|
390
396
|
*/
|
|
391
397
|
timelineMaxHeight?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Class name overrides for internal elements.
|
|
400
|
+
* Use this to customize the container border/background or response section styling.
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* // Transparent background and borders
|
|
404
|
+
* <AgentResponse
|
|
405
|
+
* state={state}
|
|
406
|
+
* classNames={{
|
|
407
|
+
* container: "border-transparent",
|
|
408
|
+
* response: "bg-transparent",
|
|
409
|
+
* }}
|
|
410
|
+
* />
|
|
411
|
+
*/
|
|
412
|
+
classNames?: AgentResponseClassNames;
|
|
392
413
|
}
|
|
393
414
|
/**
|
|
394
415
|
* AgentResponse Component
|
package/dist/index.js
CHANGED
|
@@ -1324,6 +1324,7 @@ var AgentResponse = React11.forwardRef(
|
|
|
1324
1324
|
renderMarkdown,
|
|
1325
1325
|
renderThinkingMarkdown,
|
|
1326
1326
|
timelineMaxHeight,
|
|
1327
|
+
classNames,
|
|
1327
1328
|
className,
|
|
1328
1329
|
...props
|
|
1329
1330
|
}, ref) => {
|
|
@@ -1368,7 +1369,7 @@ var AgentResponse = React11.forwardRef(
|
|
|
1368
1369
|
onMouseLeave: () => setIsHovered(false),
|
|
1369
1370
|
...props,
|
|
1370
1371
|
children: [
|
|
1371
|
-
/* @__PURE__ */ jsxs("div", { className: "border border-border rounded-lg overflow-hidden", children: [
|
|
1372
|
+
/* @__PURE__ */ jsxs("div", { className: cn("border border-border rounded-lg overflow-hidden", classNames?.container), children: [
|
|
1372
1373
|
showMetadataRow && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1373
1374
|
/* @__PURE__ */ jsx(
|
|
1374
1375
|
MetadataRow,
|
|
@@ -1414,7 +1415,8 @@ var AgentResponse = React11.forwardRef(
|
|
|
1414
1415
|
{
|
|
1415
1416
|
className: cn(
|
|
1416
1417
|
"bg-muted/50 p-4",
|
|
1417
|
-
showMetadataRow && "border-t border-border"
|
|
1418
|
+
showMetadataRow && "border-t border-border",
|
|
1419
|
+
classNames?.response
|
|
1418
1420
|
),
|
|
1419
1421
|
children: renderMarkdown ? renderMarkdown(state.response) : /* @__PURE__ */ jsx("span", { className: "whitespace-pre-wrap", children: state.response })
|
|
1420
1422
|
}
|