teodor-new-chat-ui 4.3.417 → 4.3.418

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,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;
package/dist/index.esm.js CHANGED
@@ -77,19 +77,6 @@ function Xg(e) {
77
77
  const d = s.get(c.userMessageId) ?? [];
78
78
  d.push(c), s.set(c.userMessageId, d);
79
79
  }
80
- console.log("🔍 [CheckpointIndex] Built checkpoint metadata:"), console.log(` Total checkpoints: ${o.length}`), console.log(` User message groups: ${s.size}`);
81
- for (const [c, d] of s.entries())
82
- console.log(` 📌 User Message "${c}": ${d.length} checkpoint(s)`), d.forEach((p, m) => {
83
- console.log(` [${m}] checkpoint="${p.id}", step=${p.step}, created=${p.createdAt}`);
84
- });
85
- console.log("🔍 [CheckpointIndex] AFTER computing checkpoint metadata:"), console.log(` checkpointMetaByCheckpointId size: ${t.size}`), console.log(" checkpointMetaByCheckpointId keys:", Array.from(t.keys()));
86
- for (const [c, d] of t.entries())
87
- console.log(` Checkpoint "${c}":`, {
88
- userMessageId: d.userMessageId,
89
- step: d.step,
90
- source: d.source,
91
- createdAt: d.createdAt
92
- });
93
80
  for (const c of s.values()) {
94
81
  if (!c.length) continue;
95
82
  c.sort((p, m) => {
@@ -102,11 +89,6 @@ function Xg(e) {
102
89
  m.attemptCount = d, m.attemptIndex = p, m.isLatestAttempt = p === 0;
103
90
  }
104
91
  }
105
- console.log("🔍 [CheckpointIndex] After attempt indexing:");
106
- for (const [c, d] of s.entries())
107
- console.log(` 📌 User Message "${c}": ${d.length} attempt(s)`), d.forEach((p) => {
108
- console.log(` - checkpoint="${p.id}", attemptCount=${p.attemptCount}, attemptIndex=${p.attemptIndex}, isLatest=${p.isLatestAttempt}`);
109
- });
110
92
  return {
111
93
  checkpoints: e,
112
94
  checkpointMetaByCheckpointId: t,
@@ -131,15 +113,15 @@ function Xg(e) {
131
113
  }
132
114
  function Jg(e, t) {
133
115
  if (!e)
134
- return console.log("🔍 [getMessageAttemptInfo] No checkpointId provided, returning defaults"), { attemptCount: 1, attemptIndex: 0 };
116
+ return { attemptCount: 1, attemptIndex: 0 };
135
117
  const n = t.getCheckpoint(e);
136
118
  if (!n || !n.userMessageId)
137
- return console.log(`🔍 [getMessageAttemptInfo] No checkpoint meta or userMessageId for "${e}"`), { attemptCount: 1, attemptIndex: 0 };
119
+ return { attemptCount: 1, attemptIndex: 0 };
138
120
  const r = t.getMessageAttempts(n.userMessageId);
139
121
  if (!r.length)
140
- return console.log(`🔍 [getMessageAttemptInfo] No attempts found for userMessageId "${n.userMessageId}"`), { attemptCount: 1, attemptIndex: 0 };
122
+ return { attemptCount: 1, attemptIndex: 0 };
141
123
  const o = r.findIndex((s) => s.id === e);
142
- return console.log(`🔍 [getMessageAttemptInfo] checkpoint="${e}", userMsg="${n.userMessageId}", attemptCount=${r.length}, attemptIndex=${o}`), {
124
+ return {
143
125
  attemptCount: r.length,
144
126
  attemptIndex: o >= 0 ? o : 0
145
127
  };
@@ -198,10 +180,7 @@ function ex(e, t) {
198
180
  ...C,
199
181
  checkpointId: l ?? null
200
182
  }));
201
- return console.log(`🔍 [normalizeSnapshot] Attaching checkpoint ID to ${w.length} messages:`, {
202
- checkpointId: l,
203
- messageIds: w.map((C) => C.id)
204
- }), {
183
+ return {
205
184
  checkpointId: l ?? null,
206
185
  checkpointNs: c ?? null,
207
186
  createdAt: x,
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(z,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("react-dom"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react","@radix-ui/react-slot","class-variance-authority","clsx","tailwind-merge","react-dom","lucide-react"],b):(z=typeof globalThis<"u"?globalThis:z||self,b(z.NewChatUI={},z.React,z.reactSlot,z.classVarianceAuthority,z.clsx,z.tailwindMerge,z.ReactDOM,z.LucideReact))})(this,function(z,b,Vt,Dr,Yg,Xg,No,ue){"use strict";var RI=Object.defineProperty;var MI=(z,b,Vt)=>b in z?RI(z,b,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):z[b]=Vt;var qg=(z,b,Vt)=>MI(z,typeof b!="symbol"?b+"":b,Vt);function Xl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=Xl(b),Lr=Xl(No),Jl=120;function Jg(e){if(!Array.isArray(e))return"";const t=e.filter(r=>!!(r&&r.type==="text")).map(r=>(r.text??"").trim()).filter(Boolean);if(!t.length)return"";const n=t.join(" ").replace(/\s+/g," ").trim();return n?n.length>Jl?`${n.slice(0,Jl-3)}…`:n:""}function ui(e){return Jg(e.content)||""}function Zg(e){var n;const t=new Map;for(const r of e){if(!r.checkpointId)continue;const o=(n=r.messages)==null?void 0:n.find(s=>s.role==="user");if(o){const s=ui(o);s&&t.set(r.checkpointId,s)}}return t}function Zl(e){const t=new Map,n=[],r=new Map,o=[];for(let c=0;c<e.length;c++){const d=e[c],p=d.checkpointId,m=p??`cp-${c}`,f=d.metadata??{},v=typeof f.step=="number"?f.step:null,g=typeof f.source=="string"?f.source:null;let x=null,y=null;const w=Array.isArray(d.messages)?d.messages:[];for(const T of w)T.role==="user"&&(y||(y=T),T.id&&(x=T.id));const S=d.next&&d.next.length>0?String(d.next[0]):null,k=d.parentConfig??null,C={id:m,step:v,source:g,createdAt:d.createdAt??null,namespace:d.checkpointNs??null,parentId:d.parentId??null,next:S,parentConfig:k,userMessageId:x};if(o.push(C),p&&t.set(p,C),p&&y){const T=ui(y);T&&r.set(p,T)}n.push({id:m,messageId:x,step:v,source:g,createdAt:d.createdAt??null,next:S,parentConfig:k})}const s=new Map;for(const c of o){if(!c.userMessageId)continue;const d=s.get(c.userMessageId)??[];d.push(c),s.set(c.userMessageId,d)}console.log("🔍 [CheckpointIndex] Built checkpoint metadata:"),console.log(` Total checkpoints: ${o.length}`),console.log(` User message groups: ${s.size}`);for(const[c,d]of s.entries())console.log(` 📌 User Message "${c}": ${d.length} checkpoint(s)`),d.forEach((p,m)=>{console.log(` [${m}] checkpoint="${p.id}", step=${p.step}, created=${p.createdAt}`)});console.log("🔍 [CheckpointIndex] AFTER computing checkpoint metadata:"),console.log(` checkpointMetaByCheckpointId size: ${t.size}`),console.log(" checkpointMetaByCheckpointId keys:",Array.from(t.keys()));for(const[c,d]of t.entries())console.log(` Checkpoint "${c}":`,{userMessageId:d.userMessageId,step:d.step,source:d.source,createdAt:d.createdAt});for(const c of s.values()){if(!c.length)continue;c.sort((p,m)=>{const f=p.createdAt?Date.parse(p.createdAt):0;return(m.createdAt?Date.parse(m.createdAt):0)-f});const d=c.length;for(let p=0;p<c.length;p++){const m=c[p];m.attemptCount=d,m.attemptIndex=p,m.isLatestAttempt=p===0}}console.log("🔍 [CheckpointIndex] After attempt indexing:");for(const[c,d]of s.entries())console.log(` 📌 User Message "${c}": ${d.length} attempt(s)`),d.forEach(p=>{console.log(` - checkpoint="${p.id}", attemptCount=${p.attemptCount}, attemptIndex=${p.attemptIndex}, isLatest=${p.isLatestAttempt}`)});return{checkpoints:e,checkpointMetaByCheckpointId:t,timeline:n,messagePreviews:r,getLatest:()=>{const c=n[0];if(c)return t.get(c.id)},getCheckpoint:c=>t.get(c),getMessageAttempts:c=>{const d=[];for(const p of t.values())p.userMessageId===c&&d.push(p);return d.length?(d.sort((p,m)=>{const f=typeof p.attemptIndex=="number"?p.attemptIndex:Number.MAX_SAFE_INTEGER,v=typeof m.attemptIndex=="number"?m.attemptIndex:Number.MAX_SAFE_INTEGER;return f-v}),d):[]}}}function Ql(e,t){if(!e)return console.log("🔍 [getMessageAttemptInfo] No checkpointId provided, returning defaults"),{attemptCount:1,attemptIndex:0};const n=t.getCheckpoint(e);if(!n||!n.userMessageId)return console.log(`🔍 [getMessageAttemptInfo] No checkpoint meta or userMessageId for "${e}"`),{attemptCount:1,attemptIndex:0};const r=t.getMessageAttempts(n.userMessageId);if(!r.length)return console.log(`🔍 [getMessageAttemptInfo] No attempts found for userMessageId "${n.userMessageId}"`),{attemptCount:1,attemptIndex:0};const o=r.findIndex(s=>s.id===e);return console.log(`🔍 [getMessageAttemptInfo] checkpoint="${e}", userMsg="${n.userMessageId}", attemptCount=${r.length}, attemptIndex=${o}`),{attemptCount:r.length,attemptIndex:o>=0?o:0}}function Qg(e,t){return e?t.getCheckpoint(e)??null:null}function ec(e){return b.useMemo(()=>Zl(e),[e])}function cr(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return{...e}}function Vn(e,t){if(e)for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim())return r.trim()}}function tc(e,t){if(!e)return null;for(const n of t){const r=e[n];if(typeof r=="number"&&Number.isFinite(r))return r}return null}function di(e){const t=cr(e);if(t)return cr(t.configurable)??t}function Nn(e){const r=[...(Array.isArray(e==null?void 0:e.checkpoints)?(e==null?void 0:e.checkpoints)??[]:e!=null&&e.checkpoints?Object.values(e.checkpoints):[]).map((s,i)=>ex(s,i)).filter(s=>!!s)].sort((s,i)=>nc(i.createdAt)-nc(s.createdAt)),o=r[0]??null;return{threadId:(e==null?void 0:e.threadId)??"",latest:o,checkpoints:r,interrupt:(o==null?void 0:o.interrupt)??null}}function ex(e,t){var S;if(!e)return null;const r=(Array.isArray((S=e.values)==null?void 0:S.messages)?e.values.messages:[]).filter(k=>!!(k&&typeof k=="object"&&typeof k.role=="string")),o=cr(e.metadata)??{},s=di(e.config),i=cr(e.parent_config??e.parentConfig),a=di(i),l=Vn(s,["checkpoint_id","checkpointId"]),c=Vn(s,["checkpoint_ns","checkpointNs"]),d=Vn(a,["checkpoint_id","checkpointId"]),p=Vn(a,["checkpoint_id","checkpointId"])??null,m=Vn(a,["checkpoint_ns","checkpointNs"])??null,f=cr(e.config),v=Array.isArray(e.tasks)?e.tasks.map(k=>({...k})):e.tasks??null,g=Array.isArray(e.next)?[...e.next]:e.next??null,x=typeof e.created_at=="string"&&e.created_at.trim()?e.created_at:typeof e.createdAt=="string"&&e.createdAt.trim()?e.createdAt:new Date(Date.now()-t).toISOString(),y={...o,step:tc(o,["step"])??0,source:Vn(o,["source"])??null},w=r.map(k=>({...k,checkpointId:l??null}));return console.log(`🔍 [normalizeSnapshot] Attaching checkpoint ID to ${w.length} messages:`,{checkpointId:l,messageIds:w.map(k=>k.id)}),{checkpointId:l??null,checkpointNs:c??null,createdAt:x,parentId:d??null,messages:w,nextCursor:p,nextCursorNs:m,interrupt:tx(r,t),metadata:y,config:f??null,parentConfig:i??null,next:g,tasks:v}}function tx(e,t){return nx(e,t)}function nx(e,t){var n;for(let r=e.length-1;r>=0;r--){const o=((n=e[r])==null?void 0:n.content)??[];for(let s=o.length-1;s>=0;s--){const i=o[s];if((i==null?void 0:i.type)==="interrupt"){const a=i;return{id:typeof a.id=="string"&&a.id.trim()?a.id:`interrupt-${t}-${r}-${s}`,value:a.value}}}}return null}function nc(e){if(!e)return 0;const t=Date.parse(e);return Number.isFinite(t)?t:0}var fi={exports:{}},$r={};/**
1
+ (function(z,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("react-dom"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react","@radix-ui/react-slot","class-variance-authority","clsx","tailwind-merge","react-dom","lucide-react"],b):(z=typeof globalThis<"u"?globalThis:z||self,b(z.NewChatUI={},z.React,z.reactSlot,z.classVarianceAuthority,z.clsx,z.tailwindMerge,z.ReactDOM,z.LucideReact))})(this,function(z,b,Vt,Dr,Yg,Xg,No,ue){"use strict";var RI=Object.defineProperty;var MI=(z,b,Vt)=>b in z?RI(z,b,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):z[b]=Vt;var qg=(z,b,Vt)=>MI(z,typeof b!="symbol"?b+"":b,Vt);function Xl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=Xl(b),Lr=Xl(No),Jl=120;function Jg(e){if(!Array.isArray(e))return"";const t=e.filter(r=>!!(r&&r.type==="text")).map(r=>(r.text??"").trim()).filter(Boolean);if(!t.length)return"";const n=t.join(" ").replace(/\s+/g," ").trim();return n?n.length>Jl?`${n.slice(0,Jl-3)}…`:n:""}function ui(e){return Jg(e.content)||""}function Zg(e){var n;const t=new Map;for(const r of e){if(!r.checkpointId)continue;const o=(n=r.messages)==null?void 0:n.find(s=>s.role==="user");if(o){const s=ui(o);s&&t.set(r.checkpointId,s)}}return t}function Zl(e){const t=new Map,n=[],r=new Map,o=[];for(let c=0;c<e.length;c++){const d=e[c],p=d.checkpointId,m=p??`cp-${c}`,f=d.metadata??{},v=typeof f.step=="number"?f.step:null,g=typeof f.source=="string"?f.source:null;let x=null,y=null;const w=Array.isArray(d.messages)?d.messages:[];for(const T of w)T.role==="user"&&(y||(y=T),T.id&&(x=T.id));const S=d.next&&d.next.length>0?String(d.next[0]):null,k=d.parentConfig??null,C={id:m,step:v,source:g,createdAt:d.createdAt??null,namespace:d.checkpointNs??null,parentId:d.parentId??null,next:S,parentConfig:k,userMessageId:x};if(o.push(C),p&&t.set(p,C),p&&y){const T=ui(y);T&&r.set(p,T)}n.push({id:m,messageId:x,step:v,source:g,createdAt:d.createdAt??null,next:S,parentConfig:k})}const s=new Map;for(const c of o){if(!c.userMessageId)continue;const d=s.get(c.userMessageId)??[];d.push(c),s.set(c.userMessageId,d)}for(const c of s.values()){if(!c.length)continue;c.sort((p,m)=>{const f=p.createdAt?Date.parse(p.createdAt):0;return(m.createdAt?Date.parse(m.createdAt):0)-f});const d=c.length;for(let p=0;p<c.length;p++){const m=c[p];m.attemptCount=d,m.attemptIndex=p,m.isLatestAttempt=p===0}}return{checkpoints:e,checkpointMetaByCheckpointId:t,timeline:n,messagePreviews:r,getLatest:()=>{const c=n[0];if(c)return t.get(c.id)},getCheckpoint:c=>t.get(c),getMessageAttempts:c=>{const d=[];for(const p of t.values())p.userMessageId===c&&d.push(p);return d.length?(d.sort((p,m)=>{const f=typeof p.attemptIndex=="number"?p.attemptIndex:Number.MAX_SAFE_INTEGER,v=typeof m.attemptIndex=="number"?m.attemptIndex:Number.MAX_SAFE_INTEGER;return f-v}),d):[]}}}function Ql(e,t){if(!e)return{attemptCount:1,attemptIndex:0};const n=t.getCheckpoint(e);if(!n||!n.userMessageId)return{attemptCount:1,attemptIndex:0};const r=t.getMessageAttempts(n.userMessageId);if(!r.length)return{attemptCount:1,attemptIndex:0};const o=r.findIndex(s=>s.id===e);return{attemptCount:r.length,attemptIndex:o>=0?o:0}}function Qg(e,t){return e?t.getCheckpoint(e)??null:null}function ec(e){return b.useMemo(()=>Zl(e),[e])}function cr(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return{...e}}function Vn(e,t){if(e)for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim())return r.trim()}}function tc(e,t){if(!e)return null;for(const n of t){const r=e[n];if(typeof r=="number"&&Number.isFinite(r))return r}return null}function di(e){const t=cr(e);if(t)return cr(t.configurable)??t}function Nn(e){const r=[...(Array.isArray(e==null?void 0:e.checkpoints)?(e==null?void 0:e.checkpoints)??[]:e!=null&&e.checkpoints?Object.values(e.checkpoints):[]).map((s,i)=>ex(s,i)).filter(s=>!!s)].sort((s,i)=>nc(i.createdAt)-nc(s.createdAt)),o=r[0]??null;return{threadId:(e==null?void 0:e.threadId)??"",latest:o,checkpoints:r,interrupt:(o==null?void 0:o.interrupt)??null}}function ex(e,t){var S;if(!e)return null;const r=(Array.isArray((S=e.values)==null?void 0:S.messages)?e.values.messages:[]).filter(k=>!!(k&&typeof k=="object"&&typeof k.role=="string")),o=cr(e.metadata)??{},s=di(e.config),i=cr(e.parent_config??e.parentConfig),a=di(i),l=Vn(s,["checkpoint_id","checkpointId"]),c=Vn(s,["checkpoint_ns","checkpointNs"]),d=Vn(a,["checkpoint_id","checkpointId"]),p=Vn(a,["checkpoint_id","checkpointId"])??null,m=Vn(a,["checkpoint_ns","checkpointNs"])??null,f=cr(e.config),v=Array.isArray(e.tasks)?e.tasks.map(k=>({...k})):e.tasks??null,g=Array.isArray(e.next)?[...e.next]:e.next??null,x=typeof e.created_at=="string"&&e.created_at.trim()?e.created_at:typeof e.createdAt=="string"&&e.createdAt.trim()?e.createdAt:new Date(Date.now()-t).toISOString(),y={...o,step:tc(o,["step"])??0,source:Vn(o,["source"])??null},w=r.map(k=>({...k,checkpointId:l??null}));return{checkpointId:l??null,checkpointNs:c??null,createdAt:x,parentId:d??null,messages:w,nextCursor:p,nextCursorNs:m,interrupt:tx(r,t),metadata:y,config:f??null,parentConfig:i??null,next:g,tasks:v}}function tx(e,t){return nx(e,t)}function nx(e,t){var n;for(let r=e.length-1;r>=0;r--){const o=((n=e[r])==null?void 0:n.content)??[];for(let s=o.length-1;s>=0;s--){const i=o[s];if((i==null?void 0:i.type)==="interrupt"){const a=i;return{id:typeof a.id=="string"&&a.id.trim()?a.id:`interrupt-${t}-${r}-${s}`,value:a.value}}}}return null}function nc(e){if(!e)return 0;const t=Date.parse(e);return Number.isFinite(t)?t:0}var fi={exports:{}},$r={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teodor-new-chat-ui",
3
- "version": "4.3.417",
3
+ "version": "4.3.418",
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",