@agno-hq/chat-react 0.1.0 → 0.3.0
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/README.md +327 -22
- package/dist/chat/index.cjs +314 -0
- package/dist/chat/index.cjs.map +1 -0
- package/dist/chat/index.d.cts +1225 -0
- package/dist/chat/index.d.ts +1225 -0
- package/dist/chat/index.js +5 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chunk-2WM3CCFE.cjs +106 -0
- package/dist/chunk-2WM3CCFE.cjs.map +1 -0
- package/dist/chunk-62IEW2HM.js +506 -0
- package/dist/chunk-62IEW2HM.js.map +1 -0
- package/dist/chunk-ERCKKOF4.cjs +3308 -0
- package/dist/chunk-ERCKKOF4.cjs.map +1 -0
- package/dist/chunk-MUOMZG4V.js +3226 -0
- package/dist/chunk-MUOMZG4V.js.map +1 -0
- package/dist/chunk-RE7ZT73K.js +102 -0
- package/dist/chunk-RE7ZT73K.js.map +1 -0
- package/dist/chunk-ROFIOWGX.cjs +530 -0
- package/dist/chunk-ROFIOWGX.cjs.map +1 -0
- package/dist/client-DUyVqxU9.d.cts +413 -0
- package/dist/client-DUyVqxU9.d.ts +413 -0
- package/dist/core/index.cjs +94 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +108 -0
- package/dist/core/index.d.ts +108 -0
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -0
- package/dist/fonts.css +18 -0
- package/dist/index.cjs +395 -1959
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -835
- package/dist/index.d.ts +12 -835
- package/dist/index.js +3 -1925
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1898 -662
- package/dist/tokens.css +111 -0
- package/package.json +52 -7
|
@@ -0,0 +1,1225 @@
|
|
|
1
|
+
import { C as ChatMessage, l as RunEventData, e as ChatStatus, g as EntityType, q as ToolExecution, m as RunRequirement, S as SessionEntry, A as AgnoClient, E as Entity, j as ReferenceData, f as Citations$1, R as ReasoningStep, o as SubRun, r as WorkflowStep, I as ImageData, V as VideoData, c as AudioData } from '../client-DUyVqxU9.cjs';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { StreamdownProps } from 'streamdown';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* useAgnoChat — a headless React hook for running any Agno agent, team or
|
|
8
|
+
* workflow against an AgentOS backend and consuming its streamed output.
|
|
9
|
+
*
|
|
10
|
+
* It owns the full chat lifecycle: sending a message, accumulating the streamed
|
|
11
|
+
* response (content, tool calls, reasoning, media), surfacing live status and
|
|
12
|
+
* the raw event feed, handling human-in-the-loop pauses, cancelling, and
|
|
13
|
+
* rehydrating prior sessions.
|
|
14
|
+
*
|
|
15
|
+
* The hook renders nothing — pair it with the components in this package or
|
|
16
|
+
* build your own UI from the values it returns.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
interface UseAgnoChatOptions {
|
|
20
|
+
/** AgentOS base URL, e.g. "http://localhost:7777". Ignored if `client` given. */
|
|
21
|
+
baseUrl?: string;
|
|
22
|
+
/** A pre-built client (use this to share headers/auth across hooks). */
|
|
23
|
+
client?: AgnoClient;
|
|
24
|
+
/** Extra request headers (e.g. Authorization). Used only with `baseUrl`. */
|
|
25
|
+
headers?: Record<string, string>;
|
|
26
|
+
/** The agent/team/workflow to run. Can change between turns. */
|
|
27
|
+
entity?: Entity | null;
|
|
28
|
+
/** User id sent with every run. */
|
|
29
|
+
userId?: string;
|
|
30
|
+
/** Initial session id; updated automatically once the backend assigns one. */
|
|
31
|
+
sessionId?: string;
|
|
32
|
+
/** Pre-seed the transcript (e.g. when restoring a session). */
|
|
33
|
+
initialMessages?: ChatMessage[];
|
|
34
|
+
/** Called with every raw run event, for logging/telemetry. */
|
|
35
|
+
onEvent?: (event: RunEventData) => void;
|
|
36
|
+
/** Called when the session id changes (e.g. first run of a new session). */
|
|
37
|
+
onSessionId?: (sessionId: string) => void;
|
|
38
|
+
}
|
|
39
|
+
interface SendOptions {
|
|
40
|
+
files?: File[];
|
|
41
|
+
}
|
|
42
|
+
interface UseAgnoChat {
|
|
43
|
+
/** Full transcript, oldest first. */
|
|
44
|
+
messages: ChatMessage[];
|
|
45
|
+
/** The agent message currently streaming, or null when idle. */
|
|
46
|
+
streamingMessage: ChatMessage | null;
|
|
47
|
+
/** Every raw event from the current/most-recent run, in arrival order. */
|
|
48
|
+
events: RunEventData[];
|
|
49
|
+
/** The most recent raw event. */
|
|
50
|
+
currentEvent: RunEventData | null;
|
|
51
|
+
/** Lifecycle status of the active run. */
|
|
52
|
+
status: ChatStatus;
|
|
53
|
+
/** Live "what is it doing" label, e.g. "Calling get_weather". */
|
|
54
|
+
activity: string | null;
|
|
55
|
+
isStreaming: boolean;
|
|
56
|
+
isPaused: boolean;
|
|
57
|
+
error: string | null;
|
|
58
|
+
sessionId: string | undefined;
|
|
59
|
+
/** Type of the selected entity (agent / team / workflow). */
|
|
60
|
+
entityType: EntityType | undefined;
|
|
61
|
+
/** Tool calls of the active/most-recent agent message. */
|
|
62
|
+
tools: ToolExecution[];
|
|
63
|
+
/** Reasoning steps of the active/most-recent agent message. */
|
|
64
|
+
reasoning: ChatMessage['reasoning_steps'];
|
|
65
|
+
/** Outstanding human-in-the-loop requirements, if the run is paused. */
|
|
66
|
+
pendingRequirements: RunRequirement[];
|
|
67
|
+
/** Past sessions for the selected entity (populated by `refreshSessions`). */
|
|
68
|
+
sessions: SessionEntry[];
|
|
69
|
+
/**
|
|
70
|
+
* Sessions with a run in flight — the visible one plus any still streaming
|
|
71
|
+
* in the background after the user switched away.
|
|
72
|
+
*/
|
|
73
|
+
streamingSessionIds: string[];
|
|
74
|
+
sessionsLoading: boolean;
|
|
75
|
+
/** Send a user message and stream the response. */
|
|
76
|
+
sendMessage: (message: string, options?: SendOptions) => Promise<void>;
|
|
77
|
+
/** Stop the active run. */
|
|
78
|
+
cancel: () => Promise<void>;
|
|
79
|
+
/** Continue a paused run with explicitly resolved requirements. */
|
|
80
|
+
continueRun: (resolution: {
|
|
81
|
+
tools?: ToolExecution[];
|
|
82
|
+
stepRequirements?: unknown[];
|
|
83
|
+
}) => Promise<void>;
|
|
84
|
+
/** Approve or reject all pending tool confirmations, then continue. */
|
|
85
|
+
respondToConfirmation: (approve: boolean) => Promise<void>;
|
|
86
|
+
/** Provide values for pending tool user-input fields, then continue. */
|
|
87
|
+
submitUserInput: (values: Record<string, unknown>) => Promise<void>;
|
|
88
|
+
/** Fetch the list of past sessions for the selected entity. */
|
|
89
|
+
refreshSessions: () => Promise<void>;
|
|
90
|
+
/** Load a past session's transcript into the chat. */
|
|
91
|
+
loadSession: (sessionId: string) => Promise<void>;
|
|
92
|
+
/** Delete a past session, removing it from the list. */
|
|
93
|
+
deleteSession: (sessionId: string) => Promise<void>;
|
|
94
|
+
/** Clear the transcript and start a new session. */
|
|
95
|
+
reset: () => void;
|
|
96
|
+
/** Replace the transcript (e.g. after loading a session from the backend). */
|
|
97
|
+
setMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
|
|
98
|
+
/** The underlying client, for ad-hoc calls (sessions, discovery, …). */
|
|
99
|
+
client: AgnoClient;
|
|
100
|
+
}
|
|
101
|
+
declare function useAgnoChat(options: UseAgnoChatOptions): UseAgnoChat;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Every visual slot in the chat components can be re-classed from the outside.
|
|
105
|
+
*
|
|
106
|
+
* Pass a `classNames` map to any chat component and it is threaded down to its
|
|
107
|
+
* children, so a single map at the top styles the whole surface:
|
|
108
|
+
*
|
|
109
|
+
* ```tsx
|
|
110
|
+
* <AgnoChat classNames={{ root: 'rounded-2xl', textarea: 'font-mono' }} />
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* The built-in `agno-*` classes stay on the elements, so overrides compose with
|
|
114
|
+
* the shipped stylesheet rather than replacing it. Skip the stylesheet entirely
|
|
115
|
+
* (import only `tokens.css`, or nothing) to style purely with your own classes.
|
|
116
|
+
*/
|
|
117
|
+
interface ChatClassNames {
|
|
118
|
+
/** Outer wrapper of `<AgnoChat>`. */
|
|
119
|
+
root?: string;
|
|
120
|
+
/** The `header` slot wrapper, when one is supplied. */
|
|
121
|
+
header?: string;
|
|
122
|
+
/** Row holding the sidebar(s) and the chat column. */
|
|
123
|
+
main?: string;
|
|
124
|
+
/** Either sidebar column (sessions, event log). */
|
|
125
|
+
sidebar?: string;
|
|
126
|
+
/** The "no entities found" banner. */
|
|
127
|
+
banner?: string;
|
|
128
|
+
/** `<ChatWindow>` column. */
|
|
129
|
+
chat?: string;
|
|
130
|
+
/** Error line under the transcript. */
|
|
131
|
+
error?: string;
|
|
132
|
+
/** `<MessageList>` scroll container. */
|
|
133
|
+
list?: string;
|
|
134
|
+
/** Empty-state placeholder inside the transcript. */
|
|
135
|
+
empty?: string;
|
|
136
|
+
/** Every `<Message>` row. */
|
|
137
|
+
message?: string;
|
|
138
|
+
/** User rows only (applied on top of `message`). */
|
|
139
|
+
userMessage?: string;
|
|
140
|
+
/** Agent rows only (applied on top of `message`). */
|
|
141
|
+
agentMessage?: string;
|
|
142
|
+
/** Message avatar. */
|
|
143
|
+
avatar?: string;
|
|
144
|
+
/** Message body column. */
|
|
145
|
+
messageBody?: string;
|
|
146
|
+
/** Rendered message content. */
|
|
147
|
+
messageContent?: string;
|
|
148
|
+
/** `<Markdown>` wrapper. */
|
|
149
|
+
markdown?: string;
|
|
150
|
+
/** "Working…" line shown while streaming with no content yet. */
|
|
151
|
+
activity?: string;
|
|
152
|
+
/** `<ChatInput>` wrapper. */
|
|
153
|
+
input?: string;
|
|
154
|
+
/** Row holding attach / textarea / send. */
|
|
155
|
+
inputRow?: string;
|
|
156
|
+
/** The textarea itself. */
|
|
157
|
+
textarea?: string;
|
|
158
|
+
/** Send button. */
|
|
159
|
+
sendButton?: string;
|
|
160
|
+
/** Stop button shown in place of send while streaming. */
|
|
161
|
+
stopButton?: string;
|
|
162
|
+
/** Attach-files button. */
|
|
163
|
+
attachButton?: string;
|
|
164
|
+
/** Pending attachment chips. */
|
|
165
|
+
files?: string;
|
|
166
|
+
/** `<SessionList>` wrapper. */
|
|
167
|
+
sessions?: string;
|
|
168
|
+
/** Each session row. */
|
|
169
|
+
sessionItem?: string;
|
|
170
|
+
/** The active session row (applied on top of `sessionItem`). */
|
|
171
|
+
activeSessionItem?: string;
|
|
172
|
+
/** "New chat" button. */
|
|
173
|
+
newSessionButton?: string;
|
|
174
|
+
/** `<EntitySelector>` wrapper. */
|
|
175
|
+
select?: string;
|
|
176
|
+
/** Selector trigger button. */
|
|
177
|
+
selectTrigger?: string;
|
|
178
|
+
/** Selector popover. */
|
|
179
|
+
selectPanel?: string;
|
|
180
|
+
/** Each option in the popover. */
|
|
181
|
+
selectOption?: string;
|
|
182
|
+
/** Shared class for the collapsible panels below. */
|
|
183
|
+
panel?: string;
|
|
184
|
+
/** `<ToolCalls>`. */
|
|
185
|
+
toolCalls?: string;
|
|
186
|
+
/** `<Reasoning>`. */
|
|
187
|
+
reasoning?: string;
|
|
188
|
+
/** `<Citations>` — the sources block under an answer. */
|
|
189
|
+
citations?: string;
|
|
190
|
+
/** Each source card inside `<Citations>`. */
|
|
191
|
+
sourceCard?: string;
|
|
192
|
+
/** Inline `[1]` citation marker in the answer text. */
|
|
193
|
+
citationMarker?: string;
|
|
194
|
+
/** The hover card shown for a citation marker or a link. */
|
|
195
|
+
linkPreview?: string;
|
|
196
|
+
/** `<Followups>` — the "Related questions" block under the latest answer. */
|
|
197
|
+
followups?: string;
|
|
198
|
+
/** The heading above the follow-up list. */
|
|
199
|
+
followupsHead?: string;
|
|
200
|
+
/** Each follow-up button. */
|
|
201
|
+
followup?: string;
|
|
202
|
+
/** The copy button on a fenced code block. */
|
|
203
|
+
copyButton?: string;
|
|
204
|
+
/** `<WorkflowSteps>`. */
|
|
205
|
+
workflowSteps?: string;
|
|
206
|
+
/** `<MemberResponses>`. */
|
|
207
|
+
memberResponses?: string;
|
|
208
|
+
/** `<Multimedia>`. */
|
|
209
|
+
multimedia?: string;
|
|
210
|
+
/** `<EventLog>`. */
|
|
211
|
+
eventLog?: string;
|
|
212
|
+
/** `<HumanInput>` panel. */
|
|
213
|
+
humanInput?: string;
|
|
214
|
+
/** `<StatusIndicator>`. */
|
|
215
|
+
status?: string;
|
|
216
|
+
/** Floating launcher button of `<ChatLauncher>`. */
|
|
217
|
+
launcher?: string;
|
|
218
|
+
/** Floating panel of `<ChatLauncher>`. */
|
|
219
|
+
launcherPanel?: string;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Link metadata shown in a preview. Everything is optional — the URL-derived
|
|
224
|
+
* fields (host, favicon) are always available, the rest arrive only if the
|
|
225
|
+
* payload carried them or a `resolveLinkPreview` filled them in.
|
|
226
|
+
*/
|
|
227
|
+
interface LinkPreview {
|
|
228
|
+
title?: string;
|
|
229
|
+
description?: string;
|
|
230
|
+
/** Absolute URL of a preview image (OpenGraph `og:image`). */
|
|
231
|
+
image?: string;
|
|
232
|
+
/** Absolute URL of the site icon. Defaults to `/favicon.ico` on the origin. */
|
|
233
|
+
favicon?: string;
|
|
234
|
+
/** Human name of the site, e.g. "Agno Docs". Falls back to the hostname. */
|
|
235
|
+
siteName?: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Resolve richer metadata for a link. Runs at most once per URL, lazily — on
|
|
239
|
+
* first hover, never on render — so a transcript full of citations costs
|
|
240
|
+
* nothing until someone actually points at one.
|
|
241
|
+
*
|
|
242
|
+
* Browsers can't read another origin's `<meta>` tags (CORS), so this has to be
|
|
243
|
+
* backed by something server-side of your own:
|
|
244
|
+
*
|
|
245
|
+
* ```tsx
|
|
246
|
+
* <ChatProvider
|
|
247
|
+
* resolveLinkPreview={async (url) => {
|
|
248
|
+
* const res = await fetch(`/api/og?url=${encodeURIComponent(url)}`)
|
|
249
|
+
* return res.ok ? res.json() : null
|
|
250
|
+
* }}
|
|
251
|
+
* />
|
|
252
|
+
* ```
|
|
253
|
+
*
|
|
254
|
+
* Return `null` when there's nothing to add; the card falls back to the
|
|
255
|
+
* hostname, favicon and whatever title the citation payload carried.
|
|
256
|
+
*/
|
|
257
|
+
type ResolveLinkPreview = (url: string) => Promise<LinkPreview | null> | LinkPreview | null;
|
|
258
|
+
/** One numbered entry in a message's source list. */
|
|
259
|
+
interface Source {
|
|
260
|
+
/** 1-based position — what `[1]` in the answer text refers to. */
|
|
261
|
+
index: number;
|
|
262
|
+
/** DOM id of this source's card, so inline markers can link to it. */
|
|
263
|
+
anchorId: string;
|
|
264
|
+
/** A link the model browsed, or a chunk retrieved from a knowledge base. */
|
|
265
|
+
kind: 'url' | 'document';
|
|
266
|
+
/** Absolute URL, when there is one to open. */
|
|
267
|
+
url?: string;
|
|
268
|
+
/** Display name: the payload's title, the document name, or the hostname. */
|
|
269
|
+
title: string;
|
|
270
|
+
/** The passage that was actually retrieved, when the payload carries one. */
|
|
271
|
+
snippet?: string;
|
|
272
|
+
/** Retrieval query that surfaced this chunk (knowledge-base sources only). */
|
|
273
|
+
query?: string;
|
|
274
|
+
}
|
|
275
|
+
/** The hostname without `www.`, or undefined for anything unparseable. */
|
|
276
|
+
declare function sourceHost(url?: string): string | undefined;
|
|
277
|
+
/**
|
|
278
|
+
* The site's own icon. Same-origin to the site being cited, so no third-party
|
|
279
|
+
* favicon service is involved and nothing is requested until a card renders.
|
|
280
|
+
*/
|
|
281
|
+
declare function faviconUrl(url?: string): string | undefined;
|
|
282
|
+
/** `docs.agno.com/introduction` — the host plus a trimmed path, for card chrome. */
|
|
283
|
+
declare function displayUrl(url?: string): string | undefined;
|
|
284
|
+
/**
|
|
285
|
+
* Flatten a message's `references` and `citations` into one numbered list.
|
|
286
|
+
*
|
|
287
|
+
* Retrieved documents come first (they are what grounded the answer), then any
|
|
288
|
+
* browsed links. Entries pointing at the same URL are merged, so a link that is
|
|
289
|
+
* both retrieved and cited is numbered once.
|
|
290
|
+
*
|
|
291
|
+
* `idBase` seeds the DOM ids used to link inline markers to cards — pass a
|
|
292
|
+
* value that is stable per message, e.g. React's `useId()`.
|
|
293
|
+
*/
|
|
294
|
+
declare function collectSources(references: ReferenceData[] | undefined, citations: Citations$1 | undefined, idBase?: string): Source[];
|
|
295
|
+
/**
|
|
296
|
+
* The sources a model cited inline, for runs that carry no `references` or
|
|
297
|
+
* `citations` at all — a common shape, e.g.
|
|
298
|
+
*
|
|
299
|
+
* ```text
|
|
300
|
+
* Call `Agent.run()` in production. [1](https://docs.agno.com/agents/building-agents)
|
|
301
|
+
*
|
|
302
|
+
* Sources: [Building Agents](https://docs.agno.com/agents/building-agents)
|
|
303
|
+
* ```
|
|
304
|
+
*
|
|
305
|
+
* A link labelled with a bare number is the citation; a link labelled with text
|
|
306
|
+
* names the same URL, so the trailing "Sources:" line titles the cards. Numbers
|
|
307
|
+
* are kept exactly as the model wrote them, so the markers in the answer and
|
|
308
|
+
* the cards below it can't disagree. An answer with no numbered links has no
|
|
309
|
+
* sources — a plain link in prose is not a citation.
|
|
310
|
+
*/
|
|
311
|
+
declare function sourcesFromMarkdown(content: string | undefined, idBase?: string): Source[];
|
|
312
|
+
/**
|
|
313
|
+
* The answer without its trailing "Sources:" line.
|
|
314
|
+
*
|
|
315
|
+
* When `sourcesFromMarkdown` has turned that line into cards, leaving it in
|
|
316
|
+
* the prose lists every source twice, back to back. The line is only dropped
|
|
317
|
+
* when it is the last thing in the answer and holds nothing but links — a
|
|
318
|
+
* paragraph that goes on to say something is prose, and stays. A half-written
|
|
319
|
+
* line mid-stream counts as links, so it never flashes up before the cards do.
|
|
320
|
+
*/
|
|
321
|
+
declare function withoutSourcesLine(content: string): string;
|
|
322
|
+
/**
|
|
323
|
+
* Rewrite the bare citation markers in an answer as links to the source they
|
|
324
|
+
* name: `context [1].` becomes ``context [1](https://…).``
|
|
325
|
+
*
|
|
326
|
+
* A Markdown parser has no concept of a citation marker — `[1]` is prose — so
|
|
327
|
+
* this runs before parsing and leaves one shape for the renderer to handle. The
|
|
328
|
+
* preceding space is absorbed so the marker sits against the word it qualifies,
|
|
329
|
+
* the way a footnote does.
|
|
330
|
+
*
|
|
331
|
+
* Untouched: markers with no matching source, anything inside code, reference
|
|
332
|
+
* links (`[text][1]`), link definitions (`[1]: https://…`) and markers that are
|
|
333
|
+
* already links (`[1](…)`).
|
|
334
|
+
*/
|
|
335
|
+
declare function linkCitations(content: string, sources: Source[]): string;
|
|
336
|
+
/**
|
|
337
|
+
* Publishes the sources of the message being rendered. `<Message>` wraps its
|
|
338
|
+
* body in one, which is how a `[1]` in the answer finds the card it points at —
|
|
339
|
+
* including inside a custom `renderMarkdown`.
|
|
340
|
+
*/
|
|
341
|
+
declare const SourcesProvider: React$1.Provider<Source[]>;
|
|
342
|
+
/** The sources of the surrounding message; empty outside one. */
|
|
343
|
+
declare function useSources(): Source[];
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Markdown for a chat transcript, rendered by [Streamdown](https://streamdown.ai).
|
|
347
|
+
*
|
|
348
|
+
* Answers arrive a token at a time, which is where a plain parser falls down:
|
|
349
|
+
* mid-stream the text is full of unterminated bold, half-written links and
|
|
350
|
+
* unclosed fences. Streamdown repairs that as it goes, and brings GFM (tables,
|
|
351
|
+
* task lists, strikethrough) and a sanitising pass with it.
|
|
352
|
+
*
|
|
353
|
+
* Streamdown styles itself with Tailwind utility classes, which do nothing in
|
|
354
|
+
* an app that doesn't use Tailwind. So every element is mapped back onto this
|
|
355
|
+
* package's own `agno-md-*` classes: the shipped stylesheet keeps working, no
|
|
356
|
+
* Tailwind is required, and `classNames`/tokens still govern the look.
|
|
357
|
+
*
|
|
358
|
+
* Prefer a different renderer? `renderMarkdown` on the chat components replaces
|
|
359
|
+
* this one entirely.
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
interface MarkdownProps {
|
|
363
|
+
content: string;
|
|
364
|
+
className?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Sources the inline `[n]` markers refer to. Defaults to the sources of the
|
|
367
|
+
* surrounding `<Message>`; pass `[]` to render markers as plain text.
|
|
368
|
+
*/
|
|
369
|
+
sources?: Source[];
|
|
370
|
+
/**
|
|
371
|
+
* The answer is still streaming, so repair half-written markdown rather than
|
|
372
|
+
* rendering a stray `**` or an unclosed fence.
|
|
373
|
+
*/
|
|
374
|
+
streaming?: boolean;
|
|
375
|
+
/**
|
|
376
|
+
* Put a copy button on fenced code blocks. On by default; set `false` to drop
|
|
377
|
+
* it, or set `codeCopy` on `<ChatProvider>` to turn it off everywhere.
|
|
378
|
+
*/
|
|
379
|
+
codeCopy?: boolean;
|
|
380
|
+
/** Escape hatch onto Streamdown itself — anything not set here. */
|
|
381
|
+
options?: Omit<StreamdownProps, 'children' | 'className' | 'components'>;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Copy text, by whichever route the browser allows.
|
|
385
|
+
*
|
|
386
|
+
* The async Clipboard API is the right one, but it rejects on an insecure
|
|
387
|
+
* origin and whenever the document isn't focused — so a selection-based copy
|
|
388
|
+
* stands behind it. Returns whether anything was actually copied: the button
|
|
389
|
+
* should not claim success it didn't have.
|
|
390
|
+
*
|
|
391
|
+
* Exported because a host building its own copy affordance wants the same
|
|
392
|
+
* fallbacks, and because the failure paths are worth testing.
|
|
393
|
+
*/
|
|
394
|
+
declare function writeClipboard(text: string): Promise<boolean>;
|
|
395
|
+
declare function Markdown({ content, className, sources, streaming, codeCopy, options, }: MarkdownProps): React__default.ReactElement;
|
|
396
|
+
type RenderMarkdown = (content: string) => React__default.ReactNode;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* `<ChatProvider>` runs a chat and shares it with everything below it, so the
|
|
400
|
+
* layout is entirely yours:
|
|
401
|
+
*
|
|
402
|
+
* ```tsx
|
|
403
|
+
* <ChatProvider baseUrl="http://localhost:7777" entity={agent}>
|
|
404
|
+
* <MyOwnHeader />
|
|
405
|
+
* <ChatTranscript />
|
|
406
|
+
* <ChatComposer />
|
|
407
|
+
* </ChatProvider>
|
|
408
|
+
* ```
|
|
409
|
+
*
|
|
410
|
+
* Every chat component works standalone (pass it props directly) *or* inside a
|
|
411
|
+
* provider (props omitted, values read from context). Reach for the raw values
|
|
412
|
+
* with `useChatContext()`; use `useAgnoChat` directly if you'd rather own the
|
|
413
|
+
* state yourself and skip the provider.
|
|
414
|
+
*/
|
|
415
|
+
|
|
416
|
+
interface ChatContextValue {
|
|
417
|
+
/** The live chat state and actions. */
|
|
418
|
+
chat: UseAgnoChat;
|
|
419
|
+
/** Slot class overrides, threaded to every descendant. */
|
|
420
|
+
classNames: ChatClassNames;
|
|
421
|
+
/** Markdown renderer override, threaded to every descendant. */
|
|
422
|
+
renderMarkdown?: RenderMarkdown;
|
|
423
|
+
/** Link-preview metadata lookup, threaded to every descendant. */
|
|
424
|
+
resolveLinkPreview?: ResolveLinkPreview;
|
|
425
|
+
/** Whether fenced code blocks carry a copy button. Defaults to true. */
|
|
426
|
+
codeCopy?: boolean;
|
|
427
|
+
}
|
|
428
|
+
interface ChatProviderProps extends UseAgnoChatOptions {
|
|
429
|
+
children: React__default.ReactNode;
|
|
430
|
+
/** Slot class overrides shared by every component in the tree. */
|
|
431
|
+
classNames?: ChatClassNames;
|
|
432
|
+
/** Markdown renderer shared by every component in the tree. */
|
|
433
|
+
renderMarkdown?: RenderMarkdown;
|
|
434
|
+
/**
|
|
435
|
+
* Fill out link previews with your own metadata (OpenGraph title,
|
|
436
|
+
* description, image). Called at most once per URL, on first hover — see
|
|
437
|
+
* `ResolveLinkPreview`. Without it previews still show the hostname, the site
|
|
438
|
+
* favicon and whatever title the citation payload carried.
|
|
439
|
+
*/
|
|
440
|
+
resolveLinkPreview?: ResolveLinkPreview;
|
|
441
|
+
/**
|
|
442
|
+
* Put a copy button on fenced code blocks everywhere below this provider. On
|
|
443
|
+
* by default; pass `false` to drop it.
|
|
444
|
+
*/
|
|
445
|
+
codeCopy?: boolean;
|
|
446
|
+
/**
|
|
447
|
+
* Use an existing `useAgnoChat` result instead of creating one. Lets a parent
|
|
448
|
+
* own the state (or share one chat across two providers).
|
|
449
|
+
*/
|
|
450
|
+
chat?: UseAgnoChat;
|
|
451
|
+
/**
|
|
452
|
+
* Wrapper element rendered around the children. Defaults to a plain `div`
|
|
453
|
+
* carrying the theme classes; pass `false` to render children bare.
|
|
454
|
+
*/
|
|
455
|
+
as?: React__default.ElementType | false;
|
|
456
|
+
className?: string;
|
|
457
|
+
/** Light theme instead of the default dark. */
|
|
458
|
+
light?: boolean;
|
|
459
|
+
style?: React__default.CSSProperties;
|
|
460
|
+
}
|
|
461
|
+
declare function ChatProvider({ children, classNames, renderMarkdown, resolveLinkPreview, codeCopy, chat: externalChat, as, className, light, style, ...options }: ChatProviderProps): React__default.ReactElement;
|
|
462
|
+
/**
|
|
463
|
+
* Read the chat, class overrides, markdown renderer and link-preview resolver
|
|
464
|
+
* provided by the nearest `<ChatProvider>`. Throws outside a provider — use the
|
|
465
|
+
* optional variant below if the component must also work standalone.
|
|
466
|
+
*/
|
|
467
|
+
declare function useChatContext(): ChatContextValue;
|
|
468
|
+
/** Context lookup that returns null instead of throwing outside a provider. */
|
|
469
|
+
declare function useOptionalChatContext(): ChatContextValue | null;
|
|
470
|
+
/** The chat instance, from the prop if given, otherwise from context. */
|
|
471
|
+
declare function useResolvedChat(explicit?: UseAgnoChat): UseAgnoChat;
|
|
472
|
+
/** Merge the provider's class overrides with any passed directly. */
|
|
473
|
+
declare function useResolvedClassNames(explicit?: ChatClassNames): ChatClassNames;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* The support-widget shell: a bubble pinned to a corner of the viewport that
|
|
477
|
+
* opens the chat in a popover — or over the whole screen — and closes it again.
|
|
478
|
+
*
|
|
479
|
+
* `<AgnoChat mode="launcher">` renders itself inside one of these. Use the
|
|
480
|
+
* component directly to give your own `<ChatWindow>` the same behaviour.
|
|
481
|
+
*/
|
|
482
|
+
|
|
483
|
+
/** Corner the bubble (and the panel it opens) is pinned to. */
|
|
484
|
+
type LauncherPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
485
|
+
/** How far the panel opens: a corner popover, or the entire viewport. */
|
|
486
|
+
type LauncherPanel = 'popover' | 'fullscreen';
|
|
487
|
+
interface ChatLauncherProps {
|
|
488
|
+
/** The chat surface to reveal — usually `<AgnoChat>` or `<ChatWindow>`. */
|
|
489
|
+
children: React__default.ReactNode;
|
|
490
|
+
/** Corner to pin to. Default "bottom-right". */
|
|
491
|
+
position?: LauncherPosition;
|
|
492
|
+
/** Distance from both edges of that corner. Number means px. Default 24. */
|
|
493
|
+
offset?: number | string;
|
|
494
|
+
/** Popover (default) or full-screen when open. */
|
|
495
|
+
panel?: LauncherPanel;
|
|
496
|
+
/** Popover width. Number means px. Default 400. Ignored when full-screen. */
|
|
497
|
+
width?: number | string;
|
|
498
|
+
/** Popover height. Number means px. Default 620. Ignored when full-screen. */
|
|
499
|
+
height?: number | string;
|
|
500
|
+
/** Controlled open state. Pair with `onOpenChange`. */
|
|
501
|
+
open?: boolean;
|
|
502
|
+
/** Open state on first render when uncontrolled. Default false. */
|
|
503
|
+
defaultOpen?: boolean;
|
|
504
|
+
onOpenChange?: (open: boolean) => void;
|
|
505
|
+
/** Text beside the bubble glyph, e.g. "Chat with us". Icon-only without it. */
|
|
506
|
+
label?: string;
|
|
507
|
+
/** Replaces the default speech-bubble glyph. */
|
|
508
|
+
icon?: React__default.ReactNode;
|
|
509
|
+
/** Accessible name for the bubble. Default "Open chat" / "Close chat". */
|
|
510
|
+
ariaLabel?: string;
|
|
511
|
+
/** Close on Escape. Default true. */
|
|
512
|
+
closeOnEscape?: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* Keep the bubble (as a close button) while the panel is open. Default true.
|
|
515
|
+
* Turn it off when the panel carries its own close control.
|
|
516
|
+
*/
|
|
517
|
+
bubbleWhenOpen?: boolean;
|
|
518
|
+
/**
|
|
519
|
+
* Keep the chat mounted after the first open, so closing the panel does not
|
|
520
|
+
* discard the conversation or interrupt a run. Default true.
|
|
521
|
+
*/
|
|
522
|
+
keepMounted?: boolean;
|
|
523
|
+
/** Render into `document.body`, escaping transformed ancestors. Default true. */
|
|
524
|
+
portal?: boolean;
|
|
525
|
+
className?: string;
|
|
526
|
+
}
|
|
527
|
+
declare function ChatLauncher({ children, position, offset, panel, width, height, open, defaultOpen, onOpenChange, label, icon, ariaLabel, closeOnEscape, bubbleWhenOpen, keepMounted, portal, className, }: ChatLauncherProps): React__default.ReactElement | null;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Suggested-prompt chips — the "what can I ask?" row a support chat shows on an
|
|
531
|
+
* empty transcript. `<ChatWindow>` renders these from its `quickPrompts` prop;
|
|
532
|
+
* render the component yourself to place them somewhere else.
|
|
533
|
+
*/
|
|
534
|
+
|
|
535
|
+
/** A chip: plain text, or a short label that sends a longer prompt. */
|
|
536
|
+
type QuickPrompt = string | {
|
|
537
|
+
label: string;
|
|
538
|
+
prompt?: string;
|
|
539
|
+
};
|
|
540
|
+
declare const quickPromptLabel: (p: QuickPrompt) => string;
|
|
541
|
+
declare const quickPromptText: (p: QuickPrompt) => string;
|
|
542
|
+
interface QuickPromptsProps {
|
|
543
|
+
prompts: QuickPrompt[];
|
|
544
|
+
/** Called with the prompt text to send. */
|
|
545
|
+
onSelect: (prompt: string) => void;
|
|
546
|
+
disabled?: boolean;
|
|
547
|
+
className?: string;
|
|
548
|
+
}
|
|
549
|
+
declare function QuickPrompts({ prompts, onSelect, disabled, className, }: QuickPromptsProps): React__default.ReactElement | null;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Zero-wiring chat widget. Point it at an AgentOS URL and it discovers the
|
|
553
|
+
* available agents/teams/workflows, lets the user pick one, and runs a full
|
|
554
|
+
* streaming chat — transcript, tools, reasoning, media and human-in-the-loop.
|
|
555
|
+
*
|
|
556
|
+
* It renders inline by default. `mode="launcher"` turns it into a support
|
|
557
|
+
* widget instead: a bubble pinned to a corner that opens the chat in a popover
|
|
558
|
+
* (or over the whole screen with `panel="fullscreen"`).
|
|
559
|
+
*
|
|
560
|
+
* For finer control (custom layout, auth headers, session restore), call
|
|
561
|
+
* `useAgnoChat` directly and render `<ChatWindow>`.
|
|
562
|
+
*/
|
|
563
|
+
|
|
564
|
+
interface AgnoChatProps {
|
|
565
|
+
/** AgentOS base URL, e.g. "http://localhost:7777". */
|
|
566
|
+
baseUrl?: string;
|
|
567
|
+
/** Pre-built client (overrides baseUrl); use for shared auth/headers. */
|
|
568
|
+
client?: AgnoClient;
|
|
569
|
+
headers?: Record<string, string>;
|
|
570
|
+
userId?: string;
|
|
571
|
+
/**
|
|
572
|
+
* The selected agent/team/workflow. Pass it to own the selection — the embed
|
|
573
|
+
* then only displays it, the way AgentOS drives the chat from its breadcrumb.
|
|
574
|
+
* Omit it and the embed discovers the entities and selects the first itself.
|
|
575
|
+
*/
|
|
576
|
+
entity?: Entity;
|
|
577
|
+
/** Initial selection when `entity` is not supplied. */
|
|
578
|
+
defaultEntity?: Entity;
|
|
579
|
+
/** Fires whenever the selection changes, controlled or not. */
|
|
580
|
+
onEntityChange?: (entity: Entity) => void;
|
|
581
|
+
/** Provide entities explicitly instead of auto-discovering them. */
|
|
582
|
+
entities?: Entity[];
|
|
583
|
+
/**
|
|
584
|
+
* Put an interactive picker in the composer instead of the read-only badge.
|
|
585
|
+
* Off by default: AgentOS switches the entity from its own chrome, so the
|
|
586
|
+
* dock just reports what is answering. `<EntitySelector>` is exported for
|
|
587
|
+
* placing a picker in your `header` slot.
|
|
588
|
+
*/
|
|
589
|
+
showEntityPicker?: boolean;
|
|
590
|
+
/** Hide the selection display in the composer entirely. */
|
|
591
|
+
hideEntityBadge?: boolean;
|
|
592
|
+
placeholder?: string;
|
|
593
|
+
/** Show the attach-files control. Default true, as the AgentOS dock does. */
|
|
594
|
+
allowFiles?: boolean;
|
|
595
|
+
/** Show the past-sessions sidebar. Default false. */
|
|
596
|
+
showSessions?: boolean;
|
|
597
|
+
/** Render the last run error above the input. Default false. */
|
|
598
|
+
showErrors?: boolean;
|
|
599
|
+
/** Suggested prompts offered while the transcript is empty. */
|
|
600
|
+
quickPrompts?: QuickPrompt[];
|
|
601
|
+
/**
|
|
602
|
+
* Hide the "Related questions" an agent built with `followups=True` suggests
|
|
603
|
+
* after its latest answer. Shown above the composer by default; clicking one
|
|
604
|
+
* sends it.
|
|
605
|
+
*/
|
|
606
|
+
hideFollowups?: boolean;
|
|
607
|
+
/** Heading over the follow-ups. Default "Related questions"; `null` for none. */
|
|
608
|
+
followupsTitle?: React__default.ReactNode | null;
|
|
609
|
+
renderMarkdown?: RenderMarkdown;
|
|
610
|
+
/**
|
|
611
|
+
* Fill link previews with your own OpenGraph metadata. Called once per URL,
|
|
612
|
+
* on first hover — see `ResolveLinkPreview`.
|
|
613
|
+
*/
|
|
614
|
+
resolveLinkPreview?: ResolveLinkPreview;
|
|
615
|
+
/** Put a copy button on fenced code blocks. Defaults to true. */
|
|
616
|
+
codeCopy?: boolean;
|
|
617
|
+
/**
|
|
618
|
+
* Your own header/toolbar, rendered above the chat. Nothing by default —
|
|
619
|
+
* the embed ships without chrome so it drops into yours.
|
|
620
|
+
*/
|
|
621
|
+
header?: React__default.ReactNode;
|
|
622
|
+
/** Rendered below the chat, outside the composer. */
|
|
623
|
+
footer?: React__default.ReactNode;
|
|
624
|
+
/** Empty-state copy shown before the first message. */
|
|
625
|
+
emptyState?: React__default.ReactNode;
|
|
626
|
+
/** Light theme instead of the default dark. */
|
|
627
|
+
light?: boolean;
|
|
628
|
+
className?: string;
|
|
629
|
+
/** Per-slot class overrides — see `ChatClassNames`. */
|
|
630
|
+
classNames?: ChatClassNames;
|
|
631
|
+
style?: React__default.CSSProperties;
|
|
632
|
+
/**
|
|
633
|
+
* "inline" (default) renders the chat where you put it. "launcher" pins a
|
|
634
|
+
* support-style bubble to a corner of the viewport that opens the chat.
|
|
635
|
+
*/
|
|
636
|
+
mode?: 'inline' | 'launcher';
|
|
637
|
+
/** Panel size — inline, or the launcher's popover. Number means px. */
|
|
638
|
+
width?: number | string;
|
|
639
|
+
height?: number | string;
|
|
640
|
+
/** Launcher only: corner to pin to. Default "bottom-right". */
|
|
641
|
+
position?: LauncherPosition;
|
|
642
|
+
/** Launcher only: distance from both edges of that corner. Default 24. */
|
|
643
|
+
offset?: number | string;
|
|
644
|
+
/** Launcher only: open as a corner popover (default) or over the whole screen. */
|
|
645
|
+
panel?: LauncherPanel;
|
|
646
|
+
/** Launcher only: text beside the bubble glyph, e.g. "Chat with us". */
|
|
647
|
+
launcherLabel?: string;
|
|
648
|
+
/** Launcher only: replaces the default speech-bubble glyph. */
|
|
649
|
+
launcherIcon?: React__default.ReactNode;
|
|
650
|
+
/** Launcher only: open on first render. Default false. */
|
|
651
|
+
defaultOpen?: boolean;
|
|
652
|
+
/** Launcher only: controlled open state. Pair with `onOpenChange`. */
|
|
653
|
+
open?: boolean;
|
|
654
|
+
onOpenChange?: (open: boolean) => void;
|
|
655
|
+
}
|
|
656
|
+
declare function AgnoChat(props: AgnoChatProps): React__default.ReactElement;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* A complete chat surface built from a `useAgnoChat` result. Pass the hook's
|
|
660
|
+
* return value as `chat`; this renders the transcript, the live status, the
|
|
661
|
+
* human-in-the-loop panel, and the input box.
|
|
662
|
+
*
|
|
663
|
+
* Use this when you call `useAgnoChat` yourself (so you control the entity,
|
|
664
|
+
* session, headers, etc.). For a zero-wiring widget, use `<AgnoChat>`.
|
|
665
|
+
*/
|
|
666
|
+
|
|
667
|
+
interface ChatWindowProps {
|
|
668
|
+
/** Omit inside a `<ChatProvider>`. */
|
|
669
|
+
chat?: UseAgnoChat;
|
|
670
|
+
placeholder?: string;
|
|
671
|
+
/** Initials shown on the user avatar. Defaults to AgentOS's "ME". */
|
|
672
|
+
userInitials?: string;
|
|
673
|
+
emptyState?: React__default.ReactNode;
|
|
674
|
+
allowFiles?: boolean;
|
|
675
|
+
disabled?: boolean;
|
|
676
|
+
renderMarkdown?: RenderMarkdown;
|
|
677
|
+
/**
|
|
678
|
+
* Render the last run error above the input. Default false — it is raw
|
|
679
|
+
* backend text, too long for a narrow window. Read `chat.error` to show it
|
|
680
|
+
* your own way.
|
|
681
|
+
*/
|
|
682
|
+
showErrors?: boolean;
|
|
683
|
+
/** Suggested prompts, offered while the transcript is empty. */
|
|
684
|
+
quickPrompts?: QuickPrompt[];
|
|
685
|
+
/** What a chip does. Defaults to sending it as the first message. */
|
|
686
|
+
onQuickPrompt?: (prompt: string) => void;
|
|
687
|
+
/** Hide the "Related questions" an agent suggests after its latest answer. */
|
|
688
|
+
hideFollowups?: boolean;
|
|
689
|
+
/** What a follow-up does. Defaults to sending it as the next message. */
|
|
690
|
+
onFollowup?: (prompt: string) => void;
|
|
691
|
+
/** Heading over the follow-ups. Default "Related questions"; `null` for none. */
|
|
692
|
+
followupsTitle?: React__default.ReactNode | null;
|
|
693
|
+
/** Rendered above the transcript (your own toolbar, title, tabs…). */
|
|
694
|
+
header?: React__default.ReactNode;
|
|
695
|
+
/** Replace the composer entirely. Pass `false` for a read-only transcript. */
|
|
696
|
+
composer?: React__default.ReactNode | false;
|
|
697
|
+
className?: string;
|
|
698
|
+
classNames?: ChatClassNames;
|
|
699
|
+
}
|
|
700
|
+
declare function ChatWindow({ chat: chatProp, placeholder, userInitials, emptyState, allowFiles, disabled, renderMarkdown, showErrors, quickPrompts, onQuickPrompt, hideFollowups, onFollowup, followupsTitle, header, composer, className, classNames, }: ChatWindowProps): React__default.ReactElement;
|
|
701
|
+
|
|
702
|
+
/** Scrollable transcript that auto-sticks to the bottom while streaming. */
|
|
703
|
+
|
|
704
|
+
interface MessageListProps {
|
|
705
|
+
/** Omit inside a `<ChatProvider>` to use the provider's transcript. */
|
|
706
|
+
messages?: ChatMessage[];
|
|
707
|
+
status?: ChatStatus;
|
|
708
|
+
activity?: string | null;
|
|
709
|
+
renderMarkdown?: RenderMarkdown;
|
|
710
|
+
emptyState?: React__default.ReactNode;
|
|
711
|
+
/** What is answering — picks the agent avatar. */
|
|
712
|
+
entityType?: EntityType;
|
|
713
|
+
/** Initials shown on the user avatar. Defaults to AgentOS's "ME". */
|
|
714
|
+
userInitials?: string;
|
|
715
|
+
/** Rendered after the last message (e.g. a human-in-the-loop panel). */
|
|
716
|
+
footer?: React__default.ReactNode;
|
|
717
|
+
/** Rendered above the first message, inside the scroll area. */
|
|
718
|
+
header?: React__default.ReactNode;
|
|
719
|
+
/** Replace how each message is rendered. */
|
|
720
|
+
renderMessage?: (message: ChatMessage, activity?: string | null) => React__default.ReactNode;
|
|
721
|
+
className?: string;
|
|
722
|
+
classNames?: ChatClassNames;
|
|
723
|
+
}
|
|
724
|
+
declare function MessageList({ messages, status, activity, renderMarkdown, emptyState, entityType, userInitials, footer, header, renderMessage, className, classNames, }: MessageListProps): React__default.ReactElement;
|
|
725
|
+
|
|
726
|
+
/** Renders a single chat message: content, tools, reasoning, media, citations, follow-ups. */
|
|
727
|
+
|
|
728
|
+
interface MessageProps {
|
|
729
|
+
message: ChatMessage;
|
|
730
|
+
/** Override the Markdown renderer (e.g. plug in react-markdown). */
|
|
731
|
+
renderMarkdown?: RenderMarkdown;
|
|
732
|
+
/** Live activity label, shown while streaming with no content yet. */
|
|
733
|
+
activity?: string | null;
|
|
734
|
+
/** What is answering — picks the avatar (Agno mark vs. the team glyph). */
|
|
735
|
+
entityType?: EntityType;
|
|
736
|
+
/** Initials shown on the user avatar. AgentOS falls back to "ME". */
|
|
737
|
+
userInitials?: string;
|
|
738
|
+
/** Hide the reasoning panel. */
|
|
739
|
+
hideReasoning?: boolean;
|
|
740
|
+
/** Hide tool calls. */
|
|
741
|
+
hideTools?: boolean;
|
|
742
|
+
/** Hide the sources block under the answer. */
|
|
743
|
+
hideSources?: boolean;
|
|
744
|
+
/**
|
|
745
|
+
* Render the "Related questions" the agent suggested under this message,
|
|
746
|
+
* sending the clicked one here. Off by default: `<ChatWindow>` pins them
|
|
747
|
+
* above the composer instead, so they stay in reach as the transcript grows.
|
|
748
|
+
*/
|
|
749
|
+
onFollowup?: (prompt: string) => void;
|
|
750
|
+
/** Replace the avatar entirely. Pass `false` to drop it. */
|
|
751
|
+
avatar?: React__default.ReactNode | false;
|
|
752
|
+
/** Rendered after the message content, inside the body. */
|
|
753
|
+
children?: React__default.ReactNode;
|
|
754
|
+
className?: string;
|
|
755
|
+
classNames?: ChatClassNames;
|
|
756
|
+
}
|
|
757
|
+
declare function Message({ message, renderMarkdown, activity, avatar, children, className, classNames, entityType, userInitials, hideReasoning, hideTools, hideSources, onFollowup, }: MessageProps): React__default.ReactElement;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* The AgentOS chat dock: a rounded card holding an auto-growing textarea and a
|
|
761
|
+
* bottom action row (attach on the left, send/stop on the right).
|
|
762
|
+
*/
|
|
763
|
+
|
|
764
|
+
interface ChatInputProps {
|
|
765
|
+
/** Omit inside a `<ChatProvider>` to send through the provider's chat. */
|
|
766
|
+
onSend?: (message: string, files?: File[]) => void;
|
|
767
|
+
onStop?: () => void;
|
|
768
|
+
disabled?: boolean;
|
|
769
|
+
busy?: boolean;
|
|
770
|
+
placeholder?: string;
|
|
771
|
+
/** Allow attaching files. */
|
|
772
|
+
allowFiles?: boolean;
|
|
773
|
+
/** Rendered in the left action group — where the entity picker sits. */
|
|
774
|
+
leading?: React__default.ReactNode;
|
|
775
|
+
/** Rendered in the right action group, before send. */
|
|
776
|
+
trailing?: React__default.ReactNode;
|
|
777
|
+
className?: string;
|
|
778
|
+
classNames?: ChatClassNames;
|
|
779
|
+
}
|
|
780
|
+
declare function ChatInput({ onSend, onStop, disabled, busy, placeholder, allowFiles, leading, trailing, className, classNames, }: ChatInputProps): React__default.ReactElement;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Attachment previews, shown in a banner above the composer field — the
|
|
784
|
+
* AgentOS `FileUpload` banner: a count with a "clear all" control, then a
|
|
785
|
+
* horizontally scrolling row of items.
|
|
786
|
+
*
|
|
787
|
+
* Images render as a thumbnail; everything else as a card with a file-type
|
|
788
|
+
* mark, the name, and the MIME type.
|
|
789
|
+
*/
|
|
790
|
+
|
|
791
|
+
interface FilePreviewProps {
|
|
792
|
+
files: File[];
|
|
793
|
+
onRemove: (index: number) => void;
|
|
794
|
+
onClear?: () => void;
|
|
795
|
+
className?: string;
|
|
796
|
+
}
|
|
797
|
+
declare function FilePreview({ files, onRemove, onClear, className }: FilePreviewProps): React__default.ReactElement | null;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* The AgentOS "behind the scenes" panel: everything the run did on its way to
|
|
801
|
+
* the answer, folded under a single muted trigger above the message.
|
|
802
|
+
*
|
|
803
|
+
* The steps are derived from the run's own events, the way the AgentOS chat
|
|
804
|
+
* builds them — content deltas, model-request and reasoning-delta events are
|
|
805
|
+
* dropped, started/completed pairs collapse into one step that reports whether
|
|
806
|
+
* it has finished, and run lifecycle events read as "Run Started" / "Run
|
|
807
|
+
* Completed" with the run duration. Messages restored from session history
|
|
808
|
+
* carry their stored events, so the panel looks the same there.
|
|
809
|
+
*
|
|
810
|
+
* When a message has no events at all, the steps are synthesised from what it
|
|
811
|
+
* does carry (tools, reasoning, member turns, workflow steps).
|
|
812
|
+
*/
|
|
813
|
+
|
|
814
|
+
interface BehindTheScenesProps {
|
|
815
|
+
message: ChatMessage;
|
|
816
|
+
/** True while this message is the one streaming. */
|
|
817
|
+
streaming?: boolean;
|
|
818
|
+
/** Live activity label, e.g. "Calling get_weather". */
|
|
819
|
+
activity?: string | null;
|
|
820
|
+
renderMarkdown?: RenderMarkdown;
|
|
821
|
+
defaultOpen?: boolean;
|
|
822
|
+
hideReasoning?: boolean;
|
|
823
|
+
hideTools?: boolean;
|
|
824
|
+
className?: string;
|
|
825
|
+
classNames?: ChatClassNames;
|
|
826
|
+
}
|
|
827
|
+
type BehindTheScenesStep = {
|
|
828
|
+
kind: 'status';
|
|
829
|
+
id: string;
|
|
830
|
+
label: string;
|
|
831
|
+
detail?: string;
|
|
832
|
+
icon: 'run' | 'continued';
|
|
833
|
+
} | {
|
|
834
|
+
kind: 'tool';
|
|
835
|
+
id: string;
|
|
836
|
+
tool: ToolExecution;
|
|
837
|
+
} | {
|
|
838
|
+
kind: 'reasoning';
|
|
839
|
+
id: string;
|
|
840
|
+
steps: ReasoningStep[];
|
|
841
|
+
completed: boolean;
|
|
842
|
+
} | {
|
|
843
|
+
kind: 'memory';
|
|
844
|
+
id: string;
|
|
845
|
+
completed: boolean;
|
|
846
|
+
} | {
|
|
847
|
+
kind: 'member';
|
|
848
|
+
id: string;
|
|
849
|
+
member: SubRun;
|
|
850
|
+
} | {
|
|
851
|
+
kind: 'step';
|
|
852
|
+
id: string;
|
|
853
|
+
step: WorkflowStep;
|
|
854
|
+
};
|
|
855
|
+
type Options = {
|
|
856
|
+
hideReasoning?: boolean;
|
|
857
|
+
hideTools?: boolean;
|
|
858
|
+
};
|
|
859
|
+
/** The steps shown for a message — from its events when it has them. */
|
|
860
|
+
declare function behindTheScenesItems(message: ChatMessage, opts?: Options): BehindTheScenesStep[];
|
|
861
|
+
/** Whether `<BehindTheScenes>` would render anything for this message. */
|
|
862
|
+
declare function hasBehindTheScenes(message: ChatMessage, opts?: Options): boolean;
|
|
863
|
+
/** The trigger label, mirroring AgentOS's `getBehindTheScenesLabel`. */
|
|
864
|
+
declare function behindTheScenesLabel(message: ChatMessage, streaming?: boolean, activity?: string | null): string;
|
|
865
|
+
declare function BehindTheScenes({ message, streaming, activity, renderMarkdown, defaultOpen, hideReasoning, hideTools, className, classNames, }: BehindTheScenesProps): React__default.ReactElement | null;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Tool calls, rendered the AgentOS way: a row of compact uppercase pills above
|
|
869
|
+
* the answer, with the selected one expanding into a detail panel showing its
|
|
870
|
+
* arguments and result.
|
|
871
|
+
*/
|
|
872
|
+
|
|
873
|
+
declare function ToolCalls({ tools }: {
|
|
874
|
+
tools?: ToolExecution[];
|
|
875
|
+
}): React__default.ReactElement | null;
|
|
876
|
+
|
|
877
|
+
/** Renders a message's reasoning steps in a collapsible timeline. */
|
|
878
|
+
|
|
879
|
+
declare function Reasoning({ steps, defaultOpen, }: {
|
|
880
|
+
steps?: ReasoningStep[];
|
|
881
|
+
defaultOpen?: boolean;
|
|
882
|
+
}): React__default.ReactElement | null;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Renders the nested runs of a team or workflow turn — each team member's
|
|
886
|
+
* response (or each workflow step's executor) as a collapsible card with the
|
|
887
|
+
* member's name, streamed content and tool calls.
|
|
888
|
+
*/
|
|
889
|
+
|
|
890
|
+
declare function MemberResponses({ members, renderMarkdown, title, }: {
|
|
891
|
+
members?: SubRun[];
|
|
892
|
+
renderMarkdown?: RenderMarkdown;
|
|
893
|
+
title?: string;
|
|
894
|
+
}): React__default.ReactElement | null;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Renders the steps of a workflow run as an ordered progress list, each with a
|
|
898
|
+
* status indicator, the step name, and its collapsible output.
|
|
899
|
+
*/
|
|
900
|
+
|
|
901
|
+
declare function WorkflowSteps({ steps, renderMarkdown, title, }: {
|
|
902
|
+
steps?: WorkflowStep[];
|
|
903
|
+
renderMarkdown?: RenderMarkdown;
|
|
904
|
+
title?: string;
|
|
905
|
+
}): React__default.ReactElement | null;
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* The sources behind an answer, as cards.
|
|
909
|
+
*
|
|
910
|
+
* Everything the message cited — retrieved knowledge-base chunks and links the
|
|
911
|
+
* model browsed — is flattened into one numbered list by `collectSources`, so
|
|
912
|
+
* the numbers here are the same ones the inline `[1]` markers in the answer
|
|
913
|
+
* point at.
|
|
914
|
+
*/
|
|
915
|
+
|
|
916
|
+
interface CitationsProps {
|
|
917
|
+
/** Retrieved knowledge-base chunks, as they arrive on the message. */
|
|
918
|
+
references?: ReferenceData[];
|
|
919
|
+
/** Links the model browsed, as they arrive on the message. */
|
|
920
|
+
citations?: Citations$1;
|
|
921
|
+
/**
|
|
922
|
+
* A pre-built list, e.g. from `collectSources`. Wins over `references` and
|
|
923
|
+
* `citations` — pass it when the inline markers were numbered elsewhere.
|
|
924
|
+
*/
|
|
925
|
+
sources?: Source[];
|
|
926
|
+
/** Heading above the cards. Defaults to "Sources". */
|
|
927
|
+
title?: string;
|
|
928
|
+
/** Cards shown before the "more" toggle. Defaults to 4; `0` shows them all. */
|
|
929
|
+
max?: number;
|
|
930
|
+
className?: string;
|
|
931
|
+
classNames?: ChatClassNames;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* One card: the site's favicon and the title, linking to the source. The
|
|
935
|
+
* number, URL and cited passage live on the hover card — a row of cards under
|
|
936
|
+
* an answer only needs to say where it can take you.
|
|
937
|
+
*/
|
|
938
|
+
declare function SourceCard({ source, className, }: {
|
|
939
|
+
source: Source;
|
|
940
|
+
className?: string;
|
|
941
|
+
}): React__default.ReactElement;
|
|
942
|
+
declare function Citations({ references, citations, sources: given, title, max, className, classNames, }: CitationsProps): React__default.ReactElement | null;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* "Related questions" — the follow-up prompts an agent suggests after its
|
|
946
|
+
* answer, stacked as a list of one-line buttons. An agent built with
|
|
947
|
+
* `followups=True` sends them as a `FollowupsCompleted` event and stores them
|
|
948
|
+
* on the run; `<ChatWindow>` pins the latest answer's above the composer, and
|
|
949
|
+
* `<Message onFollowup>` puts them under the answer instead. Render the
|
|
950
|
+
* component yourself from `message.followups` to place them anywhere else.
|
|
951
|
+
*
|
|
952
|
+
* Prompts are trimmed, de-duplicated and clamped to one line each — a model
|
|
953
|
+
* asked for "5–10 words" does not always comply, and a wrapped row reads like
|
|
954
|
+
* an answer rather than a question to ask. The full text is on the `title`.
|
|
955
|
+
*/
|
|
956
|
+
|
|
957
|
+
interface FollowupsProps {
|
|
958
|
+
/** The suggested prompts, as the run carried them. */
|
|
959
|
+
items?: string[] | null;
|
|
960
|
+
/** Called with the prompt text to send. */
|
|
961
|
+
onSelect: (prompt: string) => void;
|
|
962
|
+
/** Heading above the list. Pass `null` for none. Default "Related questions". */
|
|
963
|
+
title?: React__default.ReactNode | null;
|
|
964
|
+
/**
|
|
965
|
+
* Lines each prompt may take before it is cut with an ellipsis. Default 1;
|
|
966
|
+
* `false` lets them wrap.
|
|
967
|
+
*/
|
|
968
|
+
lines?: number | false;
|
|
969
|
+
/** Show at most this many. Default: all of them. */
|
|
970
|
+
max?: number;
|
|
971
|
+
/** Grey the list out (a run is in flight, the composer is disabled…). */
|
|
972
|
+
disabled?: boolean;
|
|
973
|
+
className?: string;
|
|
974
|
+
classNames?: ChatClassNames;
|
|
975
|
+
}
|
|
976
|
+
/** Trim, drop empties, and keep the first of any duplicates (case-insensitively). */
|
|
977
|
+
declare function normalizeFollowups(items?: readonly string[] | null): string[];
|
|
978
|
+
declare function Followups({ items, onSelect, title, lines, max, disabled, className, classNames, }: FollowupsProps): React__default.ReactElement | null;
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Link previews: the little card that describes where a citation points.
|
|
982
|
+
*
|
|
983
|
+
* Two pieces of metadata feed it. The URL itself always yields a hostname and a
|
|
984
|
+
* favicon, and the citation payload usually carries a title and the retrieved
|
|
985
|
+
* passage — that much renders with no network beyond the site icon. Anything
|
|
986
|
+
* richer (OpenGraph title, description, image) comes from the optional
|
|
987
|
+
* `resolveLinkPreview` on `<ChatProvider>`, and only for links someone actually
|
|
988
|
+
* points at: the fetch is triggered by the first hover, not by rendering.
|
|
989
|
+
*/
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Resolve metadata for `url`, at most once per URL per resolver.
|
|
993
|
+
*
|
|
994
|
+
* Nothing happens until `enabled` flips true, which is how hovering pays for
|
|
995
|
+
* the lookup instead of rendering. Returns `null` while there is nothing to
|
|
996
|
+
* add — the caller still has the hostname and favicon to fall back on.
|
|
997
|
+
*/
|
|
998
|
+
declare function useLinkPreview(url: string | undefined, enabled: boolean): {
|
|
999
|
+
preview: LinkPreview | null;
|
|
1000
|
+
loading: boolean;
|
|
1001
|
+
};
|
|
1002
|
+
/** The site's icon, falling back to a glyph when the origin serves none. */
|
|
1003
|
+
declare function Favicon({ url, kind, size, className, }: {
|
|
1004
|
+
url?: string;
|
|
1005
|
+
kind?: Source['kind'];
|
|
1006
|
+
size?: number;
|
|
1007
|
+
className?: string;
|
|
1008
|
+
}): React__default.ReactElement;
|
|
1009
|
+
interface LinkPreviewCardProps {
|
|
1010
|
+
source: Source;
|
|
1011
|
+
/** Resolved metadata, when a `resolveLinkPreview` returned some. */
|
|
1012
|
+
preview?: LinkPreview | null;
|
|
1013
|
+
loading?: boolean;
|
|
1014
|
+
className?: string;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* The preview body: site row, title, description. Shared by the hover card and
|
|
1018
|
+
* the source cards under a message, so the two always agree.
|
|
1019
|
+
*/
|
|
1020
|
+
declare function LinkPreviewCard({ source, preview, loading, className, }: LinkPreviewCardProps): React__default.ReactElement;
|
|
1021
|
+
interface HoverPreviewProps {
|
|
1022
|
+
source: Source;
|
|
1023
|
+
/** The trigger — a citation marker or a link in the answer. */
|
|
1024
|
+
children: React__default.ReactElement;
|
|
1025
|
+
/** Turn the hover card off and render the trigger bare. */
|
|
1026
|
+
disabled?: boolean;
|
|
1027
|
+
className?: string;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Wraps a citation marker or link so that pointing at it — or tabbing to it —
|
|
1031
|
+
* reveals the preview card. Escape dismisses it; the card is reachable with the
|
|
1032
|
+
* pointer, so links inside it stay clickable.
|
|
1033
|
+
*/
|
|
1034
|
+
declare function HoverPreview({ source, children, disabled, className, }: HoverPreviewProps): React__default.ReactElement;
|
|
1035
|
+
|
|
1036
|
+
/** Renders images, videos and audio attached to a message. */
|
|
1037
|
+
|
|
1038
|
+
declare function Multimedia({ images, videos, audio, responseAudio, }: {
|
|
1039
|
+
images?: ImageData[];
|
|
1040
|
+
videos?: VideoData[];
|
|
1041
|
+
audio?: AudioData[];
|
|
1042
|
+
responseAudio?: AudioData;
|
|
1043
|
+
}): React__default.ReactElement | null;
|
|
1044
|
+
|
|
1045
|
+
/** A live status line showing what the run is currently doing. */
|
|
1046
|
+
|
|
1047
|
+
declare function StatusIndicator({ status, activity, }: {
|
|
1048
|
+
status: ChatStatus;
|
|
1049
|
+
activity?: string | null;
|
|
1050
|
+
}): React__default.ReactElement | null;
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* A developer-facing live feed of run events. Consecutive repeats of the same
|
|
1054
|
+
* event (e.g. the stream of `RunContent` deltas) are folded into a single row
|
|
1055
|
+
* with a count, and each row is labelled with the agent/team/workflow it came
|
|
1056
|
+
* from — so a streaming run reads as one "RunContent ×N" line, not hundreds.
|
|
1057
|
+
*/
|
|
1058
|
+
|
|
1059
|
+
declare function EventLog({ events, autoScroll, maxHeight, }: {
|
|
1060
|
+
events: RunEventData[];
|
|
1061
|
+
autoScroll?: boolean;
|
|
1062
|
+
maxHeight?: number;
|
|
1063
|
+
}): React__default.ReactElement;
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Human-in-the-loop panel, styled after the Agno OS chat HITL cards.
|
|
1067
|
+
*
|
|
1068
|
+
* When a run pauses, each pending tool / requirement renders as its own card:
|
|
1069
|
+
* the tool icon + UPPERCASE name, a collapsible Arguments accordion, per-card
|
|
1070
|
+
* Approve / Reject controls (with an optional rejection reason), and any
|
|
1071
|
+
* requested input fields. Submitting resolves every card and continues the run.
|
|
1072
|
+
*/
|
|
1073
|
+
|
|
1074
|
+
interface HumanInputProps {
|
|
1075
|
+
message: ChatMessage;
|
|
1076
|
+
entityType?: EntityType;
|
|
1077
|
+
busy?: boolean;
|
|
1078
|
+
/** Continue the run with the resolved tools (agent/team) or step requirements (workflow). */
|
|
1079
|
+
onResolve: (resolution: {
|
|
1080
|
+
tools?: ToolExecution[];
|
|
1081
|
+
stepRequirements?: unknown[];
|
|
1082
|
+
}) => void;
|
|
1083
|
+
className?: string;
|
|
1084
|
+
}
|
|
1085
|
+
declare function HumanInput({ message, entityType, busy, onResolve, className, }: HumanInputProps): React__default.ReactElement | null;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* Entity picker styled after the Agno OS chat selector: a compact bordered
|
|
1089
|
+
* trigger showing the selection in mono-uppercase, opening a dark popover with
|
|
1090
|
+
* muted group labels (Agents / Teams / Workflows) and a check on the active
|
|
1091
|
+
* item. Custom popover (no native <select>, no extra deps).
|
|
1092
|
+
*/
|
|
1093
|
+
|
|
1094
|
+
declare function EntitySelector({ entities, value, onChange, disabled, placeholder, className, classNames, }: {
|
|
1095
|
+
entities: Entity[];
|
|
1096
|
+
value?: Entity | null;
|
|
1097
|
+
onChange: (entity: Entity) => void;
|
|
1098
|
+
disabled?: boolean;
|
|
1099
|
+
placeholder?: string;
|
|
1100
|
+
className?: string;
|
|
1101
|
+
classNames?: ChatClassNames;
|
|
1102
|
+
}): React__default.ReactElement;
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* The selected agent/team/workflow, shown read-only in the composer row — the
|
|
1106
|
+
* AgentOS `SelectComponentType` display: the name in mono uppercase, then the
|
|
1107
|
+
* model in a small bordered chip.
|
|
1108
|
+
*
|
|
1109
|
+
* This is deliberately not a control. AgentOS switches the entity from the
|
|
1110
|
+
* breadcrumb above the chat, not from the dock, so the selection is owned by
|
|
1111
|
+
* whatever renders the embed. Pass `entity` down and render `<EntitySelector>`
|
|
1112
|
+
* in your own chrome if you want users to change it.
|
|
1113
|
+
*/
|
|
1114
|
+
|
|
1115
|
+
interface EntityBadgeProps {
|
|
1116
|
+
entity?: Entity | null;
|
|
1117
|
+
/** Shown when nothing is selected yet. */
|
|
1118
|
+
placeholder?: string;
|
|
1119
|
+
/** Hide the model mark. */
|
|
1120
|
+
hideModel?: boolean;
|
|
1121
|
+
className?: string;
|
|
1122
|
+
}
|
|
1123
|
+
declare function EntityBadge({ entity, placeholder, hideModel, className, }: EntityBadgeProps): React__default.ReactElement | null;
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Model-provider marks, shown on the selected-entity badge in the composer.
|
|
1127
|
+
*
|
|
1128
|
+
* The artwork is the AgentOS set (`agno-os/src/components/ui/icon/`), reduced to
|
|
1129
|
+
* plain geometry: the clip paths there wrap the full viewBox and their ids
|
|
1130
|
+
* would collide whenever an icon renders more than once on a page. Every mark
|
|
1131
|
+
* inherits `currentColor` so it follows the surrounding text.
|
|
1132
|
+
*/
|
|
1133
|
+
|
|
1134
|
+
interface ProviderIconProps {
|
|
1135
|
+
size?: number;
|
|
1136
|
+
className?: string;
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Pick a mark from a provider or model string, the way AgentOS does — matching
|
|
1140
|
+
* on a substring so "anthropic", "claude-opus-5" and "us.anthropic.claude"
|
|
1141
|
+
* all land on the same logo. Returns null when nothing matches, and the badge
|
|
1142
|
+
* then falls back to the model name as text.
|
|
1143
|
+
*/
|
|
1144
|
+
declare function getProviderIcon(value?: string): ((props: ProviderIconProps) => React__default.ReactElement) | null;
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* A sidebar listing the past sessions of the selected entity. Clicking a
|
|
1148
|
+
* session loads its transcript; the trash icon deletes it.
|
|
1149
|
+
*
|
|
1150
|
+
* Pair with `useAgnoChat`: pass `chat.sessions`, `chat.loadSession`, etc.
|
|
1151
|
+
*/
|
|
1152
|
+
|
|
1153
|
+
interface SessionListProps {
|
|
1154
|
+
/** Omit inside a `<ChatProvider>` to use the provider's session list. */
|
|
1155
|
+
sessions?: SessionEntry[];
|
|
1156
|
+
activeSessionId?: string;
|
|
1157
|
+
/** Sessions with a run in flight — each shows a spinner instead of the delete button. */
|
|
1158
|
+
streamingSessionIds?: string[];
|
|
1159
|
+
loading?: boolean;
|
|
1160
|
+
onSelect?: (sessionId: string) => void;
|
|
1161
|
+
onDelete?: (sessionId: string) => void;
|
|
1162
|
+
onNew?: () => void;
|
|
1163
|
+
title?: string;
|
|
1164
|
+
/** Hide the header row. */
|
|
1165
|
+
hideTitle?: boolean;
|
|
1166
|
+
className?: string;
|
|
1167
|
+
classNames?: ChatClassNames;
|
|
1168
|
+
}
|
|
1169
|
+
declare function SessionList({ sessions, activeSessionId, streamingSessionIds, loading, onSelect, onDelete, onNew, title, hideTitle, className, classNames, }: SessionListProps): React__default.ReactElement;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* The icon set.
|
|
1173
|
+
*
|
|
1174
|
+
* Standard icons come from lucide-react, which is what AgentOS itself renders.
|
|
1175
|
+
* They were hand-traced here to keep the install dependency-free, and the
|
|
1176
|
+
* approximations drifted — the paperclip read as a hook rather than a clip —
|
|
1177
|
+
* so the geometry is now maintained upstream instead. lucide is
|
|
1178
|
+
* `sideEffects: false` and tree-shakeable, so only the icons imported below
|
|
1179
|
+
* reach a consumer's bundle.
|
|
1180
|
+
*
|
|
1181
|
+
* Re-exported under our own names so call sites stay stable if a mapping
|
|
1182
|
+
* changes, and so the two pieces of Agno artwork lucide has no equivalent for
|
|
1183
|
+
* — the brand mark and the team glyph — sit alongside them. Model-provider
|
|
1184
|
+
* marks live in `providerIcons.tsx` for the same reason.
|
|
1185
|
+
*/
|
|
1186
|
+
|
|
1187
|
+
type IconProps = {
|
|
1188
|
+
size?: number;
|
|
1189
|
+
className?: string;
|
|
1190
|
+
};
|
|
1191
|
+
declare const ChevronDown: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1192
|
+
declare const ArrowUp: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1193
|
+
declare const Paperclip: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1194
|
+
declare const FileIcon: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1195
|
+
declare const FileAudio: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1196
|
+
declare const FileVideo: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1197
|
+
declare const Wrench: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1198
|
+
declare const BookOpen: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1199
|
+
declare const Globe: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1200
|
+
declare const Brain: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1201
|
+
declare const Box: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1202
|
+
declare const Plus: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1203
|
+
declare const Check: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1204
|
+
declare const Copy: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1205
|
+
declare const Close: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1206
|
+
/** Memory-update steps. */
|
|
1207
|
+
declare const Memory: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1208
|
+
/** Run-continued marker. */
|
|
1209
|
+
declare const Rerun: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1210
|
+
declare const Pulse: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1211
|
+
declare const Trash: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1212
|
+
declare const ChatBubble: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1213
|
+
declare const Spinner: ({ size, className }: IconProps) => React__default.ReactElement;
|
|
1214
|
+
/** The stop control is a filled square, not an outline. */
|
|
1215
|
+
declare function Stop({ size, className }: IconProps): React__default.ReactElement;
|
|
1216
|
+
/** The Agno mark — used as the agent avatar, exactly as in AgentOS. */
|
|
1217
|
+
declare function AgnoMark({ size, className }: IconProps): React__default.ReactElement;
|
|
1218
|
+
/** The AgentOS `team` glyph, drawn in the current colour. */
|
|
1219
|
+
declare function TeamGlyph({ size, className }: IconProps): React__default.ReactElement;
|
|
1220
|
+
/** The grid loader AgentOS shows while a run is working. */
|
|
1221
|
+
declare function GridLoader({ className }: {
|
|
1222
|
+
className?: string;
|
|
1223
|
+
}): React__default.ReactElement;
|
|
1224
|
+
|
|
1225
|
+
export { AgnoChat, type AgnoChatProps, AgnoMark, ArrowUp, BehindTheScenes, type BehindTheScenesProps, BookOpen, Box, Brain, ChatBubble, type ChatClassNames, type ChatContextValue, ChatInput, type ChatInputProps, ChatLauncher, type ChatLauncherProps, ChatProvider, type ChatProviderProps, ChatWindow, type ChatWindowProps, Check, ChevronDown, Citations, type CitationsProps, Close, Copy, EntityBadge, type EntityBadgeProps, EntitySelector, EventLog, Favicon, FileAudio, FileIcon, FilePreview, type FilePreviewProps, FileVideo, Followups, type FollowupsProps, Globe, GridLoader, HoverPreview, type HoverPreviewProps, HumanInput, type HumanInputProps, type LauncherPanel, type LauncherPosition, type LinkPreview, LinkPreviewCard, type LinkPreviewCardProps, Markdown, type MarkdownProps, MemberResponses, Memory, Message, MessageList, type MessageListProps, type MessageProps, Multimedia, Paperclip, Plus, Pulse, type QuickPrompt, QuickPrompts, type QuickPromptsProps, Reasoning, type RenderMarkdown, Rerun, type ResolveLinkPreview, type SendOptions, SessionList, type SessionListProps, type Source, SourceCard, SourcesProvider, Spinner, StatusIndicator, Stop, TeamGlyph, ToolCalls, Trash, type UseAgnoChat, type UseAgnoChatOptions, WorkflowSteps, Wrench, behindTheScenesItems, behindTheScenesLabel, collectSources, displayUrl, faviconUrl, getProviderIcon, hasBehindTheScenes, linkCitations, normalizeFollowups, quickPromptLabel, quickPromptText, sourceHost, sourcesFromMarkdown, useAgnoChat, useChatContext, useLinkPreview, useOptionalChatContext, useResolvedChat, useResolvedClassNames, useSources, withoutSourcesLine, writeClipboard };
|