teodor-new-chat-ui 4.3.389 → 4.3.390

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,4 +1,4 @@
1
- import type { AgentDetail, AgentSchemaInfo, AgentSummary, CheckpointList, CheckpointSnapshot, HistoryPayload, SharedThreadSummary, ThreadInfo, ThreadShareResponse, ThreadSummary } from "@/types";
1
+ import type { AgentDetail, AgentSchemaInfo, AgentSummary, CheckpointSnapshot, HistoryPayload, SharedThreadSummary, ThreadInfo, ThreadShareResponse, ThreadSummary } from "@/types";
2
2
  import type { TokenListener } from "../types";
3
3
  import { getChatToken, onChatTokenChanged, setChatToken } from "./utils";
4
4
  export declare class ChatApi {
@@ -36,7 +36,6 @@ export declare class ChatApi {
36
36
  cancelRun(threadId: string): Promise<{
37
37
  status: string;
38
38
  }>;
39
- listCheckpointSummaries(threadId: string): Promise<CheckpointList["items"]>;
40
39
  unshareThread(threadId: string, shareId: string): Promise<{
41
40
  ok: boolean;
42
41
  shareId: string;
@@ -6,7 +6,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
6
6
  ref?: React.Ref<HTMLDivElement>;
7
7
  } & {
8
8
  asChild?: boolean;
9
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
9
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
10
10
  label?: string;
11
11
  shouldFilter?: boolean;
12
12
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -24,7 +24,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
24
24
  ref?: React.Ref<HTMLInputElement>;
25
25
  } & {
26
26
  asChild?: boolean;
27
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
27
+ }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
28
28
  value?: string;
29
29
  onValueChange?: (search: string) => void;
30
30
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -34,7 +34,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
34
34
  ref?: React.Ref<HTMLDivElement>;
35
35
  } & {
36
36
  asChild?: boolean;
37
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
37
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
38
38
  label?: string;
39
39
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
40
40
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
@@ -43,14 +43,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
43
43
  ref?: React.Ref<HTMLDivElement>;
44
44
  } & {
45
45
  asChild?: boolean;
46
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
47
47
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
48
48
  children?: React.ReactNode;
49
49
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
50
50
  ref?: React.Ref<HTMLDivElement>;
51
51
  } & {
52
52
  asChild?: boolean;
53
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
53
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
54
54
  heading?: React.ReactNode;
55
55
  value?: string;
56
56
  forceMount?: boolean;
@@ -59,7 +59,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
59
59
  ref?: React.Ref<HTMLDivElement>;
60
60
  } & {
61
61
  asChild?: boolean;
62
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
62
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
63
63
  alwaysRender?: boolean;
64
64
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
65
65
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
@@ -68,7 +68,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
68
68
  ref?: React.Ref<HTMLDivElement>;
69
69
  } & {
70
70
  asChild?: boolean;
71
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
71
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
72
72
  disabled?: boolean;
73
73
  onSelect?: (value: string) => void;
74
74
  value?: string;
@@ -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 | HTMLObjectElement | HTMLDataElement | HTMLHeadElement | HTMLLinkElement | HTMLBodyElement | HTMLMapElement | HTMLMetaElement | HTMLLabelElement | HTMLSourceElement | HTMLOutputElement | HTMLTitleElement | HTMLSlotElement | HTMLStyleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | 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"> & {
3
+ declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLTextAreaElement | HTMLFormElement | HTMLDivElement | HTMLObjectElement | HTMLDataElement | HTMLHeadElement | HTMLLinkElement | HTMLBodyElement | HTMLMapElement | HTMLLabelElement | HTMLSourceElement | HTMLTitleElement | HTMLSlotElement | HTMLStyleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | 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;
@@ -1,15 +1,10 @@
1
1
  import type { ChatMessage, PendingInterrupt, StreamEvent } from "@/types";
2
- import type { ToolStreamEntry } from "@/types/toolStream";
3
2
  export interface MessagesState {
4
3
  messages: ChatMessage[];
5
4
  assemblingId: string | null;
6
5
  lastCheckpointId: string | null;
7
6
  lastCheckpointNs: string | null;
8
- toolIndex: Record<string, string>;
9
- toolStreamingMessageId: string | null;
10
- toolStreamingStack: string[];
11
7
  pendingInterrupt: PendingInterrupt;
12
- toolTimelines: Record<string, ToolStreamEntry[]>;
13
8
  messagesStreamMeta?: Record<string, {
14
9
  lastSeq?: number | null;
15
10
  lastText?: string;
@@ -1,24 +1,8 @@
1
1
  import type { ChatMessage, MessagePart } from "@/types";
2
- import type { ToolStreamEntry } from "@/types/toolStream";
3
2
  export declare function sanitizeHistory(messages: ChatMessage[]): ChatMessage[];
4
3
  export declare function replaceMessageAtIndex(messages: ChatMessage[], index: number, message: ChatMessage): ChatMessage[];
5
4
  export declare function stripInterruptParts(messages: ChatMessage[]): ChatMessage[];
6
5
  export declare function findLastAssistantId(messages: ChatMessage[]): string | null;
7
- export declare function collectToolEventIds(ev: {
8
- id?: unknown;
9
- call_id?: unknown;
10
- callId?: unknown;
11
- }): string[];
12
- export declare function gatherIdsForMapping(message: ChatMessage | null, candidates: string[]): string[];
13
- export declare function mapToolIdsToMessage(toolIndex: Record<string, string>, messageId: string, ids: string[]): Record<string, string>;
14
- export declare function mergeToolMetadata(existing: ChatMessage | undefined, toolCallIds: string[], toolName: string, toolArgs?: Record<string, unknown>): Record<string, unknown>;
15
- export declare function appendToolTimelineEntry(messages: ChatMessage[], messageId: string, entry: Omit<ToolStreamEntry, "id" | "timestamp" | "idx">): ChatMessage[];
16
- export declare function pushToolToStack(stack: string[], toolId: string): string[];
17
- export declare function removeToolFromStack(stack: string[], toolId: string): string[];
18
- export declare function syncToolTimelines(messages: ChatMessage[], existing: Record<string, ToolStreamEntry[]>): {
19
- messages: ChatMessage[];
20
- toolTimelines: Record<string, ToolStreamEntry[]>;
21
- };
22
6
  export declare function getFullTextFromParts(parts: MessagePart[]): string;
23
7
  export declare function mergePartsWithMeta(baseParts: MessagePart[], deltaParts: MessagePart[], metaIn: {
24
8
  lastSeq?: number | null;
@@ -34,4 +18,3 @@ export declare function mergePartsWithMeta(baseParts: MessagePart[], deltaParts:
34
18
  export declare function computeSuffix(existing: string, incoming: string): string;
35
19
  export declare function stampLastAssistantCheckpoint(messages: ChatMessage[], checkpointId: string, checkpointNs?: string | null): ChatMessage[];
36
20
  export declare function nameFromModel(model?: string): string | null;
37
- export declare function getToolProgress(message: ChatMessage): ToolStreamEntry[];
@@ -6,8 +6,7 @@
6
6
  * Encapsulates logic for:
7
7
  * - Normalizing and sorting checkpoint options
8
8
  * - Building checkpoint lookups (by ID, by step:source)
9
- * - Detecting edited messages (attempt detection via buildAttemptMetadataMap)
10
- * - Creating reverse user message ID → attempts lookup
9
+ * - Detecting edited messages (attempt detection via buildAttemptMaps)
11
10
  *
12
11
  * This hook moves ~107 lines of metadata preparation logic from ChatInterface,
13
12
  * resulting in cleaner separation of concerns.