@burdenoff/fe-libs 2026.924.2 → 2026.924.4

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/shared/assistant/adminModeSendGate.d.ts.map +1 -1
  2. package/dist/shared/assistant/adminModeSendGate.js +23 -20
  3. package/dist/shared/assistant/autoRouting.d.ts +197 -0
  4. package/dist/shared/assistant/autoRouting.d.ts.map +1 -0
  5. package/dist/shared/assistant/autoRouting.js +854 -0
  6. package/dist/shared/assistant/conversation.d.ts +13 -0
  7. package/dist/shared/assistant/conversation.d.ts.map +1 -1
  8. package/dist/shared/assistant/i18nManifest.d.ts +2 -0
  9. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  10. package/dist/shared/assistant/i18nManifest.js +23 -19
  11. package/dist/shared/assistant/index.d.ts +3 -0
  12. package/dist/shared/assistant/index.d.ts.map +1 -1
  13. package/dist/shared/assistant/modeCapabilities.d.ts +1 -1
  14. package/dist/shared/assistant/modeCapabilities.d.ts.map +1 -1
  15. package/dist/shared/assistant/modeCapabilities.js +29 -28
  16. package/dist/shared/assistant/permissionError.d.ts.map +1 -1
  17. package/dist/shared/assistant/permissionError.js +11 -10
  18. package/dist/shared/assistant/store.d.ts +32 -2
  19. package/dist/shared/assistant/store.d.ts.map +1 -1
  20. package/dist/shared/assistant/store.js +69 -29
  21. package/dist/shared/assistant/turnOutcome.d.ts +58 -0
  22. package/dist/shared/assistant/turnOutcome.d.ts.map +1 -0
  23. package/dist/shared/assistant/turnOutcome.js +79 -0
  24. package/dist/shared/assistant/turnOutcomeCopy.d.ts +62 -0
  25. package/dist/shared/assistant/turnOutcomeCopy.d.ts.map +1 -0
  26. package/dist/shared/assistant/turnOutcomeCopy.js +49 -0
  27. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  28. package/dist/shared/assistant/ui/AssistantChatArea.js +475 -399
  29. package/dist/shared/assistant/ui/AssistantEmptyState.d.ts +17 -1
  30. package/dist/shared/assistant/ui/AssistantEmptyState.d.ts.map +1 -1
  31. package/dist/shared/assistant/ui/AssistantEmptyState.js +14 -9
  32. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +3 -0
  33. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts.map +1 -1
  34. package/dist/shared/assistant/ui/composer/AssistantComposer.js +110 -109
  35. package/dist/shared/assistant/ui/composer/AssistantModeSelector.d.ts +20 -0
  36. package/dist/shared/assistant/ui/composer/AssistantModeSelector.d.ts.map +1 -1
  37. package/dist/shared/assistant/ui/composer/AssistantModeSelector.js +89 -45
  38. package/dist/shared/assistant/writeModeConsent.d.ts +15 -2
  39. package/dist/shared/assistant/writeModeConsent.d.ts.map +1 -1
  40. package/dist/shared/assistant/writeModeConsent.js +24 -19
  41. package/dist/shared-assistant.js +116 -113
  42. package/package.json +1 -1
@@ -1,8 +1,24 @@
1
1
  import { FC } from 'react';
2
2
  import { AssistantMode } from '../types';
3
+ import { AssistantIntent, AutoSuggestion } from '../autoRouting';
3
4
  interface Props {
4
5
  mode: AssistantMode;
5
- onSuggestionClick: (suggestion: string) => void;
6
+ /**
7
+ * `intent` is set only for an Auto chip: which mode's list it came from, so
8
+ * the send is routed by that rather than by reading its (translated) text.
9
+ */
10
+ onSuggestionClick: (suggestion: string, intent?: AssistantIntent) => void;
11
+ /**
12
+ * Chips to show instead of the active mode's — Auto's mix of the read and the
13
+ * write mode's suggestions (BOFF-7800).
14
+ */
15
+ suggestions?: readonly AutoSuggestion[];
16
+ /**
17
+ * Say what Auto does. The pill's own hint is a `title` and a screen-reader
18
+ * description; a sighted touch user reaches neither, and an empty Auto
19
+ * conversation is exactly when they need it.
20
+ */
21
+ explainsAuto?: boolean;
6
22
  }
7
23
  /**
8
24
  * AssistantEmptyState — the v2 zero-message surface (per the "panel-welcome"
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantEmptyState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantEmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,UAAU,KAAK;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,KAAK,CAyDzC,CAAC"}
1
+ {"version":3,"file":"AssistantEmptyState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantEmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAItE,UAAU,KAAK;IACb,IAAI,EAAE,aAAa,CAAC;IACpB;;;OAGG;IACH,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1E;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACxC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,KAAK,CA2EzC,CAAC"}
@@ -3,8 +3,8 @@ import { useAssistantTr as r } from "../i18n.js";
3
3
  import { Sparkles as i } from "lucide-react";
4
4
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
5
  //#region src/shared/assistant/ui/AssistantEmptyState.tsx
6
- var s = ({ mode: s, onSuggestionClick: c }) => {
7
- let l = r(), { modes: u } = n(), d = e(u, s), f = t(), p = d?.suggestions.slice(0, 4) ?? [];
6
+ var s = ({ mode: s, onSuggestionClick: c, suggestions: l, explainsAuto: u = !1 }) => {
7
+ let d = r(), { modes: f } = n(), p = e(f, s), m = t(), h = l ?? (p?.suggestions.slice(0, 4) ?? []).map((e) => ({ text: e }));
8
8
  return /* @__PURE__ */ o("div", {
9
9
  className: "flex flex-1 flex-col items-center justify-center overflow-y-auto px-6 py-8 text-center",
10
10
  children: [
@@ -14,21 +14,26 @@ var s = ({ mode: s, onSuggestionClick: c }) => {
14
14
  }),
15
15
  /* @__PURE__ */ a("h2", {
16
16
  className: "mt-5 text-2xl font-semibold leading-tight tracking-tight text-text-primary",
17
- children: l("empty.title", "How can I help?")
17
+ children: d("empty.title", "How can I help?")
18
18
  }),
19
19
  /* @__PURE__ */ a("p", {
20
20
  className: "mt-2 max-w-[16rem] text-[13px] leading-relaxed text-text-muted",
21
- children: f ? l("empty.subtitle", "You're viewing {{page}}. Ask about it, or pick a suggestion below.", { page: f }) : l("empty.subtitleNoPage", "Ask me anything, or pick a suggestion below.")
21
+ children: m ? d("empty.subtitle", "You're viewing {{page}}. Ask about it, or pick a suggestion below.", { page: m }) : d("empty.subtitleNoPage", "Ask me anything, or pick a suggestion below.")
22
22
  }),
23
+ u ? /* @__PURE__ */ a("p", {
24
+ className: "mt-2 max-w-[18rem] text-[12px] leading-relaxed text-text-muted",
25
+ "data-testid": "assistant-auto-explainer",
26
+ children: d("modeSelector.autoHint", "Answers your questions, and proposes changes for you to approve")
27
+ }) : null,
23
28
  /* @__PURE__ */ a("div", {
24
29
  className: "mt-6 flex flex-wrap items-center justify-center gap-2",
25
- children: p.map((e) => /* @__PURE__ */ a("button", {
30
+ children: h.map((e) => /* @__PURE__ */ a("button", {
26
31
  type: "button",
27
- onClick: () => c(e),
28
- className: "rounded-full border border-border-subtle bg-bg-surface px-3.5 py-2 text-[13px] leading-tight text-text-primary shadow-sm transition-all hover:border-action-primary-bg/40 hover:bg-bg-elevated hover:shadow-md",
32
+ onClick: () => c(e.text, e.intent),
33
+ className: "rounded-full border border-border-subtle bg-bg-surface px-3.5 py-2 text-[13px] leading-tight text-text-primary shadow-sm transition-[color,background-color,border-color,box-shadow] hover:border-action-primary-bg/40 hover:bg-bg-elevated hover:shadow-md",
29
34
  "data-testid": "assistant-suggestion",
30
- children: e
31
- }, e))
35
+ children: e.text
36
+ }, e.text))
32
37
  })
33
38
  ]
34
39
  });
@@ -2,6 +2,7 @@ import { FC } from 'react';
2
2
  import { AssistantModeConfig } from '../../conversation';
3
3
  import { AssistantMode } from '../../types';
4
4
  import { AssistantAttachment } from '../../attachments';
5
+ import { AssistantAutoOption } from './AssistantModeSelector';
5
6
  interface Props {
6
7
  /**
7
8
  * Writes would be refused in this workspace. Advisory only — the mode stays
@@ -33,6 +34,8 @@ interface Props {
33
34
  */
34
35
  attachmentCharsPerFile?: number;
35
36
  onModeChange: (mode: AssistantMode) => void;
37
+ /** Offer Auto as the first mode pill (BOFF-7800); absent where it is not offered. */
38
+ auto?: AssistantAutoOption;
36
39
  /**
37
40
  * Opens the hands-free voice conversation. Omitted where a voice session
38
41
  * cannot work at all (no speech input, or nothing able to speak the reply),
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantComposer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAO3B,UAAU,KAAK;IACb;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACtE,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,qDAAqD;IACrD,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CA6ZvC,CAAC"}
1
+ {"version":3,"file":"AssistantComposer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,UAAU,KAAK;IACb;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACtE,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,qDAAqD;IACrD,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,qFAAqF;IACrF,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CA+ZvC,CAAC"}
@@ -1,178 +1,179 @@
1
1
  import { useI18n as e } from "../../../providers/shell/I18nProvider.js";
2
2
  import { useVoiceInput as t } from "../../voice/useVoiceInput.js";
3
- import { useAssistantTr as ee } from "../../i18n.js";
4
- import { languageDisplayName as n } from "../../voice/speechVoices.js";
3
+ import { useAssistantTr as n } from "../../i18n.js";
4
+ import { languageDisplayName as ee } from "../../voice/speechVoices.js";
5
5
  import { resolveAssistantLanguage as r } from "../../voice/languages.js";
6
- import { getSendableAttachments as i } from "../../attachments.js";
7
- import { useAssistantStore as a } from "../../store.js";
8
- import { AssistantAttachmentButton as o } from "./AssistantAttachmentButton.js";
9
- import { AssistantAttachmentChips as s } from "./AssistantAttachmentChips.js";
10
- import { AssistantModeSelector as c } from "./AssistantModeSelector.js";
11
- import { AssistantVoiceButton as te } from "./AssistantVoiceButton.js";
12
- import { AssistantVoiceSessionButton as ne } from "../voice/AssistantVoiceSessionButton.js";
13
- import { useAssistantAttachments as re } from "../../useAssistantAttachments.js";
14
- import { useCallback as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
15
- import { ArrowUp as m, Loader2 as h } from "lucide-react";
16
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
6
+ import { getSendableAttachments as te } from "../../attachments.js";
7
+ import { useAssistantStore as ne } from "../../store.js";
8
+ import { AssistantAttachmentButton as re } from "./AssistantAttachmentButton.js";
9
+ import { AssistantAttachmentChips as i } from "./AssistantAttachmentChips.js";
10
+ import { AssistantModeSelector as a } from "./AssistantModeSelector.js";
11
+ import { AssistantVoiceButton as o } from "./AssistantVoiceButton.js";
12
+ import { AssistantVoiceSessionButton as s } from "../voice/AssistantVoiceSessionButton.js";
13
+ import { useAssistantAttachments as c } from "../../useAssistantAttachments.js";
14
+ import { useCallback as l, useLayoutEffect as u, useMemo as ie, useRef as d, useState as f } from "react";
15
+ import { ArrowUp as ae, Loader2 as oe } from "lucide-react";
16
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
17
17
  //#region src/shared/assistant/ui/composer/AssistantComposer.tsx
18
- var v = 200, y = ({ writeAccessDenied: y = !1, onSend: b, disabled: x = !1, placeholder: S, mode: ie, availableModes: C, attachmentCharsPerFile: ae, onModeChange: oe, onStartVoiceSession: w }) => {
19
- let T = ee(), { locale: E } = e(), D = f(null), [O, k] = p(""), [A, j] = p(!1), M = f(0), { attachments: N, isBusy: P, preparingCount: F, sendBlocker: I, rejection: L, addFiles: R, remove: z, retry: B, clear: V, clearRejection: H, canAddMore: se } = re({ perFileChars: ae }), U = l((e) => {
20
- k((t) => t ? `${t.replace(/\s+$/, "")} ${e}` : e);
21
- }, []), W = a((e) => e.assistantLanguage), G = t({
22
- onFinalize: U,
23
- language: d(() => r(W, E), [W, E]).tag
24
- }), K = S ?? T("composer.placeholder", "Ask me anything…"), q = O.trim(), J = i(N), Y = N.filter((e) => e.status === "error"), X = (q.length > 0 || J.length > 0) && !x && I === null;
18
+ var h = 200, g = ({ writeAccessDenied: g = !1, onSend: _, disabled: v = !1, placeholder: y, mode: b, availableModes: x, attachmentCharsPerFile: S, onModeChange: C, auto: w, onStartVoiceSession: T }) => {
19
+ let E = n(), { locale: D } = e(), O = d(null), [k, A] = f(""), [j, M] = f(!1), N = d(0), { attachments: P, isBusy: F, preparingCount: I, sendBlocker: L, rejection: R, addFiles: z, remove: B, retry: V, clear: H, clearRejection: se, canAddMore: U } = c({ perFileChars: S }), W = l((e) => {
20
+ A((t) => t ? `${t.replace(/\s+$/, "")} ${e}` : e);
21
+ }, []), G = ne((e) => e.assistantLanguage), K = t({
22
+ onFinalize: W,
23
+ language: ie(() => r(G, D), [G, D]).tag
24
+ }), ce = y ?? E("composer.placeholder", "Ask me anything…"), q = k.trim(), J = te(P), Y = P.filter((e) => e.status === "error"), X = (q.length > 0 || J.length > 0) && !v && L === null;
25
25
  u(() => {
26
- let e = D.current;
27
- e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, v)}px`);
28
- }, [O]);
26
+ let e = O.current;
27
+ e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, h)}px`);
28
+ }, [k]);
29
29
  let Z = l(() => {
30
- X && (G.isActive && G.stop(), b(O.trim(), J), k(""), V());
30
+ X && (K.isActive && K.stop(), _(k.trim(), J), A(""), H());
31
31
  }, [
32
32
  X,
33
- b,
34
- O,
33
+ _,
34
+ k,
35
35
  J,
36
- V,
37
- G
38
- ]), ce = l((e) => {
36
+ H,
37
+ K
38
+ ]), le = l((e) => {
39
39
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Z());
40
- }, [Z]), le = l((e) => {
40
+ }, [Z]), Q = l((e) => {
41
41
  let t = Array.from(e.clipboardData?.files ?? []);
42
- t.length !== 0 && (e.preventDefault(), R(t));
43
- }, [R]), ue = l((e) => {
44
- Array.from(e.dataTransfer?.types ?? []).includes("Files") && (M.current += 1, j(!0));
45
- }, []), Q = l(() => {
46
- M.current = Math.max(0, M.current - 1), M.current === 0 && j(!1);
47
- }, []), de = l((e) => {
48
- Array.from(e.dataTransfer?.types ?? []).includes("Files") && e.preventDefault();
42
+ t.length !== 0 && (e.preventDefault(), z(t));
43
+ }, [z]), ue = l((e) => {
44
+ Array.from(e.dataTransfer?.types ?? []).includes("Files") && (N.current += 1, M(!0));
45
+ }, []), de = l(() => {
46
+ N.current = Math.max(0, N.current - 1), N.current === 0 && M(!1);
49
47
  }, []), fe = l((e) => {
50
- e.preventDefault(), M.current = 0, j(!1), R(e.dataTransfer?.files ?? null);
51
- }, [R]), pe = (e) => {
48
+ Array.from(e.dataTransfer?.types ?? []).includes("Files") && e.preventDefault();
49
+ }, []), pe = l((e) => {
50
+ e.preventDefault(), N.current = 0, M(!1), z(e.dataTransfer?.files ?? null);
51
+ }, [z]), me = (e) => {
52
52
  switch (e) {
53
- case "too-many": return T("attachments.tooMany", "You can attach up to {{max}} files per message.", { max: 5 });
54
- case "too-large": return T("attachments.tooLarge", "That file is larger than 10 MB.");
55
- case "empty": return T("attachments.empty", "That file is empty.");
56
- case "unreadable": return T("attachments.unreadable", "That file could not be read.");
57
- case "unsupported-image": return T("attachments.unsupportedImage", "This device can't read that image format, so it can't be resized to send. Save it as JPEG and try again.");
53
+ case "too-many": return E("attachments.tooMany", "You can attach up to {{max}} files per message.", { max: 5 });
54
+ case "too-large": return E("attachments.tooLarge", "That file is larger than 10 MB.");
55
+ case "empty": return E("attachments.empty", "That file is empty.");
56
+ case "unreadable": return E("attachments.unreadable", "That file could not be read.");
57
+ case "unsupported-image": return E("attachments.unsupportedImage", "This device can't read that image format, so it can't be resized to send. Save it as JPEG and try again.");
58
58
  }
59
59
  }, $ = (() => {
60
- switch (G.error) {
61
- case "not-allowed": return T("voice.denied", "Microphone access is blocked. Allow it in your browser settings to dictate.");
62
- case "audio-capture": return T("voice.noMic", "No microphone was found.");
63
- case "network": return T("voice.network", "Speech recognition is offline right now.");
64
- case "language-not-supported": return T("voice.languageNotSupported", "This browser cannot recognise spoken {{language}}. Try a different browser, or type instead.", { language: n(G.language, E) });
65
- case "unknown": return T("voice.failed", "Dictation stopped unexpectedly.");
60
+ switch (K.error) {
61
+ case "not-allowed": return E("voice.denied", "Microphone access is blocked. Allow it in your browser settings to dictate.");
62
+ case "audio-capture": return E("voice.noMic", "No microphone was found.");
63
+ case "network": return E("voice.network", "Speech recognition is offline right now.");
64
+ case "language-not-supported": return E("voice.languageNotSupported", "This browser cannot recognise spoken {{language}}. Try a different browser, or type instead.", { language: ee(K.language, D) });
65
+ case "unknown": return E("voice.failed", "Dictation stopped unexpectedly.");
66
66
  default: return null;
67
67
  }
68
68
  })();
69
- return /* @__PURE__ */ _("div", {
69
+ return /* @__PURE__ */ m("div", {
70
70
  className: "flex-shrink-0 px-3 pb-3 pt-1.5",
71
71
  children: [
72
- /* @__PURE__ */ _("div", {
72
+ /* @__PURE__ */ m("div", {
73
73
  onDragEnter: ue,
74
- onDragLeave: Q,
75
- onDragOver: de,
76
- onDrop: fe,
77
- className: `rounded-2xl border p-2 shadow-sm transition-colors focus-within:border-action-primary-bg focus-within:ring-2 focus-within:ring-action-primary-bg/15 ${A ? "border-action-primary-bg border-dashed bg-action-primary-bg/5" : "border-border-default bg-bg-sunken"}`,
74
+ onDragLeave: de,
75
+ onDragOver: fe,
76
+ onDrop: pe,
77
+ className: `rounded-2xl border p-2 shadow-sm transition-colors focus-within:border-action-primary-bg focus-within:ring-2 focus-within:ring-action-primary-bg/15 ${j ? "border-action-primary-bg border-dashed bg-action-primary-bg/5" : "border-border-default bg-bg-sunken"}`,
78
78
  "data-testid": "assistant-composer",
79
79
  children: [
80
- /* @__PURE__ */ g(s, {
81
- attachments: N,
82
- onRemove: z,
83
- onRetry: B,
84
- disabled: x,
85
- preparingCount: F
80
+ /* @__PURE__ */ p(i, {
81
+ attachments: P,
82
+ onRemove: B,
83
+ onRetry: V,
84
+ disabled: v,
85
+ preparingCount: I
86
86
  }),
87
- /* @__PURE__ */ _("div", {
87
+ /* @__PURE__ */ m("div", {
88
88
  className: "flex items-end gap-2",
89
89
  children: [
90
- /* @__PURE__ */ g(o, {
91
- onFiles: R,
92
- canAddMore: se,
93
- disabled: x
90
+ /* @__PURE__ */ p(re, {
91
+ onFiles: z,
92
+ canAddMore: U,
93
+ disabled: v
94
94
  }),
95
- /* @__PURE__ */ g("textarea", {
96
- ref: D,
97
- value: O,
98
- onChange: (e) => k(e.target.value),
99
- onKeyDown: ce,
100
- onPaste: le,
101
- disabled: x,
102
- placeholder: A ? T("composer.dropHere", "Drop files to attach") : K,
95
+ /* @__PURE__ */ p("textarea", {
96
+ ref: O,
97
+ value: k,
98
+ onChange: (e) => A(e.target.value),
99
+ onKeyDown: le,
100
+ onPaste: Q,
101
+ disabled: v,
102
+ placeholder: j ? E("composer.dropHere", "Drop files to attach") : ce,
103
103
  rows: 1,
104
104
  className: "min-h-[36px] flex-1 resize-none self-center bg-transparent px-1 py-2 text-[15px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50",
105
- "aria-label": T("chatInput.ariaLabel", "Message input"),
105
+ "aria-label": E("chatInput.ariaLabel", "Message input"),
106
106
  "data-testid": "assistant-input"
107
107
  }),
108
- G.isSupported && /* @__PURE__ */ g(te, {
109
- isListening: G.isListening,
110
- isStarting: G.isStarting,
111
- onToggle: G.toggle,
112
- disabled: x
108
+ K.isSupported && /* @__PURE__ */ p(o, {
109
+ isListening: K.isListening,
110
+ isStarting: K.isStarting,
111
+ onToggle: K.toggle,
112
+ disabled: v
113
113
  }),
114
- w && q.length === 0 && N.length === 0 && !G.isActive ? /* @__PURE__ */ g(ne, {
115
- onStart: w,
116
- disabled: x
117
- }) : /* @__PURE__ */ g("button", {
114
+ T && q.length === 0 && P.length === 0 && !K.isActive ? /* @__PURE__ */ p(s, {
115
+ onStart: T,
116
+ disabled: v
117
+ }) : /* @__PURE__ */ p("button", {
118
118
  type: "button",
119
119
  onClick: Z,
120
120
  disabled: !X,
121
121
  className: `flex size-9 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${X ? "bg-action-primary-bg text-action-primary-text hover:scale-105 hover:bg-action-primary-bg-hover" : "bg-bg-elevated text-text-muted"}`,
122
- "aria-label": T("chatInput.send", "Send message"),
122
+ "aria-label": E("chatInput.send", "Send message"),
123
123
  "data-testid": "assistant-send",
124
- children: x || P ? /* @__PURE__ */ g(h, { className: "size-4 motion-safe:animate-spin" }) : /* @__PURE__ */ g(m, { className: "size-4" })
124
+ children: v || F ? /* @__PURE__ */ p(oe, { className: "size-4 motion-safe:animate-spin" }) : /* @__PURE__ */ p(ae, { className: "size-4" })
125
125
  })
126
126
  ]
127
127
  }),
128
- C.length > 1 && /* @__PURE__ */ g("div", {
128
+ x.length > 1 && /* @__PURE__ */ p("div", {
129
129
  className: "mt-2 px-0.5",
130
- children: /* @__PURE__ */ g(c, {
131
- mode: ie,
132
- availableModes: C,
133
- onModeChange: oe,
134
- disabled: x
130
+ children: /* @__PURE__ */ p(a, {
131
+ mode: b,
132
+ availableModes: x,
133
+ onModeChange: C,
134
+ disabled: v,
135
+ auto: w
135
136
  })
136
137
  })
137
138
  ]
138
139
  }),
139
- y ? /* @__PURE__ */ g("p", {
140
+ g ? /* @__PURE__ */ p("p", {
140
141
  className: "mt-1.5 px-1 text-center text-[11px] text-status-warning",
141
142
  "data-testid": "assistant-write-access-warning",
142
- children: T("composer.writeAccessDenied", "Changes may not save — your role in this workspace does not currently allow edits. You can still plan and review an action.")
143
+ children: E("composer.writeAccessDenied", "Changes may not save — your role in this workspace does not currently allow edits. You can still plan and review an action.")
143
144
  }) : null,
144
- /* @__PURE__ */ g("div", {
145
+ /* @__PURE__ */ p("div", {
145
146
  className: "mt-1.5 px-1 text-center text-[11px]",
146
147
  "aria-live": "polite",
147
- children: G.isStarting && !G.isListening ? /* @__PURE__ */ g("p", {
148
+ children: K.isStarting && !K.isListening ? /* @__PURE__ */ p("p", {
148
149
  className: "text-text-muted",
149
150
  "data-testid": "assistant-voice-starting",
150
- children: T("voice.starting", "Starting the microphone…")
151
- }) : G.isListening ? /* @__PURE__ */ _("p", {
151
+ children: E("voice.starting", "Starting the microphone…")
152
+ }) : K.isListening ? /* @__PURE__ */ m("p", {
152
153
  className: "text-status-error-text",
153
154
  "data-testid": "assistant-voice-status",
154
- children: [/* @__PURE__ */ g("span", { className: "mr-1 inline-block size-1.5 rounded-full bg-status-error-text align-middle motion-safe:animate-pulse" }), G.interim || T("voice.listening", "Listening… speak now, tap the square to stop")]
155
- }) : $ ? /* @__PURE__ */ g("p", {
155
+ children: [/* @__PURE__ */ p("span", { className: "mr-1 inline-block size-1.5 rounded-full bg-status-error-text align-middle motion-safe:animate-pulse" }), K.interim || E("voice.listening", "Listening… speak now, tap the square to stop")]
156
+ }) : $ ? /* @__PURE__ */ p("p", {
156
157
  className: "text-status-error-text",
157
158
  "data-testid": "assistant-voice-error",
158
159
  children: $
159
- }) : L ? /* @__PURE__ */ g("button", {
160
+ }) : R ? /* @__PURE__ */ p("button", {
160
161
  type: "button",
161
- onClick: H,
162
+ onClick: se,
162
163
  className: "text-status-error-text underline-offset-2 hover:underline",
163
164
  "data-testid": "assistant-attachment-rejection",
164
- children: pe(L)
165
- }) : I === "failed" ? /* @__PURE__ */ g("p", {
165
+ children: me(R)
166
+ }) : L === "failed" ? /* @__PURE__ */ p("p", {
166
167
  className: "text-status-error-text",
167
168
  "data-testid": "assistant-attachment-blocked",
168
- children: Y.length === 1 ? T("attachments.blockedOne", "{{name}} didn't upload. Retry or remove it before sending.", { name: Y[0].filename }) : T("attachments.blockedMany", "{{count}} attachments didn't upload. Retry or remove them before sending.", { count: Y.length })
169
- }) : /* @__PURE__ */ g("p", {
169
+ children: Y.length === 1 ? E("attachments.blockedOne", "{{name}} didn't upload. Retry or remove it before sending.", { name: Y[0].filename }) : E("attachments.blockedMany", "{{count}} attachments didn't upload. Retry or remove them before sending.", { count: Y.length })
170
+ }) : /* @__PURE__ */ p("p", {
170
171
  className: "text-text-muted",
171
- children: T("composer.hint", "Enter to send · Shift+Enter for newline · drag or paste files to attach")
172
+ children: E("composer.hint", "Enter to send · Shift+Enter for newline · drag or paste files to attach")
172
173
  })
173
174
  })
174
175
  ]
175
176
  });
176
177
  };
177
178
  //#endregion
178
- export { y as AssistantComposer };
179
+ export { g as AssistantComposer };
@@ -8,7 +8,27 @@ interface Props {
8
8
  availableModes: AssistantModeConfig[];
9
9
  onModeChange: (mode: AssistantMode) => void;
10
10
  disabled?: boolean;
11
+ /**
12
+ * Offer Auto as the first pill (BOFF-7800). Absent where Auto is not offered.
13
+ * `active` is whether it is selected; `mode` then says where Auto has routed
14
+ * the open conversation, which the pill names once that is the write mode.
15
+ */
16
+ auto?: AssistantAutoOption;
11
17
  }
18
+ export interface AssistantAutoOption {
19
+ active: boolean;
20
+ onSelect: () => void;
21
+ }
22
+ /**
23
+ * The pill id Auto uses inside the radiogroup — how a keypress finds the pill it
24
+ * came from.
25
+ *
26
+ * ★★ Deliberately NOT a legal mode id: the colon is outside
27
+ * `PRODUCT_ASSISTANT_MODE_ID_PATTERN`. A product may declare a mode called
28
+ * `auto`, and with a plain "auto" here its pill would share this id, so picking
29
+ * it would select Auto instead and the arrow keys could not tell the two apart.
30
+ */
31
+ export declare const AUTO_MODE_OPTION_ID = ":auto";
12
32
  /**
13
33
  * Per-mode presentation metadata: the icon, and the shared English name used
14
34
  * when a product's `label` is empty ('Ask' / 'Take action'), while the mode ID
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantModeSelector.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantModeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AACzE,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAQvE,UAAU,KAAK;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,iFAAiF;IACjF,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,oBAAoB,EACpB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAsBxD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE;IAC5C,EAAE,EAAE,aAAa,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAQzC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAgBf;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAkI3C,CAAC"}
1
+ {"version":3,"file":"AssistantModeSelector.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantModeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAQvE,UAAU,KAAK;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,iFAAiF;IACjF,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,oBAAoB,EACpB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAsBxD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE;IAC5C,EAAE,EAAE,aAAa,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAQzC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAgBf;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAqN3C,CAAC"}
@@ -1,38 +1,39 @@
1
1
  import { useAssistantTr as e } from "../../i18n.js";
2
2
  import { ASSISTANT_MODE_FALLBACK_LABELS as t, assistantModeFallbackLabel as n, isBuiltInAssistantMode as r } from "../../modeCopy.js";
3
- import { useCallback as i, useRef as a } from "react";
4
- import { ShieldCheck as o, Sparkles as s, Zap as c } from "lucide-react";
5
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
3
+ import { AUTO_WRITE_MODE as i } from "../../autoRouting.js";
4
+ import { useCallback as a, useId as o, useMemo as s, useRef as c } from "react";
5
+ import { ShieldCheck as l, Sparkles as u, Wand2 as d, Zap as f } from "lucide-react";
6
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
6
7
  //#region src/shared/assistant/ui/composer/AssistantModeSelector.tsx
7
- var d = {
8
+ var h = ":auto", g = {
8
9
  general: {
9
10
  i18nKey: "mode.ask",
10
11
  fallback: t.general,
11
- icon: s
12
+ icon: u
12
13
  },
13
14
  assistant: {
14
15
  i18nKey: "mode.ask",
15
16
  fallback: t.assistant,
16
- icon: s
17
+ icon: u
17
18
  },
18
19
  "api-calls": {
19
20
  i18nKey: "mode.takeAction",
20
21
  fallback: t["api-calls"],
21
- icon: o
22
+ icon: l
22
23
  },
23
24
  "vibe-plugins": {
24
25
  i18nKey: "mode.build",
25
26
  fallback: t["vibe-plugins"],
26
- icon: c
27
+ icon: f
27
28
  }
28
29
  };
29
- function f(e) {
30
- return r(e.id) ? d[e.id] : {
30
+ function _(e) {
31
+ return r(e.id) ? g[e.id] : {
31
32
  fallback: n(e),
32
- icon: e.producesArtifacts === !0 ? c : s
33
+ icon: e.producesArtifacts === !0 ? f : u
33
34
  };
34
35
  }
35
- function p(e, t, n) {
36
+ function v(e, t, n) {
36
37
  switch (e) {
37
38
  case "Home": return 0;
38
39
  case "End": return n;
@@ -43,46 +44,89 @@ function p(e, t, n) {
43
44
  default: return null;
44
45
  }
45
46
  }
46
- var m = ({ mode: t, availableModes: n, onModeChange: r, disabled: o = !1 }) => {
47
- let s = e(), c = a(null), d = i((e) => {
48
- if (o) return;
49
- let i = e.target?.closest("[data-mode-id]")?.dataset.modeId, a = i ? n.findIndex((e) => e.id === i) : -1, s = a >= 0 ? a : n.findIndex((e) => e.id === t), l = p(e.key, s, n.length - 1);
50
- if (l === null) return;
51
- e.preventDefault();
52
- let u = n[l];
53
- u && (c.current?.querySelector(`[data-mode-id="${u.id}"]`)?.focus(), u.id !== t && r(u.id));
47
+ var y = ({ mode: t, availableModes: n, onModeChange: r, disabled: l = !1, auto: u }) => {
48
+ let f = e(), g = c(null), y = o(), b = u !== void 0, x = s(() => [...b ? [h] : [], ...n.map((e) => e.id)], [b, n]), S = u?.active ? h : t, C = x.includes(S) ? S : x[0] ?? null, w = a((e) => {
49
+ if (e === ":auto") {
50
+ u?.onSelect();
51
+ return;
52
+ }
53
+ let t = n.find((t) => t.id === e);
54
+ t && r(t.id);
54
55
  }, [
56
+ u,
55
57
  n,
56
- o,
57
- t,
58
58
  r
59
- ]);
60
- return n.length < 2 ? null : /* @__PURE__ */ l("div", {
61
- ref: c,
59
+ ]), T = a((e) => {
60
+ if (l) return;
61
+ let t = e.target?.closest("[data-mode-id]")?.dataset.modeId, n = t ? x.indexOf(t) : -1, r = n >= 0 ? n : x.indexOf(S), i = v(e.key, r, x.length - 1);
62
+ if (i === null) return;
63
+ e.preventDefault();
64
+ let a = x[i];
65
+ a !== void 0 && (g.current?.querySelector(`[data-mode-id="${a}"]`)?.focus(), a !== S && w(a));
66
+ }, [
67
+ l,
68
+ x,
69
+ S,
70
+ w
71
+ ]), E = !!u?.active && t === "api-calls", D = n.find((e) => e.id === i);
72
+ return n.length < 2 ? null : /* @__PURE__ */ m("div", {
73
+ ref: g,
62
74
  role: "radiogroup",
63
- "aria-label": s("modeSelector.ariaLabel", "Select assistant mode"),
64
- onKeyDown: d,
65
- className: "inline-flex max-w-full items-center gap-1 overflow-x-auto rounded-full border border-border-subtle bg-bg-elevated p-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
75
+ "aria-label": f("modeSelector.ariaLabel", "Select assistant mode"),
76
+ onKeyDown: T,
77
+ className: "relative inline-flex max-w-full items-center gap-1 overflow-x-auto rounded-full border border-border-subtle bg-bg-elevated p-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
66
78
  "data-testid": "assistant-mode-selector",
67
- children: n.map((e) => {
68
- let n = f(e), i = n.icon, a = e.id === t;
69
- return /* @__PURE__ */ u("button", {
79
+ children: [
80
+ u ? /* @__PURE__ */ m("button", {
70
81
  type: "button",
71
82
  role: "radio",
72
- "aria-checked": a,
73
- tabIndex: a ? 0 : -1,
74
- disabled: o,
75
- onClick: () => r(e.id),
76
- "data-mode-id": e.id,
77
- className: `flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1.5 text-[13px] font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 ${a ? "bg-action-primary-bg text-action-primary-text shadow-sm" : "text-text-secondary hover:bg-bg-surface hover:text-text-primary"}`,
78
- "data-testid": `assistant-mode-option-${e.id}`,
79
- children: [/* @__PURE__ */ l(i, {
80
- className: "size-3.5",
81
- "aria-hidden": "true"
82
- }), /* @__PURE__ */ l("span", { children: s(`mode.${e.id}`, e.label || n.fallback) })]
83
- }, e.id);
84
- })
83
+ "aria-checked": u.active,
84
+ tabIndex: C === ":auto" ? 0 : -1,
85
+ disabled: l,
86
+ onClick: () => w(h),
87
+ "data-mode-id": h,
88
+ "aria-describedby": y,
89
+ title: f("modeSelector.autoHint", "Answers your questions, and proposes changes for you to approve"),
90
+ className: `flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1.5 text-[13px] font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 ${u.active ? "bg-action-primary-bg text-action-primary-text shadow-sm" : "text-text-secondary hover:bg-bg-surface hover:text-text-primary"}`,
91
+ "data-testid": "assistant-mode-auto",
92
+ "data-auto-routed": E ? i : void 0,
93
+ children: [
94
+ /* @__PURE__ */ p(d, {
95
+ className: "size-3.5",
96
+ "aria-hidden": "true"
97
+ }),
98
+ /* @__PURE__ */ p("span", { children: f("modeSelector.auto", "Auto") }),
99
+ E && D ? /* @__PURE__ */ m("span", {
100
+ className: "opacity-80",
101
+ children: ["· ", f(`mode.${D.id}`, D.label || _(D).fallback)]
102
+ }) : null
103
+ ]
104
+ }) : null,
105
+ n.map((e) => {
106
+ let n = _(e), r = n.icon, i = !u?.active && e.id === t;
107
+ return /* @__PURE__ */ m("button", {
108
+ type: "button",
109
+ role: "radio",
110
+ "aria-checked": i,
111
+ tabIndex: C === e.id ? 0 : -1,
112
+ disabled: l,
113
+ onClick: () => w(e.id),
114
+ "data-mode-id": e.id,
115
+ className: `flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1.5 text-[13px] font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 ${i ? "bg-action-primary-bg text-action-primary-text shadow-sm" : "text-text-secondary hover:bg-bg-surface hover:text-text-primary"}`,
116
+ "data-testid": `assistant-mode-option-${e.id}`,
117
+ children: [/* @__PURE__ */ p(r, {
118
+ className: "size-3.5",
119
+ "aria-hidden": "true"
120
+ }), /* @__PURE__ */ p("span", { children: f(`mode.${e.id}`, e.label || n.fallback) })]
121
+ }, e.id);
122
+ }),
123
+ u ? /* @__PURE__ */ p("span", {
124
+ id: y,
125
+ className: "sr-only left-0 top-0",
126
+ children: f("modeSelector.autoHint", "Answers your questions, and proposes changes for you to approve")
127
+ }) : null
128
+ ]
85
129
  });
86
130
  };
87
131
  //#endregion
88
- export { d as ASSISTANT_MODE_META, m as AssistantModeSelector, f as assistantModeMeta, p as nextModeIndex };
132
+ export { g as ASSISTANT_MODE_META, h as AUTO_MODE_OPTION_ID, y as AssistantModeSelector, _ as assistantModeMeta, v as nextModeIndex };