@athenaintel/react 0.10.24 → 0.10.26
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 +586 -436
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +587 -437
- 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';
|
|
@@ -86,6 +90,13 @@ export declare interface AssetTab {
|
|
|
86
90
|
|
|
87
91
|
export declare type AssetType = 'presentation' | 'spreadsheet' | 'document' | 'notebook' | 'unknown';
|
|
88
92
|
|
|
93
|
+
declare type AthenaAiLangChainMessage = Extract<LangChainMessage, {
|
|
94
|
+
type: 'ai';
|
|
95
|
+
}> & {
|
|
96
|
+
usage_metadata?: Record<string, unknown>;
|
|
97
|
+
response_metadata?: Record<string, unknown>;
|
|
98
|
+
};
|
|
99
|
+
|
|
89
100
|
export declare const AthenaAssistantActionBar: FC<AthenaAssistantActionBarProps>;
|
|
90
101
|
|
|
91
102
|
export declare interface AthenaAssistantActionBarProps {
|
|
@@ -199,6 +210,10 @@ export declare interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey
|
|
|
199
210
|
|
|
200
211
|
export declare type AthenaEnvironment = 'production' | 'staging';
|
|
201
212
|
|
|
213
|
+
declare type AthenaLangChainMessage = Exclude<LangChainMessage, {
|
|
214
|
+
type: 'ai';
|
|
215
|
+
}> | AthenaAiLangChainMessage;
|
|
216
|
+
|
|
202
217
|
/**
|
|
203
218
|
* Layout that places the chat on the left and the asset panel on the right.
|
|
204
219
|
* When no assets are open, the chat takes full width. Includes a draggable resize handle.
|
|
@@ -572,6 +587,8 @@ declare interface AuthConfig {
|
|
|
572
587
|
token?: string | null;
|
|
573
588
|
}
|
|
574
589
|
|
|
590
|
+
export declare const autoCloseInFlightSubgraphMessages: (msgs: readonly unknown[]) => unknown[];
|
|
591
|
+
|
|
575
592
|
export declare const BrowseToolUI: ToolCallMessagePartComponent;
|
|
576
593
|
|
|
577
594
|
export declare function Button({ className, variant, size, asChild, ...props }: React_2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -619,6 +636,8 @@ export declare interface ComposerQuotePreviewProps {
|
|
|
619
636
|
className?: string;
|
|
620
637
|
}
|
|
621
638
|
|
|
639
|
+
export declare const convertLangChainToThreadMessages: (messages: AthenaLangChainMessage[], isRunning?: boolean, metadata?: {}) => ThreadMessage[];
|
|
640
|
+
|
|
622
641
|
export declare function createAssetToolUI(config: {
|
|
623
642
|
icon: React.ElementType;
|
|
624
643
|
assetType: AssetType;
|
|
@@ -692,7 +711,12 @@ export declare const GetDatabaseTableSchemaToolUI: ToolCallMessagePartComponent;
|
|
|
692
711
|
|
|
693
712
|
export declare function getPostHogInstance<TClient = unknown>(): TClient | null;
|
|
694
713
|
|
|
695
|
-
/**
|
|
714
|
+
/**
|
|
715
|
+
* Fetch persisted thread state from the conversations API.
|
|
716
|
+
*
|
|
717
|
+
* This endpoint is the same source used by Athena's conversation sidebar and
|
|
718
|
+
* supports API-key auth plus BYO SSO session tokens sent as Bearer tokens.
|
|
719
|
+
*/
|
|
696
720
|
export declare function getThreadState(backendUrl: string, auth: AuthConfig, threadId: string): Promise<ThreadStateResponse>;
|
|
697
721
|
|
|
698
722
|
export declare const isAthenaCitationUrl: ({ href, appUrl, }: {
|
|
@@ -748,6 +772,13 @@ declare interface MenuItem {
|
|
|
748
772
|
*/
|
|
749
773
|
declare type MenuScope = string;
|
|
750
774
|
|
|
775
|
+
export declare const NestedPtcMessages: FC<NestedPtcMessagesProps>;
|
|
776
|
+
|
|
777
|
+
export declare interface NestedPtcMessagesProps {
|
|
778
|
+
components: PartsComponents;
|
|
779
|
+
messageClassName?: string;
|
|
780
|
+
}
|
|
781
|
+
|
|
751
782
|
export declare function normalizeResult(result: unknown): Record<string, unknown> | null;
|
|
752
783
|
|
|
753
784
|
export declare const OpenAssetToolUI: ToolCallMessagePartComponent;
|
|
@@ -785,6 +816,8 @@ export declare interface ParsedAthenaCitationLink {
|
|
|
785
816
|
assetType: AssetType | null;
|
|
786
817
|
}
|
|
787
818
|
|
|
819
|
+
declare type PartsComponents = ComponentProps<typeof MessagePrimitive.Parts>["components"];
|
|
820
|
+
|
|
788
821
|
export declare interface PostHogConfig {
|
|
789
822
|
/** PostHog API key. When falsy, PostHog is disabled and the provider is a no-op. */
|
|
790
823
|
apiKey?: string;
|
|
@@ -794,6 +827,8 @@ export declare interface PostHogConfig {
|
|
|
794
827
|
debug?: boolean;
|
|
795
828
|
}
|
|
796
829
|
|
|
830
|
+
export declare const PTC_SUBCALL_DID_NOT_COMPLETE_MESSAGE = "Sub-call did not complete before the parent tool returned.";
|
|
831
|
+
|
|
797
832
|
declare interface QuoteContextValue {
|
|
798
833
|
quote: QuoteData | null;
|
|
799
834
|
setQuote: (quote: QuoteData | null) => void;
|
|
@@ -1016,6 +1051,7 @@ declare interface ThreadStateResponse {
|
|
|
1016
1051
|
thread_id: string;
|
|
1017
1052
|
messages: unknown[];
|
|
1018
1053
|
status?: string;
|
|
1054
|
+
[key: string]: unknown;
|
|
1019
1055
|
}
|
|
1020
1056
|
|
|
1021
1057
|
/**
|