teodor-new-chat-ui 4.3.342 → 4.3.344

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.
@@ -0,0 +1,8 @@
1
+ import type { ChatMessage } from "@/types/api";
2
+ interface StreamComponentProps {
3
+ message: ChatMessage;
4
+ viewMode: "preview" | "expanded";
5
+ isStreaming?: boolean;
6
+ }
7
+ export declare function StreamComponent({ message, viewMode, isStreaming }: StreamComponentProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ChatMessage } from "@/types/api";
2
+ interface ToolComponentProps {
3
+ message: ChatMessage;
4
+ viewMode: "preview" | "expanded";
5
+ }
6
+ export declare function ToolComponent({ message, viewMode }: ToolComponentProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -1,6 +1,7 @@
1
1
  export { ArtifactPreviewItem } from "./ArtifactPreviewItem";
2
- export { SimpleJsonView } from "./SimpleJsonView";
3
2
  export { InterruptPartRenderer } from "./InterruptPartRenderer";
3
+ export { SimpleJsonView } from "./SimpleJsonView";
4
+ export { StreamComponent } from "./StreamComponent";
5
+ export { ToolComponent } from "./ToolComponent";
4
6
  export { useFilePreview } from "./useFilePreview";
5
7
  export { UserTextContent } from "./UserTextContent";
6
- export { ToolMessage } from "./ToolMessage";
@@ -1,6 +1,6 @@
1
1
  import * as ResizablePrimitive from "react-resizable-panels";
2
2
  declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
3
- declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLTextAreaElement | HTMLFormElement | HTMLDivElement | HTMLObjectElement | HTMLDataElement | HTMLHeadElement | HTMLLinkElement | HTMLBodyElement | HTMLMapElement | HTMLMetaElement | HTMLLabelElement | HTMLSourceElement | HTMLOutputElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMeterElement | HTMLOptGroupElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLMenuElement | HTMLTableCaptionElement | HTMLPictureElement>, "id" | "onResize"> & {
3
+ declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLTextAreaElement | HTMLFormElement | HTMLDivElement | HTMLObjectElement | HTMLProgressElement | HTMLDataElement | HTMLHeadElement | HTMLLinkElement | HTMLBodyElement | HTMLMapElement | HTMLMetaElement | HTMLLabelElement | HTMLSourceElement | HTMLOutputElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMeterElement | HTMLOptGroupElement | HTMLPreElement | HTMLScriptElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLMenuElement | HTMLTableCaptionElement | HTMLPictureElement>, "id" | "onResize"> & {
4
4
  className?: string | undefined;
5
5
  collapsedSize?: number | undefined;
6
6
  collapsible?: boolean | undefined;
@@ -14,11 +14,12 @@ export interface ChatProvidersProps {
14
14
  initialCheckpointId?: string | null;
15
15
  initialCheckpointNs?: string | null;
16
16
  autoLoadInitial?: boolean;
17
+ onConnectionError?: (error: string) => void;
17
18
  onError?: (error: string) => void;
18
19
  onAuthError?: (error: string) => void;
19
20
  onThreadChange?: (threadId: string | null) => void;
20
21
  }
21
- export declare function ChatProviders({ children, apiConfig, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, onError, onAuthError, onThreadChange, }: ChatProvidersProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function ChatProviders({ children, apiConfig, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, onConnectionError, onError, onAuthError, onThreadChange, }: ChatProvidersProps): import("react/jsx-runtime").JSX.Element;
22
23
  export { useApi } from './providers/ApiProvider';
23
24
  export { useStream, useThreads, useThreadState } from './providers/ChatSessionProvider';
24
25
  export type { ApiContextValue, SendOptions, StreamContextValue, ThreadsContextValue, ThreadStateContextValue } from './types';
@@ -82,8 +82,9 @@ interface ChatSessionProviderProps {
82
82
  onError?: (error: string) => void;
83
83
  onAuthError?: (error: string) => void;
84
84
  onThreadChange?: (threadId: string | null) => void;
85
+ onConnectionError?: (error: string) => void;
85
86
  }
86
- export declare function ChatSessionProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, onError, onAuthError, onThreadChange, }: ChatSessionProviderProps): import("react/jsx-runtime").JSX.Element;
87
+ export declare function ChatSessionProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, onError, onAuthError, onThreadChange, onConnectionError, }: ChatSessionProviderProps): import("react/jsx-runtime").JSX.Element;
87
88
  /**
88
89
  * Hook to check if the current component is within a ChatSessionProvider
89
90
  */
@@ -9,6 +9,7 @@ export interface MessagesState {
9
9
  lastCheckpointId: string | null;
10
10
  lastCheckpointNs: string | null;
11
11
  toolIndex: Record<string, string>;
12
+ toolStreamingMessageId: string | null;
12
13
  lastBranch: Extract<StreamEvent, {
13
14
  type: "branch";
14
15
  }> | null;