@burdenoff/fe-libs 2026.926.3 → 2026.926.5

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 (66) hide show
  1. package/dist/chrome/ProductPickerSheet.d.ts.map +1 -1
  2. package/dist/chrome/ProductPickerSheet.js +45 -44
  3. package/dist/chrome/ProductSwitcher.d.ts.map +1 -1
  4. package/dist/chrome/ProductSwitcher.js +83 -82
  5. package/dist/shared/assistant/autoRouting.d.ts +1 -0
  6. package/dist/shared/assistant/autoRouting.d.ts.map +1 -1
  7. package/dist/shared/assistant/autoRouting.js +1 -1
  8. package/dist/shared/assistant/conversation.d.ts +29 -0
  9. package/dist/shared/assistant/conversation.d.ts.map +1 -1
  10. package/dist/shared/assistant/guardedStorage.d.ts +32 -0
  11. package/dist/shared/assistant/guardedStorage.d.ts.map +1 -0
  12. package/dist/shared/assistant/guardedStorage.js +36 -0
  13. package/dist/shared/assistant/i18nManifest.d.ts +7 -0
  14. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  15. package/dist/shared/assistant/i18nManifest.js +7 -0
  16. package/dist/shared/assistant/index.d.ts +3 -0
  17. package/dist/shared/assistant/index.d.ts.map +1 -1
  18. package/dist/shared/assistant/liveTurns.d.ts +145 -0
  19. package/dist/shared/assistant/liveTurns.d.ts.map +1 -0
  20. package/dist/shared/assistant/liveTurns.js +99 -0
  21. package/dist/shared/assistant/store.d.ts.map +1 -1
  22. package/dist/shared/assistant/store.js +11 -10
  23. package/dist/shared/assistant/turnState.d.ts +12 -0
  24. package/dist/shared/assistant/turnState.d.ts.map +1 -1
  25. package/dist/shared/assistant/turnState.js +4 -1
  26. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  27. package/dist/shared/assistant/ui/AssistantChatArea.js +704 -568
  28. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +19 -0
  29. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
  30. package/dist/shared/assistant/ui/AssistantMessageItem.js +92 -88
  31. package/dist/shared/assistant/ui/AssistantMessageList.d.ts +22 -2
  32. package/dist/shared/assistant/ui/AssistantMessageList.d.ts.map +1 -1
  33. package/dist/shared/assistant/ui/AssistantMessageList.js +37 -36
  34. package/dist/shared/assistant/ui/AssistantPendingWriteCard.d.ts +34 -0
  35. package/dist/shared/assistant/ui/AssistantPendingWriteCard.d.ts.map +1 -1
  36. package/dist/shared/assistant/ui/AssistantPendingWriteCard.js +31 -28
  37. package/dist/shared/assistant/ui/useVoiceSession.d.ts +1 -0
  38. package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
  39. package/dist/shared/assistant/ui/useVoiceSession.js +119 -117
  40. package/dist/shared/assistant/voice/voiceReopen.d.ts +117 -0
  41. package/dist/shared/assistant/voice/voiceReopen.d.ts.map +1 -0
  42. package/dist/shared/assistant/voice/voiceReopen.js +49 -0
  43. package/dist/shared/config/index.d.ts +3 -1
  44. package/dist/shared/config/index.d.ts.map +1 -1
  45. package/dist/shared/config/productSlug.d.ts +36 -0
  46. package/dist/shared/config/productSlug.d.ts.map +1 -0
  47. package/dist/shared/config/productSlug.js +23 -0
  48. package/dist/shared/config/products.d.ts +8 -1
  49. package/dist/shared/config/products.d.ts.map +1 -1
  50. package/dist/shared/config/products.js +21 -14
  51. package/dist/shared/hooks/shell/useProducts.d.ts +8 -0
  52. package/dist/shared/hooks/shell/useProducts.d.ts.map +1 -1
  53. package/dist/shared/hooks/shell/useProducts.js +46 -42
  54. package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
  55. package/dist/shared/providers/AppShellProvider.js +228 -227
  56. package/dist/shared/providers/shell/ThemeProvider.d.ts +1 -1
  57. package/dist/shared/providers/shell/ThemeProvider.d.ts.map +1 -1
  58. package/dist/shared/providers/shell/ThemeProvider.js +58 -57
  59. package/dist/shared/providers/shell/brandAttribute.d.ts +11 -0
  60. package/dist/shared/providers/shell/brandAttribute.d.ts.map +1 -0
  61. package/dist/shared/providers/shell/brandAttribute.js +7 -0
  62. package/dist/shared-assistant.js +101 -98
  63. package/dist/shared-config.js +11 -10
  64. package/dist/shared.js +121 -120
  65. package/package.json +2 -2
  66. package/src/vite/types.ts +4 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ProductPickerSheet.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductPickerSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO3C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkCD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAuH1D,CAAC"}
