teodor-new-chat-ui 4.3.18 → 4.3.21

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.
@@ -269,6 +269,7 @@ export interface SendOptions {
269
269
  config?: Record<string, unknown>;
270
270
  payloadExtras?: Record<string, unknown>;
271
271
  attachments?: File[];
272
+ command?: StreamCommand | null;
272
273
  }
273
274
  export interface ApiContextValue {
274
275
  token: string | null;
@@ -333,20 +334,12 @@ export interface StreamSubmitPayload {
333
334
  export interface StreamContextValue {
334
335
  isStreaming: boolean;
335
336
  error: string | null;
336
- send: (request: Omit<ChatRequest, "payload"> & {
337
- payload?: Record<string, unknown>;
338
- }, callbacks?: {
339
- onOpen?: (info: {
340
- threadId: string | null;
341
- created: boolean;
342
- }) => void;
343
- onError?: (error: unknown) => void;
344
- onGap?: (gap: {
345
- from: number;
346
- to: number;
347
- }) => void;
348
- }) => Promise<void>;
349
337
  submit: (payload: StreamSubmitPayload, options?: SendOptions) => Promise<void>;
338
+ /**
339
+ * @deprecated Prefer `submit`; retained for backwards compatibility while
340
+ * hosts migrate to the unified helper.
341
+ */
342
+ send?: (payload: StreamSubmitPayload, options?: SendOptions) => Promise<void>;
350
343
  stop: () => void;
351
344
  setAuthToken: (token: string | null) => void;
352
345
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teodor-new-chat-ui",
3
- "version": "4.3.18",
3
+ "version": "4.3.21",
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",