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.
- package/dist/features/checkpoint/utils/attemptDetection.d.ts +1 -1
- package/dist/features/checkpoint/utils/messagePreviews.d.ts +1 -7
- package/dist/features/core/contexts/index.d.ts +1 -3
- package/dist/features/core/contexts/providers/ApiProvider.d.ts +1 -1
- package/dist/features/core/contexts/{ChatProviders.d.ts → providers/ChatProviders.d.ts} +3 -3
- package/dist/features/core/contexts/providers/index.d.ts +1 -0
- package/dist/features/core/hooks/index.d.ts +1 -2
- package/dist/features/core/hooks/useApi.d.ts +1 -0
- package/dist/features/core/types/context.d.ts +2 -1
- package/dist/features/core/types/index.d.ts +3 -2
- package/dist/features/core/types/models.d.ts +202 -0
- package/dist/features/core/types/requests.d.ts +22 -0
- package/dist/features/messaging/components/{chat/ChatApp.d.ts → ChatApp.d.ts} +1 -1
- package/dist/features/messaging/components/message/artifacts/ResearchTaskArtifact.d.ts +20 -0
- package/dist/features/messaging/index.d.ts +12 -12
- package/dist/features/messaging/utils/markdown.worker.d.ts +1 -0
- package/dist/features/streaming/contexts/index.d.ts +0 -1
- package/dist/features/streaming/contexts/types.d.ts +57 -0
- package/dist/features/streaming/index.d.ts +2 -1
- package/dist/features/streaming/utils/constants.d.ts +1 -0
- package/dist/features/streaming/utils/types.d.ts +0 -8
- package/dist/features/thread/hooks/useThreadHistoryState.d.ts +1 -1
- package/dist/features/ui/components/ui/accordion.d.ts +7 -0
- package/dist/features/ui/components/ui/alert-dialog.d.ts +20 -0
- package/dist/features/ui/components/ui/alert.d.ts +8 -0
- package/dist/features/ui/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/features/ui/components/ui/avatar.d.ts +6 -0
- package/dist/features/ui/components/ui/breadcrumb.d.ts +19 -0
- package/dist/features/ui/components/ui/calendar.d.ts +8 -0
- package/dist/features/ui/components/ui/carousel.d.ts +18 -0
- package/dist/features/ui/components/ui/chart.d.ts +62 -0
- package/dist/features/ui/components/ui/checkbox.d.ts +4 -0
- package/dist/features/ui/components/ui/collapsible.d.ts +5 -0
- package/dist/features/ui/components/ui/context-menu.d.ts +27 -0
- package/dist/features/ui/components/ui/drawer.d.ts +22 -0
- package/dist/features/ui/components/ui/form.d.ts +23 -0
- package/dist/features/ui/components/ui/hover-card.d.ts +6 -0
- package/dist/features/ui/components/ui/input-otp.d.ts +34 -0
- package/dist/features/ui/components/ui/menubar.d.ts +28 -0
- package/dist/features/ui/components/ui/navigation-menu.d.ts +12 -0
- package/dist/features/ui/components/ui/pagination.d.ts +28 -0
- package/dist/features/ui/components/ui/popover.d.ts +6 -0
- package/dist/features/ui/components/ui/progress.d.ts +4 -0
- package/dist/features/ui/components/ui/radio-group.d.ts +5 -0
- package/dist/features/ui/components/ui/resizable.d.ts +23 -0
- package/dist/features/ui/components/ui/sidebar.d.ts +66 -0
- package/dist/features/ui/components/ui/skeleton.d.ts +2 -0
- package/dist/features/ui/components/ui/slider.d.ts +4 -0
- package/dist/features/ui/components/ui/table.d.ts +10 -0
- package/dist/features/ui/components/ui/tabs.d.ts +7 -0
- package/dist/features/ui/components/ui/toggle-group.d.ts +12 -0
- package/dist/features/ui/components/ui/toggle.d.ts +12 -0
- package/dist/features/ui/components/ui/use-toast.d.ts +2 -0
- package/dist/features/ui/hooks/index.d.ts +2 -0
- package/dist/features/ui/hooks/use-mobile.d.ts +1 -0
- package/dist/features/ui/hooks/use-toast.d.ts +1 -1
- package/dist/index.esm.js +5868 -6108
- package/dist/index.umd.js +42 -42
- package/dist/lib/index.d.ts +2 -2
- package/dist/types/models.d.ts +1 -202
- package/dist/types/requests.d.ts +1 -15
- package/package.json +1 -1
- package/dist/features/core/contexts/providers/ChatSessionProvider.d.ts +0 -1
- package/dist/features/streaming/contexts/services/use-streaming-service.d.ts +0 -61
- package/dist/types/marked.d.ts +0 -11
- /package/dist/features/messaging/components/{chat/ChatInput.d.ts → ChatInput.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/ChatInterface.d.ts → ChatInterface.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/FileViewerModal.d.ts → FileViewerModal.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/MarkdownContent.d.ts → MarkdownContent.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/MessageComponent.d.ts → MessageComponent.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/MessageList.d.ts → MessageList.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/MessageRow.d.ts → MessageRow.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/ThreadManager.d.ts → ThreadManager.d.ts} +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/ArtifactRenderer.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/InterruptPartRenderer.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message/artifacts → message}/ResearchTaskArtifact.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/SimpleJsonView.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/StreamProgress.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/ToolComponent.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/UserTextContent.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/artifacts/PlotArtifact.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/index.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/message → message}/useFilePreview.d.ts +0 -0
- /package/dist/features/messaging/components/{chat/threads → threads}/ThreadListItem.d.ts +0 -0
package/dist/lib/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export { useStream as useStreamingHook } from "../features/streaming";
|
|
|
7
7
|
export * from "../features/thread";
|
|
8
8
|
export * from "../features/ui";
|
|
9
9
|
export * from "../features/core";
|
|
10
|
-
export type { ChatMessage, ChatRequest,
|
|
11
|
-
export { ChatApp as default } from "../features/messaging/components/
|
|
10
|
+
export type { ChatMessage, ChatRequest, HistoryPayload, HydratedCheckpointSnapshot, MessagePart, PregelTask, Role, StateSnapshot, StreamEvent, TextPart, ThreadInfo, ThreadShareTarget, ThreadSummary, ToolEndEvent } from '@/types';
|
|
11
|
+
export { ChatApp as default } from "../features/messaging/components/ChatApp";
|
package/dist/types/models.d.ts
CHANGED
|
@@ -1,202 +1 @@
|
|
|
1
|
-
export
|
|
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
|
-
}
|
|
1
|
+
export * from "@/features/core/types/models";
|
package/dist/types/requests.d.ts
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { TimelineCheckpoint } from "@/features/checkpoint/types";
|
|
3
|
-
export interface ChatRequest {
|
|
4
|
-
threadId?: string | null;
|
|
5
|
-
payload?: Record<string, unknown>;
|
|
6
|
-
checkpointId?: string | null;
|
|
7
|
-
checkpointNs?: string | null;
|
|
8
|
-
nodeFilter?: string | string[] | null;
|
|
9
|
-
config?: Record<string, unknown>;
|
|
10
|
-
edit?: boolean;
|
|
11
|
-
branchLabel?: string;
|
|
12
|
-
active_agent?: string;
|
|
13
|
-
command?: StreamCommand | null;
|
|
14
|
-
timelineCheckpoints?: TimelineCheckpoint[];
|
|
15
|
-
}
|
|
1
|
+
export * from "@/features/core/types/requests";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { StreamingProvider as ChatSessionProvider, useStream, useThreads, useThreadState, useHasChatSession, } from "@/features/streaming/contexts";
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { ChatRequest, HistoryPayload } from '@/types';
|
|
2
|
-
import { type HeartbeatEvent, type StateHistoryEvent, type StreamEvent, type ThreadInfoEvent } from "@/features/streaming";
|
|
3
|
-
export interface StreamClosedInfo {
|
|
4
|
-
reason: 'complete' | 'aborted' | 'error';
|
|
5
|
-
lastSeq: number;
|
|
6
|
-
lastCheckpointId: string | null;
|
|
7
|
-
lastCheckpointNs: string | null;
|
|
8
|
-
lastStateHistory: HistoryPayload | null;
|
|
9
|
-
threadId: string | null;
|
|
10
|
-
threadInfo: ThreadInfoEvent | null;
|
|
11
|
-
manualStop: boolean;
|
|
12
|
-
error?: string | null;
|
|
13
|
-
}
|
|
14
|
-
interface UseChatStreamingServiceOptions {
|
|
15
|
-
baseUrl: string;
|
|
16
|
-
onThreadInfo: (event: ThreadInfoEvent) => void;
|
|
17
|
-
onMessageEvent: (event: StreamEvent) => void;
|
|
18
|
-
onStateHistory?: (event: StateHistoryEvent) => void;
|
|
19
|
-
onUnhandledEvent?: (event: StreamEvent) => void;
|
|
20
|
-
onToolEvent?: (event: Extract<StreamEvent, {
|
|
21
|
-
type: 'tool.start' | 'tool.end';
|
|
22
|
-
}>) => void;
|
|
23
|
-
onSequenceGap?: (gap: {
|
|
24
|
-
from: number;
|
|
25
|
-
to: number;
|
|
26
|
-
}) => void;
|
|
27
|
-
onStreamClosed?: (info: StreamClosedInfo) => void;
|
|
28
|
-
onConnectionError?: (error: string) => void;
|
|
29
|
-
onAuthError?: (error: string) => void;
|
|
30
|
-
onHeartbeat?: (event: HeartbeatEvent) => void;
|
|
31
|
-
}
|
|
32
|
-
interface StartStreamCallbacks {
|
|
33
|
-
onOpen?: (info: {
|
|
34
|
-
threadId: string | null;
|
|
35
|
-
created: boolean;
|
|
36
|
-
}) => void;
|
|
37
|
-
onError?: (error: unknown) => void;
|
|
38
|
-
onGap?: (gap: {
|
|
39
|
-
from: number;
|
|
40
|
-
to: number;
|
|
41
|
-
}) => void;
|
|
42
|
-
onClosed?: (info: StreamClosedInfo) => void;
|
|
43
|
-
onConnectionError?: (error: string) => void;
|
|
44
|
-
onAuthError?: (error: string) => void;
|
|
45
|
-
onHeartbeat?: (event: HeartbeatEvent) => void;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Thin integration layer that adapts the public `useStream` hook to the
|
|
49
|
-
* coordination callbacks expected by `StreamingProvider`. Keeping this logic
|
|
50
|
-
* here means we continue to rely on the well-tested streaming hook for all SSE
|
|
51
|
-
* behaviour while the provider focuses purely on state updates.
|
|
52
|
-
*/
|
|
53
|
-
export declare function useChatStreamingService({ baseUrl, onThreadInfo, onMessageEvent, onStateHistory, onUnhandledEvent, onSequenceGap, onStreamClosed, onConnectionError, onAuthError, onHeartbeat, onToolEvent, }: UseChatStreamingServiceOptions): {
|
|
54
|
-
startStream: (request: ChatRequest, callbacks?: StartStreamCallbacks) => void;
|
|
55
|
-
stop: () => void;
|
|
56
|
-
isStreaming: boolean;
|
|
57
|
-
error: string | null;
|
|
58
|
-
setAuthToken: (t: string | null) => void;
|
|
59
|
-
replayBufferedEvents: (threadId?: string | null) => void;
|
|
60
|
-
};
|
|
61
|
-
export {};
|
package/dist/types/marked.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare module 'marked' {
|
|
2
|
-
type MarkedFn = ((src: string) => string) & {
|
|
3
|
-
parse?: (src: string) => string;
|
|
4
|
-
};
|
|
5
|
-
export const marked: MarkedFn;
|
|
6
|
-
export const parse: (src: string) => string;
|
|
7
|
-
const markedDefault: MarkedFn & {
|
|
8
|
-
parse: (src: string) => string;
|
|
9
|
-
};
|
|
10
|
-
export default markedDefault;
|
|
11
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/dist/features/messaging/components/{chat/FileViewerModal.d.ts → FileViewerModal.d.ts}
RENAMED
|
File without changes
|
/package/dist/features/messaging/components/{chat/MarkdownContent.d.ts → MarkdownContent.d.ts}
RENAMED
|
File without changes
|
/package/dist/features/messaging/components/{chat/MessageComponent.d.ts → MessageComponent.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/features/messaging/components/{chat/message → message}/InterruptPartRenderer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/features/messaging/components/{chat/message → message}/artifacts/PlotArtifact.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|