1
+ {"version":3,"file":"ProductPickerSheet.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductPickerSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ3C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkCD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAuH1D,CAAC"}
@@ -1,110 +1,111 @@
1
- import { Sheet as e, SheetContent as t, SheetHeader as n, SheetTitle as r } from "../ui/sheet.js";
2
- import { filterProducts as i, resolveProductLogo as a } from "./ProductSwitcher.js";
3
- import { useMemo as o, useState as s } from "react";
4
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
1
+ import { isSameProductSlug as e } from "../shared/config/productSlug.js";
2
+ import { Sheet as t, SheetContent as n, SheetHeader as r, SheetTitle as i } from "../ui/sheet.js";
3
+ import { filterProducts as a, resolveProductLogo as o } from "./ProductSwitcher.js";
4
+ import { useMemo as s, useState as c } from "react";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
6
  //#region src/chrome/ProductPickerSheet.tsx
6
- var u = 6, d = ({ product: e }) => {
7
- let [t, n] = s(!1), r = a(e);
8
- return r && !t ? /* @__PURE__ */ c("div", {
7
+ var d = 6, f = ({ product: e }) => {
8
+ let [t, n] = c(!1), r = o(e);
9
+ return r && !t ? /* @__PURE__ */ l("div", {
9
10
  className: "size-10 rounded-lg bg-white p-1 ring-1 ring-border-default dark:ring-border-strong flex items-center justify-center flex-shrink-0 overflow-hidden",
10
- children: /* @__PURE__ */ c("img", {
11
+ children: /* @__PURE__ */ l("img", {
11
12
  src: r,
12
13
  alt: e.name,
13
14
  className: "size-full object-contain",
14
15
  onError: () => n(!0)
15
16
  })
16
- }) : e.icon ? /* @__PURE__ */ c("div", {
17
+ }) : e.icon ? /* @__PURE__ */ l("div", {
17
18
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center flex-shrink-0",
18
19
  children: e.icon
19
- }) : /* @__PURE__ */ c("div", {
20
+ }) : /* @__PURE__ */ l("div", {
20
21
  className: "size-10 rounded-lg bg-action-primary-bg flex items-center justify-center flex-shrink-0",
21
- children: /* @__PURE__ */ c("span", {
22
+ children: /* @__PURE__ */ l("span", {
22
23
  className: "text-action-primary-text font-bold text-sm",
23
24
  children: e.name.substring(0, 2).toUpperCase()
24
25
  })
25
26
  });
26
- }, f = ({ open: a, onOpenChange: f, products: p, currentProductId: m, onProductChange: h }) => {
27
- let [g, _] = s(""), v = p.length > u, y = o(() => i(p, g), [p, g]), b = (e) => {
28
- h && h(e), f(!1);
27
+ }, p = ({ open: o, onOpenChange: p, products: m, currentProductId: h, onProductChange: g }) => {
28
+ let [_, v] = c(""), y = m.length > d, b = s(() => a(m, _), [m, _]), x = (e) => {
29
+ g && g(e), p(!1);
29
30
  };
30
- return /* @__PURE__ */ c(e, {
31
- open: a,
31
+ return /* @__PURE__ */ l(t, {
32
+ open: o,
32
33
  onOpenChange: (e) => {
33
- e || _(""), f(e);
34
+ e || v(""), p(e);
34
35
  },
35
- children: /* @__PURE__ */ l(t, {
36
+ children: /* @__PURE__ */ u(n, {
36
37
  side: "bottom",
37
38
  className: "h-[60vh] flex flex-col p-0",
38
39
  children: [
39
- /* @__PURE__ */ c(n, {
40
+ /* @__PURE__ */ l(r, {
40
41
  className: "px-4 pt-4 pb-2 border-b border-border-subtle",
41
- children: /* @__PURE__ */ c(r, {
42
+ children: /* @__PURE__ */ l(i, {
42
43
  className: "text-text-primary",
43
44
  children: "Switch Product"
44
45
  })
45
46
  }),
46
- v && /* @__PURE__ */ l("div", {
47
+ y && /* @__PURE__ */ u("div", {
47
48
  className: "relative px-4 py-2 border-b border-border-subtle",
48
- children: [/* @__PURE__ */ c("svg", {
49
+ children: [/* @__PURE__ */ l("svg", {
49
50
  className: "pointer-events-none absolute left-7 top-1/2 -translate-y-1/2 size-4 text-text-muted",
50
51
  fill: "none",
51
52
  stroke: "currentColor",
52
53
  viewBox: "0 0 24 24",
53
- children: /* @__PURE__ */ c("path", {
54
+ children: /* @__PURE__ */ l("path", {
54
55
  strokeLinecap: "round",
55
56
  strokeLinejoin: "round",
56
57
  strokeWidth: 2,
57
58
  d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
58
59
  })
59
- }), /* @__PURE__ */ c("input", {
60
+ }), /* @__PURE__ */ l("input", {
60
61
  type: "text",
61
- value: g,
62
- onChange: (e) => _(e.target.value),
62
+ value: _,
63
+ onChange: (e) => v(e.target.value),
63
64
  placeholder: "Search products…",
64
65
  "aria-label": "Search products",
65
66
  className: "w-full rounded-md border border-border-subtle bg-bg-surface py-2.5 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-muted focus:border-transparent focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-border)]"
66
67
  })]
67
68
  }),
68
- /* @__PURE__ */ l("div", {
69
+ /* @__PURE__ */ u("div", {
69
70
  className: "flex-1 overflow-y-auto py-2",
70
- children: [y.length === 0 && /* @__PURE__ */ l("p", {
71
+ children: [b.length === 0 && /* @__PURE__ */ u("p", {
71
72
  className: "px-4 py-6 text-center text-body-sm text-text-muted",
72
73
  children: [
73
74
  "No products match “",
74
- g,
75
+ _,
75
76
  "”"
76
77
  ]
77
- }), y.map((e) => /* @__PURE__ */ l("button", {
78
- onClick: () => b(e),
79
- className: `w-full flex items-center gap-4 px-4 py-3.5 text-body-sm transition-colors ${e.id === m ? "bg-[var(--color-accent-soft)]" : "hover:bg-bg-sunken"}`,
78
+ }), b.map((t) => /* @__PURE__ */ u("button", {
79
+ onClick: () => x(t),
80
+ className: `w-full flex items-center gap-4 px-4 py-3.5 text-body-sm transition-colors ${e(t.id, h) ? "bg-[var(--color-accent-soft)]" : "hover:bg-bg-sunken"}`,
80
81
  children: [
81
- /* @__PURE__ */ c(d, { product: e }),
82
- /* @__PURE__ */ l("div", {
82
+ /* @__PURE__ */ l(f, { product: t }),
83
+ /* @__PURE__ */ u("div", {
83
84
  className: "flex-1 text-left min-w-0",
84
- children: [/* @__PURE__ */ c("p", {
85
+ children: [/* @__PURE__ */ l("p", {
85
86
  className: "font-medium text-text-primary",
86
- children: e.name
87
- }), e.description && /* @__PURE__ */ c("p", {
87
+ children: t.name
88
+ }), t.description && /* @__PURE__ */ l("p", {
88
89
  className: "text-xs text-text-secondary truncate",
89
- children: e.description
90
+ children: t.description
90
91
  })]
91
92
  }),
92
- e.id === m && /* @__PURE__ */ c("svg", {
93
+ e(t.id, h) && /* @__PURE__ */ l("svg", {
93
94
  className: "size-5 text-action-primary-bg flex-shrink-0",
94
95
  fill: "currentColor",
95
96
  viewBox: "0 0 20 20",
96
- children: /* @__PURE__ */ c("path", {
97
+ children: /* @__PURE__ */ l("path", {
97
98
  fillRule: "evenodd",
98
99
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
99
100
  clipRule: "evenodd"
100
101
  })
101
102
  }),
102
- e.url && e.id !== m && /* @__PURE__ */ c("svg", {
103
+ t.url && !e(t.id, h) && /* @__PURE__ */ l("svg", {
103
104
  className: "size-4 text-text-muted flex-shrink-0",
104
105
  fill: "none",
105
106
  stroke: "currentColor",
106
107
  viewBox: "0 0 24 24",
107
- children: /* @__PURE__ */ c("path", {
108
+ children: /* @__PURE__ */ l("path", {
108
109
  strokeLinecap: "round",
109
110
  strokeLinejoin: "round",
110
111
  strokeWidth: 2,
@@ -112,11 +113,11 @@ var u = 6, d = ({ product: e }) => {
112
113
  })
113
114
  })
114
115
  ]
115
- }, e.id))]
116
+ }, t.id))]
116
117
  })
117
118
  ]
118
119
  })
119
120
  });
120
121
  };
121
122
  //#endregion
122
- export { f as ProductPickerSheet };
123
+ export { p as ProductPickerSheet };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSwitcher.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAWhC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,MAAM,GAAG,SAAS,CAKrB;AA0CD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EACzF,QAAQ,EAAE,CAAC,EAAE,EACb,KAAK,EAAE,MAAM,GACZ,CAAC,EAAE,CASL;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,OAAO,EAAE,EACnB,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,GAAG,SAAS,CAOrB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC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AAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAgNpD,CAAC"}
@@ -1,82 +1,83 @@
1
- import { getProductsWithUrls as e } from "../shared/config/products.js";
2
- import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
3
- import { useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
4
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
1
+ import { isSameProductSlug as e } from "../shared/config/productSlug.js";
2
+ import { getProductsWithUrls as t } from "../shared/config/products.js";
3
+ import { useShellLabel as n } from "../shared/providers/shell/useShellLabel.js";
4
+ import { useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
5
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
5
6
  //#region src/chrome/ProductSwitcher.tsx
6
- var c = 6;
7
- function l(e) {
7
+ var l = 6;
8
+ function u(e) {
8
9
  if (e?.logoUrl) return e.logoUrl;
9
10
  let t = e?.url;
10
11
  if (!(!t || t === "#")) return `${t.replace(/\/+$/, "")}/icons/icon.svg`;
11
12
  }
12
- var u = ({ product: e, sizeClass: t, textClass: n }) => {
13
- let [r, i] = a(!1), s = l(e), c = !!s && !r;
14
- return /* @__PURE__ */ o("div", {
13
+ var d = ({ product: e, sizeClass: t, textClass: n }) => {
14
+ let [r, i] = o(!1), a = u(e), c = !!a && !r;
15
+ return /* @__PURE__ */ s("div", {
15
16
  className: `${t} rounded-md flex items-center justify-center flex-shrink-0 overflow-hidden ${c ? "bg-white p-0.5 ring-1 ring-border-default dark:ring-border-strong" : `text-text-inverse font-semibold ${n}`}`,
16
17
  style: c ? void 0 : { backgroundColor: e?.color || "var(--color-action-primary-bg)" },
17
- children: c ? /* @__PURE__ */ o("img", {
18
- src: s,
18
+ children: c ? /* @__PURE__ */ s("img", {
19
+ src: a,
19
20
  alt: e?.name ?? "",
20
21
  className: "size-full object-contain",
21
22
  onError: () => i(!0)
22
23
  }) : e?.icon || e?.name.charAt(0)
23
24
  });
24
25
  };
25
- function d(e, t) {
26
+ function f(e, t) {
26
27
  let n = t.trim().toLowerCase();
27
28
  return n ? e.filter((e) => e.name.toLowerCase().includes(n) || e.id.toLowerCase().includes(n) || (e.description ? e.description.toLowerCase().includes(n) : !1)) : e;
28
29
  }
29
- function f(t, n) {
30
- return t.find((e) => e.id === n) || (n ? e().find((e) => e.id === n) || {
31
- id: n,
32
- name: n,
30
+ function p(n, r) {
31
+ return n.find((t) => e(t.id, r)) || (r ? t().find((t) => e(t.id, r)) || {
32
+ id: r,
33
+ name: r,
33
34
  url: "#"
34
- } : t[0]);
35
+ } : n[0]);
35
36
  }
36
- var p = ({ products: e, currentProductId: l, onProductChange: p, compact: m = !1 }) => {
37
- let h = t(), [g, _] = a(!1), [v, y] = a(""), b = i(null), x = i(null), S = f(e, l), C = e.length > c, w = r(() => d(e, v), [e, v]);
38
- n(() => {
37
+ var m = ({ products: t, currentProductId: u, onProductChange: m, compact: h = !1 }) => {
38
+ let g = n(), [_, v] = o(!1), [y, b] = o(""), x = a(null), S = a(null), C = p(t, u), w = t.length > l, T = i(() => f(t, y), [t, y]);
39
+ r(() => {
39
40
  let e = (e) => {
40
- b.current && !b.current.contains(e.target) && _(!1);
41
+ x.current && !x.current.contains(e.target) && v(!1);
41
42
  };
42
- if (g) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
43
- }, [g]), n(() => {
44
- if (!g) {
45
- y("");
43
+ if (_) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
44
+ }, [_]), r(() => {
45
+ if (!_) {
46
+ b("");
46
47
  return;
47
48
  }
48
- if (C) {
49
- let e = setTimeout(() => x.current?.focus(), 60);
49
+ if (w) {
50
+ let e = setTimeout(() => S.current?.focus(), 60);
50
51
  return () => clearTimeout(e);
51
52
  }
52
- }, [g, C]);
53
- let T = (e) => {
54
- e.comingSoon || (p ? p(e) : window.location.href = e.url, _(!1));
53
+ }, [_, w]);
54
+ let E = (e) => {
55
+ e.comingSoon || (m ? m(e) : window.location.href = e.url, v(!1));
55
56
  };
56
- return /* @__PURE__ */ s("div", {
57
+ return /* @__PURE__ */ c("div", {
57
58
  className: "relative",
58
- ref: b,
59
- children: [/* @__PURE__ */ s("button", {
60
- onClick: () => _(!g),
61
- className: `flex items-center gap-2 px-3 py-2 rounded-button hover:bg-bg-sunken transition-colors ${g ? "bg-bg-sunken" : ""}`,
62
- "aria-label": h("productSwitcher.title", "Switch product"),
63
- "aria-expanded": g,
59
+ ref: x,
60
+ children: [/* @__PURE__ */ c("button", {
61
+ onClick: () => v(!_),
62
+ className: `flex items-center gap-2 px-3 py-2 rounded-button hover:bg-bg-sunken transition-colors ${_ ? "bg-bg-sunken" : ""}`,
63
+ "aria-label": g("productSwitcher.title", "Switch product"),
64
+ "aria-expanded": _,
64
65
  children: [
65
- /* @__PURE__ */ o(u, {
66
- product: S,
66
+ /* @__PURE__ */ s(d, {
67
+ product: C,
67
68
  sizeClass: "size-6",
68
69
  textClass: "text-xs"
69
70
  }),
70
- !m && /* @__PURE__ */ o("span", {
71
+ !h && /* @__PURE__ */ s("span", {
71
72
  className: "text-body-sm font-medium text-text-primary",
72
- children: S?.name
73
+ children: C?.name
73
74
  }),
74
- !m && /* @__PURE__ */ o("svg", {
75
- className: `w-4 h-4 text-text-secondary transition-transform ${g ? "rotate-180" : ""}`,
75
+ !h && /* @__PURE__ */ s("svg", {
76
+ className: `w-4 h-4 text-text-secondary transition-transform ${_ ? "rotate-180" : ""}`,
76
77
  fill: "none",
77
78
  stroke: "currentColor",
78
79
  viewBox: "0 0 24 24",
79
- children: /* @__PURE__ */ o("path", {
80
+ children: /* @__PURE__ */ s("path", {
80
81
  strokeLinecap: "round",
81
82
  strokeLinejoin: "round",
82
83
  strokeWidth: 2,
@@ -84,54 +85,54 @@ var p = ({ products: e, currentProductId: l, onProductChange: p, compact: m = !1
84
85
  })
85
86
  })
86
87
  ]
87
- }), g && /* @__PURE__ */ s("div", {
88
+ }), _ && /* @__PURE__ */ c("div", {
88
89
  className: "absolute right-0 mt-2 w-[calc(100vw-1.5rem)] sm:w-72 max-w-72 bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] z-50 py-2 overflow-hidden animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200",
89
90
  children: [
90
- /* @__PURE__ */ o("div", {
91
+ /* @__PURE__ */ s("div", {
91
92
  className: "px-4 py-2 border-b border-border-subtle",
92
- children: /* @__PURE__ */ o("p", {
93
+ children: /* @__PURE__ */ s("p", {
93
94
  className: "text-[11px] font-medium text-text-muted uppercase tracking-wider",
94
- children: h("productSwitcher.title", "Switch Product")
95
+ children: g("productSwitcher.title", "Switch Product")
95
96
  })
96
97
  }),
97
- C && /* @__PURE__ */ s("div", {
98
+ w && /* @__PURE__ */ c("div", {
98
99
  className: "relative px-3 py-2 border-b border-border-subtle",
99
100
  children: [
100
- /* @__PURE__ */ o("svg", {
101
+ /* @__PURE__ */ s("svg", {
101
102
  className: "pointer-events-none absolute left-6 top-1/2 -translate-y-1/2 size-4 text-text-muted",
102
103
  fill: "none",
103
104
  stroke: "currentColor",
104
105
  viewBox: "0 0 24 24",
105
- children: /* @__PURE__ */ o("path", {
106
+ children: /* @__PURE__ */ s("path", {
106
107
  strokeLinecap: "round",
107
108
  strokeLinejoin: "round",
108
109
  strokeWidth: 2,
109
110
  d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
110
111
  })
111
112
  }),
112
- /* @__PURE__ */ o("input", {
113
- ref: x,
113
+ /* @__PURE__ */ s("input", {
114
+ ref: S,
114
115
  type: "text",
115
- value: v,
116
- onChange: (e) => y(e.target.value),
116
+ value: y,
117
+ onChange: (e) => b(e.target.value),
117
118
  onKeyDown: (e) => {
118
- e.key === "Escape" && (v ? (e.stopPropagation(), y("")) : _(!1));
119
+ e.key === "Escape" && (y ? (e.stopPropagation(), b("")) : v(!1));
119
120
  },
120
- placeholder: h("productSwitcher.searchPlaceholder", "Search products…"),
121
- "aria-label": h("productSwitcher.searchAria", "Search products"),
121
+ placeholder: g("productSwitcher.searchPlaceholder", "Search products…"),
122
+ "aria-label": g("productSwitcher.searchAria", "Search products"),
122
123
  className: "w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-8 text-sm text-text-primary placeholder:text-text-muted transition-all duration-200 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-border)]"
123
124
  }),
124
- v && /* @__PURE__ */ o("button", {
125
+ y && /* @__PURE__ */ s("button", {
125
126
  type: "button",
126
- onClick: () => y(""),
127
- "aria-label": h("common.clearSearch", "Clear search"),
127
+ onClick: () => b(""),
128
+ "aria-label": g("common.clearSearch", "Clear search"),
128
129
  className: "absolute right-5 top-1/2 -translate-y-1/2 rounded-button p-1 text-text-muted transition-colors hover:bg-bg-sunken hover:text-text-primary",
129
- children: /* @__PURE__ */ o("svg", {
130
+ children: /* @__PURE__ */ s("svg", {
130
131
  className: "size-4",
131
132
  fill: "none",
132
133
  stroke: "currentColor",
133
134
  viewBox: "0 0 24 24",
134
- children: /* @__PURE__ */ o("path", {
135
+ children: /* @__PURE__ */ s("path", {
135
136
  strokeLinecap: "round",
136
137
  strokeLinejoin: "round",
137
138
  strokeWidth: 2,
@@ -141,50 +142,50 @@ var p = ({ products: e, currentProductId: l, onProductChange: p, compact: m = !1
141
142
  })
142
143
  ]
143
144
  }),
144
- /* @__PURE__ */ s("div", {
145
+ /* @__PURE__ */ c("div", {
145
146
  className: "py-1 max-h-96 overflow-y-auto",
146
- children: [w.length === 0 && /* @__PURE__ */ s("p", {
147
+ children: [T.length === 0 && /* @__PURE__ */ c("p", {
147
148
  className: "px-4 py-6 text-center text-body-sm text-text-muted",
148
149
  children: [
149
150
  "No products match “",
150
- v,
151
+ y,
151
152
  "”"
152
153
  ]
153
- }), w.map((e) => /* @__PURE__ */ s("button", {
154
- onClick: () => T(e),
155
- disabled: e.comingSoon,
156
- "aria-disabled": e.comingSoon,
157
- title: e.comingSoon ? h("productSwitcher.soon", "Soon") : e.name,
158
- className: `w-full flex items-center gap-3 px-4 py-2.5 text-body-sm transition-colors ${e.comingSoon ? "text-text-muted cursor-not-allowed opacity-60" : e.id === l ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-primary hover:bg-bg-sunken"}`,
154
+ }), T.map((t) => /* @__PURE__ */ c("button", {
155
+ onClick: () => E(t),
156
+ disabled: t.comingSoon,
157
+ "aria-disabled": t.comingSoon,
158
+ title: t.comingSoon ? g("productSwitcher.soon", "Soon") : t.name,
159
+ className: `w-full flex items-center gap-3 px-4 py-2.5 text-body-sm transition-colors ${t.comingSoon ? "text-text-muted cursor-not-allowed opacity-60" : e(t.id, u) ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-primary hover:bg-bg-sunken"}`,
159
160
  children: [
160
- /* @__PURE__ */ o(u, {
161
- product: e,
161
+ /* @__PURE__ */ s(d, {
162
+ product: t,
162
163
  sizeClass: "size-8",
163
164
  textClass: "text-sm"
164
165
  }),
165
- /* @__PURE__ */ o("span", {
166
+ /* @__PURE__ */ s("span", {
166
167
  className: "flex-1 text-left leading-tight",
167
- children: e.name
168
+ children: t.name
168
169
  }),
169
- e.comingSoon ? /* @__PURE__ */ o("span", {
170
+ t.comingSoon ? /* @__PURE__ */ s("span", {
170
171
  className: "shrink-0 whitespace-nowrap rounded-full border border-border-subtle bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-text-secondary",
171
- children: h("productSwitcher.soon", "Soon")
172
- }) : e.id === l && /* @__PURE__ */ o("svg", {
172
+ children: g("productSwitcher.soon", "Soon")
173
+ }) : e(t.id, u) && /* @__PURE__ */ s("svg", {
173
174
  className: "size-5 text-action-primary-bg",
174
175
  fill: "currentColor",
175
176
  viewBox: "0 0 20 20",
176
- children: /* @__PURE__ */ o("path", {
177
+ children: /* @__PURE__ */ s("path", {
177
178
  fillRule: "evenodd",
178
179
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
179
180
  clipRule: "evenodd"
180
181
  })
181
182
  })
182
183
  ]
183
- }, e.id))]
184
+ }, t.id))]
184
185
  })
185
186
  ]
186
187
  })]
187
188
  });
188
189
  };
189
190
  //#endregion
190
- export { p as ProductSwitcher, d as filterProducts, l as resolveProductLogo };
191
+ export { m as ProductSwitcher, f as filterProducts, u as resolveProductLogo };
@@ -147,6 +147,7 @@ export interface AutoCarryOverConversation {
147
147
  content: string;
148
148
  metadata?: {
149
149
  localAction?: unknown;
150
+ approvalFollowUp?: unknown;
150
151
  };
151
152
  }[];
152
153
  }
@@ -1 +1 @@
1
- {"version":3,"file":"autoRouting.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/autoRouting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,SAAS,CAAC;AAEnE,gFAAgF;AAChF,eAAO,MAAM,cAAc,cAA6C,CAAC;AAEzE;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,cAA6C,CAAC;AAE1E,sEAAsE;AACtE,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAAE,GAChD,OAAO,CAKT;AAslBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAg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YAAY,EAAE,yBAAyB,GAAG,SAAS,EACnD,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,OAAO,GACpB,MAAM,CAmBR;AAMD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,EAAE,eAAe,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,SAAI,GACR,cAAc,EAAE,CAalB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAyB9D"}
@@ -828,7 +828,7 @@ function X(e, t) {
828
828
  ].join("\n");
829
829
  }
830
830
  function Z(e, t, n) {
831
- return !e || e.routedBy !== "auto" || !n ? "" : X(e.messages.filter((e) => e.role === "user" && !e.metadata?.localAction).map((e) => e.content), t);
831
+ return !e || e.routedBy !== "auto" || !n ? "" : X(e.messages.filter((e) => e.role === "user" && !e.metadata?.localAction && !e.metadata?.approvalFollowUp).map((e) => e.content), t);
832
832
  }
833
833
  function Q(e, t, n = 4) {
834
834
  let r = [], i = /* @__PURE__ */ new Set(), a = (e, t) => {
@@ -120,6 +120,35 @@ export interface AssistantMessageMetadata {
120
120
  * what was done; nothing re-runs it when the conversation is reopened.
121
121
  */
122
122
  localAction?: AssistantLocalAction;
123
+ /**
124
+ * ★ BOFF-7335: this user message is the "I approved that change — go ahead."
125
+ * the panel sent after the Approve button landed — not something the person
126
+ * typed. Retry and Auto's carry-over never replay it, so a reopened
127
+ * conversation can never resend an approval; the approval itself lives in the
128
+ * sandbox and is single-use.
129
+ */
130
+ approvalFollowUp?: true;
131
+ /**
132
+ * ★ BOFF-7335: on that "go ahead", the id of the reply whose change was
133
+ * approved — so its card can say the assistant was asked to go ahead with
134
+ * it, from the go-ahead itself rather than from where it happens to sit in
135
+ * the thread.
136
+ */
137
+ approvedReplyId?: string;
138
+ /**
139
+ * ★ BOFF-7335: when the person's Approve for this reply's `pendingWrite`
140
+ * LANDED (ISO time). The card reads as approved from then on — never as
141
+ * expired, which would tell someone whose change was carried out that nothing
142
+ * changed and invite them to ask for it again. A record: no button comes back
143
+ * for it.
144
+ */
145
+ pendingWriteApprovedAt?: string;
146
+ /**
147
+ * ★ BOFF-7335: the client stopped waiting before the model finished — the
148
+ * reply holds what had arrived, plus the note that says so. A record, not an
149
+ * error: the turn still closed as a normal answer.
150
+ */
151
+ incomplete?: true;
123
152
  [key: string]: unknown;
124
153
  }
125
154
  export interface Message {
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/conversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,cAAc,GACd,SAAS,GACT,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,MAAM,2BAA2B,GACnC,MAAM,GACN,cAAc,GACd,YAAY,GACZ,WAAW,GACX,UAAU,GACV,OAAO,CAAC;AAEZ;;;;;;;;;GASG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qEAAqE;AACrE,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,GACxD;IAA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kF;IAClF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;;;;;;;;;OAeG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;;;;;;;;;OAaG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
@@ -0,0 +1,32 @@
1
+ import { PersistStorage } from 'zustand/middleware';
2
+ /**
3
+ * Persist storage that can refuse a write without failing the action behind it
4
+ * (BOFF-7335).
5
+ *
6
+ * ★★ WHY. The persist middleware writes after EVERY set — `set(...); return
7
+ * setItem();` — and calls storage synchronously, so a `setItem` that throws
8
+ * throws out of the store action itself. The profile-scoped adapter has no
9
+ * guard around `localStorage.setItem`, and a full origin quota
10
+ * (`QuotaExceededError`), or storage the browser has blocked, therefore threw
11
+ * out of `addMessage` in the middle of a turn: the question was on screen, the
12
+ * turn never started, and nothing said why. Conversations are the one thing
13
+ * here that grows without bound.
14
+ *
15
+ * The state is already in memory when the write is attempted — the middleware
16
+ * sets first — so dropping the write loses nothing this page shows. It is not
17
+ * saved for the next load; the next write that fits saves everything, since
18
+ * each write is the whole persisted state.
19
+ *
20
+ * ★ Logged once per failure streak, not per write: a turn writes on every poll,
21
+ * and one line per poll would bury the console.
22
+ *
23
+ * `onWriteError` is told about each refused write — the place to free space,
24
+ * whose own write then persists the smaller state. It is never re-entered: a
25
+ * write that fails while it runs is dropped without calling it again, so a
26
+ * callback that writes cannot recurse.
27
+ *
28
+ * Reads are not wrapped: the middleware already catches a read that throws and
29
+ * hydrates nothing.
30
+ */
31
+ export declare function createGuardedAssistantStorage<S>(storage: PersistStorage<S> | undefined, onWriteError?: (error: unknown, name: string) => void): PersistStorage<S> | undefined;
32
+ //# sourceMappingURL=guardedStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardedStorage.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/guardedStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAC7C,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,EACtC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GACpD,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,CA8C/B"}
@@ -0,0 +1,36 @@
1
+ //#region src/shared/assistant/guardedStorage.ts
2
+ function e(e, t) {
3
+ if (!e) return;
4
+ let n = !1, r = !1, i = (e, i) => {
5
+ if (n || (n = !0, console.warn(`[assistant] could not save "${i}"; this page keeps working, but the change is not saved until a later save fits`, e)), !(!t || r)) {
6
+ r = !0;
7
+ try {
8
+ t(e, i);
9
+ } catch {} finally {
10
+ r = !1;
11
+ }
12
+ }
13
+ };
14
+ return {
15
+ getItem: (t) => e.getItem(t),
16
+ setItem: (t, r) => {
17
+ try {
18
+ let i = e.setItem(t, r);
19
+ return n = !1, i;
20
+ } catch (e) {
21
+ i(e, t);
22
+ return;
23
+ }
24
+ },
25
+ removeItem: (t) => {
26
+ try {
27
+ return e.removeItem(t);
28
+ } catch (e) {
29
+ i(e, t);
30
+ return;
31
+ }
32
+ }
33
+ };
34
+ }
35
+ //#endregion
36
+ export { e as createGuardedAssistantStorage };