@distri/react 0.1.8 → 0.2.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/README.md +186 -0
- package/dist/globals.css +2358 -0
- package/dist/globals.d.cts +2 -0
- package/dist/globals.d.ts +2 -0
- package/dist/index.cjs +4724 -0
- package/dist/index.d.cts +850 -0
- package/dist/index.d.ts +811 -17
- package/dist/index.js +4358 -217
- package/package.json +42 -32
- package/dist/index.d.mts +0 -56
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -434
- package/dist/index.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,429 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { ReactNode } from 'react';
|
|
4
|
+
import { AgentSkill, Message, TaskStatusUpdateEvent, TaskArtifactUpdateEvent, Task, MessageSendParams, Part } from '@a2a-js/sdk/client';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
import * as _radix_ui_react_separator from '@radix-ui/react-separator';
|
|
8
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
9
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
10
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
11
|
+
import { ClassValue } from 'clsx';
|
|
12
|
+
|
|
13
|
+
type Role = 'user' | 'system' | 'assistant';
|
|
14
|
+
interface RunStartedEvent {
|
|
15
|
+
type: 'run_started';
|
|
16
|
+
data: {};
|
|
17
|
+
}
|
|
18
|
+
interface RunFinishedEvent {
|
|
19
|
+
type: 'run_finished';
|
|
20
|
+
data: {};
|
|
21
|
+
}
|
|
22
|
+
interface RunErrorEvent {
|
|
23
|
+
type: 'run_error';
|
|
24
|
+
data: {
|
|
25
|
+
message: string;
|
|
26
|
+
code?: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface TextMessageStartEvent {
|
|
30
|
+
type: 'text_message_start';
|
|
31
|
+
data: {
|
|
32
|
+
message_id: string;
|
|
33
|
+
role: Role;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
interface TextMessageContentEvent {
|
|
37
|
+
type: 'text_message_content';
|
|
38
|
+
data: {
|
|
39
|
+
message_id: string;
|
|
40
|
+
delta: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
interface TextMessageEndEvent {
|
|
44
|
+
type: 'text_message_end';
|
|
45
|
+
data: {
|
|
46
|
+
message_id: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
interface ToolCallStartEvent {
|
|
50
|
+
type: 'tool_call_start';
|
|
51
|
+
data: {
|
|
52
|
+
tool_call_id: string;
|
|
53
|
+
tool_call_name: string;
|
|
54
|
+
parent_message_id?: string;
|
|
55
|
+
is_external?: boolean;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
interface ToolCallArgsEvent {
|
|
59
|
+
type: 'tool_call_args';
|
|
60
|
+
data: {
|
|
61
|
+
tool_call_id: string;
|
|
62
|
+
delta: string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
interface ToolCallEndEvent {
|
|
66
|
+
type: 'tool_call_end';
|
|
67
|
+
data: {
|
|
68
|
+
tool_call_id: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
interface ToolCallResultEvent {
|
|
72
|
+
type: 'tool_call_result';
|
|
73
|
+
data: {
|
|
74
|
+
tool_call_id: string;
|
|
75
|
+
result: string;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
interface AgentHandoverEvent {
|
|
79
|
+
type: 'agent_handover';
|
|
80
|
+
data: {
|
|
81
|
+
from_agent: string;
|
|
82
|
+
to_agent: string;
|
|
83
|
+
reason?: string;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
type DistriEvent = RunStartedEvent | RunFinishedEvent | RunErrorEvent | TextMessageStartEvent | TextMessageContentEvent | TextMessageEndEvent | ToolCallStartEvent | ToolCallArgsEvent | ToolCallEndEvent | ToolCallResultEvent | AgentHandoverEvent;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Message roles supported by Distri
|
|
90
|
+
*/
|
|
91
|
+
type MessageRole = 'system' | 'assistant' | 'user' | 'tool';
|
|
92
|
+
/**
|
|
93
|
+
* Distri-specific message structure with parts
|
|
94
|
+
*/
|
|
95
|
+
interface DistriMessage {
|
|
96
|
+
id: string;
|
|
97
|
+
role: MessageRole;
|
|
98
|
+
parts: DistriPart[];
|
|
99
|
+
created_at?: string;
|
|
100
|
+
}
|
|
101
|
+
type DistriStreamEvent = DistriMessage | DistriEvent;
|
|
102
|
+
/**
|
|
103
|
+
* Context required for constructing A2A messages from DistriMessage
|
|
104
|
+
*/
|
|
105
|
+
interface InvokeContext {
|
|
106
|
+
thread_id: string;
|
|
107
|
+
run_id?: string;
|
|
108
|
+
metadata?: any;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Distri message parts - equivalent to Rust enum Part
|
|
112
|
+
*/
|
|
113
|
+
type TextPart = {
|
|
114
|
+
type: 'text';
|
|
115
|
+
text: string;
|
|
116
|
+
};
|
|
117
|
+
type CodeObservationPart = {
|
|
118
|
+
type: 'code_observation';
|
|
119
|
+
thought: string;
|
|
120
|
+
code: string;
|
|
121
|
+
};
|
|
122
|
+
type ImageUrlPart = {
|
|
123
|
+
type: 'image_url';
|
|
124
|
+
image: FileUrl;
|
|
125
|
+
};
|
|
126
|
+
type ImageBytesPart = {
|
|
127
|
+
type: 'image_bytes';
|
|
128
|
+
image: FileBytes;
|
|
129
|
+
};
|
|
130
|
+
type ImagePart = ImageUrlPart | ImageBytesPart;
|
|
131
|
+
type DataPart = {
|
|
132
|
+
type: 'data';
|
|
133
|
+
data: any;
|
|
134
|
+
};
|
|
135
|
+
type ToolCallPart = {
|
|
136
|
+
type: 'tool_call';
|
|
137
|
+
tool_call: ToolCall;
|
|
138
|
+
};
|
|
139
|
+
type ToolResultPart = {
|
|
140
|
+
type: 'tool_result';
|
|
141
|
+
tool_result: ToolResult;
|
|
142
|
+
};
|
|
143
|
+
type PlanPart = {
|
|
144
|
+
type: 'plan';
|
|
145
|
+
plan: string;
|
|
146
|
+
};
|
|
147
|
+
type DistriPart = TextPart | CodeObservationPart | ImagePart | DataPart | ToolCallPart | ToolResultPart | PlanPart;
|
|
148
|
+
/**
|
|
149
|
+
* File type for images
|
|
150
|
+
*/
|
|
151
|
+
interface FileBytes {
|
|
152
|
+
mime_type: string;
|
|
153
|
+
data: string;
|
|
154
|
+
name?: string;
|
|
155
|
+
}
|
|
156
|
+
interface FileUrl {
|
|
157
|
+
mime_type: string;
|
|
158
|
+
url: string;
|
|
159
|
+
name?: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Tool definition interface following AG-UI pattern
|
|
163
|
+
*/
|
|
164
|
+
interface DistriBaseTool {
|
|
165
|
+
name: string;
|
|
166
|
+
type: 'function' | 'ui';
|
|
167
|
+
description: string;
|
|
168
|
+
input_schema: object;
|
|
169
|
+
}
|
|
170
|
+
interface DistriFnTool extends DistriBaseTool {
|
|
171
|
+
type: 'function';
|
|
172
|
+
handler: ToolHandler;
|
|
173
|
+
onToolComplete?: (toolCallId: string, toolResult: ToolResult) => void;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Tool handler function
|
|
177
|
+
*/
|
|
178
|
+
interface ToolHandler {
|
|
179
|
+
(input: any): Promise<string | number | boolean | null | object>;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Tool call from agent
|
|
183
|
+
*/
|
|
184
|
+
interface ToolCall {
|
|
185
|
+
tool_call_id: string;
|
|
186
|
+
tool_name: string;
|
|
187
|
+
input: any;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Tool result for responding to tool calls
|
|
191
|
+
*/
|
|
192
|
+
interface ToolResult {
|
|
193
|
+
tool_call_id: string;
|
|
194
|
+
result: string | number | boolean | null;
|
|
195
|
+
success: boolean;
|
|
196
|
+
error?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Distri-specific Agent type that wraps A2A AgentCard
|
|
200
|
+
*/
|
|
201
|
+
interface DistriAgent {
|
|
202
|
+
/** The name of the agent. */
|
|
203
|
+
name: string;
|
|
204
|
+
id: string;
|
|
205
|
+
/** A brief description of the agent's purpose. */
|
|
206
|
+
description?: string;
|
|
207
|
+
/** The version of the agent. */
|
|
208
|
+
version?: string;
|
|
209
|
+
/** The system prompt for the agent, if any. */
|
|
210
|
+
system_prompt?: string | null;
|
|
211
|
+
/** A list of MCP server definitions associated with the agent. */
|
|
212
|
+
mcp_servers?: McpDefinition[];
|
|
213
|
+
/** Settings related to the model used by the agent. */
|
|
214
|
+
model_settings?: ModelSettings;
|
|
215
|
+
/** The size of the history to maintain for the agent. */
|
|
216
|
+
history_size?: number;
|
|
217
|
+
/** The planning configuration for the agent, if any. */
|
|
218
|
+
plan?: any;
|
|
219
|
+
/** A2A-specific fields */
|
|
220
|
+
icon_url?: string;
|
|
221
|
+
max_iterations?: number;
|
|
222
|
+
skills?: AgentSkill[];
|
|
223
|
+
/** List of sub-agents that this agent can transfer control to */
|
|
224
|
+
sub_agents?: string[];
|
|
225
|
+
}
|
|
226
|
+
interface McpDefinition {
|
|
227
|
+
/** The filter applied to the tools in this MCP definition. */
|
|
228
|
+
filter?: string[];
|
|
229
|
+
/** The name of the MCP server. */
|
|
230
|
+
name: string;
|
|
231
|
+
/** The type of the MCP server (Tool or Agent). */
|
|
232
|
+
type?: McpServerType;
|
|
233
|
+
}
|
|
234
|
+
interface ModelSettings {
|
|
235
|
+
model: string;
|
|
236
|
+
temperature: number;
|
|
237
|
+
max_tokens: number;
|
|
238
|
+
top_p: number;
|
|
239
|
+
frequency_penalty: number;
|
|
240
|
+
presence_penalty: number;
|
|
241
|
+
max_iterations: number;
|
|
242
|
+
provider: ModelProvider;
|
|
243
|
+
/** Additional parameters for the agent, if any. */
|
|
244
|
+
parameters?: any;
|
|
245
|
+
/** The format of the response, if specified. */
|
|
246
|
+
response_format?: any;
|
|
247
|
+
}
|
|
248
|
+
type McpServerType = 'tool' | 'agent';
|
|
249
|
+
type ModelProvider = 'openai' | 'aigateway';
|
|
250
|
+
/**
|
|
251
|
+
* Distri Thread type for conversation management
|
|
252
|
+
*/
|
|
253
|
+
interface DistriThread {
|
|
254
|
+
id: string;
|
|
255
|
+
title: string;
|
|
256
|
+
agent_id: string;
|
|
257
|
+
agent_name: string;
|
|
258
|
+
updated_at: string;
|
|
259
|
+
message_count: number;
|
|
260
|
+
last_message?: string;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Distri Client Configuration
|
|
264
|
+
*/
|
|
265
|
+
interface DistriClientConfig {
|
|
266
|
+
baseUrl: string;
|
|
267
|
+
apiVersion?: string;
|
|
268
|
+
timeout?: number;
|
|
269
|
+
retryAttempts?: number;
|
|
270
|
+
retryDelay?: number;
|
|
271
|
+
debug?: boolean;
|
|
272
|
+
headers?: Record<string, string>;
|
|
273
|
+
interceptor?: (init?: RequestInit) => Promise<RequestInit | undefined>;
|
|
274
|
+
}
|
|
275
|
+
type A2AStreamEventData = Message | TaskStatusUpdateEvent | TaskArtifactUpdateEvent | Task;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Enhanced Distri Client that wraps A2AClient and adds Distri-specific features
|
|
279
|
+
*/
|
|
280
|
+
declare class DistriClient {
|
|
281
|
+
private config;
|
|
282
|
+
private agentClients;
|
|
283
|
+
constructor(config: DistriClientConfig);
|
|
284
|
+
/**
|
|
285
|
+
* Get all available agents from the Distri server
|
|
286
|
+
*/
|
|
287
|
+
getAgents(): Promise<DistriAgent[]>;
|
|
288
|
+
/**
|
|
289
|
+
* Get specific agent by ID
|
|
290
|
+
*/
|
|
291
|
+
getAgent(agentId: string): Promise<DistriAgent>;
|
|
292
|
+
/**
|
|
293
|
+
* Get or create A2AClient for an agent
|
|
294
|
+
*/
|
|
295
|
+
private getA2AClient;
|
|
296
|
+
/**
|
|
297
|
+
* Send a message to an agent
|
|
298
|
+
*/
|
|
299
|
+
sendMessage(agentId: string, params: MessageSendParams): Promise<Message | Task>;
|
|
300
|
+
/**
|
|
301
|
+
* Send a streaming message to an agent
|
|
302
|
+
*/
|
|
303
|
+
sendMessageStream(agentId: string, params: MessageSendParams): AsyncGenerator<A2AStreamEventData>;
|
|
304
|
+
/**
|
|
305
|
+
* Get task details
|
|
306
|
+
*/
|
|
307
|
+
getTask(agentId: string, taskId: string): Promise<Task>;
|
|
308
|
+
/**
|
|
309
|
+
* Cancel a task
|
|
310
|
+
*/
|
|
311
|
+
cancelTask(agentId: string, taskId: string): Promise<void>;
|
|
312
|
+
/**
|
|
313
|
+
* Get threads from Distri server
|
|
314
|
+
*/
|
|
315
|
+
getThreads(): Promise<DistriThread[]>;
|
|
316
|
+
getThread(threadId: string): Promise<DistriThread>;
|
|
317
|
+
/**
|
|
318
|
+
* Get thread messages
|
|
319
|
+
*/
|
|
320
|
+
getThreadMessages(threadId: string): Promise<Message[]>;
|
|
321
|
+
/**
|
|
322
|
+
* Get messages from a thread as DistriMessage format
|
|
323
|
+
*/
|
|
324
|
+
getThreadMessagesAsDistri(threadId: string): Promise<DistriMessage[]>;
|
|
325
|
+
/**
|
|
326
|
+
* Send a DistriMessage to a thread
|
|
327
|
+
*/
|
|
328
|
+
sendDistriMessage(threadId: string, message: DistriMessage, context: InvokeContext): Promise<void>;
|
|
329
|
+
/**
|
|
330
|
+
* Get the base URL for making direct requests
|
|
331
|
+
*/
|
|
332
|
+
get baseUrl(): string;
|
|
333
|
+
/**
|
|
334
|
+
* Enhanced fetch with retry logic
|
|
335
|
+
*/
|
|
336
|
+
private fetchAbsolute;
|
|
337
|
+
/**
|
|
338
|
+
* Enhanced fetch with retry logic
|
|
339
|
+
*/
|
|
340
|
+
private fetch;
|
|
341
|
+
/**
|
|
342
|
+
* Delay utility
|
|
343
|
+
*/
|
|
344
|
+
private delay;
|
|
345
|
+
/**
|
|
346
|
+
* Debug logging
|
|
347
|
+
*/
|
|
348
|
+
private debug;
|
|
349
|
+
/**
|
|
350
|
+
* Helper method to create A2A messages
|
|
351
|
+
*/
|
|
352
|
+
static initMessage(parts: Part[] | string, role: "agent" | "user" | undefined, message: Omit<Partial<Message>, 'parts' | 'role' | 'kind'>): Message;
|
|
353
|
+
/**
|
|
354
|
+
* Create a DistriMessage instance
|
|
355
|
+
*/
|
|
356
|
+
static initDistriMessage(role: DistriMessage['role'], parts: DistriPart[], id?: string, created_at?: string): DistriMessage;
|
|
357
|
+
/**
|
|
358
|
+
* Helper method to create message send parameters
|
|
359
|
+
*/
|
|
360
|
+
static initMessageParams(message: Message, configuration?: MessageSendParams['configuration'], metadata?: any): MessageSendParams;
|
|
361
|
+
/**
|
|
362
|
+
* Create MessageSendParams from a DistriMessage using InvokeContext
|
|
363
|
+
*/
|
|
364
|
+
static initDistriMessageParams(message: DistriMessage, context: InvokeContext): MessageSendParams;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Enhanced Agent class with simple tool system following AG-UI pattern
|
|
369
|
+
*/
|
|
370
|
+
declare class Agent$1 {
|
|
371
|
+
private client;
|
|
372
|
+
private agentDefinition;
|
|
373
|
+
private tools;
|
|
374
|
+
constructor(agentDefinition: DistriAgent, client: DistriClient);
|
|
375
|
+
/**
|
|
376
|
+
* Add a tool to the agent (AG-UI style)
|
|
377
|
+
*/
|
|
378
|
+
registerTool(tool: DistriBaseTool): void;
|
|
379
|
+
/**
|
|
380
|
+
* Add multiple tools at once
|
|
381
|
+
*/
|
|
382
|
+
registerTools(tools: DistriBaseTool[]): void;
|
|
383
|
+
/**
|
|
384
|
+
* Remove a tool
|
|
385
|
+
*/
|
|
386
|
+
unregisterTool(toolName: string): void;
|
|
387
|
+
/**
|
|
388
|
+
* Get all registered tools
|
|
389
|
+
*/
|
|
390
|
+
getTools(): DistriBaseTool[];
|
|
391
|
+
/**
|
|
392
|
+
* Check if a tool is registered
|
|
393
|
+
*/
|
|
394
|
+
hasTool(toolName: string): boolean;
|
|
395
|
+
/**
|
|
396
|
+
* Get agent information
|
|
397
|
+
*/
|
|
398
|
+
get id(): string;
|
|
399
|
+
get name(): string;
|
|
400
|
+
get description(): string | undefined;
|
|
401
|
+
get iconUrl(): string | undefined;
|
|
402
|
+
/**
|
|
403
|
+
* Fetch messages for a thread (public method for useChat)
|
|
404
|
+
*/
|
|
405
|
+
getThreadMessages(threadId: string): Promise<Message[]>;
|
|
406
|
+
/**
|
|
407
|
+
* Direct (non-streaming) invoke
|
|
408
|
+
*/
|
|
409
|
+
invoke(params: MessageSendParams): Promise<Message>;
|
|
410
|
+
/**
|
|
411
|
+
* Streaming invoke
|
|
412
|
+
*/
|
|
413
|
+
invokeStream(params: MessageSendParams): Promise<AsyncGenerator<DistriEvent | DistriMessage>>;
|
|
414
|
+
/**
|
|
415
|
+
* Enhance message params with tool definitions
|
|
416
|
+
*/
|
|
417
|
+
private enhanceParamsWithTools;
|
|
418
|
+
/**
|
|
419
|
+
* Create an agent instance from an agent ID
|
|
420
|
+
*/
|
|
421
|
+
static create(agentId: string, client: DistriClient): Promise<Agent$1>;
|
|
422
|
+
/**
|
|
423
|
+
* List all available agents
|
|
424
|
+
*/
|
|
425
|
+
static list(client: DistriClient): Promise<Agent$1[]>;
|
|
426
|
+
}
|
|
5
427
|
|
|
6
428
|
interface DistriContextValue {
|
|
7
429
|
client: DistriClient | null;
|
|
@@ -11,10 +433,26 @@ interface DistriContextValue {
|
|
|
11
433
|
interface DistriProviderProps {
|
|
12
434
|
config: DistriClientConfig;
|
|
13
435
|
children: ReactNode;
|
|
436
|
+
defaultTheme?: 'dark' | 'light' | 'system';
|
|
14
437
|
}
|
|
15
|
-
declare function DistriProvider({ config, children }: DistriProviderProps): react_jsx_runtime.JSX.Element;
|
|
438
|
+
declare function DistriProvider({ config, children, defaultTheme }: DistriProviderProps): react_jsx_runtime.JSX.Element;
|
|
16
439
|
declare function useDistri(): DistriContextValue;
|
|
17
|
-
|
|
440
|
+
|
|
441
|
+
interface UseAgentOptions {
|
|
442
|
+
agentId: string;
|
|
443
|
+
agent?: Agent$1;
|
|
444
|
+
autoCreateAgent?: boolean;
|
|
445
|
+
}
|
|
446
|
+
interface UseAgentResult {
|
|
447
|
+
agent: Agent$1 | null;
|
|
448
|
+
loading: boolean;
|
|
449
|
+
error: Error | null;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* useAgent is for agent configuration and invocation.
|
|
453
|
+
* For chat UIs, use useChat instead.
|
|
454
|
+
*/
|
|
455
|
+
declare function useAgent({ agentId, autoCreateAgent, }: UseAgentOptions): UseAgentResult;
|
|
18
456
|
|
|
19
457
|
interface UseAgentsResult {
|
|
20
458
|
agents: DistriAgent[];
|
|
@@ -25,22 +463,52 @@ interface UseAgentsResult {
|
|
|
25
463
|
}
|
|
26
464
|
declare function useAgents(): UseAgentsResult;
|
|
27
465
|
|
|
466
|
+
type ToolCallStatus = 'pending' | 'running' | 'completed' | 'error' | 'user_action_required';
|
|
467
|
+
interface ToolCallState {
|
|
468
|
+
tool_call_id: string;
|
|
469
|
+
status: ToolCallStatus;
|
|
470
|
+
tool_name: string;
|
|
471
|
+
input: any;
|
|
472
|
+
result?: any;
|
|
473
|
+
error?: string;
|
|
474
|
+
startedAt?: Date;
|
|
475
|
+
completedAt?: Date;
|
|
476
|
+
component?: React.ReactNode;
|
|
477
|
+
}
|
|
478
|
+
type DistriAnyTool = DistriFnTool | DistriUiTool;
|
|
479
|
+
interface DistriUiTool extends DistriBaseTool {
|
|
480
|
+
type: 'ui';
|
|
481
|
+
component: (props: UiToolProps) => React.ReactNode;
|
|
482
|
+
}
|
|
483
|
+
type UiToolProps = {
|
|
484
|
+
toolCall: ToolCall;
|
|
485
|
+
toolCallState?: ToolCallState;
|
|
486
|
+
completeTool: (result: ToolResult) => void;
|
|
487
|
+
};
|
|
488
|
+
|
|
28
489
|
interface UseChatOptions {
|
|
29
|
-
|
|
30
|
-
|
|
490
|
+
threadId: string;
|
|
491
|
+
agent?: Agent$1;
|
|
492
|
+
onMessage?: (message: DistriStreamEvent) => void;
|
|
493
|
+
onError?: (error: Error) => void;
|
|
494
|
+
metadata?: any;
|
|
495
|
+
onMessagesUpdate?: () => void;
|
|
496
|
+
tools?: DistriAnyTool[];
|
|
31
497
|
}
|
|
32
|
-
interface
|
|
33
|
-
|
|
34
|
-
error: Error | null;
|
|
35
|
-
messages: Message[];
|
|
498
|
+
interface UseChatReturn {
|
|
499
|
+
messages: DistriStreamEvent[];
|
|
36
500
|
isStreaming: boolean;
|
|
37
|
-
sendMessage: (
|
|
38
|
-
sendMessageStream: (
|
|
501
|
+
sendMessage: (content: string | DistriPart[]) => Promise<void>;
|
|
502
|
+
sendMessageStream: (content: string | DistriPart[]) => Promise<void>;
|
|
503
|
+
isLoading: boolean;
|
|
504
|
+
error: Error | null;
|
|
39
505
|
clearMessages: () => void;
|
|
40
|
-
|
|
41
|
-
|
|
506
|
+
agent: Agent$1 | undefined;
|
|
507
|
+
toolCallStates: Map<string, ToolCallState>;
|
|
508
|
+
hasPendingToolCalls: () => boolean;
|
|
509
|
+
stopStreaming: () => void;
|
|
42
510
|
}
|
|
43
|
-
declare function useChat({
|
|
511
|
+
declare function useChat({ threadId, onMessage, onError, metadata, onMessagesUpdate, agent, tools, }: UseChatOptions): UseChatReturn;
|
|
44
512
|
|
|
45
513
|
interface UseThreadsResult {
|
|
46
514
|
threads: DistriThread[];
|
|
@@ -53,4 +521,330 @@ interface UseThreadsResult {
|
|
|
53
521
|
}
|
|
54
522
|
declare function useThreads(): UseThreadsResult;
|
|
55
523
|
|
|
56
|
-
|
|
524
|
+
interface UseToolsOptions {
|
|
525
|
+
agent?: Agent$1;
|
|
526
|
+
tools?: DistriAnyTool[];
|
|
527
|
+
}
|
|
528
|
+
declare function registerTools({ agent, tools }: UseToolsOptions): void;
|
|
529
|
+
|
|
530
|
+
interface UseToolCallStateOptions {
|
|
531
|
+
onAllToolsCompleted?: (toolResults: ToolResult[]) => void;
|
|
532
|
+
agent?: Agent$1;
|
|
533
|
+
}
|
|
534
|
+
interface UseToolCallStateReturn {
|
|
535
|
+
toolCallStates: Map<string, ToolCallState>;
|
|
536
|
+
initToolCall: (toolCall: ToolCall) => void;
|
|
537
|
+
updateToolCallStatus: (toolCallId: string, updates: Partial<ToolCallState>) => void;
|
|
538
|
+
getToolCallState: (toolCallId: string) => ToolCallState | undefined;
|
|
539
|
+
hasPendingToolCalls: () => boolean;
|
|
540
|
+
getPendingToolCalls: () => ToolCallState[];
|
|
541
|
+
clearAll: () => void;
|
|
542
|
+
clearToolResults: () => void;
|
|
543
|
+
}
|
|
544
|
+
declare function useToolCallState(options: UseToolCallStateOptions): UseToolCallStateReturn;
|
|
545
|
+
|
|
546
|
+
interface FullChatProps {
|
|
547
|
+
agentId: string;
|
|
548
|
+
agent?: Agent$1;
|
|
549
|
+
metadata?: any;
|
|
550
|
+
className?: string;
|
|
551
|
+
availableAgents?: Array<{
|
|
552
|
+
id: string;
|
|
553
|
+
name: string;
|
|
554
|
+
description?: string;
|
|
555
|
+
}>;
|
|
556
|
+
UserMessageComponent?: React__default.ComponentType<any>;
|
|
557
|
+
AssistantMessageComponent?: React__default.ComponentType<any>;
|
|
558
|
+
AssistantWithToolCallsComponent?: React__default.ComponentType<any>;
|
|
559
|
+
PlanMessageComponent?: React__default.ComponentType<any>;
|
|
560
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
561
|
+
showDebug?: boolean;
|
|
562
|
+
onAgentSelect?: (agentId: string) => void;
|
|
563
|
+
onThreadSelect?: (threadId: string) => void;
|
|
564
|
+
onThreadCreate?: (threadId: string) => void;
|
|
565
|
+
onThreadDelete?: (threadId: string) => void;
|
|
566
|
+
onLogoClick?: () => void;
|
|
567
|
+
}
|
|
568
|
+
declare const FullChat: React__default.FC<FullChatProps>;
|
|
569
|
+
|
|
570
|
+
interface EmbeddableChatProps {
|
|
571
|
+
agent: Agent$1;
|
|
572
|
+
threadId?: string;
|
|
573
|
+
height?: string;
|
|
574
|
+
className?: string;
|
|
575
|
+
style?: React__default.CSSProperties;
|
|
576
|
+
metadata?: any;
|
|
577
|
+
tools?: DistriAnyTool[];
|
|
578
|
+
availableAgents?: Array<{
|
|
579
|
+
id: string;
|
|
580
|
+
name: string;
|
|
581
|
+
description?: string;
|
|
582
|
+
}>;
|
|
583
|
+
UserMessageComponent?: React__default.ComponentType<any>;
|
|
584
|
+
AssistantMessageComponent?: React__default.ComponentType<any>;
|
|
585
|
+
AssistantWithToolCallsComponent?: React__default.ComponentType<any>;
|
|
586
|
+
PlanMessageComponent?: React__default.ComponentType<any>;
|
|
587
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
588
|
+
showDebug?: boolean;
|
|
589
|
+
showAgentSelector?: boolean;
|
|
590
|
+
placeholder?: string;
|
|
591
|
+
disableAgentSelection?: boolean;
|
|
592
|
+
onAgentSelect?: (agentId: string) => void;
|
|
593
|
+
onResponse?: (message: any) => void;
|
|
594
|
+
onMessagesUpdate?: () => void;
|
|
595
|
+
}
|
|
596
|
+
declare const EmbeddableChat: React__default.FC<EmbeddableChatProps>;
|
|
597
|
+
|
|
598
|
+
interface Agent {
|
|
599
|
+
id: string;
|
|
600
|
+
name: string;
|
|
601
|
+
description?: string;
|
|
602
|
+
}
|
|
603
|
+
interface AgentSelectProps {
|
|
604
|
+
agents: Agent[];
|
|
605
|
+
selectedAgentId?: string;
|
|
606
|
+
onAgentSelect: (agentId: string) => void;
|
|
607
|
+
className?: string;
|
|
608
|
+
placeholder?: string;
|
|
609
|
+
disabled?: boolean;
|
|
610
|
+
}
|
|
611
|
+
declare const AgentSelect: React__default.FC<AgentSelectProps>;
|
|
612
|
+
|
|
613
|
+
interface ChatInputProps {
|
|
614
|
+
value: string;
|
|
615
|
+
onChange: (value: string) => void;
|
|
616
|
+
onSend: () => void;
|
|
617
|
+
onStop?: () => void;
|
|
618
|
+
placeholder?: string;
|
|
619
|
+
disabled?: boolean;
|
|
620
|
+
isStreaming?: boolean;
|
|
621
|
+
className?: string;
|
|
622
|
+
}
|
|
623
|
+
declare const ChatInput: React__default.FC<ChatInputProps>;
|
|
624
|
+
|
|
625
|
+
type Theme = 'dark' | 'light' | 'system';
|
|
626
|
+
interface ThemeProviderProps {
|
|
627
|
+
children: React__default.ReactNode;
|
|
628
|
+
defaultTheme?: Theme;
|
|
629
|
+
storageKey?: string;
|
|
630
|
+
}
|
|
631
|
+
interface ThemeProviderState {
|
|
632
|
+
theme: Theme;
|
|
633
|
+
setTheme: (theme: Theme) => void;
|
|
634
|
+
}
|
|
635
|
+
declare function ThemeProvider({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
636
|
+
declare const useTheme: () => ThemeProviderState;
|
|
637
|
+
|
|
638
|
+
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
639
|
+
|
|
640
|
+
interface BaseMessageProps {
|
|
641
|
+
content?: string;
|
|
642
|
+
message?: DistriMessage;
|
|
643
|
+
timestamp?: Date;
|
|
644
|
+
className?: string;
|
|
645
|
+
avatar?: React__default.ReactNode;
|
|
646
|
+
name?: string;
|
|
647
|
+
}
|
|
648
|
+
interface UserMessageProps extends BaseMessageProps {
|
|
649
|
+
content?: string;
|
|
650
|
+
}
|
|
651
|
+
interface AssistantMessageProps extends BaseMessageProps {
|
|
652
|
+
content?: string;
|
|
653
|
+
message?: DistriMessage;
|
|
654
|
+
isStreaming?: boolean;
|
|
655
|
+
metadata?: any;
|
|
656
|
+
name?: string;
|
|
657
|
+
}
|
|
658
|
+
interface AssistantWithToolCallsProps extends BaseMessageProps {
|
|
659
|
+
content?: string;
|
|
660
|
+
message?: DistriMessage;
|
|
661
|
+
toolCallStates: ToolCallState[];
|
|
662
|
+
timestamp?: Date;
|
|
663
|
+
isStreaming?: boolean;
|
|
664
|
+
}
|
|
665
|
+
interface PlanMessageProps extends BaseMessageProps {
|
|
666
|
+
message?: DistriMessage;
|
|
667
|
+
plan: string;
|
|
668
|
+
timestamp?: Date;
|
|
669
|
+
}
|
|
670
|
+
interface DebugMessageProps extends BaseMessageProps {
|
|
671
|
+
className?: string;
|
|
672
|
+
}
|
|
673
|
+
declare const UserMessage: React__default.FC<UserMessageProps>;
|
|
674
|
+
declare const AssistantMessage: React__default.FC<AssistantMessageProps>;
|
|
675
|
+
declare const AssistantWithToolCalls: React__default.FC<AssistantWithToolCallsProps>;
|
|
676
|
+
declare const PlanMessage: React__default.FC<PlanMessageProps>;
|
|
677
|
+
declare const DebugMessage: React__default.FC<DebugMessageProps>;
|
|
678
|
+
|
|
679
|
+
declare const ApprovalToolCall: React__default.FC<UiToolProps>;
|
|
680
|
+
|
|
681
|
+
declare const ToastToolCall: React__default.FC<UiToolProps>;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Utility function to extract text content from message parts
|
|
685
|
+
*/
|
|
686
|
+
declare const extractTextFromMessage: (message: DistriStreamEvent) => string;
|
|
687
|
+
/**
|
|
688
|
+
* Utility function to determine if a message should be displayed
|
|
689
|
+
* Can be used by builders when creating custom chat components
|
|
690
|
+
*/
|
|
691
|
+
declare const shouldDisplayMessage: (message: DistriStreamEvent, showDebugMessages?: boolean) => boolean;
|
|
692
|
+
|
|
693
|
+
declare const buttonVariants: {
|
|
694
|
+
variant: {
|
|
695
|
+
default: string;
|
|
696
|
+
destructive: string;
|
|
697
|
+
outline: string;
|
|
698
|
+
secondary: string;
|
|
699
|
+
ghost: string;
|
|
700
|
+
link: string;
|
|
701
|
+
};
|
|
702
|
+
size: {
|
|
703
|
+
default: string;
|
|
704
|
+
sm: string;
|
|
705
|
+
lg: string;
|
|
706
|
+
icon: string;
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
710
|
+
variant?: keyof typeof buttonVariants.variant;
|
|
711
|
+
size?: keyof typeof buttonVariants.size;
|
|
712
|
+
}
|
|
713
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
714
|
+
|
|
715
|
+
interface InputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
716
|
+
}
|
|
717
|
+
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
718
|
+
|
|
719
|
+
declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
720
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
721
|
+
declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
722
|
+
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
723
|
+
declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
724
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
725
|
+
|
|
726
|
+
declare const badgeVariants: (props?: ({
|
|
727
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
728
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
729
|
+
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
730
|
+
}
|
|
731
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
732
|
+
|
|
733
|
+
interface DialogProps {
|
|
734
|
+
open?: boolean;
|
|
735
|
+
onOpenChange?: (open: boolean) => void;
|
|
736
|
+
children: React$1.ReactNode;
|
|
737
|
+
}
|
|
738
|
+
declare const DialogRoot: React$1.FC<DialogProps>;
|
|
739
|
+
declare const DialogTrigger: React$1.ForwardRefExoticComponent<React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
740
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
741
|
+
declare const DialogHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
742
|
+
declare const DialogTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
743
|
+
|
|
744
|
+
interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
745
|
+
}
|
|
746
|
+
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
747
|
+
|
|
748
|
+
declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
749
|
+
declare const Tooltip: React$1.FC<TooltipPrimitive.TooltipProps>;
|
|
750
|
+
declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
751
|
+
declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
752
|
+
|
|
753
|
+
type SidebarContext = {
|
|
754
|
+
state: "expanded" | "collapsed";
|
|
755
|
+
open: boolean;
|
|
756
|
+
setOpen: (open: boolean) => void;
|
|
757
|
+
openMobile: boolean;
|
|
758
|
+
setOpenMobile: (open: boolean) => void;
|
|
759
|
+
isMobile: boolean;
|
|
760
|
+
toggleSidebar: () => void;
|
|
761
|
+
};
|
|
762
|
+
declare const SidebarContext: React$1.Context<SidebarContext | null>;
|
|
763
|
+
declare function useSidebar(): SidebarContext;
|
|
764
|
+
declare const SidebarProvider: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
765
|
+
defaultOpen?: boolean;
|
|
766
|
+
open?: boolean;
|
|
767
|
+
onOpenChange?: (open: boolean) => void;
|
|
768
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
769
|
+
declare const Sidebar: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
770
|
+
side?: "left" | "right";
|
|
771
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
772
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
773
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
774
|
+
declare const SidebarTrigger: React$1.ForwardRefExoticComponent<Omit<ButtonProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
775
|
+
declare const SidebarRail: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
776
|
+
declare const SidebarInset: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
777
|
+
declare const SidebarHeader: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
778
|
+
declare const SidebarFooter: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
779
|
+
declare const SidebarSeparator: React$1.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_separator.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
780
|
+
declare const SidebarContent: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
781
|
+
declare const SidebarGroup: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
782
|
+
declare const SidebarGroupLabel: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
783
|
+
asChild?: boolean;
|
|
784
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
785
|
+
declare const SidebarGroupAction: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLButtonElement> & React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
786
|
+
asChild?: boolean;
|
|
787
|
+
}, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
788
|
+
declare const SidebarGroupContent: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
789
|
+
declare const SidebarMenu: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
790
|
+
declare const SidebarMenuItem: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
791
|
+
declare const SidebarMenuButton: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLButtonElement> & React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
792
|
+
asChild?: boolean;
|
|
793
|
+
isActive?: boolean;
|
|
794
|
+
tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
|
|
795
|
+
} & VariantProps<(props?: ({
|
|
796
|
+
variant?: "default" | "outline" | null | undefined;
|
|
797
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
798
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
799
|
+
declare const SidebarMenuAction: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLButtonElement> & React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
800
|
+
asChild?: boolean;
|
|
801
|
+
showOnHover?: boolean;
|
|
802
|
+
}, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
803
|
+
declare const SidebarMenuBadge: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
804
|
+
declare const SidebarMenuSkeleton: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
805
|
+
showIcon?: boolean;
|
|
806
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
807
|
+
declare const SidebarMenuSub: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React$1.RefAttributes<HTMLUListElement>>;
|
|
808
|
+
declare const SidebarMenuSubItem: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
809
|
+
declare const SidebarMenuSubButton: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLAnchorElement> & React$1.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
810
|
+
asChild?: boolean;
|
|
811
|
+
size?: "sm" | "md";
|
|
812
|
+
isActive?: boolean;
|
|
813
|
+
}, "ref"> & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
814
|
+
|
|
815
|
+
declare const Separator: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_separator.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
816
|
+
|
|
817
|
+
declare const Sheet: React$1.FC<SheetPrimitive.DialogProps>;
|
|
818
|
+
declare const sheetVariants: (props?: ({
|
|
819
|
+
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
820
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
821
|
+
interface SheetContentProps extends React$1.ComponentProps<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
822
|
+
}
|
|
823
|
+
declare const SheetContent: React$1.ForwardRefExoticComponent<Omit<SheetContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
824
|
+
declare const SheetHeader: {
|
|
825
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
826
|
+
displayName: string;
|
|
827
|
+
};
|
|
828
|
+
declare const SheetFooter: {
|
|
829
|
+
({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
830
|
+
displayName: string;
|
|
831
|
+
};
|
|
832
|
+
declare const SheetTitle: React$1.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
833
|
+
declare const SheetDescription: React$1.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
834
|
+
|
|
835
|
+
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
836
|
+
|
|
837
|
+
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
838
|
+
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
839
|
+
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
840
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
841
|
+
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
842
|
+
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
843
|
+
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
844
|
+
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
845
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
846
|
+
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
847
|
+
|
|
848
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
849
|
+
|
|
850
|
+
export { AgentSelect, ApprovalToolCall, AssistantMessage, AssistantWithToolCalls, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatInput, DebugMessage, DialogRoot as Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, type DistriAnyTool, DistriProvider, EmbeddableChat, FullChat, Input, PlanMessage, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Textarea, ThemeProvider, ThemeToggle, ToastToolCall, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserMessage, cn, extractTextFromMessage, registerTools, shouldDisplayMessage, useAgent, useAgents, useChat, useDistri, useSidebar, useTheme, useThreads, useToolCallState };
|