@optilogic/chat 1.0.0-beta.12 → 1.0.0-beta.13
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 +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/agent-response/AgentResponse.tsx +9 -1
- package/src/components/agent-response/components/ThinkingSection.tsx +1 -1
- package/src/components/agent-timeline/AgentTimeline.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optilogic/chat",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.13",
|
|
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/
|
|
28
|
-
"@optilogic/
|
|
27
|
+
"@optilogic/editor": "1.0.0-beta.13",
|
|
28
|
+
"@optilogic/core": "1.0.0-beta.13"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -92,6 +92,12 @@ export interface AgentResponseProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
92
92
|
* />
|
|
93
93
|
*/
|
|
94
94
|
renderThinkingMarkdown?: (content: string) => React.ReactNode;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Maximum height of the AgentTimeline scrollable container.
|
|
98
|
+
* Defaults to "300px". Set to "none" to disable the constraint.
|
|
99
|
+
*/
|
|
100
|
+
timelineMaxHeight?: string;
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
/**
|
|
@@ -144,6 +150,7 @@ const AgentResponse = React.forwardRef<HTMLDivElement, AgentResponseProps>(
|
|
|
144
150
|
statusContent,
|
|
145
151
|
renderMarkdown,
|
|
146
152
|
renderThinkingMarkdown,
|
|
153
|
+
timelineMaxHeight,
|
|
147
154
|
className,
|
|
148
155
|
...props
|
|
149
156
|
},
|
|
@@ -254,11 +261,12 @@ const AgentResponse = React.forwardRef<HTMLDivElement, AgentResponseProps>(
|
|
|
254
261
|
{/* Thinking Content - AgentTimeline when timeline entries exist, ThinkingSection otherwise */}
|
|
255
262
|
{hasTimelineEntries ? (
|
|
256
263
|
thinkingExpanded && (
|
|
257
|
-
<div className="
|
|
264
|
+
<div className="pl-3 pb-3 border-t border-border">
|
|
258
265
|
<AgentTimeline
|
|
259
266
|
entries={state.timelineEntries!}
|
|
260
267
|
renderMarkdown={renderThinkingMarkdown}
|
|
261
268
|
uiState={timelineUIStateRef.current}
|
|
269
|
+
maxHeight={timelineMaxHeight}
|
|
262
270
|
/>
|
|
263
271
|
</div>
|
|
264
272
|
)
|
|
@@ -110,7 +110,7 @@ const ThinkingSection = React.forwardRef<HTMLDivElement, ThinkingSectionProps>(
|
|
|
110
110
|
className={cn("px-3 pb-3 border-t border-border", className)}
|
|
111
111
|
{...props}
|
|
112
112
|
>
|
|
113
|
-
<div className="mt-2 max-h-[200px] overflow-y-auto
|
|
113
|
+
<div className="mt-2 max-h-[200px] overflow-y-auto">
|
|
114
114
|
{isStructured ? (
|
|
115
115
|
<div className="space-y-0">
|
|
116
116
|
{content.map((step) => (
|
|
@@ -151,7 +151,7 @@ export function AgentTimeline({ entries, renderMarkdown, uiState, maxHeight = "3
|
|
|
151
151
|
return (
|
|
152
152
|
<div
|
|
153
153
|
ref={containerRef}
|
|
154
|
-
className={
|
|
154
|
+
className={maxHeight !== "none" ? "overflow-y-auto" : ""}
|
|
155
155
|
style={scrollStyle}
|
|
156
156
|
>
|
|
157
157
|
{/* Filter + controls bar (sticky within scroll container) */}
|