teodor-new-chat-ui 4.3.761 → 4.3.764

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.
@@ -13,7 +13,12 @@ interface ThreadStateUpdater {
13
13
  registerClearThread: (fn: ThreadStateContextValue['clearThread']) => void;
14
14
  registerRespondToInterrupt: (fn: ThreadStateContextValue['respondToInterrupt']) => void;
15
15
  }
16
- export declare function useThreadState(): ThreadStateContextValue;
16
+ export declare function useThreadState(options: {
17
+ optional: true;
18
+ }): ThreadStateContextValue | null;
19
+ export declare function useThreadState(options?: {
20
+ optional?: false;
21
+ }): ThreadStateContextValue;
17
22
  export declare function useThreadStateUpdater(): ThreadStateUpdater;
18
23
  export declare function ThreadStateProvider({ children, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, isStreaming, onError, }: ThreadStateProviderProps): import("react/jsx-runtime").JSX.Element;
19
24
  export {};
@@ -46,5 +46,5 @@ export declare function useChatController({ submit, chatRequest, lastCheckpointI
46
46
  startEditing: (messageId: string, content: string, meta?: EditContextMeta) => void;
47
47
  cancelEditing: () => void;
48
48
  handleRegenerateCb: (messageIndex: number) => void;
49
- displayMessages: ChatMessage[];
49
+ displayMessages: any[];
50
50
  };
@@ -1,29 +1,44 @@
1
- export declare function useChatSession(): {
1
+ type UseChatSessionOptions = string | {
2
+ threadId?: string;
3
+ } | undefined;
4
+ export declare function useChatSession(options?: UseChatSessionOptions): {
2
5
  threadId: string | null;
3
- messages: import("../../../types").ChatMessage[];
4
- isHistoryLoading: boolean;
6
+ messages: any[];
5
7
  isLoading: boolean;
8
+ isHistoryLoading: boolean;
9
+ error: string | null;
10
+ values: Record<string, unknown>;
11
+ metadata: {
12
+ assemblingMessageId: string | null;
13
+ } | undefined;
6
14
  navigateToCheckpoint: (checkpointId: string, checkpointNs?: string | null) => Promise<void>;
7
15
  returnToLatest: () => Promise<void>;
8
16
  checkpoint: {
9
17
  id: string | null;
10
18
  namespace: string | null;
11
- };
19
+ } | null;
12
20
  checkpoints: import("../../persistence").HydratedCheckpointSnapshot[];
13
- interrupt: import("../../persistence").PendingInterrupt;
14
- respondToInterrupt: (approved: boolean, value?: unknown, options?: any) => Promise<void>;
15
- metadata: {
16
- assemblingMessageId: string | null;
21
+ checkpointIndex: import("../../persistence").CheckpointIndex | {
22
+ timeline: never[];
23
+ messagePreviews: {};
17
24
  };
18
- checkpointIndex: import("../../persistence").CheckpointIndex;
25
+ interrupt: {
26
+ id: string;
27
+ value: unknown;
28
+ alternatives?: import("../../../types").InterruptAlternative[];
29
+ } | null;
30
+ respondToInterrupt: (approved: boolean, value?: unknown, options?: any) => Promise<void>;
19
31
  isStreaming: boolean;
20
- error: string | null;
21
32
  activeMessageId: string | null;
22
- connectionState: "error" | "idle" | "connecting" | "connected" | "reconnecting" | undefined;
33
+ connectionState: string;
34
+ streamingAssistantId: string | null;
23
35
  submit: (input: import("../../../types").StreamSubmitPayload, callbacks?: import("../../../types").StreamCallbacks) => Promise<void>;
24
36
  stop: () => void;
25
- values: Record<string, unknown>;
26
- streamingAssistantId: string | null;
27
37
  clearThread: () => Promise<void> | void;
28
38
  setCurrentThreadId: (id: string | null) => void;
39
+ createThread: (title?: string, project?: ({
40
+ id: string;
41
+ name?: string;
42
+ } | import("../../../types").ProjectInfo | null)) => Promise<string | null>;
29
43
  };
44
+ export {};