teodor-new-chat-ui 4.3.255 → 4.3.257
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/components/chat/MessageList.d.ts +3 -23
- package/dist/components/chat/checkpoint/dropdown.d.ts +13 -0
- package/dist/context/providers/ChatSessionProvider.d.ts +2 -1
- package/dist/index.esm.js +5186 -5245
- package/dist/index.umd.js +43 -43
- package/dist/lib/historyUtils.d.ts +2 -1
- package/dist/types/api.d.ts +10 -0
- package/dist/types/timeline.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types/api";
|
|
2
|
+
import type { CheckpointMeta, EditMeta, TimelineCheckpoint } from "@/types/timeline";
|
|
2
3
|
import React from "react";
|
|
3
|
-
type EditMeta = {
|
|
4
|
-
checkpointId?: string | null;
|
|
5
|
-
checkpointNs?: string | null;
|
|
6
|
-
};
|
|
7
|
-
export type TimelineCheckpoint = {
|
|
8
|
-
id: string;
|
|
9
|
-
label: string;
|
|
10
|
-
messageId: string | null;
|
|
11
|
-
step: number | null;
|
|
12
|
-
source: string | null;
|
|
13
|
-
createdAt: string | null;
|
|
14
|
-
next?: string | null;
|
|
15
|
-
};
|
|
16
4
|
export interface MessageListProps {
|
|
17
5
|
messages: (ChatMessage | DefaultMessage)[];
|
|
18
6
|
isStreaming: boolean;
|
|
@@ -45,8 +33,8 @@ export interface MessageListProps {
|
|
|
45
33
|
/** Notify parent when an interrupt action completes */
|
|
46
34
|
onInterruptActionEnd?: () => void;
|
|
47
35
|
showToolMessages?: boolean;
|
|
48
|
-
checkpointMetaById?: Map<string,
|
|
49
|
-
checkpointIndexByKey?: Map<string,
|
|
36
|
+
checkpointMetaById?: Map<string, CheckpointMeta>;
|
|
37
|
+
checkpointIndexByKey?: Map<string, CheckpointMeta[]>;
|
|
50
38
|
activeCheckpointId?: string | null;
|
|
51
39
|
onSelectCheckpoint?: (checkpointId: string | null) => Promise<void> | void;
|
|
52
40
|
timelineCheckpoints?: TimelineCheckpoint[];
|
|
@@ -57,13 +45,5 @@ export interface MessageListHandle {
|
|
|
57
45
|
scrollToLatest: () => void;
|
|
58
46
|
scrollToTop: () => void;
|
|
59
47
|
}
|
|
60
|
-
export type MessageCheckpointMeta = {
|
|
61
|
-
id: string;
|
|
62
|
-
step: number | null;
|
|
63
|
-
source: string | null;
|
|
64
|
-
createdAt: string | null;
|
|
65
|
-
namespace: string | null;
|
|
66
|
-
parentId: string | null;
|
|
67
|
-
};
|
|
68
48
|
export declare const MessageList: React.ForwardRefExoticComponent<MessageListProps & React.RefAttributes<MessageListHandle>>;
|
|
69
49
|
export default MessageList;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CheckpointMeta } from "@/types/timeline";
|
|
2
|
+
type CheckpointOption = {
|
|
3
|
+
checkpointId: string | null;
|
|
4
|
+
};
|
|
5
|
+
type CheckpointDropdownProps = {
|
|
6
|
+
currentThreadId: string | null;
|
|
7
|
+
checkpointOptionsSorted: CheckpointOption[];
|
|
8
|
+
checkpointMetaById: Map<string, CheckpointMeta>;
|
|
9
|
+
lastCheckpointId: string | null;
|
|
10
|
+
goToCheckpoint: (checkpointId: string | null) => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
export default function CheckpointDropdown({ currentThreadId, checkpointOptionsSorted, checkpointMetaById, lastCheckpointId, goToCheckpoint, }: CheckpointDropdownProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*
|
|
28
28
|
* RESULT: Much easier to debug, faster development, no stale cache issues
|
|
29
29
|
*/
|
|
30
|
-
import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, StreamContextValue, ThreadSummary } from '@/types/api';
|
|
30
|
+
import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, StreamContextValue, ThreadSummary, TimelineCheckpoint } from '@/types/api';
|
|
31
31
|
import { type ReactNode } from 'react';
|
|
32
32
|
import { CheckpointMetadataCache } from '../hooks/useCheckpointMetadataCache';
|
|
33
33
|
interface ThreadsContextValue {
|
|
@@ -52,6 +52,7 @@ interface ThreadStateContextValue {
|
|
|
52
52
|
namespace: string | null;
|
|
53
53
|
};
|
|
54
54
|
checkpoints: HydratedCheckpointSnapshot[];
|
|
55
|
+
timelineCheckpoints: TimelineCheckpoint[];
|
|
55
56
|
metadata: any;
|
|
56
57
|
isLoading: boolean;
|
|
57
58
|
isHistoryLoading: boolean;
|