teodor-new-chat-ui 4.3.387 → 4.3.389

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.
@@ -10,19 +10,3 @@ export type HistoryHydrationResult = {
10
10
  };
11
11
  export declare function buildSnapshotKey(checkpointId: string | null | undefined, checkpointNs: string | null | undefined): string;
12
12
  export declare function hydrateHistorySnapshots(history: HistoryPayload | null | undefined): HistoryHydrationResult;
13
- /**
14
- * Finds the checkpoint preceding a given user message ID by looking for
15
- * the last checkpoint that does NOT have the same last user message ID.
16
- *
17
- * This is used during edits to find the previous step in the conversation,
18
- * ensuring we get a checkpoint from before the current attempt group.
19
- *
20
- * Matching user message IDs across checkpoints indicate a regeneration/retry
21
- * (same user input, different assistant responses). This function finds the
22
- * checkpoint that precedes this group.
23
- *
24
- * @param checkpoints - Array of HydratedCheckpointSnapshot objects (assumed sorted newest first)
25
- * @param userMessageId - The ID of the current user message
26
- * @returns The previous checkpoint (from a different attempt group), or null if none found
27
- */
28
- export declare function findCheckpointBeforeUserMessage(checkpoints: HydratedCheckpointSnapshot[], userMessageId: string | null | undefined): HydratedCheckpointSnapshot | null;
@@ -23,7 +23,7 @@ export type { ChatConfig } from "@/config/env";
23
23
  export { del, get, getChatToken, onChatTokenChanged, post, put, setChatToken } from '../api/utils';
24
24
  export { ChatSettings } from '@/components/settings/ChatSettings';
25
25
  export type { ChatSettingsConfig } from '@/components/settings/ChatSettings';
26
- export type { ChatMessage, ChatRequest, CheckpointSnapshot, HistoryPayload, HydratedCheckpointSnapshot, MessagePart, PregelTask, Role, StreamEvent, TextPart, ThreadInfo, ThreadSummary, ToolEndEvent } from '@/types';
26
+ export type { ChatMessage, ChatRequest, CheckpointSnapshot, HistoryPayload, HydratedCheckpointSnapshot, MessagePart, PregelTask, Role, StreamEvent, TextPart, ThreadInfo, ThreadShareTarget, ThreadSummary, ToolEndEvent } from '@/types';
27
27
  export { buildMessagePreviewMap } from './messagePreviews';
28
28
  export type { ChatAppProps, SimpleChatProps } from '../components/chat/ChatApp';
29
29
  export type { ChatProvidersProps } from '../context/ChatProviders';
@@ -3,5 +3,4 @@ export * from "./events";
3
3
  export * from "./models";
4
4
  export * from "./requests";
5
5
  export * from "./timeline";
6
- export * from "./user";
7
6
  export type TokenListener = (token: string | null) => void;
@@ -171,6 +171,17 @@ export interface ThreadShareResponse {
171
171
  sharedWithUserId: string;
172
172
  sharedAt: string;
173
173
  }
174
+ /**
175
+ * Generic share target for thread sharing.
176
+ * Allows host applications to define their own user model and map it here.
177
+ * ThreadManager is agnostic to the user model structure.
178
+ */
179
+ export interface ThreadShareTarget {
180
+ id: string;
181
+ label: string;
182
+ secondaryLabel?: string;
183
+ metadata?: Record<string, unknown>;
184
+ }
174
185
  export interface ThreadInfo extends ThreadSummary {
175
186
  lastMessage?: string | null;
176
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teodor-new-chat-ui",
3
- "version": "4.3.387",
3
+ "version": "4.3.389",
4
4
  "description": "React chat UI components with streaming support, tool calls, and modern design",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
@@ -1,21 +0,0 @@
1
- export interface SmartOrgUser {
2
- id?: string;
3
- user_id?: string;
4
- username?: string;
5
- email?: string;
6
- name?: string;
7
- organisation?: string;
8
- created?: string;
9
- description?: string;
10
- locked?: boolean;
11
- email_verified?: boolean;
12
- phone1?: string;
13
- admin?: {
14
- force_password_change?: boolean;
15
- };
16
- passwordAttempts?: number;
17
- active_key?: string;
18
- active_expire?: string;
19
- isFirstLogin?: boolean;
20
- modified?: string;
21
- }