@athenaintel/react 0.1.0 → 0.2.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/dist/index.cjs +874 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +86 -0
- package/dist/index.js +874 -119
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
package/dist/index.d.ts
CHANGED
|
@@ -10,16 +10,45 @@ import * as React_2 from 'react';
|
|
|
10
10
|
import { ReactNode } from 'react';
|
|
11
11
|
import { RefAttributes } from 'react';
|
|
12
12
|
import { Store } from '@tanstack/react-store';
|
|
13
|
+
import { StoreApi } from 'zustand';
|
|
13
14
|
import { ToolCallMessagePartComponent } from '@assistant-ui/react';
|
|
14
15
|
import { ToolCallMessagePartStatus } from '@assistant-ui/react';
|
|
15
16
|
import { Toolkit } from '@assistant-ui/react';
|
|
16
17
|
import { Tooltip as Tooltip_2 } from 'radix-ui';
|
|
18
|
+
import { UseBoundStore } from 'zustand';
|
|
17
19
|
import { VariantProps } from 'class-variance-authority';
|
|
18
20
|
|
|
19
21
|
export declare const AppendDocumentToolUI: ToolCallMessagePartComponent;
|
|
20
22
|
|
|
21
23
|
declare type AssetIconType = "doc" | "pdf" | "sheet";
|
|
22
24
|
|
|
25
|
+
export declare const AssetPanel: FC;
|
|
26
|
+
|
|
27
|
+
export declare interface AssetPanelState {
|
|
28
|
+
isOpen: boolean;
|
|
29
|
+
tabs: AssetTab[];
|
|
30
|
+
activeTabId: string | null;
|
|
31
|
+
viewMode: ViewMode;
|
|
32
|
+
isFullscreen: boolean;
|
|
33
|
+
openAsset: (assetId: string, meta?: {
|
|
34
|
+
name?: string;
|
|
35
|
+
type?: AssetType;
|
|
36
|
+
}) => void;
|
|
37
|
+
closeTab: (assetId: string) => void;
|
|
38
|
+
setActiveTab: (assetId: string) => void;
|
|
39
|
+
setViewMode: (mode: ViewMode) => void;
|
|
40
|
+
closePanel: () => void;
|
|
41
|
+
toggleFullscreen: () => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface AssetTab {
|
|
45
|
+
id: string;
|
|
46
|
+
name: string | null;
|
|
47
|
+
type: AssetType;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export declare type AssetType = 'presentation' | 'spreadsheet' | 'document' | 'unknown';
|
|
51
|
+
|
|
23
52
|
export declare const AthenaChat: FC<AthenaChatProps>;
|
|
24
53
|
|
|
25
54
|
export declare interface AthenaChatProps {
|
|
@@ -37,6 +66,26 @@ export declare interface AthenaChatProps {
|
|
|
37
66
|
mentionTools?: MentionTool[];
|
|
38
67
|
}
|
|
39
68
|
|
|
69
|
+
export declare interface AthenaConfig {
|
|
70
|
+
apiKey?: string;
|
|
71
|
+
token?: string | null;
|
|
72
|
+
backendUrl: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Layout that places the chat on the left and the asset panel on the right.
|
|
77
|
+
* When no assets are open, the chat takes full width. Includes a draggable resize handle.
|
|
78
|
+
*/
|
|
79
|
+
export declare const AthenaLayout: FC<AthenaLayoutProps>;
|
|
80
|
+
|
|
81
|
+
export declare interface AthenaLayoutProps {
|
|
82
|
+
children: ReactNode;
|
|
83
|
+
/** Default width (%) of the chat panel when assets are open. Defaults to 50. */
|
|
84
|
+
defaultChatPercent?: number;
|
|
85
|
+
/** Minimum width (%) of each panel. Defaults to 25. */
|
|
86
|
+
minPercent?: number;
|
|
87
|
+
}
|
|
88
|
+
|
|
40
89
|
export declare function AthenaProvider({ children, apiKey, token: tokenProp, agent, model, tools, frontendTools, apiUrl, backendUrl, workbench, knowledgeBase, systemPrompt, threadId, }: AthenaProviderProps): JSX.Element;
|
|
41
90
|
|
|
42
91
|
export declare interface AthenaProviderProps {
|
|
@@ -106,6 +155,8 @@ export declare const buttonVariants: (props?: ({
|
|
|
106
155
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
107
156
|
} & ClassProp) | undefined) => string;
|
|
108
157
|
|
|
158
|
+
export declare function clearAutoOpenedAssets(): void;
|
|
159
|
+
|
|
109
160
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
110
161
|
|
|
111
162
|
export declare function Collapsible({ ...props }: React.ComponentProps<typeof Collapsible_2.Root>): JSX.Element;
|
|
@@ -118,6 +169,12 @@ export declare const CreateDocumentToolUI: ToolCallMessagePartComponent;
|
|
|
118
169
|
|
|
119
170
|
export declare const CreateEmailDraftToolUI: ToolCallMessagePartComponent;
|
|
120
171
|
|
|
172
|
+
export declare const CreatePresentationToolUI: ToolCallMessagePartComponent;
|
|
173
|
+
|
|
174
|
+
export declare const CreateSheetToolUI: ToolCallMessagePartComponent;
|
|
175
|
+
|
|
176
|
+
export declare const DEFAULT_BACKEND_URL = "https://api.athenaintel.com/api/assistant-ui";
|
|
177
|
+
|
|
121
178
|
export declare const EmailSearchToolUI: ToolCallMessagePartComponent;
|
|
122
179
|
|
|
123
180
|
declare interface FetchState {
|
|
@@ -171,6 +228,8 @@ declare type MenuScope = string;
|
|
|
171
228
|
|
|
172
229
|
export declare const ReadAssetToolUI: ToolCallMessagePartComponent;
|
|
173
230
|
|
|
231
|
+
export declare function resetAssetAutoOpen(): void;
|
|
232
|
+
|
|
174
233
|
declare interface ScopeRegistry {
|
|
175
234
|
entries: Map<MenuScope, ScopeRegistryEntry>;
|
|
176
235
|
}
|
|
@@ -267,6 +326,31 @@ export declare function TooltipTrigger({ ...props }: React_2.ComponentProps<type
|
|
|
267
326
|
|
|
268
327
|
export declare function tryParseJson(text: string): Record<string, unknown> | null;
|
|
269
328
|
|
|
329
|
+
/**
|
|
330
|
+
* Hook to generate an embed URL for rendering an asset in an iframe.
|
|
331
|
+
* Calls the Agora `/api/embed/generate-token` endpoint.
|
|
332
|
+
*/
|
|
333
|
+
export declare function useAssetEmbed(assetId: string | null, options?: UseAssetEmbedOptions & {
|
|
334
|
+
backendUrl: string;
|
|
335
|
+
apiKey?: string;
|
|
336
|
+
token?: string | null;
|
|
337
|
+
}): UseAssetEmbedResult;
|
|
338
|
+
|
|
339
|
+
export declare interface UseAssetEmbedOptions {
|
|
340
|
+
readOnly?: boolean;
|
|
341
|
+
expiresInSeconds?: number;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export declare interface UseAssetEmbedResult {
|
|
345
|
+
embedUrl: string | null;
|
|
346
|
+
isLoading: boolean;
|
|
347
|
+
error: string | null;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export declare const useAssetPanelStore: UseBoundStore<StoreApi<AssetPanelState>>;
|
|
351
|
+
|
|
352
|
+
export declare function useAthenaConfig(): AthenaConfig;
|
|
353
|
+
|
|
270
354
|
export declare const useAthenaRuntime: (config: AthenaRuntimeConfig) => AssistantRuntime;
|
|
271
355
|
|
|
272
356
|
export declare function useMentionSuggestions(tools: MentionTool[]): MentionSuggestionsStore;
|
|
@@ -286,6 +370,8 @@ export declare function useMentionSuggestions(tools: MentionTool[]): MentionSugg
|
|
|
286
370
|
*/
|
|
287
371
|
export declare function useParentAuth(): string | null;
|
|
288
372
|
|
|
373
|
+
export declare type ViewMode = 'tabs' | 'tiled';
|
|
374
|
+
|
|
289
375
|
export declare const WebSearchToolUI: ToolCallMessagePartComponent;
|
|
290
376
|
|
|
291
377
|
export { }
|