@optilogic/chat 1.0.0-beta.14 → 1.0.0-beta.16

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.0.0-beta.14",
3
+ "version": "1.0.0-beta.16",
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.0.0-beta.14",
28
- "@optilogic/editor": "1.0.0-beta.14"
27
+ "@optilogic/core": "1.0.0-beta.16",
28
+ "@optilogic/editor": "1.0.0-beta.16"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^18.0.0 || ^19.0.0",
@@ -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
- <IconButton
298
- icon={<Square />}
299
- variant="filled"
300
- size="sm"
301
- aria-label="Stop"
302
- onClick={onStop}
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) */