@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/dist/index.d.cts
CHANGED
|
@@ -787,6 +787,10 @@ interface UserPromptInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
787
787
|
isSubmitting?: boolean;
|
|
788
788
|
/** Called when user clicks Stop during submission */
|
|
789
789
|
onStop?: () => void;
|
|
790
|
+
/** Tooltip text shown on hover over the stop button */
|
|
791
|
+
stopTooltip?: string;
|
|
792
|
+
/** Additional CSS class names applied to the stop button */
|
|
793
|
+
stopClassName?: string;
|
|
790
794
|
/** Whether to disable input while submitting (default: true) */
|
|
791
795
|
disableWhileSubmitting?: boolean;
|
|
792
796
|
/** Auto-focus the editor when mounted (handles Slate initialization timing) */
|
package/dist/index.d.ts
CHANGED
|
@@ -787,6 +787,10 @@ interface UserPromptInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
787
787
|
isSubmitting?: boolean;
|
|
788
788
|
/** Called when user clicks Stop during submission */
|
|
789
789
|
onStop?: () => void;
|
|
790
|
+
/** Tooltip text shown on hover over the stop button */
|
|
791
|
+
stopTooltip?: string;
|
|
792
|
+
/** Additional CSS class names applied to the stop button */
|
|
793
|
+
stopClassName?: string;
|
|
790
794
|
/** Whether to disable input while submitting (default: true) */
|
|
791
795
|
disableWhileSubmitting?: boolean;
|
|
792
796
|
/** Auto-focus the editor when mounted (handles Slate initialization timing) */
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React11 from 'react';
|
|
2
2
|
import { useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
3
|
-
import { cn, Popover, PopoverTrigger, PopoverContent, Button, Textarea, IconButton, LoadingSpinner } from '@optilogic/core';
|
|
3
|
+
import { cn, Popover, PopoverTrigger, PopoverContent, Button, Textarea, Tooltip, IconButton, LoadingSpinner } from '@optilogic/core';
|
|
4
4
|
import { Activity, Wrench, Book, HardDrive, Check, Copy, ThumbsUp, ThumbsDown, ChevronDown, ChevronRight, MessageCircleQuestion, Square, Loader2, Send, ChevronUp, Brain, BookOpen, MessageSquare, AlertCircle, ChevronsDownUp, ChevronsUpDown } from 'lucide-react';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { SlateEditor, Text } from '@optilogic/editor';
|
|
@@ -1227,7 +1227,7 @@ function AgentTimeline({ entries, renderMarkdown, uiState, maxHeight = "300px" }
|
|
|
1227
1227
|
className: maxHeight !== "none" ? "overflow-y-auto" : "",
|
|
1228
1228
|
style: scrollStyle,
|
|
1229
1229
|
children: [
|
|
1230
|
-
/* @__PURE__ */ jsxs("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", children: [
|
|
1230
|
+
/* @__PURE__ */ jsxs("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", children: [
|
|
1231
1231
|
TYPE_CONFIG.filter((tc) => availableTypes.has(tc.type)).map((tc) => {
|
|
1232
1232
|
const isActive = activeFilters.has(tc.type);
|
|
1233
1233
|
const count = entries.filter((e) => e.type === tc.type).length;
|
|
@@ -1385,7 +1385,7 @@ var AgentResponse = React11.forwardRef(
|
|
|
1385
1385
|
elapsedTime
|
|
1386
1386
|
}
|
|
1387
1387
|
),
|
|
1388
|
-
hasTimelineEntries ? thinkingExpanded && /* @__PURE__ */ jsx("div", { className: "
|
|
1388
|
+
hasTimelineEntries ? thinkingExpanded && /* @__PURE__ */ jsx("div", { className: "pb-3 border-t border-border", children: /* @__PURE__ */ jsx(
|
|
1389
1389
|
AgentTimeline,
|
|
1390
1390
|
{
|
|
1391
1391
|
entries: state.timelineEntries,
|
|
@@ -1546,6 +1546,8 @@ var UserPromptInput = React11.forwardRef(
|
|
|
1546
1546
|
disabled = false,
|
|
1547
1547
|
isSubmitting = false,
|
|
1548
1548
|
onStop,
|
|
1549
|
+
stopTooltip,
|
|
1550
|
+
stopClassName,
|
|
1549
1551
|
disableWhileSubmitting = true,
|
|
1550
1552
|
autoFocus = false,
|
|
1551
1553
|
refocusAfterSubmit = false,
|
|
@@ -1672,16 +1674,17 @@ var UserPromptInput = React11.forwardRef(
|
|
|
1672
1674
|
) }),
|
|
1673
1675
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pl-2 pr-1 pb-1 pt-1", children: [
|
|
1674
1676
|
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: renderActions?.() }),
|
|
1675
|
-
isSubmitting && onStop ? /* @__PURE__ */ jsx(
|
|
1677
|
+
isSubmitting && onStop ? /* @__PURE__ */ jsx(Tooltip, { content: stopTooltip, disabled: !stopTooltip, children: /* @__PURE__ */ jsx(
|
|
1676
1678
|
IconButton,
|
|
1677
1679
|
{
|
|
1678
1680
|
icon: /* @__PURE__ */ jsx(Square, {}),
|
|
1679
1681
|
variant: "filled",
|
|
1680
1682
|
size: "sm",
|
|
1681
|
-
"aria-label": "Stop",
|
|
1682
|
-
onClick: onStop
|
|
1683
|
+
"aria-label": stopTooltip || "Stop",
|
|
1684
|
+
onClick: onStop,
|
|
1685
|
+
className: stopClassName
|
|
1683
1686
|
}
|
|
1684
|
-
) : /* @__PURE__ */ jsx(
|
|
1687
|
+
) }) : /* @__PURE__ */ jsx(
|
|
1685
1688
|
IconButton,
|
|
1686
1689
|
{
|
|
1687
1690
|
icon: isSubmitting ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx(Send, {}),
|