teodor-new-chat-ui 4.3.714 → 4.3.716

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.
@@ -6,7 +6,6 @@ interface ThreadStateProviderProps {
6
6
  initialCheckpointId?: string | null;
7
7
  initialCheckpointNs?: string | null;
8
8
  autoLoadInitial?: boolean;
9
- isStreaming: boolean;
10
9
  onError?: (error: string) => void;
11
10
  }
12
11
  interface ThreadStateUpdater {
@@ -15,5 +14,5 @@ interface ThreadStateUpdater {
15
14
  }
16
15
  export declare function useThreadState(): ThreadStateContextValue;
17
16
  export declare function useThreadStateUpdater(): ThreadStateUpdater;
18
- export declare function ThreadStateProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, isStreaming, onError, }: ThreadStateProviderProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ThreadStateProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, onError, }: ThreadStateProviderProps): import("react/jsx-runtime").JSX.Element;
19
18
  export {};
@@ -24,6 +24,7 @@ export interface UseChatControllerProps {
24
24
  onError?: (error: string) => void;
25
25
  enableMessageEditing?: boolean;
26
26
  messages: ChatMessage[];
27
+ unifiedMessages?: ChatMessage[];
27
28
  setPendingAssistantResponse: (pending: boolean) => void;
28
29
  project?: ProjectInfo | null;
29
30
  /** Optional callback for stream events */
@@ -46,5 +47,5 @@ export declare function useChatController({ submit, chatRequest, lastCheckpointI
46
47
  startEditing: (messageId: string, content: string, meta?: EditContextMeta) => void;
47
48
  cancelEditing: () => void;
48
49
  handleRegenerateCb: (messageIndex: number) => void;
49
- displayMessages: ChatMessage[] | undefined;
50
+ messages: ChatMessage[];
50
51
  };
@@ -0,0 +1,14 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { UseStreamApi, UseChatStreamOptions } from "@/types/domain/streaming";
3
+ export declare const StreamOptionsContext: React.Context<UseChatStreamOptions | null>;
4
+ export declare function StreamOptionsProvider({ options, children, }: {
5
+ options: UseChatStreamOptions;
6
+ children: React.ReactNode;
7
+ }): React.FunctionComponentElement<React.ProviderProps<UseChatStreamOptions | null>>;
8
+ export declare function useStreamOptions(): UseChatStreamOptions;
9
+ export declare const StreamStateContext: React.Context<UseStreamApi | null>;
10
+ export interface StreamStateProviderProps {
11
+ children: ReactNode;
12
+ }
13
+ export declare function StreamStateProvider({ children }: StreamStateProviderProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function useStreamStateContext(): UseStreamApi;
@@ -1 +1,3 @@
1
- export { StreamingProvider, useStream, useHasChatSession } from "./StreamingProvider";
1
+ export { StreamStateProvider, StreamStateContext, useStreamStateContext, StreamOptionsContext, StreamOptionsProvider, useStreamOptions, } from "./StreamStateContext";
2
+ export { useStream, useHasChatSession, } from "../hooks/use-stream";
3
+ export { useStreamApi, useStreamStatus, } from "../hooks/useStreamApi";
@@ -1,2 +1,3 @@
1
- import type { UseChatStreamOptions, UseStreamApi } from "@/types/domain/streaming";
2
- export declare function useStream(opts?: UseChatStreamOptions): UseStreamApi;
1
+ import type { StreamContextValue } from "@/types";
2
+ export declare function useStream(): StreamContextValue;
3
+ export declare function useHasChatSession(): boolean;
@@ -0,0 +1,3 @@
1
+ import type { UseChatStreamOptions, UseStreamApi } from "@/types/domain/streaming";
2
+ export declare function useStreamStatus(): boolean;
3
+ export declare function useStreamApi(opts?: UseChatStreamOptions): UseStreamApi;
@@ -1,5 +1,6 @@
1
1
  export * from "./contexts";
2
- export { useStream as useStreamingHook } from "./hooks/use-stream";
3
- export type { UseStreamApi, UseChatStreamOptions, ActiveRunContext, } from "./hooks/types";
2
+ export { useStream as useStreamingHook, useHasChatSession } from "./hooks/use-stream";
3
+ export { useStreamApi, useStreamStatus } from "./hooks/useStreamApi";
4
+ export type { UseStreamApi, UseChatStreamOptions, ActiveRunContext, } from "@/types/domain/streaming";
4
5
  export * from "./utils";
5
6
  export type { ToolEndEvent, ThreadInfoEvent, StateHistoryEvent } from "@/types/domain/streaming";