@axiom-lattice/react-sdk 2.1.5 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +191 -73
- package/dist/index.d.ts +191 -73
- package/dist/index.js +2217 -1252
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2327 -1358
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -72,6 +72,9 @@ interface AgentState {
|
|
|
72
72
|
* Chat hook state
|
|
73
73
|
*/
|
|
74
74
|
interface ChatState {
|
|
75
|
+
assistantId: string;
|
|
76
|
+
tenantId?: string;
|
|
77
|
+
threadId: string;
|
|
75
78
|
todos?: Array<{
|
|
76
79
|
content: string;
|
|
77
80
|
status: "pending" | "in_progress" | "completed";
|
|
@@ -269,6 +272,54 @@ declare function useChat<T extends UseChatOptions>(threadId: string | null, opti
|
|
|
269
272
|
clearError: () => void;
|
|
270
273
|
};
|
|
271
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Hook for managing chat interactions with an agent using AgentThreadContext
|
|
277
|
+
*
|
|
278
|
+
* This hook provides functionality for:
|
|
279
|
+
* - Accessing agent thread state from AgentThreadContext
|
|
280
|
+
* - Sending messages to an agent
|
|
281
|
+
* - Receiving streaming and non-streaming responses
|
|
282
|
+
* - Loading message history
|
|
283
|
+
* - Managing the agent thread state
|
|
284
|
+
* - Optionally returning agent state when streaming completes
|
|
285
|
+
*
|
|
286
|
+
* @template T - UseChatOptions type
|
|
287
|
+
* @returns Agent thread state and operations from AgentThreadContext
|
|
288
|
+
*/
|
|
289
|
+
declare function useAgentChat<T extends UseChatOptions>(options?: T): ChatStateWithAgent & {
|
|
290
|
+
sendMessage: (data: {
|
|
291
|
+
input?: {
|
|
292
|
+
message: string;
|
|
293
|
+
files?: {
|
|
294
|
+
name: string;
|
|
295
|
+
id: string;
|
|
296
|
+
}[];
|
|
297
|
+
};
|
|
298
|
+
command?: {
|
|
299
|
+
resume?: {
|
|
300
|
+
action: string;
|
|
301
|
+
data: Record<string, any> & {
|
|
302
|
+
config?: {
|
|
303
|
+
thread_id?: string;
|
|
304
|
+
work_log_id?: string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
message: string;
|
|
308
|
+
};
|
|
309
|
+
update?: any;
|
|
310
|
+
send?: {
|
|
311
|
+
node: string;
|
|
312
|
+
input: any;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
streaming?: boolean;
|
|
316
|
+
}) => Promise<void>;
|
|
317
|
+
stopStreaming: () => void;
|
|
318
|
+
loadMessages: (limit?: number) => Promise<void>;
|
|
319
|
+
clearMessages: () => void;
|
|
320
|
+
clearError: () => void;
|
|
321
|
+
};
|
|
322
|
+
|
|
272
323
|
/**
|
|
273
324
|
* Interface for thread creation options
|
|
274
325
|
*/
|
|
@@ -312,21 +363,105 @@ declare function useAgentGraph(): {
|
|
|
312
363
|
* @returns Provider component
|
|
313
364
|
*/
|
|
314
365
|
declare function AxiomLatticeProvider({ config, children, }: AxiomLatticeProviderProps): react_jsx_runtime.JSX.Element;
|
|
366
|
+
interface UseAxiomLatticeOptions {
|
|
367
|
+
assistantId?: string;
|
|
368
|
+
}
|
|
315
369
|
/**
|
|
316
370
|
* Hook to access the Axiom Lattice client
|
|
317
371
|
* @returns The Axiom Lattice client
|
|
318
372
|
* @throws Error if used outside of AxiomLatticeProvider
|
|
319
373
|
*/
|
|
320
|
-
declare function useAxiomLattice(): Client;
|
|
374
|
+
declare function useAxiomLattice({ assistantId, }?: UseAxiomLatticeOptions): Client;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Context value for AgentThreadContext
|
|
378
|
+
*/
|
|
379
|
+
interface AgentThreadContextValue<T extends UseChatOptions> {
|
|
380
|
+
state: ChatStateWithAgent;
|
|
381
|
+
sendMessage: (data: {
|
|
382
|
+
input?: {
|
|
383
|
+
message: string;
|
|
384
|
+
files?: {
|
|
385
|
+
name: string;
|
|
386
|
+
id: string;
|
|
387
|
+
}[];
|
|
388
|
+
};
|
|
389
|
+
command?: {
|
|
390
|
+
resume?: {
|
|
391
|
+
action: string;
|
|
392
|
+
data: Record<string, any> & {
|
|
393
|
+
config?: {
|
|
394
|
+
thread_id?: string;
|
|
395
|
+
work_log_id?: string;
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
message: string;
|
|
399
|
+
};
|
|
400
|
+
update?: any;
|
|
401
|
+
send?: {
|
|
402
|
+
node: string;
|
|
403
|
+
input: any;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
streaming?: boolean;
|
|
407
|
+
}) => Promise<void>;
|
|
408
|
+
stopStreaming: () => void;
|
|
409
|
+
loadMessages: (limit?: number) => Promise<void>;
|
|
410
|
+
clearMessages: () => void;
|
|
411
|
+
clearError: () => void;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Props for AgentThreadProvider
|
|
415
|
+
*/
|
|
416
|
+
interface AgentThreadProviderProps<T extends UseChatOptions> {
|
|
417
|
+
threadId: string | null;
|
|
418
|
+
assistantId?: string;
|
|
419
|
+
options?: T;
|
|
420
|
+
children: ReactNode;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Provider component for AgentThreadContext
|
|
424
|
+
* Manages all agent thread state and operations
|
|
425
|
+
*/
|
|
426
|
+
declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assistantId, options, children, }: AgentThreadProviderProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
427
|
+
/**
|
|
428
|
+
* Hook to access AgentThreadContext
|
|
429
|
+
* @returns Agent thread context value
|
|
430
|
+
* @throws Error if used outside of AgentThreadProvider
|
|
431
|
+
*/
|
|
432
|
+
declare function useAgentThreadContext<T extends UseChatOptions>(): AgentThreadContextValue<T>;
|
|
321
433
|
|
|
322
|
-
|
|
434
|
+
interface ChatingProps {
|
|
435
|
+
name?: string;
|
|
436
|
+
description?: string;
|
|
437
|
+
default_submit_message?: string;
|
|
438
|
+
avatar?: string;
|
|
439
|
+
attachment_placeholder?: React__default.ReactNode;
|
|
440
|
+
uploadAction?: string;
|
|
441
|
+
senderPromptsItems?: GetProp<typeof Prompts, "items">;
|
|
442
|
+
extra?: React__default.ReactNode;
|
|
443
|
+
extraMeta?: Array<{
|
|
444
|
+
id: string;
|
|
445
|
+
}>;
|
|
446
|
+
showHeader?: boolean;
|
|
447
|
+
showSender?: boolean;
|
|
448
|
+
showHITL?: boolean;
|
|
449
|
+
}
|
|
450
|
+
declare const Chating: React__default.FC<ChatingProps>;
|
|
451
|
+
|
|
452
|
+
type AgentChatProps = {
|
|
453
|
+
thread_id: string;
|
|
454
|
+
assistant_id: string;
|
|
455
|
+
} & ChatingProps;
|
|
456
|
+
declare const LatticeChat: React__default.FC<AgentChatProps>;
|
|
457
|
+
|
|
458
|
+
declare const MDResponse: ({ content, context, embeddedLink, interactive, userData, noGenUI, }: {
|
|
323
459
|
context?: any;
|
|
324
460
|
content: string;
|
|
325
461
|
embeddedLink?: boolean;
|
|
326
462
|
interactive?: boolean;
|
|
327
463
|
userData?: any;
|
|
328
464
|
noGenUI?: boolean;
|
|
329
|
-
eventHandler?: (action: string, data: any, message: string, agent?: string) => void;
|
|
330
465
|
}) => react_jsx_runtime.JSX.Element;
|
|
331
466
|
declare const MDViewFormItem: ({ value }: {
|
|
332
467
|
value?: string;
|
|
@@ -334,21 +469,13 @@ declare const MDViewFormItem: ({ value }: {
|
|
|
334
469
|
|
|
335
470
|
declare const MDMermaid: ({ children }: any) => react_jsx_runtime.JSX.Element;
|
|
336
471
|
|
|
337
|
-
type ElementEventHandler = (action: string | "__open_side_app", data: {
|
|
338
|
-
component_key?: string;
|
|
339
|
-
data?: any;
|
|
340
|
-
message?: string;
|
|
341
|
-
action?: string;
|
|
342
|
-
size?: "small" | "middle" | "large";
|
|
343
|
-
config?: {
|
|
344
|
-
thread_id?: string;
|
|
345
|
-
work_log_id?: string;
|
|
346
|
-
};
|
|
347
|
-
}, message: string, agent?: string) => void;
|
|
348
472
|
type ElementProps<T = any> = {
|
|
349
473
|
component_key: string;
|
|
474
|
+
context?: {
|
|
475
|
+
thread_id?: string;
|
|
476
|
+
assistant_id?: string;
|
|
477
|
+
};
|
|
350
478
|
data: T;
|
|
351
|
-
eventHandler: ElementEventHandler;
|
|
352
479
|
interactive?: boolean;
|
|
353
480
|
default_open_in_side_app?: boolean;
|
|
354
481
|
};
|
|
@@ -369,40 +496,55 @@ interface ToolCallData {
|
|
|
369
496
|
declare const getElement: (language: string | undefined) => ElementMeta | null;
|
|
370
497
|
declare const regsiterElement: (language: string, ElementMeta: ElementMeta) => ElementMeta;
|
|
371
498
|
|
|
372
|
-
|
|
373
|
-
content: string;
|
|
374
|
-
status: "completed" | "in_progress" | "pending";
|
|
375
|
-
}
|
|
499
|
+
declare const SideAppViewBrowser: React__default.FC;
|
|
376
500
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
501
|
+
declare const ChatUIContext: React$1.Context<{
|
|
502
|
+
sideAppVisible: boolean;
|
|
503
|
+
setSideAppVisible: (visible: boolean) => void;
|
|
504
|
+
sideAppSize: "small" | "middle" | "large" | "full";
|
|
505
|
+
setSideAppSize: (size: "small" | "middle" | "large" | "full") => void;
|
|
506
|
+
sideAppSelectedCard: {
|
|
507
|
+
component_key: string;
|
|
508
|
+
data: any;
|
|
509
|
+
message?: string;
|
|
510
|
+
} | null;
|
|
511
|
+
setSideAppSelectedCard: (card: {
|
|
512
|
+
component_key: string;
|
|
513
|
+
data: any;
|
|
514
|
+
message?: string;
|
|
515
|
+
} | null) => void;
|
|
516
|
+
openSideApp: (card: {
|
|
517
|
+
component_key: string;
|
|
518
|
+
data: any;
|
|
519
|
+
message?: string;
|
|
520
|
+
}) => void;
|
|
521
|
+
closeSideApp: () => void;
|
|
522
|
+
}>;
|
|
523
|
+
declare const ChatUIContextProvider: ({ children, }: {
|
|
524
|
+
children: React.ReactNode;
|
|
525
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
526
|
+
declare const useChatUIContext: () => {
|
|
527
|
+
sideAppVisible: boolean;
|
|
528
|
+
setSideAppVisible: (visible: boolean) => void;
|
|
529
|
+
sideAppSize: "small" | "middle" | "large" | "full";
|
|
530
|
+
setSideAppSize: (size: "small" | "middle" | "large" | "full") => void;
|
|
531
|
+
sideAppSelectedCard: {
|
|
532
|
+
component_key: string;
|
|
533
|
+
data: any;
|
|
534
|
+
message?: string;
|
|
535
|
+
} | null;
|
|
536
|
+
setSideAppSelectedCard: (card: {
|
|
537
|
+
component_key: string;
|
|
538
|
+
data: any;
|
|
539
|
+
message?: string;
|
|
540
|
+
} | null) => void;
|
|
541
|
+
openSideApp: (card: {
|
|
542
|
+
component_key: string;
|
|
543
|
+
data: any;
|
|
544
|
+
message?: string;
|
|
545
|
+
}) => void;
|
|
546
|
+
closeSideApp: () => void;
|
|
547
|
+
};
|
|
406
548
|
|
|
407
549
|
interface UIMessage {
|
|
408
550
|
id: string;
|
|
@@ -423,30 +565,6 @@ interface AttachFile {
|
|
|
423
565
|
id: string;
|
|
424
566
|
}
|
|
425
567
|
|
|
426
|
-
declare const ThinkingChain: ({ message }: {
|
|
427
|
-
message: UIMessage;
|
|
428
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
429
|
-
declare const ThinkingChainGroup: ({ message }: {
|
|
430
|
-
message: UIMessage;
|
|
431
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
432
|
-
|
|
433
|
-
interface SideAppViewBrowserProps {
|
|
434
|
-
open_uri: {
|
|
435
|
-
component_key: string;
|
|
436
|
-
data: any;
|
|
437
|
-
message?: string;
|
|
438
|
-
size?: "small" | "middle" | "large" | "full";
|
|
439
|
-
};
|
|
440
|
-
eventHandler: (action: string, data: any, message: string, agent?: string) => void;
|
|
441
|
-
onClose: () => void;
|
|
442
|
-
onChangeSize: (size: "small" | "middle" | "large" | "full") => void;
|
|
443
|
-
}
|
|
444
|
-
declare const SideAppViewBrowser: React__default.FC<SideAppViewBrowserProps>;
|
|
445
|
-
|
|
446
|
-
declare const chatContext: React$1.Context<{
|
|
447
|
-
eventHandler: (component_key: string, data: any, message: string) => void;
|
|
448
|
-
}>;
|
|
449
|
-
|
|
450
568
|
interface ExplorerFile {
|
|
451
569
|
name: string;
|
|
452
570
|
content: string[];
|
|
@@ -462,4 +580,4 @@ interface FileExplorerProps {
|
|
|
462
580
|
}
|
|
463
581
|
declare const FileExplorer: React__default.FC<ElementProps>;
|
|
464
582
|
|
|
465
|
-
export { type AgentState, type AttachFile, AxiomLatticeProvider, type AxiomLatticeProviderProps, type ChatResponse, type ChatState, type ChatStateWithAgent, Chating, type
|
|
583
|
+
export { type AgentChatProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, type AttachFile, AxiomLatticeProvider, type AxiomLatticeProviderProps, type ChatResponse, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, type ElementMeta, type ElementProps, type ExplorerFile, FileExplorer, type FileExplorerProps, LatticeChat, MDMermaid, MDResponse, MDViewFormItem, SideAppViewBrowser, type StreamEventHandlerOptions, type Thread, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseAxiomLatticeOptions, type UseChatOptions, getElement, regsiterElement, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useAxiomLattice, useChat, useChatUIContext, useThread };
|
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,9 @@ interface AgentState {
|
|
|
72
72
|
* Chat hook state
|
|
73
73
|
*/
|
|
74
74
|
interface ChatState {
|
|
75
|
+
assistantId: string;
|
|
76
|
+
tenantId?: string;
|
|
77
|
+
threadId: string;
|
|
75
78
|
todos?: Array<{
|
|
76
79
|
content: string;
|
|
77
80
|
status: "pending" | "in_progress" | "completed";
|
|
@@ -269,6 +272,54 @@ declare function useChat<T extends UseChatOptions>(threadId: string | null, opti
|
|
|
269
272
|
clearError: () => void;
|
|
270
273
|
};
|
|
271
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Hook for managing chat interactions with an agent using AgentThreadContext
|
|
277
|
+
*
|
|
278
|
+
* This hook provides functionality for:
|
|
279
|
+
* - Accessing agent thread state from AgentThreadContext
|
|
280
|
+
* - Sending messages to an agent
|
|
281
|
+
* - Receiving streaming and non-streaming responses
|
|
282
|
+
* - Loading message history
|
|
283
|
+
* - Managing the agent thread state
|
|
284
|
+
* - Optionally returning agent state when streaming completes
|
|
285
|
+
*
|
|
286
|
+
* @template T - UseChatOptions type
|
|
287
|
+
* @returns Agent thread state and operations from AgentThreadContext
|
|
288
|
+
*/
|
|
289
|
+
declare function useAgentChat<T extends UseChatOptions>(options?: T): ChatStateWithAgent & {
|
|
290
|
+
sendMessage: (data: {
|
|
291
|
+
input?: {
|
|
292
|
+
message: string;
|
|
293
|
+
files?: {
|
|
294
|
+
name: string;
|
|
295
|
+
id: string;
|
|
296
|
+
}[];
|
|
297
|
+
};
|
|
298
|
+
command?: {
|
|
299
|
+
resume?: {
|
|
300
|
+
action: string;
|
|
301
|
+
data: Record<string, any> & {
|
|
302
|
+
config?: {
|
|
303
|
+
thread_id?: string;
|
|
304
|
+
work_log_id?: string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
message: string;
|
|
308
|
+
};
|
|
309
|
+
update?: any;
|
|
310
|
+
send?: {
|
|
311
|
+
node: string;
|
|
312
|
+
input: any;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
streaming?: boolean;
|
|
316
|
+
}) => Promise<void>;
|
|
317
|
+
stopStreaming: () => void;
|
|
318
|
+
loadMessages: (limit?: number) => Promise<void>;
|
|
319
|
+
clearMessages: () => void;
|
|
320
|
+
clearError: () => void;
|
|
321
|
+
};
|
|
322
|
+
|
|
272
323
|
/**
|
|
273
324
|
* Interface for thread creation options
|
|
274
325
|
*/
|
|
@@ -312,21 +363,105 @@ declare function useAgentGraph(): {
|
|
|
312
363
|
* @returns Provider component
|
|
313
364
|
*/
|
|
314
365
|
declare function AxiomLatticeProvider({ config, children, }: AxiomLatticeProviderProps): react_jsx_runtime.JSX.Element;
|
|
366
|
+
interface UseAxiomLatticeOptions {
|
|
367
|
+
assistantId?: string;
|
|
368
|
+
}
|
|
315
369
|
/**
|
|
316
370
|
* Hook to access the Axiom Lattice client
|
|
317
371
|
* @returns The Axiom Lattice client
|
|
318
372
|
* @throws Error if used outside of AxiomLatticeProvider
|
|
319
373
|
*/
|
|
320
|
-
declare function useAxiomLattice(): Client;
|
|
374
|
+
declare function useAxiomLattice({ assistantId, }?: UseAxiomLatticeOptions): Client;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Context value for AgentThreadContext
|
|
378
|
+
*/
|
|
379
|
+
interface AgentThreadContextValue<T extends UseChatOptions> {
|
|
380
|
+
state: ChatStateWithAgent;
|
|
381
|
+
sendMessage: (data: {
|
|
382
|
+
input?: {
|
|
383
|
+
message: string;
|
|
384
|
+
files?: {
|
|
385
|
+
name: string;
|
|
386
|
+
id: string;
|
|
387
|
+
}[];
|
|
388
|
+
};
|
|
389
|
+
command?: {
|
|
390
|
+
resume?: {
|
|
391
|
+
action: string;
|
|
392
|
+
data: Record<string, any> & {
|
|
393
|
+
config?: {
|
|
394
|
+
thread_id?: string;
|
|
395
|
+
work_log_id?: string;
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
message: string;
|
|
399
|
+
};
|
|
400
|
+
update?: any;
|
|
401
|
+
send?: {
|
|
402
|
+
node: string;
|
|
403
|
+
input: any;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
streaming?: boolean;
|
|
407
|
+
}) => Promise<void>;
|
|
408
|
+
stopStreaming: () => void;
|
|
409
|
+
loadMessages: (limit?: number) => Promise<void>;
|
|
410
|
+
clearMessages: () => void;
|
|
411
|
+
clearError: () => void;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Props for AgentThreadProvider
|
|
415
|
+
*/
|
|
416
|
+
interface AgentThreadProviderProps<T extends UseChatOptions> {
|
|
417
|
+
threadId: string | null;
|
|
418
|
+
assistantId?: string;
|
|
419
|
+
options?: T;
|
|
420
|
+
children: ReactNode;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Provider component for AgentThreadContext
|
|
424
|
+
* Manages all agent thread state and operations
|
|
425
|
+
*/
|
|
426
|
+
declare function AgentThreadProvider<T extends UseChatOptions>({ threadId, assistantId, options, children, }: AgentThreadProviderProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
427
|
+
/**
|
|
428
|
+
* Hook to access AgentThreadContext
|
|
429
|
+
* @returns Agent thread context value
|
|
430
|
+
* @throws Error if used outside of AgentThreadProvider
|
|
431
|
+
*/
|
|
432
|
+
declare function useAgentThreadContext<T extends UseChatOptions>(): AgentThreadContextValue<T>;
|
|
321
433
|
|
|
322
|
-
|
|
434
|
+
interface ChatingProps {
|
|
435
|
+
name?: string;
|
|
436
|
+
description?: string;
|
|
437
|
+
default_submit_message?: string;
|
|
438
|
+
avatar?: string;
|
|
439
|
+
attachment_placeholder?: React__default.ReactNode;
|
|
440
|
+
uploadAction?: string;
|
|
441
|
+
senderPromptsItems?: GetProp<typeof Prompts, "items">;
|
|
442
|
+
extra?: React__default.ReactNode;
|
|
443
|
+
extraMeta?: Array<{
|
|
444
|
+
id: string;
|
|
445
|
+
}>;
|
|
446
|
+
showHeader?: boolean;
|
|
447
|
+
showSender?: boolean;
|
|
448
|
+
showHITL?: boolean;
|
|
449
|
+
}
|
|
450
|
+
declare const Chating: React__default.FC<ChatingProps>;
|
|
451
|
+
|
|
452
|
+
type AgentChatProps = {
|
|
453
|
+
thread_id: string;
|
|
454
|
+
assistant_id: string;
|
|
455
|
+
} & ChatingProps;
|
|
456
|
+
declare const LatticeChat: React__default.FC<AgentChatProps>;
|
|
457
|
+
|
|
458
|
+
declare const MDResponse: ({ content, context, embeddedLink, interactive, userData, noGenUI, }: {
|
|
323
459
|
context?: any;
|
|
324
460
|
content: string;
|
|
325
461
|
embeddedLink?: boolean;
|
|
326
462
|
interactive?: boolean;
|
|
327
463
|
userData?: any;
|
|
328
464
|
noGenUI?: boolean;
|
|
329
|
-
eventHandler?: (action: string, data: any, message: string, agent?: string) => void;
|
|
330
465
|
}) => react_jsx_runtime.JSX.Element;
|
|
331
466
|
declare const MDViewFormItem: ({ value }: {
|
|
332
467
|
value?: string;
|
|
@@ -334,21 +469,13 @@ declare const MDViewFormItem: ({ value }: {
|
|
|
334
469
|
|
|
335
470
|
declare const MDMermaid: ({ children }: any) => react_jsx_runtime.JSX.Element;
|
|
336
471
|
|
|
337
|
-
type ElementEventHandler = (action: string | "__open_side_app", data: {
|
|
338
|
-
component_key?: string;
|
|
339
|
-
data?: any;
|
|
340
|
-
message?: string;
|
|
341
|
-
action?: string;
|
|
342
|
-
size?: "small" | "middle" | "large";
|
|
343
|
-
config?: {
|
|
344
|
-
thread_id?: string;
|
|
345
|
-
work_log_id?: string;
|
|
346
|
-
};
|
|
347
|
-
}, message: string, agent?: string) => void;
|
|
348
472
|
type ElementProps<T = any> = {
|
|
349
473
|
component_key: string;
|
|
474
|
+
context?: {
|
|
475
|
+
thread_id?: string;
|
|
476
|
+
assistant_id?: string;
|
|
477
|
+
};
|
|
350
478
|
data: T;
|
|
351
|
-
eventHandler: ElementEventHandler;
|
|
352
479
|
interactive?: boolean;
|
|
353
480
|
default_open_in_side_app?: boolean;
|
|
354
481
|
};
|
|
@@ -369,40 +496,55 @@ interface ToolCallData {
|
|
|
369
496
|
declare const getElement: (language: string | undefined) => ElementMeta | null;
|
|
370
497
|
declare const regsiterElement: (language: string, ElementMeta: ElementMeta) => ElementMeta;
|
|
371
498
|
|
|
372
|
-
|
|
373
|
-
content: string;
|
|
374
|
-
status: "completed" | "in_progress" | "pending";
|
|
375
|
-
}
|
|
499
|
+
declare const SideAppViewBrowser: React__default.FC;
|
|
376
500
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
501
|
+
declare const ChatUIContext: React$1.Context<{
|
|
502
|
+
sideAppVisible: boolean;
|
|
503
|
+
setSideAppVisible: (visible: boolean) => void;
|
|
504
|
+
sideAppSize: "small" | "middle" | "large" | "full";
|
|
505
|
+
setSideAppSize: (size: "small" | "middle" | "large" | "full") => void;
|
|
506
|
+
sideAppSelectedCard: {
|
|
507
|
+
component_key: string;
|
|
508
|
+
data: any;
|
|
509
|
+
message?: string;
|
|
510
|
+
} | null;
|
|
511
|
+
setSideAppSelectedCard: (card: {
|
|
512
|
+
component_key: string;
|
|
513
|
+
data: any;
|
|
514
|
+
message?: string;
|
|
515
|
+
} | null) => void;
|
|
516
|
+
openSideApp: (card: {
|
|
517
|
+
component_key: string;
|
|
518
|
+
data: any;
|
|
519
|
+
message?: string;
|
|
520
|
+
}) => void;
|
|
521
|
+
closeSideApp: () => void;
|
|
522
|
+
}>;
|
|
523
|
+
declare const ChatUIContextProvider: ({ children, }: {
|
|
524
|
+
children: React.ReactNode;
|
|
525
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
526
|
+
declare const useChatUIContext: () => {
|
|
527
|
+
sideAppVisible: boolean;
|
|
528
|
+
setSideAppVisible: (visible: boolean) => void;
|
|
529
|
+
sideAppSize: "small" | "middle" | "large" | "full";
|
|
530
|
+
setSideAppSize: (size: "small" | "middle" | "large" | "full") => void;
|
|
531
|
+
sideAppSelectedCard: {
|
|
532
|
+
component_key: string;
|
|
533
|
+
data: any;
|
|
534
|
+
message?: string;
|
|
535
|
+
} | null;
|
|
536
|
+
setSideAppSelectedCard: (card: {
|
|
537
|
+
component_key: string;
|
|
538
|
+
data: any;
|
|
539
|
+
message?: string;
|
|
540
|
+
} | null) => void;
|
|
541
|
+
openSideApp: (card: {
|
|
542
|
+
component_key: string;
|
|
543
|
+
data: any;
|
|
544
|
+
message?: string;
|
|
545
|
+
}) => void;
|
|
546
|
+
closeSideApp: () => void;
|
|
547
|
+
};
|
|
406
548
|
|
|
407
549
|
interface UIMessage {
|
|
408
550
|
id: string;
|
|
@@ -423,30 +565,6 @@ interface AttachFile {
|
|
|
423
565
|
id: string;
|
|
424
566
|
}
|
|
425
567
|
|
|
426
|
-
declare const ThinkingChain: ({ message }: {
|
|
427
|
-
message: UIMessage;
|
|
428
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
429
|
-
declare const ThinkingChainGroup: ({ message }: {
|
|
430
|
-
message: UIMessage;
|
|
431
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
432
|
-
|
|
433
|
-
interface SideAppViewBrowserProps {
|
|
434
|
-
open_uri: {
|
|
435
|
-
component_key: string;
|
|
436
|
-
data: any;
|
|
437
|
-
message?: string;
|
|
438
|
-
size?: "small" | "middle" | "large" | "full";
|
|
439
|
-
};
|
|
440
|
-
eventHandler: (action: string, data: any, message: string, agent?: string) => void;
|
|
441
|
-
onClose: () => void;
|
|
442
|
-
onChangeSize: (size: "small" | "middle" | "large" | "full") => void;
|
|
443
|
-
}
|
|
444
|
-
declare const SideAppViewBrowser: React__default.FC<SideAppViewBrowserProps>;
|
|
445
|
-
|
|
446
|
-
declare const chatContext: React$1.Context<{
|
|
447
|
-
eventHandler: (component_key: string, data: any, message: string) => void;
|
|
448
|
-
}>;
|
|
449
|
-
|
|
450
568
|
interface ExplorerFile {
|
|
451
569
|
name: string;
|
|
452
570
|
content: string[];
|
|
@@ -462,4 +580,4 @@ interface FileExplorerProps {
|
|
|
462
580
|
}
|
|
463
581
|
declare const FileExplorer: React__default.FC<ElementProps>;
|
|
464
582
|
|
|
465
|
-
export { type AgentState, type AttachFile, AxiomLatticeProvider, type AxiomLatticeProviderProps, type ChatResponse, type ChatState, type ChatStateWithAgent, Chating, type
|
|
583
|
+
export { type AgentChatProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, type AttachFile, AxiomLatticeProvider, type AxiomLatticeProviderProps, type ChatResponse, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, type ElementMeta, type ElementProps, type ExplorerFile, FileExplorer, type FileExplorerProps, LatticeChat, MDMermaid, MDResponse, MDViewFormItem, SideAppViewBrowser, type StreamEventHandlerOptions, type Thread, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseAxiomLatticeOptions, type UseChatOptions, getElement, regsiterElement, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useAxiomLattice, useChat, useChatUIContext, useThread };
|