@burdenoff/fe-libs 2026.1116.6 → 2026.1116.8

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.
@@ -9,61 +9,62 @@ import { useAssistantTr as m } from "../../i18n.js";
9
9
  import { useAssistantStore as h } from "../../store.js";
10
10
  import { voiceTurnsOnly as g } from "../../voice/turnVisibility.js";
11
11
  import { AssistantRenameConversationDialog as _ } from "../AssistantRenameConversationDialog.js";
12
- import { assistantHistoryIsOn as v } from "../conversationDelete.js";
13
- import { useConversationDeleteDialog as y } from "../conversationDeleteDialog.js";
14
- import { ASSISTANT_PAGE_BAR_ICON_BUTTON as b } from "./AssistantPageBar.js";
15
- import { useCallback as x, useRef as S, useState as C, useSyncExternalStore as w } from "react";
16
- import { FileJson as T, FileText as E, Mic as D, MoreHorizontal as O, Pencil as k, Pin as A, PinOff as j, Trash2 as M } from "lucide-react";
17
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
12
+ import { useAssistantPageLayout as v } from "../assistantPageLayout.js";
13
+ import { assistantHistoryIsOn as y } from "../conversationDelete.js";
14
+ import { useConversationDeleteDialog as b } from "../conversationDeleteDialog.js";
15
+ import { ASSISTANT_PAGE_BAR_ICON_BUTTON as x } from "./AssistantPageBar.js";
16
+ import { useCallback as S, useRef as C, useState as w, useSyncExternalStore as T } from "react";
17
+ import { FileJson as E, FileText as D, Mic as O, MoreHorizontal as k, Pencil as A, Pin as j, PinOff as M, Trash2 as N } from "lucide-react";
18
+ import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
18
19
  // src/shared/assistant/ui/compact/AssistantConversationMenu.tsx
