@hintergrund/ui 0.2.1 → 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.
Files changed (42) hide show
  1. package/dist/Builder-H8tY8V9I.js +14172 -0
  2. package/dist/admin.js +11160 -9739
  3. package/dist/{anthropic-UhrJpH25.js → anthropic-messages-C3hIUlsA.js} +1134 -1055
  4. package/dist/azure-openai-responses-t7u41KMr.js +222 -0
  5. package/dist/builder.js +2 -2
  6. package/dist/client-Cd7yMX39.js +7860 -0
  7. package/dist/deferred-tools-BZWMWBYN.js +28 -0
  8. package/dist/error-body-BUPcH4GF.js +71 -0
  9. package/dist/github-copilot-headers-B1RBGoZi.js +21 -0
  10. package/dist/{global-CFcrkAa3.js → global-Bk9T4Af5.js} +17896 -16508
  11. package/dist/google-generative-ai-6ZG79NDC.js +264 -0
  12. package/dist/{google-shared-BmdaIInh.js → google-shared-C6y4fA42.js} +1135 -1104
  13. package/dist/google-vertex-f2myaAmm.js +305 -0
  14. package/dist/headers-D4iLzGaS.js +21 -0
  15. package/dist/json-parse-LZdWp-Nd.js +232 -0
  16. package/dist/login.js +79 -75
  17. package/dist/mistral-conversations-D16H8Mgq.js +513 -0
  18. package/dist/openai-codex-responses-DIHPbnIS.js +947 -0
  19. package/dist/openai-completions-vDHGFsWV.js +741 -0
  20. package/dist/{headers-u7rXGJ9f.js → openai-prompt-cache-BJwqbEDx.js} +7 -6
  21. package/dist/openai-responses-B0rjAJxx.js +184 -0
  22. package/dist/openai-responses-shared-DqdzMfa_.js +477 -0
  23. package/dist/pi-messages-DB2BtH-g.js +251 -0
  24. package/dist/pi-user-agent-CUqx-qiX.js +13 -0
  25. package/dist/provider-env-D2VjEV3S.js +26 -0
  26. package/dist/provider-retry-BsigVlMg.js +67 -0
  27. package/dist/setup.js +275 -188
  28. package/dist/transform-messages-CsKsy6b4.js +398 -0
  29. package/package.json +4 -5
  30. package/dist/Builder-B0XYsyXe.js +0 -163449
  31. package/dist/azure-openai-responses-DAC03Qw1.js +0 -203
  32. package/dist/client-Sh7wNjbG.js +0 -5277
  33. package/dist/github-copilot-headers-DWh_6bE3.js +0 -35
  34. package/dist/google-CVz_TaG6.js +0 -248
  35. package/dist/google-vertex-C6GE41DE.js +0 -285
  36. package/dist/json-parse-DmJ6NiZE.js +0 -93
  37. package/dist/mistral-DqYbzWvv.js +0 -22932
  38. package/dist/openai-codex-responses-ZWuD9ryk.js +0 -700
  39. package/dist/openai-completions-B6B2OwYj.js +0 -535
  40. package/dist/openai-responses-D9Ip2Wgd.js +0 -142
  41. package/dist/openai-responses-shared-eUUJSL4D.js +0 -324
  42. 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
+ };