@athenaintel/react 0.10.25 → 0.10.27
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 +1500 -466
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +1501 -467
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AssistantRuntime } from '@assistant-ui/core';
|
|
|
2
2
|
import { ClassProp } from 'class-variance-authority/types';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
import { Collapsible as Collapsible_2 } from 'radix-ui';
|
|
5
|
+
import { ComponentProps } from 'react';
|
|
5
6
|
import { ComponentPropsWithRef } from 'react';
|
|
6
7
|
import { Context } from 'react';
|
|
7
8
|
import { EmptyMessagePartComponent } from '@assistant-ui/react';
|
|
@@ -9,6 +10,8 @@ import { FC } from 'react';
|
|
|
9
10
|
import { ForwardRefExoticComponent } from 'react';
|
|
10
11
|
import { JSX } from 'react/jsx-runtime';
|
|
11
12
|
import { JSXElementConstructor } from 'react';
|
|
13
|
+
import { LangChainMessage } from '@assistant-ui/react-langgraph';
|
|
14
|
+
import { MessagePrimitive } from '@assistant-ui/react';
|
|
12
15
|
import { PersistOptions } from 'zustand/middleware';
|
|
13
16
|
import * as React_2 from 'react';
|
|
14
17
|
import { ReactElement } from 'react';
|
|
@@ -19,6 +22,7 @@ import { RefAttributes } from 'react';
|
|
|
19
22
|
import { Store } from '@tanstack/react-store';
|
|
20
23
|
import { StoreApi } from 'zustand';
|
|
21
24
|
import { TextMessagePartComponent } from '@assistant-ui/react';
|
|
25
|
+
import { ThreadMessage } from '@assistant-ui/react';
|
|
22
26
|
import { ToolCallMessagePartComponent } from '@assistant-ui/react';
|
|
23
27
|
import { ToolCallMessagePartStatus } from '@assistant-ui/react';
|
|
24
28
|
import { Toolkit } from '@assistant-ui/react';
|
|
@@ -61,6 +65,7 @@ export declare interface AssetPanelState {
|
|
|
61
65
|
openAsset: (assetId: string, meta?: {
|
|
62
66
|
name?: string;
|
|
63
67
|
type?: AssetType;
|
|
68
|
+
slideNumber?: number;
|
|
64
69
|
}) => void;
|
|
65
70
|
closeTab: (assetId: string) => void;
|
|
66
71
|
setActiveTab: (assetId: string) => void;
|
|
@@ -82,10 +87,18 @@ export declare interface AssetTab {
|
|
|
82
87
|
id: string;
|
|
83
88
|
name: string | null;
|
|
84
89
|
type: AssetType;
|
|
90
|
+
slideNumber?: number;
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
export declare type AssetType = 'presentation' | 'spreadsheet' | 'document' | 'notebook' | 'unknown';
|
|
88
94
|
|
|
95
|
+
declare type AthenaAiLangChainMessage = Extract<LangChainMessage, {
|
|
96
|
+
type: 'ai';
|
|
97
|
+
}> & {
|
|
98
|
+
usage_metadata?: Record<string, unknown>;
|
|
99
|
+
response_metadata?: Record<string, unknown>;
|
|
100
|
+
};
|
|
101
|
+
|
|
89
102
|
export declare const AthenaAssistantActionBar: FC<AthenaAssistantActionBarProps>;
|
|
90
103
|
|
|
91
104
|
export declare interface AthenaAssistantActionBarProps {
|
|
@@ -199,6 +212,10 @@ export declare interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey
|
|
|
199
212
|
|
|
200
213
|
export declare type AthenaEnvironment = 'production' | 'staging';
|
|
201
214
|
|
|
215
|
+
declare type AthenaLangChainMessage = Exclude<LangChainMessage, {
|
|
216
|
+
type: 'ai';
|
|
217
|
+
}> | AthenaAiLangChainMessage;
|
|
218
|
+
|
|
202
219
|
/**
|
|
203
220
|
* Layout that places the chat on the left and the asset panel on the right.
|
|
204
221
|
* When no assets are open, the chat takes full width. Includes a draggable resize handle.
|
|
@@ -572,6 +589,8 @@ declare interface AuthConfig {
|
|
|
572
589
|
token?: string | null;
|
|
573
590
|
}
|
|
574
591
|
|
|
592
|
+
export declare const autoCloseInFlightSubgraphMessages: (msgs: readonly unknown[]) => unknown[];
|
|
593
|
+
|
|
575
594
|
export declare const BrowseToolUI: ToolCallMessagePartComponent;
|
|
576
595
|
|
|
577
596
|
export declare function Button({ className, variant, size, asChild, ...props }: React_2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -579,7 +598,7 @@ export declare function Button({ className, variant, size, asChild, ...props }:
|
|
|
579
598
|
}): JSX.Element;
|
|
580
599
|
|
|
581
600
|
export declare const buttonVariants: (props?: ({
|
|
582
|
-
variant?: "
|
|
601
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
583
602
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
584
603
|
} & ClassProp) | undefined) => string;
|
|
585
604
|
|
|
@@ -619,6 +638,8 @@ export declare interface ComposerQuotePreviewProps {
|
|
|
619
638
|
className?: string;
|
|
620
639
|
}
|
|
621
640
|
|
|
641
|
+
export declare const convertLangChainToThreadMessages: (messages: AthenaLangChainMessage[], isRunning?: boolean, metadata?: {}) => ThreadMessage[];
|
|
642
|
+
|
|
622
643
|
export declare function createAssetToolUI(config: {
|
|
623
644
|
icon: React.ElementType;
|
|
624
645
|
assetType: AssetType;
|
|
@@ -753,6 +774,13 @@ declare interface MenuItem {
|
|
|
753
774
|
*/
|
|
754
775
|
declare type MenuScope = string;
|
|
755
776
|
|
|
777
|
+
export declare const NestedPtcMessages: FC<NestedPtcMessagesProps>;
|
|
778
|
+
|
|
779
|
+
export declare interface NestedPtcMessagesProps {
|
|
780
|
+
components: PartsComponents;
|
|
781
|
+
messageClassName?: string;
|
|
782
|
+
}
|
|
783
|
+
|
|
756
784
|
export declare function normalizeResult(result: unknown): Record<string, unknown> | null;
|
|
757
785
|
|
|
758
786
|
export declare const OpenAssetToolUI: ToolCallMessagePartComponent;
|
|
@@ -790,6 +818,8 @@ export declare interface ParsedAthenaCitationLink {
|
|
|
790
818
|
assetType: AssetType | null;
|
|
791
819
|
}
|
|
792
820
|
|
|
821
|
+
declare type PartsComponents = ComponentProps<typeof MessagePrimitive.Parts>["components"];
|
|
822
|
+
|
|
793
823
|
export declare interface PostHogConfig {
|
|
794
824
|
/** PostHog API key. When falsy, PostHog is disabled and the provider is a no-op. */
|
|
795
825
|
apiKey?: string;
|
|
@@ -799,6 +829,8 @@ export declare interface PostHogConfig {
|
|
|
799
829
|
debug?: boolean;
|
|
800
830
|
}
|
|
801
831
|
|
|
832
|
+
export declare const PTC_SUBCALL_DID_NOT_COMPLETE_MESSAGE = "Sub-call did not complete before the parent tool returned.";
|
|
833
|
+
|
|
802
834
|
declare interface QuoteContextValue {
|
|
803
835
|
quote: QuoteData | null;
|
|
804
836
|
setQuote: (quote: QuoteData | null) => void;
|