@athenaintel/react 0.10.25 → 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.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> & {
@@ -579,7 +596,7 @@ export declare function Button({ className, variant, size, asChild, ...props }:
579
596
  }): JSX.Element;
580
597
 
581
598
  export declare const buttonVariants: (props?: ({
582
- variant?: "default" | "link" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
599
+ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
583
600
  size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
584
601
  } & ClassProp) | undefined) => string;
585
602
 
@@ -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;
@@ -753,6 +772,13 @@ declare interface MenuItem {
753
772
  */
754
773
  declare type MenuScope = string;
755
774
 
775
+ export declare const NestedPtcMessages: FC<NestedPtcMessagesProps>;
776
+
777
+ export declare interface NestedPtcMessagesProps {
778
+ components: PartsComponents;
779
+ messageClassName?: string;
780
+ }
781
+
756
782
  export declare function normalizeResult(result: unknown): Record<string, unknown> | null;
757
783
 
758
784
  export declare const OpenAssetToolUI: ToolCallMessagePartComponent;
@@ -790,6 +816,8 @@ export declare interface ParsedAthenaCitationLink {
790
816
  assetType: AssetType | null;
791
817
  }
792
818
 
819
+ declare type PartsComponents = ComponentProps<typeof MessagePrimitive.Parts>["components"];
820
+
793
821
  export declare interface PostHogConfig {
794
822
  /** PostHog API key. When falsy, PostHog is disabled and the provider is a no-op. */
795
823
  apiKey?: string;
@@ -799,6 +827,8 @@ export declare interface PostHogConfig {
799
827
  debug?: boolean;
800
828
  }
801
829
 
830
+ export declare const PTC_SUBCALL_DID_NOT_COMPLETE_MESSAGE = "Sub-call did not complete before the parent tool returned.";
831
+
802
832
  declare interface QuoteContextValue {
803
833
  quote: QuoteData | null;
804
834
  setQuote: (quote: QuoteData | null) => void;