@hintergrund/ui 0.2.2 → 0.2.3
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/Builder-H8tY8V9I.js +14172 -0
- package/dist/admin.js +11084 -9645
- package/dist/{anthropic-CwpwmW2G.js → anthropic-messages-C3hIUlsA.js} +1134 -1055
- package/dist/azure-openai-responses-t7u41KMr.js +222 -0
- package/dist/builder.js +2 -2
- package/dist/client-Cd7yMX39.js +7860 -0
- package/dist/deferred-tools-BZWMWBYN.js +28 -0
- package/dist/error-body-BUPcH4GF.js +71 -0
- package/dist/github-copilot-headers-B1RBGoZi.js +21 -0
- package/dist/{global-DdaMTl90.js → global-Bk9T4Af5.js} +17850 -16460
- package/dist/google-generative-ai-6ZG79NDC.js +264 -0
- package/dist/{google-shared-zl4aoTwW.js → google-shared-C6y4fA42.js} +1135 -1104
- package/dist/google-vertex-f2myaAmm.js +305 -0
- package/dist/headers-D4iLzGaS.js +21 -0
- package/dist/json-parse-LZdWp-Nd.js +232 -0
- package/dist/login.js +48 -48
- package/dist/mistral-conversations-D16H8Mgq.js +513 -0
- package/dist/openai-codex-responses-DIHPbnIS.js +947 -0
- package/dist/openai-completions-vDHGFsWV.js +741 -0
- package/dist/{headers-u7rXGJ9f.js → openai-prompt-cache-BJwqbEDx.js} +7 -6
- package/dist/openai-responses-B0rjAJxx.js +184 -0
- package/dist/openai-responses-shared-DqdzMfa_.js +477 -0
- package/dist/pi-messages-DB2BtH-g.js +251 -0
- package/dist/pi-user-agent-CUqx-qiX.js +13 -0
- package/dist/provider-env-D2VjEV3S.js +26 -0
- package/dist/provider-retry-BsigVlMg.js +67 -0
- package/dist/setup.js +230 -228
- package/dist/transform-messages-CsKsy6b4.js +398 -0
- package/package.json +4 -5
- package/dist/Builder-BhGmzNTC.js +0 -163449
- package/dist/azure-openai-responses-yWEFYMG1.js +0 -203
- package/dist/client-Sh7wNjbG.js +0 -5277
- package/dist/github-copilot-headers-DWh_6bE3.js +0 -35
- package/dist/google-BgPPfrTM.js +0 -248
- package/dist/google-vertex-D7kAAkZn.js +0 -285
- package/dist/json-parse-Dk_xwHcS.js +0 -93
- package/dist/mistral-BJWDROjc.js +0 -22932
- package/dist/openai-codex-responses-rzy0Aqwg.js +0 -700
- package/dist/openai-completions-CUEO2YVR.js +0 -535
- package/dist/openai-responses-k6plMvd9.js +0 -142
- package/dist/openai-responses-shared-CCD7nRqy.js +0 -324
- package/dist/transform-messages-CkpQp6fJ.js +0 -132
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(s) {
|
|
2
|
+
return Promise.resolve().then(s);
|
|
3
|
+
} });
|
|
4
|
+
const c = (s) => s;
|
|
5
|
+
function m(s, d, t = c) {
|
|
6
|
+
const n = /* @__PURE__ */ new Map();
|
|
7
|
+
for (const e of s.tools ?? [])
|
|
8
|
+
n.set(t(e.name), e);
|
|
9
|
+
if (!d)
|
|
10
|
+
return { immediate: [...n.values()], deferred: /* @__PURE__ */ new Map() };
|
|
11
|
+
const r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
12
|
+
for (const e of s.messages)
|
|
13
|
+
if (e.role === "assistant")
|
|
14
|
+
for (const o of e.content)
|
|
15
|
+
o.type === "toolCall" && a.add(t(o.name));
|
|
16
|
+
else if (e.role === "toolResult")
|
|
17
|
+
for (const o of e.addedToolNames ?? []) {
|
|
18
|
+
const l = t(o);
|
|
19
|
+
a.has(l) || r.add(l);
|
|
20
|
+
}
|
|
21
|
+
const f = [], i = /* @__PURE__ */ new Map();
|
|
22
|
+
for (const [e, o] of n)
|
|
23
|
+
r.has(e) ? i.set(e, o) : f.push(o);
|
|
24
|
+
return { immediate: f, deferred: i };
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
m as s
|
|
28
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(t) {
|
|
2
|
+
return Promise.resolve().then(t);
|
|
3
|
+
} });
|
|
4
|
+
const o = 4e3;
|
|
5
|
+
function p(t) {
|
|
6
|
+
if (!(t instanceof Error))
|
|
7
|
+
return { message: i(t), messageCarriesBody: !1 };
|
|
8
|
+
const e = t, n = f(e), s = d(e), r = s === void 0 || t.message.includes(s);
|
|
9
|
+
return {
|
|
10
|
+
status: n,
|
|
11
|
+
body: s,
|
|
12
|
+
message: t.message,
|
|
13
|
+
messageCarriesBody: r
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function f(t) {
|
|
17
|
+
if (typeof t.statusCode == "number")
|
|
18
|
+
return t.statusCode;
|
|
19
|
+
if (typeof t.status == "number")
|
|
20
|
+
return t.status;
|
|
21
|
+
if (typeof t.$metadata?.httpStatusCode == "number")
|
|
22
|
+
return t.$metadata.httpStatusCode;
|
|
23
|
+
if (typeof t.$response?.statusCode == "number")
|
|
24
|
+
return t.$response.statusCode;
|
|
25
|
+
}
|
|
26
|
+
function d(t) {
|
|
27
|
+
const e = a(t);
|
|
28
|
+
if (e === void 0)
|
|
29
|
+
return;
|
|
30
|
+
const n = e.trim();
|
|
31
|
+
if (n.length !== 0)
|
|
32
|
+
return y(n, o);
|
|
33
|
+
}
|
|
34
|
+
function a(t) {
|
|
35
|
+
if (typeof t.body == "string")
|
|
36
|
+
return t.body;
|
|
37
|
+
if (u(t.error))
|
|
38
|
+
return i(t.error);
|
|
39
|
+
const e = t.$response?.body;
|
|
40
|
+
if (typeof e == "string")
|
|
41
|
+
return e;
|
|
42
|
+
if (!c(e) && u(e))
|
|
43
|
+
return i(e);
|
|
44
|
+
}
|
|
45
|
+
function c(t) {
|
|
46
|
+
return typeof t == "object" && t !== null && "pipe" in t && typeof t.pipe == "function";
|
|
47
|
+
}
|
|
48
|
+
function u(t) {
|
|
49
|
+
if (typeof t != "object" || t === null)
|
|
50
|
+
return !1;
|
|
51
|
+
const e = Object.getPrototypeOf(t);
|
|
52
|
+
return e !== Object.prototype && e !== null ? !1 : Object.keys(t).length > 0;
|
|
53
|
+
}
|
|
54
|
+
function b(t, e) {
|
|
55
|
+
return t.messageCarriesBody || t.status === void 0 || t.body === void 0 ? e !== void 0 && t.status !== void 0 ? `${e} (${t.status}): ${t.message}` : t.message : e !== void 0 ? `${e} (${t.status}): ${t.body}` : `${t.status}: ${t.body}`;
|
|
56
|
+
}
|
|
57
|
+
function y(t, e) {
|
|
58
|
+
return t.length <= e ? t : `${t.slice(0, e)}... [truncated ${t.length - e} chars]`;
|
|
59
|
+
}
|
|
60
|
+
function i(t) {
|
|
61
|
+
try {
|
|
62
|
+
const e = JSON.stringify(t);
|
|
63
|
+
return e === void 0 ? String(t) : e;
|
|
64
|
+
} catch {
|
|
65
|
+
return String(t);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
b as f,
|
|
70
|
+
p as n
|
|
71
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(t) {
|
|
2
|
+
return Promise.resolve().then(t);
|
|
3
|
+
} });
|
|
4
|
+
function n(t) {
|
|
5
|
+
const e = t[t.length - 1];
|
|
6
|
+
return e && e.role !== "user" ? "agent" : "user";
|
|
7
|
+
}
|
|
8
|
+
function o(t) {
|
|
9
|
+
return t.some((e) => e.role === "user" && Array.isArray(e.content) ? e.content.some((r) => r.type === "image") : e.role === "toolResult" && Array.isArray(e.content) ? e.content.some((r) => r.type === "image") : !1);
|
|
10
|
+
}
|
|
11
|
+
function i(t) {
|
|
12
|
+
const e = {
|
|
13
|
+
"X-Initiator": n(t.messages),
|
|
14
|
+
"Openai-Intent": "conversation-edits"
|
|
15
|
+
};
|
|
16
|
+
return t.hasImages && (e["Copilot-Vision-Request"] = "true"), e;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
i as b,
|
|
20
|
+
o as h
|
|
21
|
+
};
|