19
- var I = "min-h-11 gap-2.5 px-3", L = {
20
+ var L = "min-h-11 gap-2.5 px-3", R = {
20
21
  icon: {
21
22
  button: "flex size-10 shrink-0 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
22
23
  icon: "size-5"
23
24
  },
24
25
  bar: {
25
- button: b,
26
+ button: x,
26
27
  icon: "size-4"
27
28
  }
28
29
  };
29
- function R(e) {
30
- let { tr: t, pin: i, onRename: a, onTogglePin: o } = e, s = i?.pinned ? j : A;
31
- return /* @__PURE__ */ F(N, { children: [
32
- /* @__PURE__ */ F(n, {
33
- className: I,
30
+ function z(e) {
31
+ let { tr: t, pin: i, onRename: a, onTogglePin: o } = e, s = i?.pinned ? M : j;
32
+ return /* @__PURE__ */ I(P, { children: [
33
+ /* @__PURE__ */ I(n, {
34
+ className: L,
34
35
  onSelect: a,
35
36
  "data-testid": "assistant-more-rename",
36
- children: [/* @__PURE__ */ P(k, {
37
+ children: [/* @__PURE__ */ F(A, {
37
38
  className: "size-4 shrink-0 text-text-secondary",
38
39
  "aria-hidden": "true"
39
40
  }), t("conversationMenu.rename", "Rename")]
40
41
  }),
41
- i ? /* @__PURE__ */ F(n, {
42
- className: I,
42
+ i ? /* @__PURE__ */ I(n, {
43
+ className: L,
43
44
  onSelect: o,
44
45
  "data-testid": "assistant-more-pin",
45
46
  "data-pinned": i.pinned ? "true" : "false",
46
- children: [/* @__PURE__ */ P(s, {
47
+ children: [/* @__PURE__ */ F(s, {
47
48
  className: "size-4 shrink-0 text-text-secondary",
48
49
  "aria-hidden": "true"
49
50
  }), i.pinned ? t("conversationMenu.unpin", "Unpin") : t("conversationMenu.pin", "Pin")]
50
51
  }) : null,
51
- /* @__PURE__ */ P(r, {})
52
+ /* @__PURE__ */ F(r, {})
52
53
  ] });
53
54
  }
54
- function z(e) {
55
- let { managed: t, activeConversationId: n, conversations: r, onOpenChange: i, onDeleteConfirmed: o } = e, s = y(), c = t && s !== null && l({
55
+ function B(e) {
56
+ let { managed: t, activeConversationId: n, conversations: r, onOpenChange: i, onDeleteConfirmed: o } = e, s = b(), c = t && s !== null && l({
56
57
  spoken: !1,
57
58
  bound: null,
58
59
  activeConversationId: n,
59
60
  conversations: r,
60
- historyOn: v()
61
- }) !== null, [u, d] = C(null), f = h((e) => u === null || e.conversations.some((e) => e.id === u.conversationId)), p = S(null), m = x((e, t) => {
61
+ historyOn: y()
62
+ }) !== null, [u, d] = w(null), f = h((e) => u === null || e.conversations.some((e) => e.id === u.conversationId)), p = C(null), m = S((e, t) => {
62
63
  p.current = {
63
64
  kind: e,
64
65
  conversationId: t
65
66
  };
66
- }, []), g = x((e) => {
67
+ }, []), g = S((e) => {
67
68
  let t = h.getState(), n = t.conversations.find((t) => t.id === e.conversationId);
68
69
  if (!n) return;
69
70
  if (e.kind === "rename") {
@@ -80,24 +81,24 @@ function z(e) {
80
81
  bound: null,
81
82
  activeConversationId: n.id,
82
83
  conversations: t.conversations,
83
- historyOn: v()
84
+ historyOn: y()
84
85
  });
85
86
  r && s?.request(r, { onConfirmed: o });
86
- }, [s, o]), b = x((e) => {
87
+ }, [s, o]), v = S((e) => {
87
88
  let t = p.current;
88
89
  p.current = null, t ? g(t) : a(document) || e.preventDefault();
89
- }, [g]), w = x((e) => {
90
+ }, [g]), x = S((e) => {
90
91
  e && (p.current = null), i(e);
91
- }, [i]), T = x(() => d((e) => e && {
92
+ }, [i]), T = S(() => d((e) => e && {
92
93
  ...e,
93
94
  open: !1
94
95
  }), []);
95
96
  return {
96
97
  choose: m,
97
98
  deleteOffered: c,
98
- onCloseAutoFocus: b,
99
- onOpenChange: w,
100
- dialogs: u ? /* @__PURE__ */ P(_, {
99
+ onCloseAutoFocus: v,
100
+ onOpenChange: x,
101
+ dialogs: u ? /* @__PURE__ */ F(_, {
101
102
  open: u.open && f,
102
103
  title: u.title,
103
104
  onSave: (e) => {
@@ -107,102 +108,118 @@ function z(e) {
107
108
  }, u.opening) : null
108
109
  };
109
110
  }
110
- var B = ({ open: a, onOpenChange: l, triggerRef: _, manage: v = !1, onDeleteConfirmed: y, triggerLook: b = "icon" }) => {
111
- let x = m(), { conversations: S, activeConversationId: C, processingByConversationId: k } = h(), A = S.find((e) => e.id === C), j = !!(A && A.messages.length > 0), B = !!(w(c, () => s("assistant.transcript"), () => !1) && A && g(A.messages).length > 0), V = v && A !== void 0, H = p(V ? A : void 0), U = z({
112
- managed: V,
113
- activeConversationId: C,
114
- conversations: S,
111
+ var V = ({ open: a, onOpenChange: l, triggerRef: _, manage: y = !1, onDeleteConfirmed: b, triggerLook: x = "icon" }) => {
112
+ let S = m(), { conversations: C, activeConversationId: w, processingByConversationId: A } = h(), j = C.find((e) => e.id === w), M = !!(j && j.messages.length > 0), V = T(c, () => s("assistant.transcript"), () => !1), H = !!(j && g(j.messages).length > 0), U = V && H, W = v(), G = (y || W) && j !== void 0 && !H, K = y && j !== void 0, q = p(K ? j : void 0), J = B({
113
+ managed: K,
114
+ activeConversationId: w,
115
+ conversations: C,
115
116
  onOpenChange: l,
116
- onDeleteConfirmed: y
117
- }), W = L[b], G = (e) => {
118
- if (!A) return;
119
- let { content: t, filename: n, mimeType: r } = d(A, e, {
120
- processing: k[A.id],
121
- tr: x
117
+ onDeleteConfirmed: b
118
+ }), Y = R[x], X = (e) => {
119
+ if (!j) return;
120
+ let { content: t, filename: n, mimeType: r } = d(j, e, {
121
+ processing: A[j.id],
122
+ tr: S
122
123
  });
123
124
  u(t, n, r);
124
- }, K = () => {
125
+ }, ee = () => {
125
126
  o("assistant.transcript")?.run();
126
- }, q = (e) => {
127
- A && U.choose(e, A.id);
128
- }, J = () => {
129
- A && H && f.updateConversation(A.id, { pinned: !H.pinned });
130
- }, Y = x("header.conversationOptions", "Conversation options"), X = /* @__PURE__ */ F(e, {
127
+ }, Z = (e) => {
128
+ j && J.choose(e, j.id);
129
+ }, te = () => {
130
+ j && q && f.updateConversation(j.id, { pinned: !q.pinned });
131
+ }, Q = S("header.conversationOptions", "Conversation options"), $ = /* @__PURE__ */ I(e, {
131
132
  open: a,
132
- onOpenChange: U.onOpenChange,
133
+ onOpenChange: J.onOpenChange,
133
134
  modal: !1,
134
- children: [/* @__PURE__ */ P(i, {
135
+ children: [/* @__PURE__ */ F(i, {
135
136
  asChild: !0,
136
- children: /* @__PURE__ */ P("button", {
137
+ children: /* @__PURE__ */ F("button", {
137
138
  ref: _,
138
139
  type: "button",
139
- "aria-label": Y,
140
- title: Y,
141
- className: W.button,
140
+ "aria-label": Q,
141
+ title: Q,
142
+ className: Y.button,
142
143
  "data-testid": "assistant-more",
143
- children: /* @__PURE__ */ P(O, {
144
- className: W.icon,
144
+ children: /* @__PURE__ */ F(k, {
145
+ className: Y.icon,
145
146
  "aria-hidden": "true"
146
147
  })
147
148
  })
148
- }), /* @__PURE__ */ F(t, {
149
+ }), /* @__PURE__ */ I(t, {
149
150
  align: "end",
150
151
  sideOffset: 4,
151
152
  collisionPadding: 8,
152
- onCloseAutoFocus: U.onCloseAutoFocus,
153
+ onCloseAutoFocus: J.onCloseAutoFocus,
153
154
  className: "min-w-56 max-w-[calc(100vw-2rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto",
154
155
  "data-testid": "assistant-more-menu",
155
156
  children: [
156
- V ? R({
157
- tr: x,
158
- pin: H,
159
- onRename: () => q("rename"),
160
- onTogglePin: J
157
+ K ? z({
158
+ tr: S,
159
+ pin: q,
160
+ onRename: () => Z("rename"),
161
+ onTogglePin: te
161
162
  }) : null,
162
- j ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F(n, {
163
- className: I,
164
- onSelect: () => G("markdown"),
163
+ M ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ I(n, {
164
+ className: L,
165
+ onSelect: () => X("markdown"),
165
166
  "data-testid": "export-markdown",
166
- children: [/* @__PURE__ */ P(E, {
167
+ children: [/* @__PURE__ */ F(D, {
167
168
  className: "size-4 shrink-0 text-text-secondary",
168
169
  "aria-hidden": "true"
169
- }), x("export.markdown", "Export as Markdown")]
170
- }), /* @__PURE__ */ F(n, {
171
- className: I,
172
- onSelect: () => G("json"),
170
+ }), S("export.markdown", "Export as Markdown")]
171
+ }), /* @__PURE__ */ I(n, {
172
+ className: L,
173
+ onSelect: () => X("json"),
173
174
  "data-testid": "export-json",
174
- children: [/* @__PURE__ */ P(T, {
175
+ children: [/* @__PURE__ */ F(E, {
175
176
  className: "size-4 shrink-0 text-text-secondary",
176
177
  "aria-hidden": "true"
177
- }), x("export.json", "Export as JSON")]
178
+ }), S("export.json", "Export as JSON")]
178
179
  })] }) : null,
179
- B ? /* @__PURE__ */ F(n, {
180
- className: I,
181
- onSelect: K,
180
+ U ? /* @__PURE__ */ I(n, {
181
+ className: L,
182
+ onSelect: ee,
182
183
  "data-testid": "assistant-more-voice-transcript",
183
- children: [/* @__PURE__ */ P(D, {
184
+ children: [/* @__PURE__ */ F(O, {
184
185
  className: "size-4 shrink-0 text-text-secondary",
185
186
  "aria-hidden": "true"
186
- }), x("conversationMenu.voiceTranscript", "Voice transcript")]
187
+ }), S("conversationMenu.voiceTranscript", "Voice transcript")]
188
+ }) : null,
189
+ G ? /* @__PURE__ */ I(n, {
190
+ disabled: !0,
191
+ className: `${L} text-text-secondary`,
192
+ "data-testid": "assistant-more-voice-transcript-pending",
193
+ children: [
194
+ /* @__PURE__ */ F(O, {
195
+ className: "size-4 shrink-0",
196
+ "aria-hidden": "true"
197
+ }),
198
+ S("conversationMenu.voiceTranscript", "Voice transcript"),
199
+ /* @__PURE__ */ F("span", {
200
+ className: "text-xs text-text-muted",
201
+ children: S("conversationMenu.voiceTranscriptPending", "(after you talk in this chat)")
202
+ })
203
+ ]
187
204
  }) : null,
188
- !j && !B ? /* @__PURE__ */ P(n, {
205
+ !M && !U ? /* @__PURE__ */ F(n, {
189
206
  disabled: !0,
190
- className: `${I} text-text-secondary`,
207
+ className: `${L} text-text-secondary`,
191
208
  "data-testid": "assistant-more-empty",
192
- children: x("conversationMenu.empty", "Nothing to export yet")
209
+ children: S("conversationMenu.empty", "Nothing to export yet")
193
210
  }) : null,
194
- U.deleteOffered ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(r, {}), /* @__PURE__ */ F(n, {
195
- className: `${I} text-status-error-text focus:text-status-error-text`,
196
- onSelect: () => q("delete"),
211
+ J.deleteOffered ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(r, {}), /* @__PURE__ */ I(n, {
212
+ className: `${L} text-status-error-text focus:text-status-error-text`,
213
+ onSelect: () => Z("delete"),
197
214
  "data-testid": "assistant-more-delete",
198
- children: [/* @__PURE__ */ P(M, {
215
+ children: [/* @__PURE__ */ F(N, {
199
216
  className: "size-4 shrink-0",
200
217
  "aria-hidden": "true"
201
- }), x("conversationMenu.delete", "Delete chat")]
218
+ }), S("conversationMenu.delete", "Delete chat")]
202
219
  })] }) : null
203
220
  ]
204
221
  })]
205
222
  });
206
- return v ? /* @__PURE__ */ F(N, { children: [X, U.dialogs] }) : X;
223
+ return y ? /* @__PURE__ */ I(P, { children: [$, J.dialogs] }) : $;
207
224
  };
208
- export { B as AssistantConversationMenu };
225
+ export { V as AssistantConversationMenu };
@@ -23,4 +23,19 @@ export declare const ASSISTANT_PAGE_BAR_BUTTON = "inline-flex shrink-0 items-cen
23
23
  * touch target; from `sm`, 32 px, the height of the page's `size="sm"` buttons beside it.
24
24
  */
25
25
  export declare const ASSISTANT_PAGE_BAR_ICON_BUTTON = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] size-10 sm:size-8";
26
+ /**
27
+ * BOFF-15057: a labelled control in that group (the page's History and New chat) that is icon-only
28
+ * below `sm`, so a phone's bar keeps ONE row: its icon in the 40 px square of
29
+ * `ASSISTANT_PAGE_BAR_ICON_BUTTON`, its words from `sm` at the `size="sm"` height. Give its words
30
+ * `ASSISTANT_PAGE_BAR_LABEL`. With fe-libs `Button size="sm"`, `size-10` takes the place of its
31
+ * `h-8` below `sm` (tailwind-merge), and it is as before from `sm`. On a 320 px phone the row then
32
+ * holds four 40 px controls (History, New chat, the preview toggle, ⋯) with 132 px to spare.
33
+ */
34
+ export declare const ASSISTANT_PAGE_BAR_LABELLED_BUTTON = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] size-10 gap-1.5 sm:h-8 sm:w-auto sm:px-3";
35
+ /**
36
+ * BOFF-15057: the words of an `ASSISTANT_PAGE_BAR_LABELLED_BUTTON`: visually hidden below `sm`,
37
+ * still its accessible name there (never `hidden`, which would leave the button unnamed), shown
38
+ * from `sm`.
39
+ */
40
+ export declare const ASSISTANT_PAGE_BAR_LABEL = "sr-only sm:not-sr-only";
26
41
  export declare const AssistantPageBar: FC<AssistantPageBarProps>;
@@ -5,20 +5,20 @@ import { AssistantPageBarActionsSlot as r, useAssistantPageBarActionsOffered as
5
5
  import { Eye as a } from "lucide-react";
6
6
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
7
  // src/shared/assistant/ui/compact/AssistantPageBar.tsx
8
- var c = "min-h-12 shrink-0 items-center justify-end gap-1 px-2 py-1 sm:px-3", l = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", u = `${l} size-10 sm:size-8`, d = "flex size-10 shrink-0 items-center justify-center rounded-button transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", f = "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", p = "bg-action-primary-bg/15 text-action-primary-bg", m = "flex min-w-0 flex-wrap items-center justify-end gap-1", h = ({ conversationMenu: l, onTogglePreview: h, previewOpen: g }) => {
8
+ var c = "min-h-12 shrink-0 items-center justify-end gap-1 px-2 py-1 sm:px-3", l = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", u = `${l} size-10 sm:size-8`, d = `${l} size-10 gap-1.5 sm:h-8 sm:w-auto sm:px-3`, f = "sr-only sm:not-sr-only", p = "flex size-10 shrink-0 items-center justify-center rounded-button transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", m = "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", h = "bg-action-primary-bg/15 text-action-primary-bg", g = "flex min-w-0 flex-wrap items-center justify-end gap-1", _ = ({ conversationMenu: l, onTogglePreview: d, previewOpen: f }) => {
9
9
  let _ = e(), v = t(), y = i();
10
10
  return /* @__PURE__ */ s("div", {
11
11
  className: `flex ${c}`,
12
12
  "data-testid": "assistant-page-bar",
13
13
  "data-presentation": "page",
14
14
  children: [
15
- y ? /* @__PURE__ */ o(r, { className: m }) : null,
16
- n(v) && h ? /* @__PURE__ */ o("button", {
15
+ y ? /* @__PURE__ */ o(r, { className: g }) : null,
16
+ n(v) && d ? /* @__PURE__ */ o("button", {
17
17
  type: "button",
18
- onClick: h,
19
- className: y ? u : `${d} ${g ? p : f}`,
18
+ onClick: d,
19
+ className: y ? u : `${p} ${f ? h : m}`,
20
20
  "aria-label": v.label ?? _("header.preview", "Preview"),
21
- "aria-pressed": !!g,
21
+ "aria-pressed": !!f,
22
22
  "data-testid": "assistant-toggle-preview",
23
23
  children: /* @__PURE__ */ o(a, {
24
24
  className: y ? "size-4" : "size-5",
@@ -29,4 +29,4 @@ var c = "min-h-12 shrink-0 items-center justify-end gap-1 px-2 py-1 sm:px-3", l
29
29
  ]
30
30
  });
31
31
  };
32
- export { l as ASSISTANT_PAGE_BAR_BUTTON, u as ASSISTANT_PAGE_BAR_ICON_BUTTON, c as ASSISTANT_PAGE_BAR_ROW, h as AssistantPageBar };
32
+ export { l as ASSISTANT_PAGE_BAR_BUTTON, u as ASSISTANT_PAGE_BAR_ICON_BUTTON, f as ASSISTANT_PAGE_BAR_LABEL, d as ASSISTANT_PAGE_BAR_LABELLED_BUTTON, c as ASSISTANT_PAGE_BAR_ROW, _ as AssistantPageBar };
@@ -1,5 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { ConversationDeleteTarget } from '../conversationDeleteCommand';
3
+ import { AssistantDeleteConversationWording } from './AssistantDeleteConversationDialog';
3
4
  /** What a caller of the Delete confirmation may add (BOFF-15028). */
4
5
  export interface ConversationDeleteRequestOptions {
5
6
  /**
@@ -35,7 +36,12 @@ export declare function useConversationDeleteDialog(): ConversationDeleteDialogC
35
36
  * ★ A target that goes while it is open — deleted on another device, in
36
37
  * another tab, or here by the list — closes it: there is nothing left to
37
38
  * confirm, and a confirm must never delete whatever took its place.
39
+ *
40
+ * ★ BOFF-15057: `wording` is the confirmation's words for every opening, whoever asks (⋯ or the
41
+ * typed command), so one panel never asks the same thing in two ways. The panel passes `chat`
42
+ * while the hosting page lets ⋯ manage the chat; absent, the words of before.
38
43
  */
39
44
  export declare const AssistantConversationDeleteDialogProvider: FC<{
40
45
  children: ReactNode;
46
+ wording?: AssistantDeleteConversationWording;
41
47
  }>;
@@ -9,46 +9,47 @@ var f = i(null);
9
9
  function p() {
10
10
  return o(f);
11
11
  }
12
- var m = ({ children: i }) => {
13
- let o = e(), [p, m] = l({
12
+ var m = ({ children: i, wording: o }) => {
13
+ let p = e(), [m, h] = l({
14
14
  target: null,
15
15
  open: !1,
16
16
  opening: 0
17
- }), h = a((e, t) => {
18
- m((n) => ({
17
+ }), g = a((e, t) => {
18
+ h((n) => ({
19
19
  target: e,
20
20
  open: !0,
21
21
  opening: n.opening + 1,
22
22
  ...t?.onConfirmed ? { onConfirmed: t.onConfirmed } : {}
23
23
  }));
24
- }, []), g = a(() => {
25
- m((e) => e.open ? {
24
+ }, []), _ = a(() => {
25
+ h((e) => e.open ? {
26
26
  ...e,
27
27
  open: !1
28
28
  } : e);
29
- }, []), _ = p.open ? p.target?.conversationId : void 0, v = t((e) => _ === void 0 || e.conversations.some((e) => e.id === _));
29
+ }, []), v = m.open ? m.target?.conversationId : void 0, y = t((e) => v === void 0 || e.conversations.some((e) => e.id === v));
30
30
  s(() => {
31
- v || g();
32
- }, [v, g]);
33
- let y = a(() => {
34
- let { target: e, open: n, onConfirmed: i } = p;
31
+ y || _();
32
+ }, [y, _]);
33
+ let b = a(() => {
34
+ let { target: e, open: n, onConfirmed: i } = m;
35
35
  if (!n || !e) return;
36
36
  let a = t.getState().conversations.some((t) => t.id === e.conversationId);
37
- g(), a && (i?.(), r(e.conversationId));
38
- }, [p, g]), b = p.open && v, x = c(() => ({
39
- request: h,
40
- asking: b
41
- }), [h, b]);
37
+ _(), a && (i?.(), r(e.conversationId));
38
+ }, [m, _]), x = m.open && y, S = c(() => ({
39
+ request: g,
40
+ asking: x
41
+ }), [g, x]);
42
42
  return /* @__PURE__ */ d(f.Provider, {
43
- value: x,
44
- children: [i, p.target ? /* @__PURE__ */ u(n, {
45
- open: b,
46
- title: p.target.title,
47
- synced: p.target.synced,
48
- tr: o,
49
- onConfirm: y,
50
- onDismiss: g
51
- }, p.opening) : null]
43
+ value: S,
44
+ children: [i, m.target ? /* @__PURE__ */ u(n, {
45
+ open: x,
46
+ title: m.target.title,
47
+ synced: m.target.synced,
48
+ tr: p,
49
+ ...o ? { wording: o } : {},
50
+ onConfirm: b,
51
+ onDismiss: _
52
+ }, m.opening) : null]
52
53
  });
53
54
  };
54
55
  export { m as AssistantConversationDeleteDialogProvider, p as useConversationDeleteDialog };