teodor-new-chat-ui 4.3.399 → 4.3.401

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.
Files changed (84) hide show
  1. package/dist/features/checkpoint/utils/attemptDetection.d.ts +1 -1
  2. package/dist/features/checkpoint/utils/messagePreviews.d.ts +1 -7
  3. package/dist/features/core/contexts/index.d.ts +1 -3
  4. package/dist/features/core/contexts/providers/ApiProvider.d.ts +1 -1
  5. package/dist/features/core/contexts/{ChatProviders.d.ts → providers/ChatProviders.d.ts} +3 -3
  6. package/dist/features/core/contexts/providers/index.d.ts +1 -0
  7. package/dist/features/core/hooks/index.d.ts +1 -2
  8. package/dist/features/core/hooks/useApi.d.ts +1 -0
  9. package/dist/features/core/types/context.d.ts +2 -1
  10. package/dist/features/core/types/index.d.ts +3 -2
  11. package/dist/features/core/types/models.d.ts +202 -0
  12. package/dist/features/core/types/requests.d.ts +22 -0
  13. package/dist/features/messaging/components/{chat/ChatApp.d.ts → ChatApp.d.ts} +1 -1
  14. package/dist/features/messaging/components/message/artifacts/ResearchTaskArtifact.d.ts +20 -0
  15. package/dist/features/messaging/index.d.ts +12 -12
  16. package/dist/features/messaging/utils/markdown.worker.d.ts +1 -0
  17. package/dist/features/streaming/contexts/index.d.ts +0 -1
  18. package/dist/features/streaming/contexts/types.d.ts +57 -0
  19. package/dist/features/streaming/index.d.ts +2 -1
  20. package/dist/features/streaming/utils/constants.d.ts +1 -0
  21. package/dist/features/streaming/utils/types.d.ts +0 -8
  22. package/dist/features/thread/hooks/useThreadHistoryState.d.ts +1 -1
  23. package/dist/features/ui/components/ui/accordion.d.ts +7 -0
  24. package/dist/features/ui/components/ui/alert-dialog.d.ts +20 -0
  25. package/dist/features/ui/components/ui/alert.d.ts +8 -0
  26. package/dist/features/ui/components/ui/aspect-ratio.d.ts +3 -0
  27. package/dist/features/ui/components/ui/avatar.d.ts +6 -0
  28. package/dist/features/ui/components/ui/breadcrumb.d.ts +19 -0
  29. package/dist/features/ui/components/ui/calendar.d.ts +8 -0
  30. package/dist/features/ui/components/ui/carousel.d.ts +18 -0
  31. package/dist/features/ui/components/ui/chart.d.ts +62 -0
  32. package/dist/features/ui/components/ui/checkbox.d.ts +4 -0
  33. package/dist/features/ui/components/ui/collapsible.d.ts +5 -0
  34. package/dist/features/ui/components/ui/context-menu.d.ts +27 -0
  35. package/dist/features/ui/components/ui/drawer.d.ts +22 -0
  36. package/dist/features/ui/components/ui/form.d.ts +23 -0
  37. package/dist/features/ui/components/ui/hover-card.d.ts +6 -0
  38. package/dist/features/ui/components/ui/input-otp.d.ts +34 -0
  39. package/dist/features/ui/components/ui/menubar.d.ts +28 -0
  40. package/dist/features/ui/components/ui/navigation-menu.d.ts +12 -0
  41. package/dist/features/ui/components/ui/pagination.d.ts +28 -0
  42. package/dist/features/ui/components/ui/popover.d.ts +6 -0
  43. package/dist/features/ui/components/ui/progress.d.ts +4 -0
  44. package/dist/features/ui/components/ui/radio-group.d.ts +5 -0
  45. package/dist/features/ui/components/ui/resizable.d.ts +23 -0
  46. package/dist/features/ui/components/ui/sidebar.d.ts +66 -0
  47. package/dist/features/ui/components/ui/skeleton.d.ts +2 -0
  48. package/dist/features/ui/components/ui/slider.d.ts +4 -0
  49. package/dist/features/ui/components/ui/table.d.ts +10 -0
  50. package/dist/features/ui/components/ui/tabs.d.ts +7 -0
  51. package/dist/features/ui/components/ui/toggle-group.d.ts +12 -0
  52. package/dist/features/ui/components/ui/toggle.d.ts +12 -0
  53. package/dist/features/ui/components/ui/use-toast.d.ts +2 -0
  54. package/dist/features/ui/hooks/index.d.ts +2 -0
  55. package/dist/features/ui/hooks/use-mobile.d.ts +1 -0
  56. package/dist/features/ui/hooks/use-toast.d.ts +1 -1
  57. package/dist/index.esm.js +5868 -6108
  58. package/dist/index.umd.js +42 -42
  59. package/dist/lib/index.d.ts +2 -2
  60. package/dist/types/models.d.ts +1 -202
  61. package/dist/types/requests.d.ts +1 -15
  62. package/package.json +1 -1
  63. package/dist/features/core/contexts/providers/ChatSessionProvider.d.ts +0 -1
  64. package/dist/features/streaming/contexts/services/use-streaming-service.d.ts +0 -61
  65. package/dist/types/marked.d.ts +0 -11
  66. /package/dist/features/messaging/components/{chat/ChatInput.d.ts → ChatInput.d.ts} +0 -0
  67. /package/dist/features/messaging/components/{chat/ChatInterface.d.ts → ChatInterface.d.ts} +0 -0
  68. /package/dist/features/messaging/components/{chat/FileViewerModal.d.ts → FileViewerModal.d.ts} +0 -0
  69. /package/dist/features/messaging/components/{chat/MarkdownContent.d.ts → MarkdownContent.d.ts} +0 -0
  70. /package/dist/features/messaging/components/{chat/MessageComponent.d.ts → MessageComponent.d.ts} +0 -0
  71. /package/dist/features/messaging/components/{chat/MessageList.d.ts → MessageList.d.ts} +0 -0
  72. /package/dist/features/messaging/components/{chat/MessageRow.d.ts → MessageRow.d.ts} +0 -0
  73. /package/dist/features/messaging/components/{chat/ThreadManager.d.ts → ThreadManager.d.ts} +0 -0
  74. /package/dist/features/messaging/components/{chat/message → message}/ArtifactRenderer.d.ts +0 -0
  75. /package/dist/features/messaging/components/{chat/message → message}/InterruptPartRenderer.d.ts +0 -0
  76. /package/dist/features/messaging/components/{chat/message/artifacts → message}/ResearchTaskArtifact.d.ts +0 -0
  77. /package/dist/features/messaging/components/{chat/message → message}/SimpleJsonView.d.ts +0 -0
  78. /package/dist/features/messaging/components/{chat/message → message}/StreamProgress.d.ts +0 -0
  79. /package/dist/features/messaging/components/{chat/message → message}/ToolComponent.d.ts +0 -0
  80. /package/dist/features/messaging/components/{chat/message → message}/UserTextContent.d.ts +0 -0
  81. /package/dist/features/messaging/components/{chat/message → message}/artifacts/PlotArtifact.d.ts +0 -0
  82. /package/dist/features/messaging/components/{chat/message → message}/index.d.ts +0 -0
  83. /package/dist/features/messaging/components/{chat/message → message}/useFilePreview.d.ts +0 -0
  84. /package/dist/features/messaging/components/{chat/threads → threads}/ThreadListItem.d.ts +0 -0
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * msg3 appears in multiple checkpoints = multiple attempts/versions
12
12
  */
