@opengeni/react 7.0.0 → 7.1.0-canary.35855175602001

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 (81) hide show
  1. package/README.md +34 -0
  2. package/dist/approvals.d.ts +2 -1
  3. package/dist/artifacts.js +17 -17
  4. package/dist/{browser-viewer-LGH4IP47.js → browser-viewer-MN7MOYQT.js} +5 -5
  5. package/dist/{chunk-YS24CFDI.js → chunk-2O2HXRGP.js} +7 -7
  6. package/dist/{chunk-IP4BUBKH.js → chunk-3LL47F4U.js} +28 -17
  7. package/dist/chunk-3LL47F4U.js.map +1 -0
  8. package/dist/{chunk-UXE5SSNN.js → chunk-4ACTWOOW.js} +8 -8
  9. package/dist/{chunk-IYUPN32E.js → chunk-DBPVUGQT.js} +6 -1
  10. package/dist/{chunk-IYUPN32E.js.map → chunk-DBPVUGQT.js.map} +1 -1
  11. package/dist/{chunk-5GAL23FF.js → chunk-IOLPHOF4.js} +2 -5
  12. package/dist/chunk-IOLPHOF4.js.map +1 -0
  13. package/dist/{chunk-JPHDWKZE.js → chunk-PFDNB3U7.js} +15 -10
  14. package/dist/chunk-PFDNB3U7.js.map +1 -0
  15. package/dist/{chunk-D7GAPJ3V.js → chunk-SHRCATV6.js} +67 -34
  16. package/dist/chunk-SHRCATV6.js.map +1 -0
  17. package/dist/{chunk-H5YGYNXS.js → chunk-TV5PP2PE.js} +11 -11
  18. package/dist/chunk-TV5PP2PE.js.map +1 -0
  19. package/dist/{chunk-PNAVEK2U.js → chunk-UQS7BGNQ.js} +12 -12
  20. package/dist/{chunk-JKLGJQO5.js → chunk-VI7HELBI.js} +40 -20
  21. package/dist/chunk-VI7HELBI.js.map +1 -0
  22. package/dist/{chunk-HJ5VJ4JB.js → chunk-WKFFRFJF.js} +73 -15
  23. package/dist/chunk-WKFFRFJF.js.map +1 -0
  24. package/dist/{chunk-D5NOQPLR.js → chunk-ZC2DK5SC.js} +75 -65
  25. package/dist/chunk-ZC2DK5SC.js.map +1 -0
  26. package/dist/components/markdown.d.ts +2 -0
  27. package/dist/components/model-policy-picker.d.ts +17 -1
  28. package/dist/components/session-conversation.d.ts +3 -0
  29. package/dist/composer.d.ts +1 -1
  30. package/dist/composer.js +7 -7
  31. package/dist/{computer-viewer-CTFCJVS7.js → computer-viewer-FX4WOZMX.js} +4 -4
  32. package/dist/connect.js +5 -5
  33. package/dist/hooks/use-session-events.d.ts +6 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.js +112 -115
  36. package/dist/index.js.map +1 -1
  37. package/dist/interaction.js +5 -5
  38. package/dist/machines.js +2 -2
  39. package/dist/{model-policy-picker-menu-RVOQ4ZZG.js → model-policy-picker-menu-AGXXJZ2B.js} +4 -4
  40. package/dist/model-policy.js +1 -1
  41. package/dist/realtime.js +5 -5
  42. package/dist/session-ui.js +12 -12
  43. package/dist/session.js +3 -3
  44. package/dist/timeline/tool-display-name.d.ts +2 -1
  45. package/dist/timeline/types.d.ts +2 -1
  46. package/package.json +3 -3
  47. package/src/approvals.ts +8 -1
  48. package/src/components/approval-surface.tsx +12 -2
  49. package/src/components/machine-card.tsx +5 -5
  50. package/src/components/machine-dock-bar.tsx +1 -1
  51. package/src/components/machines/machine-detail.tsx +5 -2
  52. package/src/components/markdown.tsx +101 -55
  53. package/src/components/model-policy-picker-menu.tsx +131 -33
  54. package/src/components/model-policy-picker.tsx +61 -12
  55. package/src/components/session-commands-panel.tsx +8 -3
  56. package/src/components/session-conversation.tsx +5 -1
  57. package/src/composer.ts +1 -0
  58. package/src/hooks/use-last-started-turn-policy.ts +3 -7
  59. package/src/hooks/use-session-events.ts +32 -7
  60. package/src/index.ts +1 -0
  61. package/src/model-policy.ts +1 -4
  62. package/src/timeline/projection.ts +4 -0
  63. package/src/timeline/rolling-activity.tsx +4 -2
  64. package/src/timeline/tool-display-name.ts +8 -6
  65. package/src/timeline/tool-renderers.tsx +5 -3
  66. package/src/timeline/types.ts +2 -0
  67. package/styles/compiled.css +15 -0
  68. package/dist/chunk-5GAL23FF.js.map +0 -1
  69. package/dist/chunk-D5NOQPLR.js.map +0 -1
  70. package/dist/chunk-D7GAPJ3V.js.map +0 -1
  71. package/dist/chunk-H5YGYNXS.js.map +0 -1
  72. package/dist/chunk-HJ5VJ4JB.js.map +0 -1
  73. package/dist/chunk-IP4BUBKH.js.map +0 -1
  74. package/dist/chunk-JKLGJQO5.js.map +0 -1
  75. package/dist/chunk-JPHDWKZE.js.map +0 -1
  76. /package/dist/{browser-viewer-LGH4IP47.js.map → browser-viewer-MN7MOYQT.js.map} +0 -0
  77. /package/dist/{chunk-YS24CFDI.js.map → chunk-2O2HXRGP.js.map} +0 -0
  78. /package/dist/{chunk-UXE5SSNN.js.map → chunk-4ACTWOOW.js.map} +0 -0
  79. /package/dist/{chunk-PNAVEK2U.js.map → chunk-UQS7BGNQ.js.map} +0 -0
  80. /package/dist/{computer-viewer-CTFCJVS7.js.map → computer-viewer-FX4WOZMX.js.map} +0 -0
  81. /package/dist/{model-policy-picker-menu-RVOQ4ZZG.js.map → model-policy-picker-menu-AGXXJZ2B.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  PickerNavRow,
4
4
  defaultModelPolicyPickerMessages,
5
5
  effectiveRows
6
- } from "./chunk-IP4BUBKH.js";
6
+ } from "./chunk-3LL47F4U.js";
7
7
  import {
8
8
  coerceReasoningEffortForModel,
9
9
  effortOptionsForModel,
@@ -12,13 +12,13 @@ import {
12
12
  labelReasoningEffort,
13
13
  payerSummaryForModel,
14
14
  runnableLatencyModesForModel
15
- } from "./chunk-5GAL23FF.js";
15
+ } from "./chunk-IOLPHOF4.js";
16
16
  import {
17
17
  cn
18
18
  } from "./chunk-22KP6LR5.js";
