@agno-hq/chat-react 0.3.1 → 0.3.2
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/chat/index.cjs +82 -82
- package/dist/chat/index.d.cts +5 -2
- package/dist/chat/index.d.ts +5 -2
- package/dist/chat/index.js +1 -1
- package/dist/{chunk-JEPFGKHH.cjs → chunk-Q73XHL35.cjs} +19 -17
- package/dist/chunk-Q73XHL35.cjs.map +1 -0
- package/dist/{chunk-BZC2674Z.js → chunk-XTP3TMEZ.js} +20 -18
- package/dist/chunk-XTP3TMEZ.js.map +1 -0
- package/dist/index.cjs +83 -83
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BZC2674Z.js.map +0 -1
- package/dist/chunk-JEPFGKHH.cjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { AgnoClient, activityLabel, isSubRunEvent, applySubRunEvent, isStepEvent
|
|
|
2
2
|
import React7, { createContext, useMemo, useState, useRef, useEffect, useCallback, useContext, useId, isValidElement, cloneElement, useLayoutEffect, useReducer } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
|
-
import {
|
|
5
|
+
import { ChevronDown as ChevronDown$1, ArrowUp as ArrowUp$1, Paperclip as Paperclip$1, File, FileType2, FileAudio as FileAudio$1, FileVideo as FileVideo$1, Wrench as Wrench$1, BookOpen as BookOpen$1, Globe as Globe$1, Link, Brain as Brain$1, Box as Box$1, Plus as Plus$1, Check as Check$1, Copy as Copy$1, X, MemoryStick, RefreshCcw, Activity, Trash2, MessageSquare, LoaderCircle, Square } from 'lucide-react';
|
|
6
6
|
import { Streamdown } from 'streamdown';
|
|
7
7
|
|
|
8
8
|
var messageCounter = 0;
|
|
@@ -656,9 +656,7 @@ var Pulse = icon(Activity);
|
|
|
656
656
|
var Trash = icon(Trash2);
|
|
657
657
|
var ChatBubble = icon(MessageSquare);
|
|
658
658
|
var Spinner = icon(LoaderCircle, 12);
|
|
659
|
-
|
|
660
|
-
return /* @__PURE__ */ jsx(Square, { size, className, fill: "currentColor", strokeWidth: 0 });
|
|
661
|
-
}
|
|
659
|
+
var Stop = icon(Square, 10.67);
|
|
662
660
|
function AgnoMark({ size = 24, className }) {
|
|
663
661
|
return /* @__PURE__ */ jsxs(
|
|
664
662
|
"svg",
|
|
@@ -1094,15 +1092,18 @@ function ChatInput({
|
|
|
1094
1092
|
}
|
|
1095
1093
|
)
|
|
1096
1094
|
] });
|
|
1097
|
-
const primary = isBusy && stop ?
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1095
|
+
const primary = isBusy && stop ? (
|
|
1096
|
+
// The same button the arrow sends from, with AgentOS's square-stop in it.
|
|
1097
|
+
/* @__PURE__ */ jsx(
|
|
1098
|
+
"button",
|
|
1099
|
+
{
|
|
1100
|
+
type: "button",
|
|
1101
|
+
className: cx("agno-btn", "agno-btn--icon", cn.stopButton),
|
|
1102
|
+
onClick: stop,
|
|
1103
|
+
"aria-label": "Stop",
|
|
1104
|
+
children: /* @__PURE__ */ jsx(Stop, {})
|
|
1105
|
+
}
|
|
1106
|
+
)
|
|
1106
1107
|
) : /* @__PURE__ */ jsx(
|
|
1107
1108
|
"button",
|
|
1108
1109
|
{
|
|
@@ -2624,10 +2625,11 @@ function Message({
|
|
|
2624
2625
|
}, [message.references, message.citations, message.content, uid]);
|
|
2625
2626
|
const isUser = message.role === "user";
|
|
2626
2627
|
const isAgent = message.role === "agent";
|
|
2627
|
-
const
|
|
2628
|
+
const hasSources = isAgent && !hideSources && sources.length > 0;
|
|
2629
|
+
const showSources = hasSources && !message.streaming;
|
|
2628
2630
|
const content = useMemo(
|
|
2629
|
-
() =>
|
|
2630
|
-
[message.content,
|
|
2631
|
+
() => hasSources && message.content ? withoutSourcesLine(message.content) : message.content,
|
|
2632
|
+
[message.content, hasSources]
|
|
2631
2633
|
);
|
|
2632
2634
|
const hasActivity = !message.content && !hasBehindTheScenes(message, { hideReasoning, hideTools });
|
|
2633
2635
|
const kind = isUser ? "user" : isAgent ? entityType : "system";
|
|
@@ -3497,5 +3499,5 @@ function EventLog({
|
|
|
3497
3499
|
}
|
|
3498
3500
|
|
|
3499
3501
|
export { AgnoChat, AgnoMark, ArrowUp, BehindTheScenes, BookOpen, Box, Brain, ChatBubble, ChatInput, ChatLauncher, ChatProvider, ChatWindow, Check, ChevronDown, Citations, Close, Copy, EntityBadge, EntitySelector, EventLog, Favicon, FileAudio, FileIcon, FilePreview, FileType, FileVideo, Followups, Globe, GridLoader, HoverPreview, HumanInput, LinkIcon, LinkPreviewCard, Markdown, MemberResponses, Memory, Message, MessageList, Multimedia, Paperclip, Plus, Pulse, QuickPrompts, Reasoning, Rerun, SessionList, SourceCard, SourcesProvider, Spinner, StatusIndicator, Stop, TeamGlyph, ToolCalls, Trash, WorkflowSteps, Wrench, admitFiles, behindTheScenesItems, behindTheScenesLabel, collectSources, cx, displayUrl, faviconUrl, fileAccepted, getProviderIcon, hasBehindTheScenes, linkCitations, normalizeFollowups, quickPromptLabel, quickPromptText, sourceHost, sourcesFromMarkdown, useAgnoChat, useChatContext, useLinkComponent, useLinkPreview, useOptionalChatContext, useResolvedChat, useResolvedClassNames, useSources, withoutSourcesLine, writeClipboard };
|
|
3500
|
-
//# sourceMappingURL=chunk-
|
|
3501
|
-
//# sourceMappingURL=chunk-
|
|
3502
|
+
//# sourceMappingURL=chunk-XTP3TMEZ.js.map
|
|
3503
|
+
//# sourceMappingURL=chunk-XTP3TMEZ.js.map
|