teodor-new-chat-ui 4.3.623 → 4.3.624
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.
- package/dist/index.esm.js +10 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +20 -20
- package/dist/index.umd.js.map +1 -1
- package/dist/types/domain/chat.d.ts +1 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2798,7 +2798,7 @@ function Cg(e, t) {
|
|
|
2798
2798
|
};
|
|
2799
2799
|
}
|
|
2800
2800
|
function kg(e, t) {
|
|
2801
|
-
var l, u, f
|
|
2801
|
+
var l, u, f;
|
|
2802
2802
|
if (!e || typeof e != "object") return null;
|
|
2803
2803
|
const n = Tg(e);
|
|
2804
2804
|
if (!n) return null;
|
|
@@ -2806,16 +2806,17 @@ function kg(e, t) {
|
|
|
2806
2806
|
if (!r.length) return null;
|
|
2807
2807
|
const o = typeof e.createdAt == "string" ? e.createdAt : typeof ((l = e.additional_kwargs) == null ? void 0 : l.created_at) == "string" ? (u = e.additional_kwargs) == null ? void 0 : u.created_at : (/* @__PURE__ */ new Date()).toISOString(), s = typeof e.id == "string" && e.id.trim() ? e.id : `msg-${Date.now().toString(16)}-${Math.random().toString(16).slice(2)}`, i = typeof e.name == "string" ? e.name : void 0, a = typeof e.model == "string" ? e.model : ((f = e.additional_kwargs) == null ? void 0 : f.model) ?? void 0;
|
|
2808
2808
|
return {
|
|
2809
|
+
...e,
|
|
2809
2810
|
id: s,
|
|
2810
2811
|
role: n,
|
|
2811
2812
|
name: i ?? a ?? (n === "assistant" ? t ?? void 0 : void 0),
|
|
2812
2813
|
model: a,
|
|
2813
2814
|
createdAt: o,
|
|
2814
2815
|
content: r,
|
|
2815
|
-
toolCallId: e.toolCallId ?? e.tool_call_id ??
|
|
2816
|
-
|
|
2817
|
-
additionalKwargs: e.additional_kwargs ?? void 0,
|
|
2818
|
-
responseMetadata: e.response_metadata ?? void 0,
|
|
2816
|
+
toolCallId: e.toolCallId ?? e.tool_call_id ?? void 0,
|
|
2817
|
+
toolCalls: e.toolCalls ?? e.tool_calls ?? void 0,
|
|
2818
|
+
additionalKwargs: e.additionalKwargs ?? e.additional_kwargs ?? void 0,
|
|
2819
|
+
responseMetadata: e.responseMetadata ?? e.response_metadata ?? void 0,
|
|
2819
2820
|
artifact: e.artifact ?? void 0,
|
|
2820
2821
|
threadId: e.threadId ?? e.thread_id
|
|
2821
2822
|
};
|
|
@@ -3687,8 +3688,8 @@ function Hg(e, t) {
|
|
|
3687
3688
|
break;
|
|
3688
3689
|
if (l.role === "assistant") {
|
|
3689
3690
|
const u = Array.isArray(l.content) ? l.content : Array.isArray(l.parts) ? l.parts : [];
|
|
3690
|
-
if (l.
|
|
3691
|
-
for (const f of l.
|
|
3691
|
+
if (l.toolCalls)
|
|
3692
|
+
for (const f of l.toolCalls)
|
|
3692
3693
|
f.id && f.name && !o.has(f.id) && o.set(f.id, {
|
|
3693
3694
|
name: f.name,
|
|
3694
3695
|
timestamp: l.createdAt,
|
|
@@ -3820,7 +3821,7 @@ function Do(e) {
|
|
|
3820
3821
|
const n = t.content, r = typeof n == "string" ? n.trim().length > 0 : Array.isArray(n) && n.some((l) => {
|
|
3821
3822
|
var u;
|
|
3822
3823
|
return l && l.type === "text" && ((u = l.text) == null ? void 0 : u.trim());
|
|
3823
|
-
}), o = Array.isArray(n) && n.some((l) => l && l.type === "image"), s = t.artifact !== null && t.artifact !== void 0, i = ((c = t.
|
|
3824
|
+
}), o = Array.isArray(n) && n.some((l) => l && l.type === "image"), s = t.artifact !== null && t.artifact !== void 0, i = ((c = t.toolCalls) == null ? void 0 : c.length) > 0, a = Array.isArray(n) && n.some((l) => l && ["file", "tool_call", "interrupt"].includes(l.type));
|
|
3824
3825
|
return !!(r || o || s || i || a);
|
|
3825
3826
|
});
|
|
3826
3827
|
}
|
|
@@ -9692,7 +9693,7 @@ function Tv({
|
|
|
9692
9693
|
/* @__PURE__ */ d.jsx("span", { className: "flex h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse" }),
|
|
9693
9694
|
/* @__PURE__ */ d.jsx("span", { className: "text-[9px] text-blue-500 font-medium lowercase", children: "running" })
|
|
9694
9695
|
] }) : /* @__PURE__ */ d.jsx("div", { className: "flex items-center gap-1 shrink-0 opacity-0 group-hover/step:opacity-100 transition-opacity", children: /* @__PURE__ */ d.jsx("span", { className: "text-[9px] text-muted-foreground/50 font-medium lowercase", children: "completed" }) }),
|
|
9695
|
-
!!o.artifact && /* @__PURE__ */ d.jsx("span", { className: "shrink-0 text-[8px] px-1 py-0 rounded bg-primary/10 text-primary/70 font-semibold border border-primary/20 leading-none", children: "Artifact" })
|
|
9696
|
+
!!o.artifact && /* @__PURE__ */ d.jsx("span", { className: "shrink-0 text-[8px] px-1 py-0 rounded bg-primary/10 text-primary/70 font-semibold border border-primary/20 leading-none", children: "Artifact Created" })
|
|
9696
9697
|
] }),
|
|
9697
9698
|
o.content && /* @__PURE__ */ d.jsx("p", { className: "text-[10px] text-muted-foreground/60 truncate group-hover/step:text-muted-foreground/80 transition-colors", children: o.content })
|
|
9698
9699
|
] })
|