teodor-new-chat-ui 4.3.414 → 4.3.416

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.
@@ -1,2 +1 @@
1
- export * from "./useMessageMetadata";
2
1
  export * from "./useCheckpointIndex";
@@ -9,29 +9,18 @@ export type EditMeta = {
9
9
  };
10
10
  export type CheckpointMeta = {
11
11
  id: string;
12
+ userMessageId: string | null;
13
+ attemptCount?: number;
14
+ isLatestAttempt?: boolean;
15
+ attemptIndex?: number;
12
16
  step: number | null;
13
17
  source: string | null;
14
18
  createdAt: string | null;
15
19
  namespace: string | null;
16
20
  parentId: string | null;
17
- attemptIndex?: number;
18
- attemptCount?: number;
19
- isLatestAttempt?: boolean;
20
- baseUserMessageId?: string | null;
21
- messageId?: string | null;
22
21
  next?: string | null;
23
22
  parentConfig?: Record<string, unknown> | null;
24
23
  };
25
- export type ResolvedMessageMetadata = {
26
- checkpointCandidates: CheckpointMeta[];
27
- defaultCheckpointId: string | null;
28
- };
29
- export type CheckpointAttemptInfo = {
30
- checkpointId: string;
31
- attemptIndex: number;
32
- attemptCount: number;
33
- isLatestAttempt: boolean;
34
- };
35
24
  export type TimelineCheckpoint = {
36
25
  id: string;
37
26
  messageId: string | null;
@@ -1,13 +1,17 @@
1
1
  import type { HydratedCheckpointSnapshot } from "@/types";
2
- import type { CheckpointAttemptInfo, CheckpointMeta, TimelineCheckpoint } from "../types";
2
+ import type { CheckpointMeta, TimelineCheckpoint } from "../types";
3
3
  export interface CheckpointIndex {
4
4
  checkpoints: HydratedCheckpointSnapshot[];
5
5
  checkpointMetaByCheckpointId: Map<string, CheckpointMeta>;
6
- userMessageIdToAttempts: Map<string, CheckpointAttemptInfo[]>;
7
6
  timeline: TimelineCheckpoint[];
8
7
  messagePreviews: Map<string, string>;
9
8
  getLatest: () => CheckpointMeta | undefined;
10
9
  getCheckpoint: (id: string) => CheckpointMeta | undefined;
11
- getAttempts: (userMessageId: string) => CheckpointAttemptInfo[];
10
+ getMessageAttempts: (userMessageId: string) => CheckpointMeta[];
12
11
  }
13
12
  export declare function buildCheckpointIndex(checkpoints: HydratedCheckpointSnapshot[]): CheckpointIndex;
13
+ export declare function getMessageAttemptInfo(checkpointId: string | null | undefined, index: CheckpointIndex): {
14
+ attemptCount: number;
15
+ attemptIndex: number;
16
+ };
17
+ export declare function getCheckpointForMessage(checkpointId: string | null | undefined, index: CheckpointIndex): CheckpointMeta | null;
@@ -1,7 +1,5 @@
1
1
  export * from "./checkpointIndex";
2
- export * from "./attemptDetection";
3
2
  export * from "./historyUtils";
4
- export * from "./messageMetadataResolver";
5
3
  export * from "./messagePreviews";
6
4
  export * from "./schemaUtils";
7
5
  export * from "../types";
@@ -2,7 +2,7 @@
2
2
  * Message Component - With truncatable tool messages and responsive design
3
3
  */
4
4
  import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
5
- import type { CheckpointMeta, EditMeta } from "@/features/checkpoint/types";
5
+ import type { EditMeta } from "@/features/checkpoint/types";
6
6
  export interface MessageComponentProps {
7
7
  message: ChatMessage | DefaultMessage;
8
8
  messageIndex: number;
@@ -31,11 +31,9 @@ export interface MessageComponentProps {
31
31
  disableInterruptActions?: boolean;
32
32
  onInterruptActionStart?: () => void;
33
33
  onInterruptActionEnd?: () => void;
34
- checkpointCandidates?: CheckpointMeta[];
35
- activeCheckpointId?: string | null;
36
- onSelectCheckpoint?: (checkpointId: string | null, parentCheckpointId?: string | null, isLatest?: boolean) => Promise<void> | void;
37
- defaultCheckpointId?: string | null;
38
- messageParentCheckpointId?: string | null;
34
+ attemptCount?: number;
35
+ attemptIndex?: number;
36
+ onSelectCheckpoint?: (checkpointId: string | null) => Promise<void> | void;
39
37
  }
40
38
  export declare const MessageComponent: import("react").NamedExoticComponent<MessageComponentProps>;
41
39
  export default MessageComponent;
@@ -1,6 +1,6 @@
1
1
  import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
2
2
  import type { EditMeta } from "@/features/checkpoint/types";
3
- import type { CheckpointIndex } from "@/features/checkpoint/utils/checkpointIndex";
3
+ import { type CheckpointIndex } from "@/features/checkpoint/utils/checkpointIndex";
4
4
  import React from "react";
5
5
  export declare const getMessageDomKey: (message: ChatMessage | DefaultMessage | undefined, index: number) => string;
6
6
  export interface MessageRowProps {
@@ -1,6 +1,6 @@
1
1
  import * as ResizablePrimitive from "react-resizable-panels";
2
2
  declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
3
- declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLSpanElement | HTMLParagraphElement | HTMLAnchorElement | HTMLObjectElement | HTMLDataElement | HTMLSourceElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLTitleElement | HTMLHeadElement | HTMLBodyElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
3
+ declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLSpanElement | HTMLParagraphElement | HTMLAnchorElement | HTMLObjectElement | HTMLDataElement | HTMLSourceElement | HTMLLinkElement | HTMLMapElement | HTMLTitleElement | HTMLHeadElement | HTMLBodyElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
4
4
  className?: string | undefined;
5
5
  collapsedSize?: number | undefined;
6
6
  collapsible?: boolean | undefined;