@optilogic/chat 1.0.0-beta.13 → 1.0.0-beta.15
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 +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/agent-response/AgentResponse.tsx +1 -1
- package/src/components/agent-timeline/AgentTimeline.tsx +1 -1
- package/src/components/user-prompt-input/UserPromptInput.tsx +13 -8
- package/src/components/user-prompt-input/types.ts +4 -0
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.15",
|
|
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/editor": "1.0.0-beta.
|
|
28
|
-
"@optilogic/core": "1.0.0-beta.
|
|
27
|
+
"@optilogic/editor": "1.0.0-beta.15",
|
|
28
|
+
"@optilogic/core": "1.0.0-beta.15"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -261,7 +261,7 @@ const AgentResponse = React.forwardRef<HTMLDivElement, AgentResponseProps>(
|
|
|
261
261
|
{/* Thinking Content - AgentTimeline when timeline entries exist, ThinkingSection otherwise */}
|
|
262
262
|
{hasTimelineEntries ? (
|
|
263
263
|
thinkingExpanded && (
|
|
264
|
-
<div className="
|
|
264
|
+
<div className="pb-3 border-t border-border">
|
|
265
265
|
<AgentTimeline
|
|
266
266
|
entries={state.timelineEntries!}
|
|
267
267
|
renderMarkdown={renderThinkingMarkdown}
|
|
@@ -155,7 +155,7 @@ export function AgentTimeline({ entries, renderMarkdown, uiState, maxHeight = "3
|
|
|
155
155
|
style={scrollStyle}
|
|
156
156
|
>
|
|
157
157
|
{/* Filter + controls bar (sticky within scroll container) */}
|
|
158
|
-
<div className="sticky top-0 z-10 bg-background flex items-center gap-1 py-1.5 mb-1 border-b border-border/50 flex-wrap">
|
|
158
|
+
<div className="sticky top-0 z-10 bg-background flex items-center gap-1 py-1.5 mb-1 border-b border-border/50 flex-wrap pl-2">
|
|
159
159
|
{/* Type filter chips */}
|
|
160
160
|
{TYPE_CONFIG.filter((tc) => availableTypes.has(tc.type)).map((tc) => {
|
|
161
161
|
const isActive = activeFilters.has(tc.type);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Send, Loader2, Square } from "lucide-react";
|
|
3
|
-
import { cn, IconButton } from "@optilogic/core";
|
|
3
|
+
import { cn, IconButton, Tooltip } from "@optilogic/core";
|
|
4
4
|
import {
|
|
5
5
|
SlateEditor,
|
|
6
6
|
Text,
|
|
@@ -143,6 +143,8 @@ export const UserPromptInput = React.forwardRef<
|
|
|
143
143
|
disabled = false,
|
|
144
144
|
isSubmitting = false,
|
|
145
145
|
onStop,
|
|
146
|
+
stopTooltip,
|
|
147
|
+
stopClassName,
|
|
146
148
|
disableWhileSubmitting = true,
|
|
147
149
|
autoFocus = false,
|
|
148
150
|
refocusAfterSubmit = false,
|
|
@@ -294,13 +296,16 @@ export const UserPromptInput = React.forwardRef<
|
|
|
294
296
|
|
|
295
297
|
{/* Send/Stop button */}
|
|
296
298
|
{isSubmitting && onStop ? (
|
|
297
|
-
<
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
299
|
+
<Tooltip content={stopTooltip} disabled={!stopTooltip}>
|
|
300
|
+
<IconButton
|
|
301
|
+
icon={<Square />}
|
|
302
|
+
variant="filled"
|
|
303
|
+
size="sm"
|
|
304
|
+
aria-label={stopTooltip || "Stop"}
|
|
305
|
+
onClick={onStop}
|
|
306
|
+
className={stopClassName}
|
|
307
|
+
/>
|
|
308
|
+
</Tooltip>
|
|
304
309
|
) : (
|
|
305
310
|
<IconButton
|
|
306
311
|
icon={
|
|
@@ -18,6 +18,10 @@ export interface UserPromptInputProps
|
|
|
18
18
|
isSubmitting?: boolean;
|
|
19
19
|
/** Called when user clicks Stop during submission */
|
|
20
20
|
onStop?: () => void;
|
|
21
|
+
/** Tooltip text shown on hover over the stop button */
|
|
22
|
+
stopTooltip?: string;
|
|
23
|
+
/** Additional CSS class names applied to the stop button */
|
|
24
|
+
stopClassName?: string;
|
|
21
25
|
/** Whether to disable input while submitting (default: true) */
|
|
22
26
|
disableWhileSubmitting?: boolean;
|
|
23
27
|
/** Auto-focus the editor when mounted (handles Slate initialization timing) */
|