13
- import type { HydratedCheckpointSnapshot } from "@/types/models";
13
+ import type { HydratedCheckpointSnapshot } from "@/features/core/types";
14
14
  import type { CheckpointAttemptInfo } from "../types";
15
15
  export interface AttemptMetadata {
16
16
  attemptIndex: number;
@@ -1,12 +1,6 @@
1
+ import type { HydratedCheckpointSnapshot } from '@/features/core/types';
1
2
  import type { ChatMessage } from '@/types';
2
- import type { HydratedCheckpointSnapshot } from '@/types/models';
3
3
  export declare function getPreviewForMessage(message: ChatMessage): string;
4
- /**
5
- * Legacy function: builds a map of message ID -> preview text.
6
- * This creates a single preview per message ID, with later occurrences overwriting earlier ones.
7
- * @deprecated Use buildCheckpointPreviewMap instead for per-checkpoint previews
8
- */
9
- export declare function buildMessagePreviewMap(messages: ChatMessage[]): Map<string, string>;
10
4
  /**
11
5
  * Builds a map of checkpoint ID -> preview text.
12
6
  * Each checkpoint gets its own preview based on the latest user message in that checkpoint.
@@ -1,6 +1,4 @@
1
1
  /**
2
2
  * Public API entry point for shared contexts.
3
3
  */
4
- export { ChatProviders, type ChatProvidersProps } from './ChatProviders';
5
- export { useApi } from './providers/ApiProvider';
6
- export { useThreadState, useStream, useThreads, useHasChatSession, } from './providers/ChatSessionProvider';
4
+ export { ApiProvider } from './providers';
@@ -3,9 +3,9 @@
3
3
  */
4
4
  import type { ApiConfig, ApiContextValue } from '@/features/core/types';
5
5
  import { type ReactNode } from 'react';
6
+ export declare const ApiContext: import("react").Context<ApiContextValue | null>;
6
7
  export interface ApiProviderProps {
7
8
  children: ReactNode;
8
9
  apiConfig?: ApiConfig;
9
10
  }
10
11
  export declare function ApiProvider({ children, apiConfig }: ApiProviderProps): import("react/jsx-runtime").JSX.Element;
11
- export declare function useApi(): ApiContextValue;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Context hierarchy:
5
5
  * ApiProvider (auth token & API client)
6
- * └─ ChatSessionProvider (threads, messages, and streaming state)
6
+ * └─ StreamingProvider (threads, messages, and streaming state)
7
7
  */
8
8
  import type { ApiConfig } from '@/features/core/types';
9
9
  import type { ToolEndEvent } from '@/features/streaming';
@@ -22,5 +22,5 @@ export interface ChatProvidersProps {
22
22
  onToolEnd?: (event: ToolEndEvent) => void;
23
23
  }
24
24
  export declare function ChatProviders({ children, apiConfig, initialThreadId, initialCheckpointId, initialCheckpointNs, autoLoadInitial, onConnectionError, onError, onAuthError, onThreadChange, onToolEnd, }: ChatProvidersProps): import("react/jsx-runtime").JSX.Element;
25
- export { useApi } from './providers/ApiProvider';
26
- export { useStream, useThreads, useThreadState } from './providers/ChatSessionProvider';
25
+ export { useApi } from '@/features/core/hooks';
26
+ export { useStream, useThreads, useThreadState, useHasChatSession } from '@/features/streaming/contexts/StreamingProvider';
@@ -0,0 +1 @@
1
+ export { ApiProvider, ApiContext } from "./ApiProvider";
@@ -1,2 +1 @@
1
- export { useApi } from "../contexts/providers/ApiProvider";
2
- export { useHasChatSession, useStream, useThreadState, useThreads, } from "../contexts/providers/ChatSessionProvider";
1
+ export { useApi } from './useApi';
@@ -0,0 +1 @@
1
+ export declare function useApi(): import("..").ApiContextValue;
@@ -1,5 +1,6 @@
1
1
  import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, ThreadSummary } from "@/types";