19
19
 
20
20
  // src/components/model-policy-picker-menu.tsx
21
- import { CheckIcon, SearchIcon, ZapIcon } from "lucide-react";
21
+ import { ArrowRightIcon, CheckIcon, SearchIcon, ZapIcon } from "lucide-react";
22
22
  import { useRef, useState } from "react";
23
23
  import { Popover, RadioGroup } from "radix-ui";
24
24
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -29,11 +29,19 @@ function ModelPolicyPickerMenu(props) {
29
29
  const selected = findPickerRow(rows, props.model);
30
30
  const words = query.toLowerCase().trim().split(/\s+/).filter(Boolean);
31
31
  const filtered = rows.filter((row) => {
32
- const text = `${row.label} ${row.id} ${row.providerLabel} ${row.billingClassLabel} ${payerSummaryForModel(row.catalog)}`.toLowerCase();
32
+ const description = props.groupPresentation?.[row.billingClass]?.description;
33
+ const text = `${row.label} ${row.id} ${row.providerLabel} ${row.billingClassLabel} ${description === void 0 ? payerSummaryForModel(row.catalog) : description ?? ""}`.toLowerCase();
33
34
  return words.every((word) => text.includes(word));
34
35
  });
35
36
  const matchingIds = new Set(filtered.map((row) => row.id));
36
- const groups = groupPickerRowsByBillingClass(rows, { codexOnly: props.codexOnly === true }).map((group) => ({ ...group, rows: group.rows.filter((row) => matchingIds.has(row.id)) })).filter((group) => group.rows.length > 0);
37
+ const groups = groupPickerRowsByBillingClass(rows, { codexOnly: props.codexOnly === true }).map((group) => {
38
+ const override = props.groupPresentation?.[group.billingClass]?.description;
39
+ return {
40
+ ...group,
41
+ rows: group.rows.filter((row) => matchingIds.has(row.id)),
42
+ description: override === void 0 ? group.billingClass === "opengeni_credits" ? null : messages.billingHints[group.billingClass] : override
43
+ };
44
+ }).filter((group) => group.rows.length > 0);
37
45
  const choose = (row) => {
38
46
  if (!row.selectable || props.disabled) return;
39
47
  if (row.id !== props.model) props.onModelChange(row.id);
@@ -51,7 +59,7 @@ function ModelPolicyPickerMenu(props) {
51
59
  hint: row.unavailableReason ?? void 0,
52
60
  disabled: props.disabled || !row.selectable,
53
61
  title: [row.label, row.unavailableReason].filter(Boolean).join(" \xB7 "),
54
- active: row.id === props.model,
62
+ active: row.selectable && row.id === props.model,
55
63
  showChevron: false,
56
64
  trailing: row.catalog.cost === "free" || row.id === props.model ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
57
65
  row.catalog.cost === "free" ? /* @__PURE__ */ jsx("span", { className: "rounded-og-sm bg-og-surface-2 px-1.5 py-0.5 text-og-control text-og-fg-muted", children: messages.free }) : null,
@@ -82,7 +90,7 @@ function ModelPolicyPickerMenu(props) {
82
90
  buttons[next]?.focus();
83
91
  },
84
92
  children: [
85
- /* @__PURE__ */ jsx("div", { className: "border-b border-og-border py-1", children: /* @__PURE__ */ jsxs("label", { className: "og-model-policy-search flex items-center gap-2 rounded-og-sm px-2 py-1 focus-within:outline-2 focus-within:-outline-offset-2 focus-within:outline-og-accent/40", children: [
93
+ rows.some((row) => row.selectable) ? /* @__PURE__ */ jsx("div", { className: "border-b border-og-border py-1", children: /* @__PURE__ */ jsxs("label", { className: "og-model-policy-search flex items-center gap-2 rounded-og-sm px-2 py-1 focus-within:outline-2 focus-within:-outline-offset-2 focus-within:outline-og-accent/40", children: [
86
94
  /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 text-og-fg-subtle", "aria-hidden": true }),
87
95
  /* @__PURE__ */ jsx(
88
96
  "input",
@@ -101,14 +109,14 @@ function ModelPolicyPickerMenu(props) {
101
109
  className: "og-model-policy-search-input h-8 min-w-0 flex-1 bg-transparent text-og-menu text-og-fg outline-hidden placeholder:text-og-fg-subtle"
102
110
  }
103
111
  )
104
- ] }) }),
112
+ ] }) }) : null,
105
113
  props.error ? /* @__PURE__ */ jsx("p", { className: "px-2 py-2 text-og-control text-og-status-failed", role: "alert", children: props.error }) : null,
106
114
  /* @__PURE__ */ jsx(
107
115
  "div",
108
116
  {
109
117
  className: "min-h-0 flex-1 overflow-y-auto overscroll-contain py-1",
110
118
  "data-testid": "model-picker-models",
111
- children: props.loading ? /* @__PURE__ */ jsx("p", { className: "px-2 py-3 text-og-control text-og-fg-subtle", children: messages.loading }) : /* @__PURE__ */ jsxs(Fragment, { children: [
119
+ children: props.loading ? /* @__PURE__ */ jsx("p", { className: "px-2 py-3 text-og-control text-og-fg-subtle", children: messages.loading }) : rows.some((row) => row.selectable) ? /* @__PURE__ */ jsxs(Fragment, { children: [
112
120
  groups.map((group) => /* @__PURE__ */ jsxs(
113
121
  "section",
114
122
  {
@@ -116,20 +124,27 @@ function ModelPolicyPickerMenu(props) {
116
124
  className: "py-2.5 first:pt-1 [&+section]:border-t [&+section]:border-og-border",
117
125
  children: [
118
126
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2.5 py-1.5 text-og-control font-semibold text-og-fg", children: [
119
- /* @__PURE__ */ jsx(BillingClassMark, { billingClass: group.billingClass, "aria-label": "" }),
120
- group.label
127
+ /* @__PURE__ */ jsx(
128
+ BillingClassMark,
129
+ {
130
+ billingClass: group.billingClass,
131
+ presentation: props.groupPresentation?.[group.billingClass],
132
+ "aria-label": ""
133
+ }
134
+ ),
135
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 break-words", children: group.label })
121
136
  ] }),
122
- group.billingClass !== "opengeni_credits" ? /* @__PURE__ */ jsx("p", { className: "px-2.5 pb-2 text-og-control text-og-fg-subtle", children: messages.billingHints[group.billingClass] }) : null,
137
+ group.description ? /* @__PURE__ */ jsx("p", { className: "break-words px-2.5 pb-2 text-og-control text-og-fg-subtle", children: group.description }) : null,
123
138
  group.rows.map(modelRow)
124
139
  ]
125
140
  },
126
141
  group.billingClass
127
142
  )),
128
143
  filtered.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-2 py-4 text-og-control text-og-fg-subtle", children: words.length ? messages.noMatches : messages.noModels }) : null
129
- ] })
144
+ ] }) : props.connectModelsHref || rows.length > 0 ? /* @__PURE__ */ jsx(ConnectModelsPanel, { href: props.connectModelsHref, messages }) : /* @__PURE__ */ jsx("p", { className: "px-2 py-4 text-og-control text-og-fg-subtle", children: messages.noModels })
130
145
  }
131
146
  ),
132
- selected && (props.hasImageAttachments && selected.catalog.capabilities?.inputModalities.includes("image") === false || effortOptionsForModel(selected.catalog).length > 1 && selected.catalog.capabilities?.reasoning.runnable !== false || props.allowLatencyMode !== false && runnableLatencyModesForModel(selected.catalog).includes("fast")) ? /* @__PURE__ */ jsxs("div", { className: "border-t border-og-border px-2.5 py-2.5", children: [
147
+ rows.some((row) => row.selectable) && selected && (props.hasImageAttachments && selected.catalog.capabilities?.inputModalities.includes("image") === false || effortOptionsForModel(selected.catalog).length > 1 && selected.catalog.capabilities?.reasoning.runnable !== false || props.allowLatencyMode !== false && runnableLatencyModesForModel(selected.catalog).includes("fast")) ? /* @__PURE__ */ jsxs("div", { className: "border-t border-og-border px-2.5 py-2.5", children: [
133
148
  props.hasImageAttachments && selected.catalog.capabilities?.inputModalities.includes("image") === false ? /* @__PURE__ */ jsx("p", { className: "pb-1.5 text-og-control leading-relaxed text-og-fg-subtle", children: messages.unsupportedAttachments }) : null,
134
149
  /* @__PURE__ */ jsx(ModelThinkingControls, { ...props })
135
150
  ] }) : null
@@ -137,6 +152,49 @@ function ModelPolicyPickerMenu(props) {
137
152
  }
138
153
  );
139
154
  }
155
+ var CONNECT_MODEL_OPTIONS = [
156
+ { billingClass: "codex_subscription", title: "Codex", detail: "ChatGPT" },
157
+ { billingClass: "supergrok_subscription", title: "SuperGrok", detail: "xAI" },
158
+ { billingClass: "byok", title: "AI Gateway", detail: "Vercel" },
159
+ { billingClass: "external", title: "OpenRouter", detail: "API key" }
160
+ ];
161
+ function ConnectModelsPanel(props) {
162
+ return /* @__PURE__ */ jsxs("div", { className: "px-1.5 pb-1.5 pt-2", "data-testid": "model-picker-connect", children: [
163
+ /* @__PURE__ */ jsxs("div", { className: "px-1.5 pb-3", children: [
164
+ /* @__PURE__ */ jsx("p", { className: "text-og-menu font-medium tracking-tight text-og-fg", children: props.messages.connectTitle }),
165
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-og-control leading-snug text-og-fg-subtle", children: props.messages.connectBody })
166
+ ] }),
167
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1", children: CONNECT_MODEL_OPTIONS.map((option) => {
168
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
169
+ /* @__PURE__ */ jsx("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-og-md bg-og-surface-2 text-og-fg", children: /* @__PURE__ */ jsx(
170
+ BillingClassMark,
171
+ {
172
+ billingClass: option.billingClass,
173
+ "aria-label": "",
174
+ className: "size-4 text-og-fg"
175
+ }
176
+ ) }),
177
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
178
+ /* @__PURE__ */ jsx("span", { className: "block truncate text-og-control font-medium text-og-fg", children: option.title }),
179
+ /* @__PURE__ */ jsx("span", { className: "block truncate text-og-control text-og-fg-subtle", children: option.detail })
180
+ ] })
181
+ ] });
182
+ const className = "flex min-w-0 items-center gap-2 rounded-og-md px-1.5 py-1.5 outline-hidden transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40";
183
+ return props.href ? /* @__PURE__ */ jsx("a", { href: props.href, className, children: content }, option.title) : /* @__PURE__ */ jsx("div", { className, children: content }, option.title);
184
+ }) }),
185
+ props.href ? /* @__PURE__ */ jsxs(
186
+ "a",
187
+ {
188
+ href: props.href,
189
+ className: "mt-2 flex h-9 w-full items-center justify-center gap-1.5 rounded-og-md bg-og-fg text-og-control font-medium text-og-surface-1 outline-hidden transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-og-accent/40",
190
+ children: [
191
+ props.messages.connectAction,
192
+ /* @__PURE__ */ jsx(ArrowRightIcon, { className: "size-3.5", "aria-hidden": true })
193
+ ]
194
+ }
195
+ ) : /* @__PURE__ */ jsx("p", { className: "px-1.5 pt-3 text-og-control text-og-fg-subtle", children: props.messages.noModels })
196
+ ] });
197
+ }
140
198
  function ModelThinkingControls(props) {
141
199
  const selected = findPickerRow(effectiveRows(props), props.model);
142
200
  if (!selected) return null;
@@ -229,4 +287,4 @@ export {
229
287
  ModelPolicyPickerMenu,
230
288
  ModelPolicyPickerPopover
231
289
  };
232
- //# sourceMappingURL=chunk-HJ5VJ4JB.js.map
290
+ //# sourceMappingURL=chunk-WKFFRFJF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/model-policy-picker-menu.tsx"],"sourcesContent":["import type { ClientModel, ReasoningEffort } from \"@opengeni/sdk\";\nimport { ArrowRightIcon, CheckIcon, SearchIcon, ZapIcon } from \"lucide-react\";\nimport { useRef, useState, type RefObject, type CSSProperties } from \"react\";\nimport { Popover, RadioGroup } from \"radix-ui\";\nimport { cn } from \"../lib/cn\";\nimport {\n coerceReasoningEffortForModel,\n effortOptionsForModel,\n findPickerRow,\n groupPickerRowsByBillingClass,\n labelReasoningEffort,\n payerSummaryForModel,\n runnableLatencyModesForModel,\n type PickerModelRow,\n} from \"../model-policy\";\nimport {\n BillingClassMark,\n defaultModelPolicyPickerMessages,\n effectiveRows,\n PickerNavRow,\n type ModelPolicyPickerProps,\n} from \"./model-policy-picker\";\ntype ClientPickerModelRow = PickerModelRow<ClientModel>;\n\n/** Model selection stays flat; reasoning never becomes a navigation destination. */\nexport function ModelPolicyPickerMenu(props: ModelPolicyPickerProps) {\n const messages = { ...defaultModelPolicyPickerMessages, ...props.messages };\n const [query, setQuery] = useState(\"\");\n const rows = effectiveRows(props);\n const selected = findPickerRow(rows, props.model);\n const words = query.toLowerCase().trim().split(/\\s+/).filter(Boolean);\n const filtered = rows.filter((row) => {\n const description = props.groupPresentation?.[row.billingClass]?.description;\n const text =\n `${row.label} ${row.id} ${row.providerLabel} ${row.billingClassLabel} ${description === undefined ? payerSummaryForModel(row.catalog) : (description ?? \"\")}`.toLowerCase();\n return words.every((word) => text.includes(word));\n });\n const matchingIds = new Set(filtered.map((row) => row.id));\n const groups = groupPickerRowsByBillingClass(rows, { codexOnly: props.codexOnly === true })\n .map((group) => {\n const override = props.groupPresentation?.[group.billingClass]?.description;\n return {\n ...group,\n rows: group.rows.filter((row) => matchingIds.has(row.id)),\n description:\n override === undefined\n ? group.billingClass === \"opengeni_credits\"\n ? null\n : messages.billingHints[group.billingClass]\n : override,\n };\n })\n .filter((group) => group.rows.length > 0);\n const choose = (row: ClientPickerModelRow) => {\n if (!row.selectable || props.disabled) return;\n if (row.id !== props.model) props.onModelChange(row.id);\n const effort = coerceReasoningEffortForModel(row.catalog, props.effort);\n // Hosts may commit the combined model/effort draft through this callback.\n props.onEffortChange(effort);\n if (\n props.latencyMode !== \"standard\" &&\n !runnableLatencyModesForModel(row.catalog).includes(props.latencyMode)\n ) {\n props.onLatencyModeChange(\"standard\");\n }\n props.onOpenChange?.(false);\n };\n const modelRow = (row: ClientPickerModelRow) => (\n <PickerNavRow\n key={row.id}\n label={row.label}\n hint={row.unavailableReason ?? undefined}\n disabled={props.disabled || !row.selectable}\n title={[row.label, row.unavailableReason].filter(Boolean).join(\" · \")}\n active={row.selectable && row.id === props.model}\n showChevron={false}\n trailing={\n row.catalog.cost === \"free\" || row.id === props.model ? (\n <span className=\"flex items-center gap-2\">\n {row.catalog.cost === \"free\" ? (\n <span className=\"rounded-og-sm bg-og-surface-2 px-1.5 py-0.5 text-og-control text-og-fg-muted\">\n {messages.free}\n </span>\n ) : null}\n {row.id === props.model ? (\n <CheckIcon className=\"size-3.5\" aria-label={messages.selected} />\n ) : null}\n </span>\n ) : null\n }\n testId={`model-picker-choice-${row.id}`}\n onClick={() => choose(row)}\n />\n );\n return (\n <div\n data-testid=\"model-picker-menu\"\n className=\"flex min-h-0 flex-col\"\n onKeyDown={(event) => {\n if (\n !(event.target instanceof HTMLButtonElement) ||\n ![\"ArrowDown\", \"ArrowUp\", \"Home\", \"End\"].includes(event.key)\n )\n return;\n const buttons = Array.from(\n event.currentTarget.querySelectorAll<HTMLButtonElement>(\n '[data-testid^=\"model-picker-choice-\"]:not(:disabled)',\n ),\n );\n const index = buttons.indexOf(event.target);\n if (index < 0) return;\n event.preventDefault();\n const next =\n event.key === \"Home\"\n ? 0\n : event.key === \"End\"\n ? buttons.length - 1\n : (index + (event.key === \"ArrowDown\" ? 1 : -1) + buttons.length) % buttons.length;\n buttons[next]?.focus();\n }}\n >\n {rows.some((row) => row.selectable) ? (\n <div className=\"border-b border-og-border py-1\">\n <label className=\"og-model-policy-search flex items-center gap-2 rounded-og-sm px-2 py-1 focus-within:outline-2 focus-within:-outline-offset-2 focus-within:outline-og-accent/40\">\n <SearchIcon className=\"size-4 shrink-0 text-og-fg-subtle\" aria-hidden />\n <input\n aria-label={messages.searchLabel}\n placeholder={messages.searchPlaceholder}\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n onKeyDown={(event) => {\n if (event.key !== \"Escape\" && event.key !== \"Tab\") event.stopPropagation();\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n event.currentTarget\n .closest('[data-testid=\"model-picker-menu\"]')\n ?.querySelector<HTMLButtonElement>(\"button:not(:disabled)\")\n ?.focus();\n }\n }}\n className=\"og-model-policy-search-input h-8 min-w-0 flex-1 bg-transparent text-og-menu text-og-fg outline-hidden placeholder:text-og-fg-subtle\"\n />\n </label>\n </div>\n ) : null}\n {props.error ? (\n <p className=\"px-2 py-2 text-og-control text-og-status-failed\" role=\"alert\">\n {props.error}\n </p>\n ) : null}\n <div\n className=\"min-h-0 flex-1 overflow-y-auto overscroll-contain py-1\"\n data-testid=\"model-picker-models\"\n >\n {props.loading ? (\n <p className=\"px-2 py-3 text-og-control text-og-fg-subtle\">{messages.loading}</p>\n ) : rows.some((row) => row.selectable) ? (\n <>\n {groups.map((group) => (\n <section\n key={group.billingClass}\n aria-label={group.label}\n className=\"py-2.5 first:pt-1 [&+section]:border-t [&+section]:border-og-border\"\n >\n <div className=\"flex items-center gap-2 px-2.5 py-1.5 text-og-control font-semibold text-og-fg\">\n <BillingClassMark\n billingClass={group.billingClass}\n presentation={props.groupPresentation?.[group.billingClass]}\n aria-label=\"\"\n />\n <span className=\"min-w-0 break-words\">{group.label}</span>\n </div>\n {group.description ? (\n <p className=\"break-words px-2.5 pb-2 text-og-control text-og-fg-subtle\">\n {group.description}\n </p>\n ) : null}\n {group.rows.map(modelRow)}\n </section>\n ))}\n {filtered.length === 0 ? (\n <p className=\"px-2 py-4 text-og-control text-og-fg-subtle\">\n {words.length ? messages.noMatches : messages.noModels}\n </p>\n ) : null}\n </>\n ) : props.connectModelsHref || rows.length > 0 ? (\n <ConnectModelsPanel href={props.connectModelsHref} messages={messages} />\n ) : (\n <p className=\"px-2 py-4 text-og-control text-og-fg-subtle\">{messages.noModels}</p>\n )}\n </div>\n {rows.some((row) => row.selectable) &&\n selected &&\n ((props.hasImageAttachments &&\n selected.catalog.capabilities?.inputModalities.includes(\"image\") === false) ||\n (effortOptionsForModel(selected.catalog).length > 1 &&\n selected.catalog.capabilities?.reasoning.runnable !== false) ||\n (props.allowLatencyMode !== false &&\n runnableLatencyModesForModel(selected.catalog).includes(\"fast\"))) ? (\n <div className=\"border-t border-og-border px-2.5 py-2.5\">\n {props.hasImageAttachments &&\n selected.catalog.capabilities?.inputModalities.includes(\"image\") === false ? (\n <p className=\"pb-1.5 text-og-control leading-relaxed text-og-fg-subtle\">\n {messages.unsupportedAttachments}\n </p>\n ) : null}\n <ModelThinkingControls {...props} />\n </div>\n ) : null}\n </div>\n );\n}\n\nconst CONNECT_MODEL_OPTIONS: Array<{\n billingClass: \"codex_subscription\" | \"supergrok_subscription\" | \"byok\" | \"external\";\n title: string;\n detail: string;\n}> = [\n { billingClass: \"codex_subscription\", title: \"Codex\", detail: \"ChatGPT\" },\n { billingClass: \"supergrok_subscription\", title: \"SuperGrok\", detail: \"xAI\" },\n { billingClass: \"byok\", title: \"AI Gateway\", detail: \"Vercel\" },\n { billingClass: \"external\", title: \"OpenRouter\", detail: \"API key\" },\n];\n\nfunction ConnectModelsPanel(props: {\n href: string | undefined;\n messages: typeof defaultModelPolicyPickerMessages;\n}) {\n return (\n <div className=\"px-1.5 pb-1.5 pt-2\" data-testid=\"model-picker-connect\">\n <div className=\"px-1.5 pb-3\">\n <p className=\"text-og-menu font-medium tracking-tight text-og-fg\">\n {props.messages.connectTitle}\n </p>\n <p className=\"mt-1 text-og-control leading-snug text-og-fg-subtle\">\n {props.messages.connectBody}\n </p>\n </div>\n <div className=\"grid grid-cols-2 gap-1\">\n {CONNECT_MODEL_OPTIONS.map((option) => {\n const content = (\n <>\n <span className=\"flex size-8 shrink-0 items-center justify-center rounded-og-md bg-og-surface-2 text-og-fg\">\n <BillingClassMark\n billingClass={option.billingClass}\n aria-label=\"\"\n className=\"size-4 text-og-fg\"\n />\n </span>\n <span className=\"min-w-0\">\n <span className=\"block truncate text-og-control font-medium text-og-fg\">\n {option.title}\n </span>\n <span className=\"block truncate text-og-control text-og-fg-subtle\">\n {option.detail}\n </span>\n </span>\n </>\n );\n const className =\n \"flex min-w-0 items-center gap-2 rounded-og-md px-1.5 py-1.5 outline-hidden transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40\";\n return props.href ? (\n <a key={option.title} href={props.href} className={className}>\n {content}\n </a>\n ) : (\n <div key={option.title} className={className}>\n {content}\n </div>\n );\n })}\n </div>\n {props.href ? (\n <a\n href={props.href}\n className=\"mt-2 flex h-9 w-full items-center justify-center gap-1.5 rounded-og-md bg-og-fg text-og-control font-medium text-og-surface-1 outline-hidden transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-og-accent/40\"\n >\n {props.messages.connectAction}\n <ArrowRightIcon className=\"size-3.5\" aria-hidden />\n </a>\n ) : (\n <p className=\"px-1.5 pt-3 text-og-control text-og-fg-subtle\">{props.messages.noModels}</p>\n )}\n </div>\n );\n}\n\nfunction ModelThinkingControls(props: ModelPolicyPickerProps) {\n const selected = findPickerRow(effectiveRows(props), props.model);\n if (!selected) return null;\n const efforts = effortOptionsForModel(selected.catalog);\n const messages = { ...defaultModelPolicyPickerMessages, ...props.messages };\n const supportsFast = runnableLatencyModesForModel(selected.catalog).includes(\"fast\");\n const showThinking =\n efforts.length > 1 && selected.catalog.capabilities?.reasoning.runnable !== false;\n const showFast = supportsFast && props.allowLatencyMode !== false;\n if (!showThinking && !showFast) return null;\n return (\n <div className=\"space-y-2 text-og-control\" data-testid=\"model-picker-reasoning\">\n <div className=\"flex min-h-7 items-center justify-between gap-3\">\n {showThinking ? <span className=\"text-og-fg-subtle\">{messages.thinking}</span> : <span />}\n {showFast ? (\n <button\n type=\"button\"\n data-testid=\"model-picker-fast\"\n disabled={props.disabled || !selected.selectable}\n aria-pressed={props.latencyMode === \"fast\"}\n title={messages.fast + \" · \" + messages.fastRateHint}\n onClick={() =>\n props.onLatencyModeChange(props.latencyMode === \"fast\" ? \"standard\" : \"fast\")\n }\n className=\"flex min-h-8 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-og-sm px-2 text-og-fg-muted hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:opacity-50\"\n >\n <ZapIcon className={cn(\"size-3.5\", props.latencyMode === \"fast\" && \"fill-current\")} />\n {messages.fast}\n <span className=\"text-og-fg-subtle\">{messages.fastRateHint}</span>\n </button>\n ) : null}\n </div>\n {showThinking ? (\n <RadioGroup.Root\n aria-label={messages.thinkingEffort}\n value={coerceReasoningEffortForModel(selected.catalog, props.effort)}\n disabled={props.disabled || !selected.selectable}\n onValueChange={(value) => props.onEffortChange(value as ReasoningEffort)}\n orientation=\"horizontal\"\n className=\"flex flex-wrap gap-0.5 rounded-og-md bg-og-surface-2 p-0.5\"\n >\n {efforts.map((effort) => (\n <RadioGroup.Item\n key={effort}\n value={effort}\n aria-label={labelReasoningEffort(effort)}\n title={labelReasoningEffort(effort)}\n className=\"min-h-8 min-w-10 flex-1 cursor-pointer whitespace-nowrap rounded-og-sm px-1.5 text-og-control text-og-fg-muted outline-hidden transition-colors hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/40 data-[state=checked]:bg-og-surface-1 data-[state=checked]:text-og-fg data-[state=checked]:shadow-sm disabled:cursor-not-allowed disabled:opacity-50\"\n >\n {effort === \"xhigh\" ? \"X-high\" : labelReasoningEffort(effort)}\n </RadioGroup.Item>\n ))}\n </RadioGroup.Root>\n ) : null}\n </div>\n );\n}\n\nexport function ModelPolicyPickerPopover(\n props: ModelPolicyPickerProps & {\n anchor: RefObject<HTMLButtonElement | null>;\n contentId: string;\n portalStyle: CSSProperties;\n },\n) {\n const outside = useRef(false);\n const messages = { ...defaultModelPolicyPickerMessages, ...props.messages };\n return (\n <Popover.Root open onOpenChange={(open) => props.onOpenChange?.(open)}>\n <Popover.Anchor virtualRef={props.anchor} />\n <Popover.Portal>\n <Popover.Content\n id={props.contentId}\n aria-label={messages.label}\n align=\"start\"\n side={props.menuSide ?? \"bottom\"}\n sideOffset={8}\n collisionPadding={12}\n onInteractOutside={(event) => {\n if (props.anchor.current?.contains(event.target as Node)) event.preventDefault();\n else outside.current = true;\n }}\n onCloseAutoFocus={(event) => {\n event.preventDefault();\n if (!outside.current) props.anchor.current?.focus();\n }}\n className={cn(\n \"og-root og-model-policy-menu z-50 flex max-h-[min(32rem,var(--radix-popover-content-available-height))] w-[22rem] max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-og-lg border border-og-border bg-og-surface-1 p-[var(--og-model-picker-menu-padding)] text-og-fg shadow-og-lg\",\n props.contentClassName,\n )}\n style={{ ...props.portalStyle, ...props.contentStyle }}\n data-testid=\"model-picker-content\"\n >\n <ModelPolicyPickerMenu {...props} />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB,WAAW,YAAY,eAAe;AAC/D,SAAS,QAAQ,gBAAoD;AACrE,SAAS,SAAS,kBAAkB;AA2E1B,SA+EA,UA7EI,KAFJ;AArDH,SAAS,sBAAsB,OAA+B;AACnE,QAAM,WAAW,EAAE,GAAG,kCAAkC,GAAG,MAAM,SAAS;AAC1E,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AACrC,QAAM,OAAO,cAAc,KAAK;AAChC,QAAM,WAAW,cAAc,MAAM,MAAM,KAAK;AAChD,QAAM,QAAQ,MAAM,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,EA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ACN;AAEJ;AAEO,SAAS,yBACd,OAKA;AACA,QAAM,UAAU,OAAO,KAAK;AAC5B,QAAM,WAAW,EAAE,GAAG,kCAAkC,GAAG,MAAM,SAAS;AAC1E,SACE,qBAAC,QAAQ,MAAR,EAAa,MAAI,MAAC,cAAc,CAAC,SAAS,MAAM,eAAe,IAAI,GAClE;AAAA,wBAAC,QAAQ,QAAR,EAAe,YAAY,MAAM,QAAQ;AAAA,IAC1C,oBAAC,QAAQ,QAAR,EACC;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACC,IAAI,MAAM;AAAA,QACV,cAAY,SAAS;AAAA,QACrB,OAAM;AAAA,QACN,MAAM,MAAM,YAAY;AAAA,QACxB,YAAY;AAAA,QACZ,kBAAkB;AAAA,QAClB,mBAAmB,CAAC,UAAU;AAC5B,cAAI,MAAM,OAAO,SAAS,SAAS,MAAM,MAAc,EAAG,OAAM,eAAe;AAAA,cAC1E,SAAQ,UAAU;AAAA,QACzB;AAAA,QACA,kBAAkB,CAAC,UAAU;AAC3B,gBAAM,eAAe;AACrB,cAAI,CAAC,QAAQ,QAAS,OAAM,OAAO,SAAS,MAAM;AAAA,QACpD;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,MAAM;AAAA,QACR;AAAA,QACA,OAAO,EAAE,GAAG,MAAM,aAAa,GAAG,MAAM,aAAa;AAAA,QACrD,eAAY;AAAA,QAEZ,8BAAC,yBAAuB,GAAG,OAAO;AAAA;AAAA,IACpC,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -8,27 +8,22 @@ import {
8
8
  TimelineAnnotationSourceRootContext
9
9
  } from "./chunk-GBPCZH3Y.js";
10
10
  import {
11
- ActivityDisclosure,
12
- BodyNote,
13
- CompactActivityContext,
14
- CopyButton,
15
- CopyHoverFrame,
16
- MOTION_INSPECT_SCALE,
17
- Markdown,
18
- MediaEmpty,
19
- MediaSkeleton,
20
- PayloadBlock,
21
- ScreenshotFigure,
22
- TermBlock,
23
- Thumbnail,
24
- TimelineSearchRevealContext,
25
- ToolCallTruncationProvider,
26
- isTimelineSearchTarget,
27
- prefersReducedMotion,
28
- useForcedDefaultOpen,
29
- useTimelineSearchNavigation,
30
- useTimelineSearchReveal
31
- } from "./chunk-D7GAPJ3V.js";
11
+ isRetainedImageContentType,
12
+ useRetainedImageObjectUrl
13
+ } from "./chunk-WYWRYUNQ.js";
14
+ import {
15
+ buildTimeline,
16
+ conversationTimeline,
17
+ groupTimeline,
18
+ invokeOlderHistoryLoaderWithReceiptCapture,
19
+ isActionableHumanInputRequest,
20
+ mcpToolLeaf,
21
+ toolDisplayName,
22
+ useHumanInputRequests,
23
+ useSession,
24
+ useSessionEvents,
25
+ useTurnQueue
26
+ } from "./chunk-VI7HELBI.js";
32
27
  import {
33
28
  Actions,
34
29
  AttachButton,
@@ -51,40 +46,53 @@ import {
51
46
  Status,
52
47
  Surface,
53
48
  useChatComposerController
54
- } from "./chunk-UXE5SSNN.js";
55
- import {
56
- LightboxProvider,
57
- Tooltip,
58
- TooltipContent,
59
- TooltipProvider,
60
- TooltipTrigger
61
- } from "./chunk-BRM6FVZA.js";
62
- import {
63
- isRetainedImageContentType,
64
- useRetainedImageObjectUrl
65
- } from "./chunk-WYWRYUNQ.js";
49
+ } from "./chunk-4ACTWOOW.js";
66
50
  import {
67
51
  ModelPolicyPicker
68
- } from "./chunk-IP4BUBKH.js";
69
- import {
70
- buildTimeline,
71
- conversationTimeline,
72
- groupTimeline,
73
- invokeOlderHistoryLoaderWithReceiptCapture,
74
- isActionableHumanInputRequest,
75
- mcpToolLeaf,
76
- toolDisplayName,
77
- useHumanInputRequests,
78
- useSession,
79
- useSessionEvents,
80
- useTurnQueue
81
- } from "./chunk-JKLGJQO5.js";
52
+ } from "./chunk-3LL47F4U.js";
82
53
  import {
83
54
  useComposer
84
55
  } from "./chunk-AKOMC3VO.js";
56
+ import {
57
+ projectPickerRows,
58
+ sortPickerRows
59
+ } from "./chunk-IOLPHOF4.js";
85
60
  import {
86
61
  usePolledValue
87
62
  } from "./chunk-KZ73RL76.js";
63
+ import {
64
+ useOpenGeni,
65
+ useOpenGeniClient
66
+ } from "./chunk-NEXLLTP4.js";
67
+ import {
68
+ ActivityDisclosure,
69
+ BodyNote,
70
+ CompactActivityContext,
71
+ CopyButton,
72
+ CopyHoverFrame,
73
+ MOTION_INSPECT_SCALE,
74
+ Markdown,
75
+ MediaEmpty,
76
+ MediaSkeleton,
77
+ PayloadBlock,
78
+ ScreenshotFigure,
79
+ TermBlock,
80
+ Thumbnail,
81
+ TimelineSearchRevealContext,
82
+ ToolCallTruncationProvider,
83
+ isTimelineSearchTarget,
84
+ prefersReducedMotion,
85
+ useForcedDefaultOpen,
86
+ useTimelineSearchNavigation,
87
+ useTimelineSearchReveal
88
+ } from "./chunk-SHRCATV6.js";
89
+ import {
90
+ LightboxProvider,
91
+ Tooltip,
92
+ TooltipContent,
93
+ TooltipProvider,
94
+ TooltipTrigger
95
+ } from "./chunk-BRM6FVZA.js";
88
96
  import {
89
97
  formatBytes,
90
98
  formatClockTime,
@@ -93,14 +101,6 @@ import {
93
101
  truncate,
94
102
  tryParseJson
95
103
  } from "./chunk-PLYRL5ER.js";
96
- import {
97
- useOpenGeni,
98
- useOpenGeniClient
99
- } from "./chunk-NEXLLTP4.js";
100
- import {
101
- projectPickerRows,
102
- sortPickerRows
103
- } from "./chunk-5GAL23FF.js";
104
104
  import {
105
105
  cn
106
106
  } from "./chunk-22KP6LR5.js";
@@ -857,7 +857,7 @@ var defaultApprovalSurfaceMessages = {
857
857
  reject: "Reject",
858
858
  approving: "Approving\u2026",
859
859
  rejecting: "Rejecting\u2026",
860
- formatToolName: (name) => name.replaceAll("_", " ").replaceAll(".", " \u203A ")
860
+ formatToolName: (name) => name.includes("__") || /^[a-f0-9]{64}$/.test(name) ? toolDisplayName(name) : name.replaceAll("_", " ").replaceAll(".", " \u203A ")
861
861
  };
862
862
  var APPROVAL_ARGUMENT_PREVIEW_CHARACTERS = 4e3;
863
863
  function approvalArgumentsPreview(value) {
@@ -946,7 +946,8 @@ function ApprovalSurface({
946
946
  className: "rounded-og-md border border-og-border bg-og-surface-1 p-3",
947
947
  children: [
948
948
  renderApproval ? renderApproval(approval) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
949
- /* @__PURE__ */ jsx3("p", { className: "text-og-sm font-medium text-og-fg", children: messages.formatToolName(approval.name) }),
949
+ /* @__PURE__ */ jsx3("p", { className: "text-og-sm font-medium text-og-fg", children: approval.display?.title ?? messages.formatToolName(approval.display?.toolName ?? approval.name) }),
950
+ approval.display?.accountLabel ? /* @__PURE__ */ jsx3("p", { className: "mt-1 break-words text-og-xs text-og-fg-muted", children: approval.display.accountLabel }) : null,
950
951
  argumentsPreview !== null ? /* @__PURE__ */ jsx3("pre", { className: "mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-og-sm bg-og-surface-2 p-2 font-mono text-og-xs text-og-fg-muted", children: argumentsPreview }) : null
951
952
  ] }),
952
953
  /* @__PURE__ */ jsxs2("div", { className: "mt-3 flex flex-wrap justify-end gap-2", children: [
@@ -3225,7 +3226,7 @@ function ToolSearchRenderer({ item }) {
3225
3226
  function DocsSearchRenderer({ item }) {
3226
3227
  const args = parseToolArgs(item.arguments);
3227
3228
  const query = typeof args.query === "string" ? args.query.trim() : "";
3228
- const title = query ? `Search \u201C${truncatePreview(query, 48)}\u201D` : toolDisplayName(item.name);
3229
+ const title = query ? `Search \u201C${truncatePreview(query, 48)}\u201D` : toolDisplayName(item.name, item.display);
3229
3230
  const running = item.status === "running";
3230
3231
  if (running) {
3231
3232
  return /* @__PURE__ */ jsx7(
@@ -3281,7 +3282,7 @@ function DocsSearchRenderer({ item }) {
3281
3282
  function SetSessionTitleRenderer({ item }) {
3282
3283
  const args = parseToolArgs(item.arguments);
3283
3284
  const titleArg = typeof args.title === "string" ? args.title.trim() : "";
3284
- const display = toolDisplayName(item.name);
3285
+ const display = toolDisplayName(item.name, item.display);
3285
3286
  const previewTitle = titleArg ? truncatePreview(titleArg, 72) : "";
3286
3287
  const icon = /* @__PURE__ */ jsx7(MessagesSquareIcon, { className: ICON_SIZE });
3287
3288
  if (item.status === "running") {
@@ -3553,7 +3554,7 @@ function RunOnRenderer({ item }) {
3553
3554
  function GenericRenderer({ item }) {
3554
3555
  const running = item.status === "running";
3555
3556
  const args = parseToolArgs(item.arguments);
3556
- const display = toolDisplayName(item.name);
3557
+ const display = toolDisplayName(item.name, item.display);
3557
3558
  const icon = /* @__PURE__ */ jsx7(GenericToolIcon, { name: item.name });
3558
3559
  const goalPreview = goalToolPreview(item.name, args);
3559
3560
  if (running) {
@@ -5222,7 +5223,7 @@ function RollingActivity({
5222
5223
  );
5223
5224
  const fallback2 = /* @__PURE__ */ jsxs11("span", { className: "og-rolling-label", children: [
5224
5225
  /* @__PURE__ */ jsx15(WrenchIcon2, { className: "size-3.5" }),
5225
- /* @__PURE__ */ jsx15("span", { children: item.kind === "tool-call" ? toolDisplayName(item.name) : "Working" })
5226
+ /* @__PURE__ */ jsx15("span", { children: item.kind === "tool-call" ? toolDisplayName(item.name, item.display) : "Working" })
5226
5227
  ] });
5227
5228
  return /* @__PURE__ */ jsxs11(
5228
5229
  "span",
@@ -5230,7 +5231,7 @@ function RollingActivity({
5230
5231
  className: "og-rolling-status",
5231
5232
  "data-running": active.some((entry) => entry.id === item.id) ? "true" : void 0,
5232
5233
  children: [
5233
- /* @__PURE__ */ jsx15("span", { className: "sr-only", children: item.kind === "tool-call" ? toolDisplayName(item.name) : item.kind === "reasoning" ? "Thinking" : "Working" }),
5234
+ /* @__PURE__ */ jsx15("span", { className: "sr-only", children: item.kind === "tool-call" ? toolDisplayName(item.name, item.display) : item.kind === "reasoning" ? "Thinking" : "Working" }),
5234
5235
  /* @__PURE__ */ jsx15("span", { className: "og-rolling-window", "aria-hidden": "true", children: /* @__PURE__ */ jsx15(AnimatePresence2, { initial: false, mode: "sync", children: /* @__PURE__ */ jsx15(
5235
5236
  motion2.span,
5236
5237
  {
@@ -10204,6 +10205,7 @@ function SessionConversation(props) {
10204
10205
  }
10205
10206
  function Conversation({
10206
10207
  sessionId,
10208
+ renderMessageText,
10207
10209
  userMessageDisclosureLabels,
10208
10210
  loadSkillReview,
10209
10211
  client,
@@ -10247,6 +10249,7 @@ function Conversation({
10247
10249
  /* @__PURE__ */ jsx21(
10248
10250
  MessageTimeline,
10249
10251
  {
10252
+ renderMessageText,
10250
10253
  userMessageDisclosureLabels,
10251
10254
  className: "min-h-0 flex-1",
10252
10255
  items: conversationTimeline(feed.timeline, queue, composer),
@@ -10370,12 +10373,19 @@ function SessionCommandsPanel({
10370
10373
  title: "Expand command",
10371
10374
  children: [
10372
10375
  /* @__PURE__ */ jsx22(ChevronRightIcon3, { className: "size-3 shrink-0 text-og-fg-subtle transition-transform group-open/command:rotate-90" }),
10373
- /* @__PURE__ */ jsx22("span", { className: "truncate", children: command.commandPreview || "Background command" })
10376
+ /* @__PURE__ */ jsx22(
10377
+ "span",
10378
+ {
10379
+ className: "min-w-0 truncate",
10380
+ title: command.commandText ?? (command.commandPreview || "Background command"),
10381
+ children: command.commandText ?? (command.commandPreview || "Background command")
10382
+ }
10383
+ )
10374
10384
  ]
10375
10385
  }
10376
10386
  ),
10377
10387
  /* @__PURE__ */ jsxs17("div", { className: "mt-2 space-y-1", children: [
10378
- /* @__PURE__ */ jsx22("p", { className: "whitespace-pre-wrap break-all font-mono text-og-fg-muted", children: command.commandPreview || "Background command" }),
10388
+ /* @__PURE__ */ jsx22("p", { className: "whitespace-pre-wrap break-all font-mono text-og-fg-muted", children: command.commandText ?? (command.commandPreview || "Background command") }),
10379
10389
  /* @__PURE__ */ jsxs17(
10380
10390
  "time",
10381
10391
  {
@@ -10634,4 +10644,4 @@ export {
10634
10644
  SessionCommands,
10635
10645
  StartupTimings
10636
10646
  };
10637
- //# sourceMappingURL=chunk-D5NOQPLR.js.map
10647
+ //# sourceMappingURL=chunk-ZC2DK5SC.js.map