teodor-new-chat-ui 4.3.396 → 4.3.397

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.
@@ -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, CheckpointMetaWithAttempts, EditMeta } from "@/hooks/useCheckpointSelectors";
5
+ import type { CheckpointMeta, CheckpointMetaWithAttempts, EditMeta } from "@/hooks/checkpoints";
6
6
  export interface MessageComponentProps {
7
7
  message: ChatMessage | DefaultMessage;
8
8
  messageIndex: number;
@@ -1,5 +1,5 @@
1
1
  import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
2
- import type { CheckpointMeta, CheckpointMetaWithAttempts, EditMeta, TimelineCheckpoint } from "@/hooks/useCheckpointSelectors";
2
+ import type { CheckpointMeta, CheckpointMetaWithAttempts, EditMeta, TimelineCheckpoint } from "@/hooks/checkpoints";
3
3
  import React from "react";
4
4
  export interface MessageListProps {
5
5
  messages: (ChatMessage | DefaultMessage)[];
@@ -1,5 +1,5 @@
1
1
  import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
2
- import type { CheckpointMeta, CheckpointMetaWithAttempts, EditMeta } from "@/hooks/useCheckpointSelectors";
2
+ import type { CheckpointMeta, CheckpointMetaWithAttempts, EditMeta } from "@/hooks/checkpoints";
3
3
  import React from "react";
4
4
  export declare const getMessageDomKey: (message: ChatMessage | DefaultMessage | undefined, index: number) => string;
5
5
  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<HTMLButtonElement | HTMLElement | HTMLTextAreaElement | HTMLFormElement | HTMLDivElement | HTMLParagraphElement | HTMLObjectElement | HTMLSourceElement | HTMLMapElement | HTMLDataElement | HTMLHeadElement | HTMLLinkElement | HTMLBodyElement | HTMLInputElement | HTMLTitleElement | HTMLImageElement | HTMLLabelElement | HTMLOutputElement | HTMLSlotElement | HTMLStyleElement | HTMLDialogElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLLIElement | HTMLOListElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLMenuElement | HTMLTableCaptionElement | HTMLPictureElement>, "id" | "onResize"> & {
3
+ declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLTextAreaElement | HTMLFormElement | HTMLDivElement | HTMLParagraphElement | HTMLObjectElement | HTMLSourceElement | HTMLMapElement | HTMLDataElement | HTMLHeadElement | HTMLLinkElement | HTMLBodyElement | HTMLInputElement | HTMLMetaElement | HTMLTitleElement | HTMLImageElement | HTMLLabelElement | HTMLOutputElement | HTMLSlotElement | HTMLStyleElement | HTMLDialogElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLLIElement | HTMLOListElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMeterElement | HTMLOptGroupElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLMenuElement | HTMLTableCaptionElement | HTMLPictureElement>, "id" | "onResize"> & {
4
4
  className?: string | undefined;
5
5
  collapsedSize?: number | undefined;
6
6
  collapsible?: boolean | undefined;
@@ -32,7 +32,7 @@
32
32
  * RESULT: Much easier to debug, faster development, no stale cache issues
33
33
  */
34
34
  import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, SharedThreadSummary, StreamContextValue, ThreadSummary } from '@/types';
35
- import type { TimelineCheckpoint } from "@/hooks/useCheckpointSelectors";
35
+ import type { TimelineCheckpoint } from "@/hooks/checkpoints";
36
36
  import type { ThreadStateMetadata } from '@/types/context';
37
37
  import type { ToolEndEvent } from '@/types/events';
38
38
  import { type ReactNode } from 'react';
@@ -0,0 +1,4 @@
1
+ export * from "./types";
2
+ export * from "./useCheckpointSelectors";
3
+ export * from "./useCheckpointMetadata";
4
+ export * from "./useMessageMetadata";
@@ -0,0 +1,14 @@
1
+ export type CheckpointMeta = {
2
+ id: string;
3
+ step: number | null;
4
+ source: string | null;
5
+ createdAt: string | null;
6
+ namespace: string | null;
7
+ parentId: string | null;
8
+ };
9
+ export type CheckpointMetaWithAttempts = CheckpointMeta & {
10
+ attemptIndex: number;
11
+ attemptCount: number;
12
+ isLatestAttempt: boolean;
13
+ baseUserMessageId: string | null;
14
+ };
@@ -12,7 +12,7 @@
12
12
  * resulting in cleaner separation of concerns.
13
13
  */
14
14
  import type { HydratedCheckpointSnapshot } from "@/types";
15
- import type { CheckpointMeta, CheckpointMetaWithAttempts } from "@/hooks/useCheckpointSelectors";
15
+ import type { CheckpointMeta, CheckpointMetaWithAttempts } from "@/hooks/checkpoints/types";
16
16
  export interface CheckpointMetadataResult {
17
17
  checkpointMetaById: Map<string, CheckpointMeta>;
18
18
  checkpointIndexByKey: Map<string, CheckpointMeta[]>;
@@ -1,4 +1,5 @@
1
1
  import type { HydratedCheckpointSnapshot, PendingInterrupt as Interrupt } from "@/types";
2
+ import type { CheckpointMeta, CheckpointMetaWithAttempts } from "@/hooks/checkpoints/types";
2
3
  export type EditMeta = {
3
4
  checkpointId?: string | null;
4
5
  checkpointNs?: string | null;
@@ -13,22 +14,9 @@ export type TimelineCheckpoint = {
13
14
  next?: string | null;
14
15
  parentConfig?: Record<string, unknown> | null;
15
16
  };
17
+ export declare function findLatestUserMessageInCheckpoint(checkpoint: HydratedCheckpointSnapshot): string | null;
16
18
  export declare function useCheckpointTimeline(checkpoints: HydratedCheckpointSnapshot[]): TimelineCheckpoint[];
17
- export type CheckpointMeta = {
18
- id: string;
19
- step: number | null;
20
- source: string | null;
21
- createdAt: string | null;
22
- namespace: string | null;
23
- parentId: string | null;
24
- };
25
19
  export declare function useCheckpointMeta(checkpoints: HydratedCheckpointSnapshot[]): CheckpointMeta[];
26
- export type CheckpointMetaWithAttempts = CheckpointMeta & {
27
- attemptIndex: number;
28
- attemptCount: number;
29
- isLatestAttempt: boolean;
30
- baseUserMessageId: string | null;
31
- };
32
20
  export declare function useCheckpointAttempts(checkpoints: HydratedCheckpointSnapshot[]): CheckpointMetaWithAttempts[];
33
21
  export declare function isExecutionPaused(snapshot: HydratedCheckpointSnapshot): boolean;
34
22
  export declare function getCurrentInterrupt(snapshot: HydratedCheckpointSnapshot): Interrupt | null;
@@ -10,7 +10,7 @@
10
10
  * that was previously embedded in MessageList.tsx's render function.
11
11
  */
12
12
  import type { ChatMessage, DefaultMessage } from "@/types";
13
- import type { CheckpointMeta, CheckpointMetaWithAttempts } from "@/hooks/useCheckpointSelectors";
13
+ import type { CheckpointMeta, CheckpointMetaWithAttempts } from "@/hooks/checkpoints/types";
14
14
  export interface MetadataResolverMaps {
15
15
  checkpointMetaById?: Map<string, CheckpointMeta>;
16
16
  checkpointIndexByKey?: Map<string, CheckpointMeta[]>;
@@ -1,7 +1,7 @@
1
1
  import type { ChatApi } from "@/api/chat-api";
2
2
  import type { StateHistoryEvent } from "@/context/services/streaming/use-streaming-service";
3
3
  import type { ChatMessage, HydratedCheckpointSnapshot } from "@/types";
4
- import type { TimelineCheckpoint } from "@/hooks/useCheckpointSelectors";
4
+ import type { TimelineCheckpoint } from "@/hooks/checkpoints";
5
5
  import type { PendingInterrupt } from "@/types/models";
6
6
  interface UseThreadHistoryStateOptions {
7
7
  api: ChatApi;