2
- import type { MessageStreamEvent, StreamCommand, StreamEvent, SystemStreamEvent, ThreadStreamEvent, ToolStreamEvent } from "@/features/streaming";
2
+ import type { MessageStreamEvent, StreamEvent, SystemStreamEvent, ThreadStreamEvent, ToolStreamEvent } from "@/features/streaming";
3
+ import type { StreamCommand } from "./requests";
3
4
  export interface ApiConfig {
4
5
  baseUrl?: string;
5
6
  apiKey?: string;
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Core Infrastructure Types
3
3
  *
4
- * Re-exports global types from @/types for convenience.
5
- * Don't add feature-specific types here - keep them in their feature folders.
4
+ * Re-export the core domain contracts used by features and hosts.
6
5
  */
7
6
  export * from "./context";
7
+ export * from "./models";
8
+ export * from "./requests";
@@ -0,0 +1,202 @@
1
+ export type Role = "system" | "user" | "assistant" | "tool";
2
+ export type TextPart = {
3
+ type: "text";
4
+ text: string;
5
+ };
6
+ export type ImagePart = {
7
+ type: "image_url";
8
+ url: string;
9
+ mimeType?: string;
10
+ alt?: string;
11
+ };
12
+ export type FilePart = {
13
+ type: "file";
14
+ url: string;
15
+ mimeType?: string;
16
+ name?: string;
17
+ size?: number;
18
+ sourceType?: string;
19
+ };
20
+ export type ToolCallPart = {
21
+ type: "tool_call";
22
+ id: string;
23
+ name: string;
24
+ args: Record<string, unknown>;
25
+ };
26
+ export type InterruptPart = {
27
+ type: "interrupt";
28
+ value?: any;
29
+ [key: string]: unknown;
30
+ };
31
+ export type MessagePart = TextPart | ImagePart | FilePart | ToolCallPart | InterruptPart;
32
+ export type PlotData = {
33
+ format?: string;
34
+ content_base64?: string;
35
+ url?: string;
36
+ mimeType?: string;
37
+ mime_type?: string;
38
+ plotId?: string;
39
+ artifactId?: string;
40
+ [key: string]: unknown;
41
+ };
42
+ export interface MessageArtifact {
43
+ [key: string]: unknown;
44
+ }
45
+ export type ArtifactPreview = {
46
+ src: string;
47
+ alt: string;
48
+ label?: string;
49
+ };
50
+ export interface ChatMessage {
51
+ id: string;
52
+ threadId?: string;
53
+ role: Role;
54
+ content: MessagePart[];
55
+ createdAt: string;
56
+ artifacts?: MessageArtifact[];
57
+ artifactPreviews?: Record<string, ArtifactPreview>;
58
+ edited?: boolean;
59
+ checkpointId?: string | null;
60
+ checkpointNs?: string | null;
61
+ branchLabel?: string;
62
+ toolCalls?: Array<{
63
+ id: string;
64
+ name: string;
65
+ args: Record<string, unknown>;
66
+ }>;
67
+ artifact?: MessageArtifact;
68
+ name?: string;
69
+ model?: string;
70
+ additionalKwargs?: Record<string, unknown>;
71
+ responseMetadata?: Record<string, unknown>;
72
+ __syntheticStreaming?: boolean;
73
+ }
74
+ export interface DefaultMessage {
75
+ type?: "default_message";
76
+ id?: string;
77
+ threadId?: string;
78
+ role: Role;
79
+ content: string;
80
+ createdAt?: string;
81
+ }
82
+ export interface PregelTask {
83
+ [key: string]: unknown;
84
+ }
85
+ export type PendingInterrupt = {
86
+ id: string;
87
+ value: unknown;
88
+ } | null;
89
+ export interface StateSnapshot {
90
+ values: Record<string, unknown>;
91
+ next?: string[];
92
+ config?: Record<string, unknown>;
93
+ metadata?: {
94
+ source?: string;
95
+ step?: number;
96
+ writes?: Record<string, unknown>;
97
+ execution_time?: number;
98
+ };
99
+ tasks?: PregelTask[];
100
+ created_at?: string;
101
+ createdAt?: string;
102
+ parentConfig?: Record<string, unknown>;
103
+ parent_config?: Record<string, unknown>;
104
+ }
105
+ export interface HydratedCheckpointSnapshot {
106
+ checkpointId: string | null;
107
+ checkpointNs: string | null;
108
+ parentId: string | null;
109
+ createdAt: string;
110
+ messages: ChatMessage[];
111
+ nextCursor: string | null;
112
+ nextCursorNs: string | null;
113
+ interrupt: PendingInterrupt;
114
+ metadata: {
115
+ step: number;
116
+ source: string | null;
117
+ [key: string]: unknown;
118
+ };
119
+ config: Record<string, unknown> | null;
120
+ parentConfig: Record<string, unknown> | null;
121
+ next: string[] | null;
122
+ tasks: Record<string, unknown>[] | null;
123
+ }
124
+ export interface HistoryPayload {
125
+ version: string;
126
+ threadId: string;
127
+ checkpoints: StateSnapshot[];
128
+ }
129
+ export interface CheckpointList {
130
+ checkpoints: Array<{
131
+ checkpoint_id: string;
132
+ checkpoint_ns: string | null;
133
+ checkpoint_config: Record<string, unknown> | null;
134
+ }>;
135
+ }
136
+ export interface StatePayload {
137
+ [key: string]: unknown;
138
+ }
139
+ export interface Envelope<T = unknown> {
140
+ type?: string;
141
+ data?: T;
142
+ error?: string;
143
+ metadata?: Record<string, unknown>;
144
+ }
145
+ export interface ThreadSummary {
146
+ threadId: string;
147
+ title: string;
148
+ createdAt: string;
149
+ updatedAt: string;
150
+ messageCount: number;
151
+ lastMessage?: string | null;
152
+ created?: boolean | null;
153
+ ready?: boolean | null;
154
+ }
155
+ export interface SharedThreadSummary extends ThreadSummary {
156
+ sharedAt: string;
157
+ sharedBy?: string;
158
+ sharedByUserId?: string;
159
+ }
160
+ export interface ThreadShareResponse {
161
+ success: boolean;
162
+ threadId: string;
163
+ shareUrl?: string;
164
+ message?: string;
165
+ }
166
+ export interface ThreadShareTarget {
167
+ type: "email" | "link" | "user";
168
+ value: string;
169
+ id?: string;
170
+ label?: string;
171
+ secondaryLabel?: string;
172
+ sharedByUserId?: string;
173
+ }
174
+ export interface ThreadInfo extends ThreadSummary {
175
+ description?: string;
176
+ isArchived?: boolean;
177
+ tags?: string[];
178
+ }
179
+ export interface AgentSummary {
180
+ id: string;
181
+ name: string;
182
+ createdAt: string;
183
+ updatedAt: string;
184
+ }
185
+ export interface AgentDetail extends AgentSummary {
186
+ description?: string;
187
+ schema?: Record<string, unknown>;
188
+ uiDefaultMessage?: string;
189
+ [key: string]: unknown;
190
+ }
191
+ export interface AgentList {
192
+ items?: AgentDetail[];
193
+ [key: string]: unknown;
194
+ }
195
+ export interface AgentSchemaInfo {
196
+ schema?: Record<string, unknown>;
197
+ [key: string]: unknown;
198
+ }
199
+ export type TokenListener = (token: string | null) => void;
200
+ export interface ExcelUploadResponse {
201
+ [key: string]: unknown;
202
+ }
@@ -0,0 +1,22 @@
1
+ export type StreamCommand = {
2
+ kind: "resume";
3
+ value: unknown;
4
+ } | {
5
+ kind: "goto";
6
+ node: string;
7
+ value?: unknown;
8
+ };
9
+ import type { TimelineCheckpoint } from "@/features/checkpoint/types";
10
+ export interface ChatRequest {
11
+ threadId?: string | null;
12
+ payload?: Record<string, unknown>;
13
+ checkpointId?: string | null;
14
+ checkpointNs?: string | null;
15
+ nodeFilter?: string | string[] | null;
16
+ config?: Record<string, unknown>;
17
+ edit?: boolean;
18
+ branchLabel?: string;
19
+ active_agent?: string;
20
+ command?: StreamCommand | null;
21
+ timelineCheckpoints?: TimelineCheckpoint[];
22
+ }
@@ -2,7 +2,7 @@
2
2
  * Chat App - Complete chat application with sidebar layout
3
3
  * Combines all chat components into a ready-to-use chat interface
4
4
  */
5
- import { type ChatProvidersProps } from "@/features/core";
5
+ import { type ChatProvidersProps } from "@/features/streaming";
6
6
  export interface ChatAppProps extends Omit<ChatProvidersProps, 'children'> {
7
7
  layout?: 'sidebar' | 'fullscreen' | 'tabs';
8
8
  layoutSize?: 'phone' | 'tablet' | 'desktop' | 'half-screen';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Custom artifact renderer for research_task_info type
3
+ * Displays research task status with links and metadata
4
+ */
5
+ export interface ResearchTaskInfo {
6
+ type: "research_task_info";
7
+ task_id: string;
8
+ progress_url: string;
9
+ query?: string;
10
+ status?: "pending" | "processing" | "completed" | "failed";
11
+ createdAt?: string;
12
+ [key: string]: unknown;
13
+ }
14
+ export interface ResearchTaskArtifactProps {
15
+ artifact: ResearchTaskInfo;
16
+ }
17
+ /**
18
+ * Renders a research task artifact with status badge and action buttons
19
+ */
20
+ export declare function ResearchTaskArtifact({ artifact }: ResearchTaskArtifactProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
- export * from "./components/chat/ChatApp";
2
- export { ChatInput } from "./components/chat/ChatInput";
3
- export type { ChatInputProps } from "./components/chat/ChatInput";
4
- export { ChatInterface } from "./components/chat/ChatInterface";
5
- export type { ChatInterfaceProps } from "./components/chat/ChatInterface";
6
- export { MessageComponent } from "./components/chat/MessageComponent";
7
- export type { MessageComponentProps } from "./components/chat/MessageComponent";
8
- export { MessageList } from "./components/chat/MessageList";
9
- export type { MessageListProps } from "./components/chat/MessageList";
10
- export { MarkdownContent } from "./components/chat/MarkdownContent";
11
- export { FileViewerModal } from "./components/chat/FileViewerModal";
12
- export { ThreadManager } from "./components/chat/ThreadManager";
1
+ export * from "./components/ChatApp";
2
+ export { ChatInput } from "./components/ChatInput";
3
+ export type { ChatInputProps } from "./components/ChatInput";
4
+ export { ChatInterface } from "./components/ChatInterface";
5
+ export type { ChatInterfaceProps } from "./components/ChatInterface";
6
+ export { MessageComponent } from "./components/MessageComponent";
7
+ export type { MessageComponentProps } from "./components/MessageComponent";
8
+ export { MessageList } from "./components/MessageList";
9
+ export type { MessageListProps } from "./components/MessageList";
10
+ export { MarkdownContent } from "./components/MarkdownContent";
11
+ export { FileViewerModal } from "./components/FileViewerModal";
12
+ export { ThreadManager } from "./components/ThreadManager";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,2 @@
1
1
  export { StreamingProvider } from "./StreamingProvider";
2
2
  export { useStream, useThreads, useThreadState, useHasChatSession } from "./StreamingProvider";
3
- export { useChatStreamingService } from "./services/use-streaming-service";
@@ -0,0 +1,57 @@
1
+ import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, SharedThreadSummary, ThreadSummary } from "@/types";
2
+ import type { CheckpointIndex } from "@/features/checkpoint/utils/checkpointIndex";
3
+ import type { TimelineCheckpoint } from "@/features/checkpoint/types";
4
+ import type { StreamContextValue, ThreadStateMetadata } from "@/features/core/types";
5
+ export interface ThreadsContextValue {
6
+ threads: ThreadSummary[];
7
+ currentThreadId: string | null;
8
+ setCurrentThreadId: (id: string | null) => void;
9
+ isLoading: boolean;
10
+ error: string | null;
11
+ sharedThreads: SharedThreadSummary[];
12
+ isLoadingSharedThreads: boolean;
13
+ actions: {
14
+ createThread: (title?: string) => Promise<string | null>;
15
+ deleteThread: (threadId: string) => Promise<void>;
16
+ renameThread: (threadId: string, title: string) => Promise<void>;
17
+ refreshThreads: () => Promise<void>;
18
+ refreshSharedThreads: () => Promise<void>;
19
+ shareThread: (threadId: string, sharedWithUserId: string) => Promise<void>;
20
+ unshareThread: (threadId: string, shareId: string) => Promise<void>;
21
+ };
22
+ shareInFlight: boolean;
23
+ shareStatus: string | null;
24
+ clearShareStatus: () => void;
25
+ }
26
+ export interface ThreadStateContextValue {
27
+ threadId: string | null;
28
+ messages: ChatMessage[];
29
+ interrupt: PendingInterrupt;
30
+ checkpoint: {
31
+ id: string | null;
32
+ namespace: string | null;
33
+ };
34
+ checkpoints: HydratedCheckpointSnapshot[];
35
+ checkpointIndex: CheckpointIndex;
36
+ timelineCheckpoints: TimelineCheckpoint[];
37
+ metadata: ThreadStateMetadata | null;
38
+ isLoading: boolean;
39
+ isHistoryLoading: boolean;
40
+ isLoadingCheckpoint: boolean;
41
+ error: string | null;
42
+ hasMore: boolean;
43
+ loadOlder: () => Promise<void>;
44
+ clearState: () => void;
45
+ navigateToCheckpoint: (checkpointId: string, checkpointNs?: string | null) => Promise<void>;
46
+ setCurrentCheckpointId: (checkpointId: string | null, checkpointNs?: string | null) => void;
47
+ returnToLatest: () => Promise<void>;
48
+ loadThread: (threadId: string, checkpointId?: string, options?: {
49
+ clearProgress?: boolean;
50
+ }) => Promise<void>;
51
+ clearThread: () => Promise<void>;
52
+ respondToInterrupt: (interruptId: string, approved: boolean, value?: unknown) => Promise<void>;
53
+ messagePreviews: Map<string, string>;
54
+ }
55
+ export declare const ThreadContext: import("react").Context<ThreadsContextValue | null>;
56
+ export declare const ThreadStateContext: import("react").Context<ThreadStateContextValue | null>;
57
+ export declare const StreamContext: import("react").Context<StreamContextValue | null>;
@@ -1,3 +1,4 @@
1
1
  export * from "./utils";
2
2
  export * from "./contexts";
3
- export { useStream } from "./hooks/use-stream";
3
+ export { useStream as useStreamingHook, type UseStreamApi, type UseChatStreamOptions } from "./hooks/use-stream";
4
+ export { ChatProviders, type ChatProvidersProps } from "../core/contexts/providers/ChatProviders";
@@ -0,0 +1 @@
1
+ export declare const MAX_BUFFERED_EVENTS = 200;
@@ -1,12 +1,4 @@
1
1
  import type { MessagePart, HistoryPayload } from "@/types";
2
- export type StreamCommand = {
3
- kind: "resume";
4
- value: unknown;
5
- } | {
6
- kind: "goto";
7
- node: string;
8
- value?: unknown;
9
- };
10
2
  type ToolEventIdentity = {
11
3
  id: string;
12
4
  call_id?: string;
@@ -2,7 +2,7 @@ import type { ChatApi } from "@/features/core";
2
2
  import type { StateHistoryEvent } from "@/features/streaming";
3
3
  import type { ChatMessage, HydratedCheckpointSnapshot } from "@/types";
4
4
  import type { TimelineCheckpoint } from "@/features/checkpoint/types";
5
- import type { PendingInterrupt } from "@/types/models";
5
+ import type { PendingInterrupt } from "@/features/core/types";
6
6
  import type { CheckpointIndex } from "@/features/checkpoint/utils/checkpointIndex";
7
7
  interface UseThreadHistoryStateOptions {
8
8
  api: ChatApi;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
+ declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
+ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertDialogHeader: {
9
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ declare const AlertDialogFooter: {
13
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
20
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,3 @@
1
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
+ declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export { AspectRatio };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
3
+ separator?: React.ReactNode;
4
+ } & React.RefAttributes<HTMLElement>>;
5
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
7
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
8
+ asChild?: boolean;
9
+ } & React.RefAttributes<HTMLAnchorElement>>;
10
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
11
+ declare const BreadcrumbSeparator: {
12
+ ({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const BreadcrumbEllipsis: {
16
+ ({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { DayPicker } from "react-day-picker";
3
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
4
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
5
+ declare namespace Calendar {
6
+ var displayName: string;
7
+ }
8
+ export { Calendar };
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
3
+ type CarouselApi = UseEmblaCarouselType[1];
4
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
5
+ type CarouselOptions = UseCarouselParameters[0];
6
+ type CarouselPlugin = UseCarouselParameters[1];
7
+ type CarouselProps = {
8
+ opts?: CarouselOptions;
9
+ plugins?: CarouselPlugin;
10
+ orientation?: "horizontal" | "vertical";
11
+ setApi?: (api: CarouselApi) => void;
12
+ };
13
+ declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
14
+ declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
+ declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
+ export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };