@burdenoff/fe-libs 2026.1113.3 → 2026.1113.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.
@@ -7,9 +7,17 @@ import { AssistantFocus } from '../../askAbout/focus';
7
7
  * Renders nothing when nothing is picked, so the composer's markup is exactly as
8
8
  * before for everyone who never uses the menu.
9
9
  */
10
- export declare const AssistantFocusChip: FC<{
10
+ export interface AssistantFocusChipProps {
11
11
  disabled?: boolean;
12
- }>;
12
+ /**
13
+ * ★ BOFF-13381: fills the message box with a suggested question. With it,
14
+ * the picked thing's suggestions show under the chip while
15
+ * `showSuggestions` is true (the box is empty). Choosing one sends nothing.
16
+ */
17
+ onSuggest?: (question: string) => void;
18
+ showSuggestions?: boolean;
19
+ }
20
+ export declare const AssistantFocusChip: FC<AssistantFocusChipProps>;
13
21
  interface BadgeProps {
14
22
  focus: AssistantFocus;
15
23
  /** Present on the composer's chip; absent on a sent message. */
@@ -3,18 +3,37 @@ import { useAssistantTr as t } from "../../i18n.js";
3
3
  import { Crosshair as n, X as r } from "lucide-react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  // src/shared/assistant/ui/composer/AssistantFocusChip.tsx
6
- var o = ({ disabled: n = !1 }) => {
7
- let r = t(), a = e((e) => e.pending);
8
- return a ? /* @__PURE__ */ i("div", {
9
- className: "mb-1.5 flex px-0.5",
6
+ var o = ({ disabled: n = !1, onSuggest: r, showSuggestions: o = !1 }) => {
7
+ let c = t(), l = e((e) => e.pending);
8
+ if (!l) return null;
9
+ let u = r && o ? l.suggestions ?? [] : [];
10
+ return /* @__PURE__ */ a("div", {
11
+ className: "mb-1.5 flex flex-col gap-1.5 px-0.5",
10
12
  "data-testid": "assistant-focus-chip-row",
11
- children: /* @__PURE__ */ i(s, {
12
- focus: a,
13
- onRemove: () => e.getState().actions.clear(),
14
- removeLabel: r("askAbout.chipRemove", "Stop asking about {{name}}", { name: a.label }),
15
- disabled: n
16
- })
17
- }) : null;
13
+ children: [/* @__PURE__ */ i("div", {
14
+ className: "flex",
15
+ children: /* @__PURE__ */ i(s, {
16
+ focus: l,
17
+ onRemove: () => e.getState().actions.clear(),
18
+ removeLabel: c("askAbout.chipRemove", "Stop asking about {{name}}", { name: l.label }),
19
+ disabled: n
20
+ })
21
+ }), u.length > 0 && r ? /* @__PURE__ */ i("div", {
22
+ className: "flex flex-wrap gap-1.5",
23
+ role: "group",
24
+ "aria-label": c("askAbout.suggestionsLabel", "Suggested questions"),
25
+ "data-agent": "deny",
26
+ "data-testid": "assistant-focus-suggestions",
27
+ children: u.map((e) => /* @__PURE__ */ i("button", {
28
+ type: "button",
29
+ disabled: n,
30
+ onClick: () => r(e),
31
+ className: "max-w-full truncate rounded-full border border-border-subtle bg-bg-surface px-2.5 py-1 text-xs text-text-primary transition-colors hover:border-action-primary-bg hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-not-allowed",
32
+ "data-testid": "assistant-focus-suggestion",
33
+ children: e
34
+ }, e))
35
+ }) : null]
36
+ });
18
37
  }, s = ({ focus: e, onRemove: o, removeLabel: s, disabled: c = !1 }) => {
19
38
  let l = t(), u = e.selectedText ? `“${e.selectedText.replace(/\s+/g, " ").slice(0, 60)}${e.selectedText.length > 60 ? "…" : ""}”` : e.kind;
20
39
  return /* @__PURE__ */ a("span", {