@qredence/fleet 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/web/client/assets/{chat-command-palette-DdPlRVuL.js → chat-command-palette-AjGusIEp.js} +1 -1
  3. package/dist/web/client/assets/{create-project-dialog-CaXurRpm.js → create-project-dialog-zTSeGUup.js} +1 -1
  4. package/dist/web/client/assets/globals-BiAbxPQ2.css +2 -0
  5. package/dist/web/client/assets/{index-BJIGh8ag.js → index-NhnAdIsR.js} +2 -2
  6. package/dist/web/client/assets/{message-queue-CPYj2iaw.js → message-queue-BoNn57Po.js} +1 -1
  7. package/dist/web/client/assets/prompt-input-BhVQxoyh.js +1 -0
  8. package/dist/web/client/assets/{prompt-suggestions-ULqmPijZ.js → prompt-suggestions-BRFWFm5y.js} +1 -1
  9. package/dist/web/client/assets/right-panel-registry-gwgnEeUz.js +2 -0
  10. package/dist/web/client/assets/routes-umGEy_Ak.js +16 -0
  11. package/dist/web/client/assets/{settings-dialog-BRWheaBZ.js → settings-dialog-C8YN5D1V.js} +1 -1
  12. package/dist/web/client/assets/{subagent-chat-panel-B6d4Z3bV.js → subagent-chat-panel-BIsmzS45.js} +1 -1
  13. package/dist/web/client/assets/{subagent-transcript-CQuPs6N4.js → subagent-transcript-CEUBL9sF.js} +1 -1
  14. package/dist/web/client/assets/{subagents-panel-ajf--C_-.js → subagents-panel-CFxWpUT0.js} +1 -1
  15. package/dist/web/client/assets/{tokens-BcUIpW6Y.js → tokens-CtP2s1Y3.js} +1 -1
  16. package/dist/web/client/assets/types-D5hZ8IyV.js +1 -0
  17. package/dist/web/client/assets/virtualized-turn-list-DkJIWXFJ.js +6 -0
  18. package/dist/web/client/bundle-budget.json +6 -6
  19. package/dist/web/server/{_tanstack-start-manifest_v-BZR0i182-OLTGGEDQ.js → _tanstack-start-manifest_v-B3Gb4p5p-DO2GL5VM.js} +9 -10
  20. package/dist/web/server/{artifacts-panel-BySfu7im-AKBWHYJS.js → artifacts-panel-CGgpyc85-V3KXDVAX.js} +2 -2
  21. package/dist/web/server/{chat-command-palette-BLGKnp-w-OKFIKD3T.js → chat-command-palette-BMR7RsuI-U5S4X44U.js} +2 -2
  22. package/dist/web/server/{chunk-4B2PJSK5.js → chunk-5TXDGMCK.js} +14 -4
  23. package/dist/web/server/{chunk-ONWT54IL.js → chunk-BS4D5LRR.js} +5 -1
  24. package/dist/web/server/{chunk-JLGBOCFM.js → chunk-ELRLMFHT.js} +49 -33
  25. package/dist/web/server/{chunk-JZ2WBCIH.js → chunk-G6NMFFZX.js} +624 -624
  26. package/dist/web/server/{chunk-47TH5VUT.js → chunk-LBUHLBKK.js} +2 -2
  27. package/dist/web/server/{chunk-2GQATGF4.js → chunk-N47UN47Y.js} +3 -3
  28. package/dist/web/server/{chunk-CIE2PLNB.js → chunk-PX7B5BTI.js} +2 -2
  29. package/dist/web/server/{chunk-NHZRY22Z.js → chunk-SOZKLVNI.js} +59 -19
  30. package/dist/web/server/{create-project-dialog-CigfFgAj-QS27NAJH.js → create-project-dialog-xhTWmcx1-UQQU3MAT.js} +2 -2
  31. package/dist/web/server/{message-queue-BsrLcNPX-CUCBSF6U.js → message-queue-Dg2okv2L-SJTUUJS7.js} +4 -4
  32. package/dist/web/server/{openui-renderer-TbIFXEW2-BET2OXM2.js → openui-renderer-CiWvcD3p-N6I66FOC.js} +1 -1
  33. package/dist/web/server/{prompt-suggestions-D6RXFQF4-7WHYRNMN.js → prompt-suggestions-h17Gu7u1-BS5SU2FY.js} +2 -2
  34. package/dist/web/server/{router-RPObiwZR-AFMFSYSZ.js → router-DOPFvRSC-G7G75P7U.js} +84 -28
  35. package/dist/web/server/{routes-Dn-deuPY-MDXEQXRU.js → routes-i2Ai-ZwX-SMSFONDQ.js} +469 -352
  36. package/dist/web/server/server.js +2 -2
  37. package/dist/web/server/{settings-dialog-CzeangBl-YKL7CLPF.js → settings-dialog-C-xwPYy8-TFICZWEM.js} +7 -7
  38. package/dist/web/server/{subagent-chat-panel-Fa31QewE-YDPOKN74.js → subagent-chat-panel-VEVu0QXU-DPWJFCYR.js} +5 -4
  39. package/dist/web/server/{subagents-panel-DjOcQxp4-GZYOZOYC.js → subagents-panel-Cs3cBcsy-HTQBIYAS.js} +4 -3
  40. package/package.json +1 -1
  41. package/dist/web/client/assets/globals-B-fD_O7k.css +0 -2
  42. package/dist/web/client/assets/prompt-input-a7UP_MAw.js +0 -1
  43. package/dist/web/client/assets/right-panel-registry-BqtgZw7Z.js +0 -2
  44. package/dist/web/client/assets/routes-C37r2W1K.js +0 -16
  45. package/dist/web/client/assets/types-Cr5Z97oW.js +0 -1
  46. package/dist/web/client/assets/virtualized-turn-list-Bcq088gZ.js +0 -6
@@ -28,7 +28,7 @@ import {
28
28
  useMutation,
29
29
  useQuery,
30
30
  useQueryClient
31
- } from "./chunk-4B2PJSK5.js";
31
+ } from "./chunk-5TXDGMCK.js";
32
32
  import {
33
33
  Gauge
34
34
  } from "./chunk-VCQ65B3G.js";
@@ -36,7 +36,7 @@ import {
36
36
  Library,
37
37
  RIGHT_PANEL_LAUNCHER_DEFINITIONS,
38
38
  getRightPanelDefinition
39
- } from "./chunk-2GQATGF4.js";
39
+ } from "./chunk-N47UN47Y.js";
40
40
  import {
41
41
  ArrowLeft,
42
42
  ProviderBrandIcon,
@@ -50,17 +50,6 @@ import {
50
50
  import {
51
51
  Pencil
52
52
  } from "./chunk-LOFZS555.js";
53
- import {
54
- CHAT_COLUMN_CLASS,
55
- CHAT_HEADER_LAYER_CLASS,
56
- CHROME_PILL_ACTIVE_CLASS,
57
- CHROME_PILL_CLASS,
58
- CHROME_PILL_INACTIVE_CLASS,
59
- COMPOSER_ADD_BUTTON_CLASS,
60
- HIT_AREA_EXPAND_DENSE_CLASS,
61
- PANEL_OVERLAY_CLASS,
62
- SUGGESTION_ITEM_CLASS
63
- } from "./chunk-CIE2PLNB.js";
64
53
  import {
65
54
  Plus,
66
55
  RightPanelProvider,
@@ -70,10 +59,11 @@ import {
70
59
  import {
71
60
  INITIAL_EDITING_STATE,
72
61
  PromptInput,
62
+ ghostPaintText,
73
63
  resolveInlineCompletion,
74
64
  sameEditingState,
75
65
  spliceCompletion
76
- } from "./chunk-NHZRY22Z.js";
66
+ } from "./chunk-SOZKLVNI.js";
77
67
  import "./chunk-X37KO4BO.js";
78
68
  import {
79
69
  ChevronLeft,
@@ -90,7 +80,7 @@ import {
90
80
  groupMessages,
91
81
  normalizeAssistantToolParts,
92
82
  orderedRlmChildren
93
- } from "./chunk-JLGBOCFM.js";
83
+ } from "./chunk-ELRLMFHT.js";
94
84
  import {
95
85
  RefreshCw
96
86
  } from "./chunk-NZ5YXXQ5.js";
@@ -98,6 +88,18 @@ import {
98
88
  notify
99
89
  } from "./chunk-UIUZ4ETR.js";
100
90
  import "./chunk-VHLBXWEN.js";
91
+ import {
92
+ CHAT_COLUMN_CLASS,
93
+ CHAT_HEADER_LAYER_CLASS,
94
+ CHROME_PILL_ACTIVE_CLASS,
95
+ CHROME_PILL_CLASS,
96
+ CHROME_PILL_INACTIVE_CLASS,
97
+ COMPOSER_ADD_BUTTON_CLASS,
98
+ HIT_AREA_EXPAND_CLASS,
99
+ HIT_AREA_EXPAND_DENSE_CLASS,
100
+ PANEL_OVERLAY_CLASS,
101
+ SUGGESTION_ITEM_CLASS
102
+ } from "./chunk-PX7B5BTI.js";
101
103
  import {
102
104
  Bot
103
105
  } from "./chunk-3OOZPQZF.js";
@@ -120,9 +122,6 @@ import {
120
122
  import {
121
123
  Sparkles
122
124
  } from "./chunk-DIVIHC5K.js";
123
- import {
124
- Terminal
125
- } from "./chunk-GNDXVFJY.js";
126
125
  import {
127
126
  CHROME_MOBILE_MAX_WIDTH_QUERY,
128
127
  DESKTOP_PANEL_ONLY,
@@ -152,6 +151,7 @@ import {
152
151
  } from "./chunk-GR765UTQ.js";
153
152
  import "./chunk-RWYAKZCZ.js";
154
153
  import {
154
+ DISCORD_URL,
155
155
  DOCUMENTATION_URL,
156
156
  EMPTY_PROJECTS,
157
157
  EXPANDED_PROJECTS_STORAGE_KEY,
@@ -160,6 +160,7 @@ import {
160
160
  NEW_SESSION_PREFIX,
161
161
  PROJECT_PREFIX,
162
162
  SESSION_PREFIX,
163
+ TWITTER_URL,
163
164
  directoryErrorMessage,
164
165
  idValue,
165
166
  newSessionResourceId,
@@ -169,7 +170,7 @@ import {
169
170
  sessionLabel,
170
171
  sessionResourceId,
171
172
  sessionSearchGroup
172
- } from "./chunk-ONWT54IL.js";
173
+ } from "./chunk-BS4D5LRR.js";
173
174
  import "./chunk-7LUHWO5G.js";
174
175
  import {
175
176
  Search
@@ -457,7 +458,7 @@ import "./chunk-RPWKCJHL.js";
457
458
  import "./chunk-L547YHC4.js";
458
459
  import "./chunk-MLKGABMK.js";
459
460
 
460
- // web/app/dist/server/assets/routes-Dn-deuPY.js
461
+ // web/app/dist/server/assets/routes-i2Ai-ZwX.js
461
462
  import * as React$1 from "react";
462
463
  import { Suspense, createContext as createContext2, createElement, forwardRef as forwardRef2, isValidElement, lazy, memo, useCallback as useCallback2, useContext as useContext2, useEffect as useEffect2, useEffectEvent, useId, useLayoutEffect, useMemo as useMemo2, useReducer, useRef as useRef2, useState as useState2, useSyncExternalStore } from "react";
463
464
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -3381,7 +3382,7 @@ function MobilePanel({ children, dataTestid, headerActions, icon: Icon, onClose,
3381
3382
  return /* @__PURE__ */ jsx("dialog", {
3382
3383
  ref: panelRef,
3383
3384
  "data-testid": dataTestid,
3384
- className: `fixed top-[var(--chat-chrome-top)] right-3 bottom-3 m-0 ${PANEL_OVERLAY_CLASS} backdrop:bg-black/20 ${DESKTOP_PANEL_ONLY}`,
3385
+ className: `fixed top-[var(--chat-chrome-top)] left-auto m-0 max-h-[calc(100dvh-var(--chat-chrome-top)-max(0.75rem,env(safe-area-inset-bottom)))] h-[calc(100dvh-var(--chat-chrome-top)-max(0.75rem,env(safe-area-inset-bottom)))] [inset-inline-start:auto] [inset-inline-end:max(0.75rem,env(safe-area-inset-right))] ${PANEL_OVERLAY_CLASS} backdrop:bg-black/20 ${DESKTOP_PANEL_ONLY}`,
3385
3386
  "aria-labelledby": panelTitleId,
3386
3387
  onClose: () => {
3387
3388
  if (suppressCloseRef.current) {
@@ -4154,7 +4155,7 @@ function Popover({ trigger, children, contentId, open, defaultOpen, onOpenChange
4154
4155
  isValidElement(trigger) ? /* @__PURE__ */ jsx(PopoverTrigger2, {
4155
4156
  render: trigger,
4156
4157
  "aria-controls": popupId,
4157
- className: "inline-flex"
4158
+ className: "inline-flex items-center"
4158
4159
  }) : /* @__PURE__ */ jsx(PopoverTrigger2, {
4159
4160
  render: /* @__PURE__ */ jsx(Button, {
4160
4161
  type: "button",
@@ -4162,7 +4163,7 @@ function Popover({ trigger, children, contentId, open, defaultOpen, onOpenChange
4162
4163
  children: trigger
4163
4164
  }),
4164
4165
  "aria-controls": popupId,
4165
- className: "inline-flex"
4166
+ className: "inline-flex items-center"
4166
4167
  }),
4167
4168
  overlay && resolvedOpen ? /* @__PURE__ */ jsx("div", {
4168
4169
  className: "fixed inset-0 z-40 bg-black/20",
@@ -4418,6 +4419,7 @@ function MarqueeLabel({ active, children }) {
4418
4419
  return /* @__PURE__ */ jsx("span", {
4419
4420
  ref: viewportRef,
4420
4421
  className: "block min-w-0 flex-1 overflow-hidden",
4422
+ title: children,
4421
4423
  children: /* @__PURE__ */ jsxs(m.span, {
4422
4424
  className: "flex w-max items-center gap-6 whitespace-nowrap",
4423
4425
  animate: { x: running ? [0, -distance] : 0 },
@@ -4487,7 +4489,7 @@ function ResourceActionMenu({ item, menuOpen, onMenuOpenChange, onRenameStart, r
4487
4489
  onMenuOpenChange(false);
4488
4490
  onRenameStart();
4489
4491
  },
4490
- className: "flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-left text-xs text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
4492
+ className: "flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-start text-xs text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
4491
4493
  children: [/* @__PURE__ */ jsx(Pencil, {
4492
4494
  "aria-hidden": "true",
4493
4495
  className: "size-3.5"
@@ -4499,11 +4501,11 @@ function ResourceActionMenu({ item, menuOpen, onMenuOpenChange, onRenameStart, r
4499
4501
  children: [/* @__PURE__ */ jsx(PopoverTrigger2, { render: /* @__PURE__ */ jsx(Button, {
4500
4502
  type: "button",
4501
4503
  variant: "ghost",
4502
- size: "icon-sm",
4504
+ size: "icon",
4503
4505
  draggable: false,
4504
4506
  "aria-label": `Actions for ${item.label}`,
4505
4507
  onClick: (event) => event.stopPropagation(),
4506
- className: "size-7 shrink-0 opacity-0 outline-none transition-opacity hover:bg-foreground/5 focus-visible:opacity-100 group-hover/resource:opacity-100 group-data-[menu-open=true]/resource:opacity-100",
4508
+ className: "size-8 shrink-0 opacity-0 outline-none transition-opacity hover:bg-foreground/5 focus-visible:opacity-100 group-hover/resource:opacity-100 group-data-[menu-open=true]/resource:opacity-100",
4507
4509
  children: /* @__PURE__ */ jsx(Ellipsis, {
4508
4510
  "aria-hidden": "true",
4509
4511
  className: "size-4"
@@ -4521,7 +4523,7 @@ function ResourceActionMenu({ item, menuOpen, onMenuOpenChange, onRenameStart, r
4521
4523
  });
4522
4524
  }
4523
4525
  function getResourceRowClassName(acceptsChildren, active, containerActive, kind, disabled2) {
4524
- return cn("group/resource relative flex min-h-8 min-w-0 cursor-pointer items-center gap-2 rounded-lg pr-2 text-body outline-none", "text-muted-foreground transition-colors hover:bg-muted hover:text-foreground", "focus-visible:bg-muted/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", "data-[menu-open=true]:bg-muted data-[menu-open=true]:text-foreground", "data-[dragging=true]:opacity-40", "data-[drop=inside]:bg-primary/10 data-[drop=inside]:ring-1 data-[drop=inside]:ring-primary/45", "data-[drop=before]:before:absolute data-[drop=before]:before:-top-0.5 data-[drop=before]:before:right-2 data-[drop=before]:before:left-2 data-[drop=before]:before:h-0.5 data-[drop=before]:before:rounded-full data-[drop=before]:before:bg-primary", "data-[drop=after]:after:absolute data-[drop=after]:after:-bottom-0.5 data-[drop=after]:after:right-2 data-[drop=after]:after:left-2 data-[drop=after]:after:h-0.5 data-[drop=after]:after:rounded-full data-[drop=after]:after:bg-primary", !acceptsChildren && active && "bg-muted text-foreground", acceptsChildren && containerActive && "bg-muted/55 text-foreground ring-1 ring-border/70", kind === "action" && "text-xs text-muted-foreground", disabled2 && "cursor-not-allowed opacity-45");
4526
+ return cn("group/resource relative flex min-h-8 min-w-0 cursor-pointer items-center gap-2 rounded-sm pe-0 text-body outline-none", "text-muted-foreground transition-colors hover:bg-muted hover:text-foreground", "focus-visible:bg-muted/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", "data-[menu-open=true]:bg-muted data-[menu-open=true]:text-foreground", "data-[dragging=true]:opacity-40", "data-[drop=inside]:bg-primary/10 data-[drop=inside]:ring-1 data-[drop=inside]:ring-primary/45", "data-[drop=before]:before:absolute data-[drop=before]:before:-top-0.5 data-[drop=before]:before:inset-x-2 data-[drop=before]:before:h-0.5 data-[drop=before]:before:rounded-full data-[drop=before]:before:bg-primary", "data-[drop=after]:after:absolute data-[drop=after]:after:-bottom-0.5 data-[drop=after]:after:inset-x-2 data-[drop=after]:after:h-0.5 data-[drop=after]:after:rounded-full data-[drop=after]:after:bg-primary", !acceptsChildren && active && "bg-muted text-foreground", acceptsChildren && containerActive && "bg-muted/55 text-foreground ring-1 ring-border/70", kind === "action" && "text-xs text-muted-foreground", disabled2 && "cursor-not-allowed opacity-45");
4525
4527
  }
4526
4528
  function useResourceRowEvents({ acceptsChildren, allowMove, disabled: disabled2, kind, onContainerSelect, onDragEnd, onDragOver, onDragStart, onDrop, onRenameStart, onSelect, renaming, row }) {
4527
4529
  const draggedRef = useRef2(false);
@@ -4646,7 +4648,7 @@ function ResourceRow(props) {
4646
4648
  onDragOver: events.handleDragOver,
4647
4649
  onDrop: events.handleDrop,
4648
4650
  className: getResourceRowClassName(acceptsChildren, props.active, props.containerActive, props.row.item.kind, props.row.item.disabled),
4649
- style: { paddingLeft: `${8 + (props.row.depth + (props.row.item.indent ?? 0)) * 14}px` },
4651
+ style: { paddingInlineStart: `${8 + (props.row.depth + (props.row.item.indent ?? 0)) * 14}px` },
4650
4652
  children: /* @__PURE__ */ jsx(ResourceRowContent, {
4651
4653
  icon,
4652
4654
  renaming: props.renaming,
@@ -5357,16 +5359,16 @@ function sessionStatusIcon(session) {
5357
5359
  }
5358
5360
  function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen, expandedProjectIds, setExpandedProjectIds, setCreateOpen, projects, projectSessions, sidebarItems, activeProjectId, activeSessionId, onNewSession, onNewSessionInProject, onProjectSelect, onRenameSession, onCreateProject, resumeResource, toggleProjectResource, renderMenu }) {
5359
5361
  return /* @__PURE__ */ jsx(AnimatedSidebarContent, {
5360
- className: "gap-0 px-2 pb-1 pt-2",
5362
+ className: "gap-0 px-2.5 pb-1 pt-2",
5361
5363
  children: /* @__PURE__ */ jsxs(AnimatedSidebarGroup, {
5362
5364
  className: "p-0",
5363
5365
  children: [/* @__PURE__ */ jsxs("div", {
5364
5366
  className: "relative mb-1 h-8",
5365
5367
  children: [/* @__PURE__ */ jsx(AnimatedSidebarGroupLabel, {
5366
- className: "mb-0 h-8 pr-16 text-xs font-normal normal-case tracking-normal text-muted-foreground",
5368
+ className: "mb-0 h-8 pe-20 text-xs font-normal normal-case tracking-normal text-muted-foreground",
5367
5369
  children: "Projects"
5368
5370
  }), /* @__PURE__ */ jsxs("div", {
5369
- className: "absolute inset-y-0 right-1 flex items-center gap-0.5",
5371
+ className: "absolute inset-y-0 left-auto flex items-center gap-0.5 [inset-inline-start:auto] [inset-inline-end:0]",
5370
5372
  children: [/* @__PURE__ */ jsxs(Popover, {
5371
5373
  open: projectActionsOpen,
5372
5374
  onOpenChange: setProjectActionsOpen,
@@ -5377,7 +5379,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
5377
5379
  type: "button",
5378
5380
  "aria-label": "Project actions",
5379
5381
  title: "Project actions",
5380
- className: "grid size-6 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring",
5382
+ className: cn(HIT_AREA_EXPAND_DENSE_CLASS, "inline-flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring"),
5381
5383
  children: /* @__PURE__ */ jsx(Ellipsis, {
5382
5384
  "aria-hidden": "true",
5383
5385
  className: "size-3.5"
@@ -5411,7 +5413,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
5411
5413
  "aria-label": "Add project",
5412
5414
  title: "Add project",
5413
5415
  onClick: () => setCreateOpen(true),
5414
- className: "grid size-6 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring",
5416
+ className: cn(HIT_AREA_EXPAND_DENSE_CLASS, "inline-flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring"),
5415
5417
  children: /* @__PURE__ */ jsx(Plus, {
5416
5418
  "aria-hidden": "true",
5417
5419
  className: "size-3.5"
@@ -5448,6 +5450,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
5448
5450
  renderMenu,
5449
5451
  renderIcon: (item) => {
5450
5452
  if (idValue(item.id, "project:")) return /* @__PURE__ */ jsx(Folder, { className: "size-4" });
5453
+ if (item.id.startsWith("toggle:")) return item.label === "Show less" ? /* @__PURE__ */ jsx(ChevronUp, { className: "size-4" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" });
5451
5454
  if (item.kind === "action") return null;
5452
5455
  const sessionId = idValue(item.id, SESSION_PREFIX);
5453
5456
  return sessionStatusIcon(projectSessions.find((entry) => entry.sessionId === sessionId));
@@ -5458,7 +5461,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
5458
5461
  return /* @__PURE__ */ jsx(Button, {
5459
5462
  type: "button",
5460
5463
  variant: "ghost",
5461
- size: "icon-xs",
5464
+ size: "icon",
5462
5465
  "aria-label": `New chat in ${item.label}`,
5463
5466
  title: `New chat in ${item.label}`,
5464
5467
  onClick: (event) => {
@@ -5469,7 +5472,7 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
5469
5472
  onNewSession();
5470
5473
  }
5471
5474
  },
5472
- className: "size-7 shrink-0 opacity-0 group-hover/resource:opacity-100 group-focus-within/resource:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100",
5475
+ className: "size-8 shrink-0 opacity-0 group-hover/resource:opacity-100 group-focus-within/resource:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100",
5473
5476
  children: /* @__PURE__ */ jsx(SquarePen, {
5474
5477
  "data-icon": "inline-start",
5475
5478
  className: "size-3.5"
@@ -5483,9 +5486,29 @@ function SessionSidebarProjectList({ projectActionsOpen, setProjectActionsOpen,
5483
5486
  })
5484
5487
  });
5485
5488
  }
5489
+ function XIcon({ className, ...props }) {
5490
+ return /* @__PURE__ */ jsx("svg", {
5491
+ "aria-hidden": "true",
5492
+ viewBox: "0 0 24 24",
5493
+ fill: "currentColor",
5494
+ className,
5495
+ ...props,
5496
+ children: /* @__PURE__ */ jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.744l7.727-8.835L1.254 2.25H8.08l4.253 5.622L18.244 2.25zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z" })
5497
+ });
5498
+ }
5499
+ function DiscordIcon({ className, ...props }) {
5500
+ return /* @__PURE__ */ jsx("svg", {
5501
+ "aria-hidden": "true",
5502
+ viewBox: "0 0 24 24",
5503
+ fill: "currentColor",
5504
+ className,
5505
+ ...props,
5506
+ children: /* @__PURE__ */ jsx("path", { d: "M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0 12.6 12.6 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14 14 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.3 12.3 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.8 19.8 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" })
5507
+ });
5508
+ }
5486
5509
  function fleetVersion() {
5487
5510
  try {
5488
- return "0.6.4";
5511
+ return "0.6.5";
5489
5512
  } catch {
5490
5513
  return "dev";
5491
5514
  }
@@ -5501,6 +5524,7 @@ function VersionBadge() {
5501
5524
  });
5502
5525
  }
5503
5526
  var MENU_ITEM_CLASS = "flex h-8 w-full items-center gap-2 rounded-md px-2 text-label outline-none transition-colors hover:bg-muted focus-visible:bg-muted";
5527
+ var SIDEBAR_ITEM_BUTTON_CLASS = "flex h-8 w-full items-center justify-start gap-2 rounded-lg px-2 text-body font-normal text-sidebar-foreground outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-sidebar-ring";
5504
5528
  function SidebarMenuItem({ icon: Icon, label, onClick, href }) {
5505
5529
  if (href) return /* @__PURE__ */ jsxs("a", {
5506
5530
  href,
@@ -5554,7 +5578,7 @@ function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen,
5554
5578
  align: "start",
5555
5579
  trigger: /* @__PURE__ */ jsxs("button", {
5556
5580
  type: "button",
5557
- className: "flex h-8 w-fit shrink-0 items-center gap-1 rounded-lg px-2 text-left text-body font-medium outline-none transition-colors hover:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-sidebar-ring",
5581
+ className: "flex h-8 w-fit shrink-0 items-center gap-1 rounded-lg px-2 text-start text-body font-medium outline-none transition-colors hover:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-sidebar-ring",
5558
5582
  children: [/* @__PURE__ */ jsx("span", {
5559
5583
  className: "truncate",
5560
5584
  children: "Qredence Fleet"
@@ -5623,7 +5647,7 @@ function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen,
5623
5647
  children: [matchingProjects.map((project) => /* @__PURE__ */ jsxs("button", {
5624
5648
  type: "button",
5625
5649
  onClick: () => selectSearchResult(`search-project:${project.projectId}`),
5626
- className: "flex w-full min-w-0 items-center gap-2 rounded-xl px-2 py-1.5 text-left text-label outline-none transition-colors hover:bg-foreground/[0.03] focus-visible:ring-2 focus-visible:ring-ring",
5650
+ className: "flex w-full min-w-0 items-center gap-2 rounded-xl px-2 py-1.5 text-start text-label outline-none transition-colors hover:bg-foreground/[0.03] focus-visible:ring-2 focus-visible:ring-ring",
5627
5651
  children: [
5628
5652
  /* @__PURE__ */ jsx(Folder, { className: "size-3.5 shrink-0 text-muted-foreground/60" }),
5629
5653
  /* @__PURE__ */ jsx("span", {
@@ -5672,7 +5696,7 @@ function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen,
5672
5696
  }), /* @__PURE__ */ jsxs("button", {
5673
5697
  type: "button",
5674
5698
  onClick: onNewSession,
5675
- className: "flex h-8 w-full items-center justify-start gap-2 rounded-lg px-2 text-body font-normal text-sidebar-foreground outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-sidebar-ring",
5699
+ className: SIDEBAR_ITEM_BUTTON_CLASS,
5676
5700
  children: [/* @__PURE__ */ jsx(SquarePen, { className: "size-4 shrink-0 text-muted-foreground" }), "New chat"]
5677
5701
  })]
5678
5702
  }),
@@ -5697,24 +5721,43 @@ function SessionSidebarNavigation({ brandMenuOpen, setBrandMenuOpen, searchOpen,
5697
5721
  renderMenu
5698
5722
  }),
5699
5723
  /* @__PURE__ */ jsxs(AnimatedSidebarFooter, {
5700
- className: "flex-row items-center gap-1 border-sidebar-border px-2.5 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))]",
5724
+ className: "flex-col gap-1 border-sidebar-border px-2.5 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))]",
5701
5725
  children: [
5702
- /* @__PURE__ */ jsx("div", {
5703
- className: "min-w-0 flex-1",
5704
- children: accountMenu ?? /* @__PURE__ */ jsx("span", {
5705
- className: "flex h-8 items-center px-2 text-body",
5706
- children: "Qredence"
5707
- })
5726
+ /* @__PURE__ */ jsxs("a", {
5727
+ href: TWITTER_URL,
5728
+ target: "_blank",
5729
+ rel: "noreferrer",
5730
+ className: SIDEBAR_ITEM_BUTTON_CLASS,
5731
+ children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4 shrink-0 text-muted-foreground" }), "Twitter"]
5708
5732
  }),
5709
- /* @__PURE__ */ jsx(VersionBadge, {}),
5710
- /* @__PURE__ */ jsx("a", {
5711
- href: DOCUMENTATION_URL,
5733
+ /* @__PURE__ */ jsxs("a", {
5734
+ href: DISCORD_URL,
5712
5735
  target: "_blank",
5713
5736
  rel: "noreferrer",
5714
- "aria-label": "Open Qredence documentation",
5715
- title: "Help",
5716
- className: "grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring",
5717
- children: /* @__PURE__ */ jsx(CircleQuestionMark, { className: "size-4" })
5737
+ className: SIDEBAR_ITEM_BUTTON_CLASS,
5738
+ children: [/* @__PURE__ */ jsx(DiscordIcon, { className: "size-4 shrink-0 text-muted-foreground" }), "Discord"]
5739
+ }),
5740
+ /* @__PURE__ */ jsxs("div", {
5741
+ className: "flex w-full flex-row items-center gap-1",
5742
+ children: [
5743
+ /* @__PURE__ */ jsx("div", {
5744
+ className: "min-w-0 flex-1",
5745
+ children: accountMenu ?? /* @__PURE__ */ jsx("span", {
5746
+ className: "flex h-8 items-center px-2 text-body",
5747
+ children: "Qredence"
5748
+ })
5749
+ }),
5750
+ /* @__PURE__ */ jsx(VersionBadge, {}),
5751
+ /* @__PURE__ */ jsx("a", {
5752
+ href: DOCUMENTATION_URL,
5753
+ target: "_blank",
5754
+ rel: "noreferrer",
5755
+ "aria-label": "Open Qredence documentation",
5756
+ title: "Help",
5757
+ className: "grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring",
5758
+ children: /* @__PURE__ */ jsx(CircleQuestionMark, { className: "size-4" })
5759
+ })
5760
+ ]
5718
5761
  })
5719
5762
  ]
5720
5763
  }),
@@ -5911,11 +5954,14 @@ function useSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS, proje
5911
5954
  label: "Start first chat",
5912
5955
  kind: "action"
5913
5956
  });
5914
- else if (sessionsForProject.length > 5) children.push({
5915
- id: `toggle:${project.projectId}`,
5916
- label: revealed ? "Show less" : "Show more",
5917
- kind: "action"
5918
- });
5957
+ else if (sessionsForProject.length > 5) {
5958
+ const hidden = sessionsForProject.length - visible.length;
5959
+ children.push({
5960
+ id: `toggle:${project.projectId}`,
5961
+ label: revealed ? "Show less" : `Show ${hidden} more`,
5962
+ kind: "action"
5963
+ });
5964
+ }
5919
5965
  return {
5920
5966
  id: projectResourceId(project.projectId),
5921
5967
  label: project.name,
@@ -5925,17 +5971,22 @@ function useSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS, proje
5925
5971
  });
5926
5972
  const unassigned = sortSessions(displayProjectSessions(projectSessions.filter((session) => !session.projectId), activeSessionId));
5927
5973
  if (unassigned.length > 0) {
5928
- const unassignedChildren = visibleProjectSessions(unassigned, activeSessionId, revealedProjectIds.has("unassigned")).map((session) => ({
5974
+ const unassignedRevealed = revealedProjectIds.has("unassigned");
5975
+ const unassignedVisible = visibleProjectSessions(unassigned, activeSessionId, unassignedRevealed);
5976
+ const unassignedChildren = unassignedVisible.map((session) => ({
5929
5977
  id: sessionResourceId(session.sessionId),
5930
5978
  label: sessionLabel(session, unassigned),
5931
5979
  kind: "file",
5932
5980
  ...session.isSubagent ? { indent: 1 } : {}
5933
5981
  }));
5934
- if (unassigned.length > 5) unassignedChildren.push({
5935
- id: "toggle:unassigned",
5936
- label: revealedProjectIds.has("unassigned") ? "Show less" : "Show more",
5937
- kind: "action"
5938
- });
5982
+ if (unassigned.length > 5) {
5983
+ const hidden = unassigned.length - unassignedVisible.length;
5984
+ unassignedChildren.push({
5985
+ id: "toggle:unassigned",
5986
+ label: unassignedRevealed ? "Show less" : `Show ${hidden} more`,
5987
+ kind: "action"
5988
+ });
5989
+ }
5939
5990
  grouped.push({
5940
5991
  id: "project:unassigned",
5941
5992
  label: "Unassigned",
@@ -6151,7 +6202,7 @@ function useSessionSidebarViewModel({ sessions, projects = EMPTY_PROJECTS, proje
6151
6202
  submitCreate
6152
6203
  };
6153
6204
  }
6154
- var LazySessionSidebarCreateDialog = lazy(() => import("./create-project-dialog-CigfFgAj-QS27NAJH.js").then(({ SessionSidebarCreateDialog }) => ({ default: SessionSidebarCreateDialog })));
6205
+ var LazySessionSidebarCreateDialog = lazy(() => import("./create-project-dialog-xhTWmcx1-UQQU3MAT.js").then(({ SessionSidebarCreateDialog }) => ({ default: SessionSidebarCreateDialog })));
6155
6206
  function SessionSidebarDialogs(props) {
6156
6207
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [props.createOpen ? /* @__PURE__ */ jsx(Suspense, {
6157
6208
  fallback: null,
@@ -6503,7 +6554,6 @@ function buildChatInputBarProps(composer, activeSessionId) {
6503
6554
  onSlashCommandSelect: composer.handleSlashCommandSelect,
6504
6555
  onLocalSlashSubmit: composer.handleLocalSlashSubmit,
6505
6556
  onDraftChange: composer.onComposerDraftChange,
6506
- intentSuggestion: composer.intentSuggestion,
6507
6557
  inlineCompletion: composer.inlineCompletion,
6508
6558
  modelPickerOpen: composer.modelPickerOpen,
6509
6559
  onModelPickerOpenChange: composer.setModelPickerOpen,
@@ -6512,7 +6562,7 @@ function buildChatInputBarProps(composer, activeSessionId) {
6512
6562
  };
6513
6563
  }
6514
6564
  function useChatInputBarProps(composer, activeSessionId) {
6515
- const { addWorkspaceAttachment, chatMode, effortPickerOpen, handleAttach, handleLocalSlashSubmit, handleSlashCommandSelect, infoDescription, inlineCompletion, intentSuggestion, modelKey, modelPickerOpen, models, onComposerDraftChange, pendingQuestionBar, removeUploadedAttachment, removeWorkspaceAttachment, setChatMode, setEffortPickerOpen, setModelKey, setModelPickerOpen, setThinkingLevel, slashCommands, thinkingLevel, uploadedAttachments, workspaceAttachments, workspaceReferenceSuggestions } = composer;
6565
+ const { addWorkspaceAttachment, chatMode, effortPickerOpen, handleAttach, handleLocalSlashSubmit, handleSlashCommandSelect, infoDescription, inlineCompletion, modelKey, modelPickerOpen, models, onComposerDraftChange, pendingQuestionBar, removeUploadedAttachment, removeWorkspaceAttachment, setChatMode, setEffortPickerOpen, setModelKey, setModelPickerOpen, setThinkingLevel, slashCommands, thinkingLevel, uploadedAttachments, workspaceAttachments, workspaceReferenceSuggestions } = composer;
6516
6566
  return useMemo2(() => buildChatInputBarProps({
6517
6567
  addWorkspaceAttachment,
6518
6568
  chatMode,
@@ -6522,7 +6572,6 @@ function useChatInputBarProps(composer, activeSessionId) {
6522
6572
  handleSlashCommandSelect,
6523
6573
  infoDescription,
6524
6574
  inlineCompletion,
6525
- intentSuggestion,
6526
6575
  modelKey,
6527
6576
  modelPickerOpen,
6528
6577
  models,
@@ -6550,7 +6599,6 @@ function useChatInputBarProps(composer, activeSessionId) {
6550
6599
  handleSlashCommandSelect,
6551
6600
  infoDescription,
6552
6601
  inlineCompletion,
6553
- intentSuggestion,
6554
6602
  modelKey,
6555
6603
  modelPickerOpen,
6556
6604
  models,
@@ -6740,34 +6788,28 @@ var WELCOME_TASKS = [
6740
6788
  value: "Explore the relevant code and create an implementation plan for a new feature before making changes."
6741
6789
  }
6742
6790
  ];
6743
- function ChatWelcome({ disabled: disabled2, onSelect, composer }) {
6791
+ function ChatWelcome({ disabled: disabled2, onSelect }) {
6744
6792
  return /* @__PURE__ */ jsxs("section", {
6745
6793
  "aria-labelledby": "welcome-title",
6746
- className: "flex w-full flex-col items-center text-center",
6747
- children: [
6748
- /* @__PURE__ */ jsx("h1", {
6749
- id: "welcome-title",
6750
- className: "text-balance text-2xl font-normal tracking-tight text-foreground sm:text-3xl",
6751
- children: "What should Fleet Prime Agent work on?"
6752
- }),
6753
- /* @__PURE__ */ jsx("div", {
6754
- className: "mt-6 w-full",
6755
- children: composer
6756
- }),
6757
- /* @__PURE__ */ jsx("div", {
6758
- "aria-label": "Suggested prompts",
6759
- className: "mt-4 flex w-full flex-wrap justify-center gap-2",
6760
- children: WELCOME_TASKS.map((item) => /* @__PURE__ */ jsx(Button, {
6761
- type: "button",
6762
- variant: "outline",
6763
- size: "sm",
6764
- disabled: disabled2 || item.disabled,
6765
- onClick: () => onSelect(item),
6766
- className: SUGGESTION_ITEM_CLASS,
6767
- children: item.label
6768
- }, item.id))
6769
- })
6770
- ]
6794
+ className: "flex w-full flex-col items-center gap-6 text-center",
6795
+ children: [/* @__PURE__ */ jsx("h1", {
6796
+ id: "welcome-title",
6797
+ className: "text-balance text-2xl font-normal tracking-tight text-foreground sm:text-3xl",
6798
+ children: "What should Fleet Prime Agent work on?"
6799
+ }), /* @__PURE__ */ jsx("div", {
6800
+ role: "group",
6801
+ "aria-label": "Suggested prompts",
6802
+ className: "flex w-full flex-wrap justify-center gap-2",
6803
+ children: WELCOME_TASKS.map((item) => /* @__PURE__ */ jsx(Button, {
6804
+ type: "button",
6805
+ variant: "outline",
6806
+ size: "sm",
6807
+ disabled: disabled2 || item.disabled,
6808
+ onClick: () => onSelect(item),
6809
+ className: SUGGESTION_ITEM_CLASS,
6810
+ children: item.label
6811
+ }, item.id))
6812
+ })]
6771
6813
  });
6772
6814
  }
6773
6815
  var LOADER_DOTS = [
@@ -6878,7 +6920,7 @@ function flattenGroups(groups, items) {
6878
6920
  if (groups && groups.length > 0) return groups.flatMap((group) => group.items);
6879
6921
  return items ? [...items] : [];
6880
6922
  }
6881
- var ComposerTriggerPopover = memo(function ComposerTriggerPopover2({ open, kind, query, items, groups, activeIndex = 0, onActiveIndexChange, onSelect, onClose, onBack, className, emptyLabel = "No matching items", title, listId = "composer-trigger-list" }) {
6923
+ var ComposerTriggerPopover = memo(function ComposerTriggerPopover2({ open, kind, query, items, groups, activeIndex = 0, onActiveIndexChange, onSelect, onBack, className, emptyLabel = "No matching items", title, listId = "composer-trigger-list" }) {
6882
6924
  const flatItems = useMemo2(() => flattenGroups(groups, items), [groups, items]);
6883
6925
  if (!open) return null;
6884
6926
  const showGroups = Boolean(groups && groups.length > 0);
@@ -6898,7 +6940,7 @@ var ComposerTriggerPopover = memo(function ComposerTriggerPopover2({ open, kind,
6898
6940
  onClick: () => {
6899
6941
  if (!item.disabled) onSelect(item);
6900
6942
  },
6901
- className: cn("flex min-h-10 cursor-pointer items-start gap-2 rounded-lg px-3 py-2 text-left", selected && "bg-accent text-accent-foreground"),
6943
+ className: cn("flex min-h-10 cursor-pointer items-start gap-2 rounded-lg px-3 py-2 text-start", selected && "bg-accent text-accent-foreground"),
6902
6944
  children: [
6903
6945
  /* @__PURE__ */ jsx("span", {
6904
6946
  className: "mt-0.5 shrink-0 text-muted-foreground",
@@ -6953,15 +6995,8 @@ var ComposerTriggerPopover = memo(function ComposerTriggerPopover2({ open, kind,
6953
6995
  children: title ?? (kind === "slash" ? "Commands" : "Workspace")
6954
6996
  }),
6955
6997
  query ? /* @__PURE__ */ jsx("span", {
6956
- className: "ml-auto max-w-[50%] truncate font-mono text-caption",
6998
+ className: "ms-auto max-w-[50%] truncate font-mono text-caption",
6957
6999
  children: query
6958
- }) : null,
6959
- onClose ? /* @__PURE__ */ jsx("button", {
6960
- type: "button",
6961
- "aria-label": "Close suggestions",
6962
- onClick: onClose,
6963
- className: "sr-only",
6964
- children: "Close suggestions"
6965
7000
  }) : null
6966
7001
  ]
6967
7002
  }), /* @__PURE__ */ jsxs("div", {
@@ -6987,7 +7022,7 @@ var ComposerTriggerPopover = memo(function ComposerTriggerPopover2({ open, kind,
6987
7022
  })]
6988
7023
  }) : null;
6989
7024
  });
6990
- var COMPOSER_SELECTOR_TRIGGER_CLASS = "relative inline-flex h-7 max-w-[18rem] min-w-0 cursor-pointer items-center gap-1.5 rounded-full px-2 text-label leading-4 text-foreground/40 transition-[background-color,transform] duration-150 after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5 hover:bg-foreground/6 hover:text-foreground/55 focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.96] data-[state=open]:bg-foreground/6 data-[state=open]:text-foreground/55";
7025
+ var COMPOSER_SELECTOR_TRIGGER_CLASS = "relative inline-flex h-7 max-w-[18rem] min-w-0 cursor-pointer items-center gap-1.5 rounded-full px-2 text-label leading-4 text-foreground/70 transition-[background-color,transform] duration-150 after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5 hover:bg-foreground/6 hover:text-foreground/85 focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.96] data-[state=open]:bg-foreground/6 data-[state=open]:text-foreground/85";
6991
7026
  var ComposerSelectorTrigger = forwardRef2(function ComposerSelectorTrigger2({ label, leadingIcon, suffix, open = false, showChevron = true, interactive = true, ariaLabel, combobox = false, popupId, className, type = "button", ...rest }, ref) {
6992
7027
  return /* @__PURE__ */ jsxs("button", {
6993
7028
  ref,
@@ -6998,10 +7033,14 @@ var ComposerSelectorTrigger = forwardRef2(function ComposerSelectorTrigger2({ la
6998
7033
  "aria-label": ariaLabel,
6999
7034
  "aria-controls": combobox ? popupId : void 0,
7000
7035
  "aria-expanded": combobox ? open : void 0,
7036
+ tabIndex: interactive ? void 0 : -1,
7001
7037
  className: cn(COMPOSER_SELECTOR_TRIGGER_CLASS, !interactive && "pointer-events-none", className),
7002
7038
  ...rest,
7039
+ title: rest.title ?? (typeof label === "string" ? label : void 0),
7040
+ disabled: !interactive || Boolean(rest.disabled),
7003
7041
  children: [
7004
7042
  leadingIcon ? /* @__PURE__ */ jsx("span", {
7043
+ "aria-hidden": "true",
7005
7044
  className: "shrink-0 [&_svg]:size-3.5",
7006
7045
  children: leadingIcon
7007
7046
  }) : null,
@@ -7012,7 +7051,7 @@ var ComposerSelectorTrigger = forwardRef2(function ComposerSelectorTrigger2({ la
7012
7051
  suffix,
7013
7052
  showChevron ? /* @__PURE__ */ jsx(ChevronDown, {
7014
7053
  "aria-hidden": "true",
7015
- className: "size-3 shrink-0 text-foreground/40"
7054
+ className: "size-3 shrink-0 text-foreground/70"
7016
7055
  }) : null
7017
7056
  ]
7018
7057
  });
@@ -7023,53 +7062,111 @@ var ModeSelector = memo(function ModeSelector2({ modes, value, defaultValue, onC
7023
7062
  const activeId = isControlled ? value : internalValue;
7024
7063
  const activeMode = modes.find((m2) => m2.id === activeId) ?? modes[0];
7025
7064
  const [open, setOpen] = useState2(false);
7026
- const handleSelect = useCallback2((id) => {
7065
+ const popupId = useId();
7066
+ const optionRefs = useRef2([]);
7067
+ const commitMode = useCallback2((id, close) => {
7027
7068
  if (!isControlled) setInternalValue(id);
7028
7069
  onChange?.(id);
7029
- setOpen(false);
7070
+ if (close) setOpen(false);
7030
7071
  }, [isControlled, onChange]);
7072
+ const focusAndSelect = useCallback2((index) => {
7073
+ if (modes.length === 0) return;
7074
+ const clamped = (index % modes.length + modes.length) % modes.length;
7075
+ const mode = modes[clamped];
7076
+ if (!mode) return;
7077
+ optionRefs.current[clamped]?.focus();
7078
+ commitMode(mode.id, false);
7079
+ }, [commitMode, modes]);
7080
+ const handleOptionKeyDown = useCallback2((event, modeId) => {
7081
+ if (modes.length === 0) return;
7082
+ const currentIndex = Math.max(0, modes.findIndex((mode) => mode.id === modeId));
7083
+ switch (event.key) {
7084
+ case "ArrowDown":
7085
+ case "ArrowRight":
7086
+ event.preventDefault();
7087
+ focusAndSelect(currentIndex + 1);
7088
+ break;
7089
+ case "ArrowUp":
7090
+ case "ArrowLeft":
7091
+ event.preventDefault();
7092
+ focusAndSelect(currentIndex - 1);
7093
+ break;
7094
+ case "Home":
7095
+ event.preventDefault();
7096
+ focusAndSelect(0);
7097
+ break;
7098
+ case "End":
7099
+ event.preventDefault();
7100
+ focusAndSelect(modes.length - 1);
7101
+ }
7102
+ }, [focusAndSelect, modes]);
7031
7103
  if (modes.length === 0) return null;
7032
7104
  const ActiveIcon = activeMode?.icon;
7033
7105
  const hasMultiple = modes.length > 1;
7106
+ const modeLabel = activeMode?.label ?? "";
7034
7107
  const trigger = /* @__PURE__ */ jsx(ComposerSelectorTrigger, {
7035
- ariaLabel: "Select mode",
7036
- label: activeMode?.label ?? "",
7108
+ ariaLabel: modeLabel ? `Select mode, ${modeLabel}` : "Select mode",
7109
+ label: modeLabel,
7037
7110
  leadingIcon: ActiveIcon ? /* @__PURE__ */ jsx(ActiveIcon, { className: "size-3.5 shrink-0" }) : void 0,
7038
7111
  open,
7039
7112
  showChevron: hasMultiple,
7040
7113
  interactive: hasMultiple,
7114
+ "aria-haspopup": hasMultiple ? "dialog" : void 0,
7115
+ "aria-expanded": hasMultiple ? open : void 0,
7116
+ "aria-controls": hasMultiple ? popupId : void 0,
7041
7117
  className
7042
7118
  });
7043
7119
  if (!hasMultiple) return trigger;
7044
7120
  return /* @__PURE__ */ jsx(Popover, {
7121
+ contentId: popupId,
7045
7122
  open,
7046
7123
  onOpenChange: setOpen,
7047
7124
  side: "top",
7048
7125
  align: "start",
7049
7126
  trigger,
7050
- children: modes.map((mode) => {
7051
- const isActive = mode.id === activeMode?.id;
7052
- const Icon = mode.icon;
7053
- return /* @__PURE__ */ jsxs("button", {
7054
- type: "button",
7055
- onClick: () => handleSelect(mode.id),
7056
- className: cn("flex w-full cursor-pointer items-start gap-2 rounded-[6px] px-2 py-2 text-left text-label leading-4 text-foreground transition-[background-color,transform] duration-150 hover:bg-foreground/6 active:scale-[0.96]", isActive && "bg-foreground/6"),
7057
- children: [
7058
- Icon && /* @__PURE__ */ jsx(Icon, { className: "mt-0.5 size-3.5 shrink-0" }),
7059
- /* @__PURE__ */ jsxs("span", {
7060
- className: "min-w-0 flex-1",
7061
- children: [/* @__PURE__ */ jsx("span", {
7062
- className: "block truncate font-medium",
7063
- children: mode.label
7064
- }), mode.description && /* @__PURE__ */ jsx("span", {
7065
- className: "block truncate text-foreground/40",
7066
- children: mode.description
7067
- })]
7068
- }),
7069
- isActive && /* @__PURE__ */ jsx(Check, { className: "mt-0.5 size-3.5 shrink-0 text-foreground/60" })
7070
- ]
7071
- }, mode.id);
7072
- })
7127
+ children: open ? /* @__PURE__ */ jsx("div", {
7128
+ role: "radiogroup",
7129
+ "aria-label": "Select mode",
7130
+ className: "flex flex-col gap-0.5",
7131
+ children: modes.map((mode, index) => {
7132
+ const isActive = mode.id === activeMode?.id;
7133
+ const Icon = mode.icon;
7134
+ return /* @__PURE__ */ jsxs("button", {
7135
+ ref: (element) => {
7136
+ optionRefs.current[index] = element;
7137
+ },
7138
+ type: "button",
7139
+ role: "radio",
7140
+ "aria-checked": isActive,
7141
+ tabIndex: isActive ? 0 : -1,
7142
+ "data-mode-id": mode.id,
7143
+ onClick: () => commitMode(mode.id, true),
7144
+ onKeyDown: (event) => handleOptionKeyDown(event, mode.id),
7145
+ className: cn("flex w-full cursor-pointer items-start gap-2 rounded-[6px] px-2 py-2 text-start text-label leading-4 text-foreground transition-[background-color,transform] duration-150 hover:bg-foreground/6 focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.96]", isActive && "bg-foreground/6"),
7146
+ children: [
7147
+ Icon ? /* @__PURE__ */ jsx("span", {
7148
+ "aria-hidden": "true",
7149
+ className: "mt-0.5 shrink-0",
7150
+ children: /* @__PURE__ */ jsx(Icon, { className: "size-3.5" })
7151
+ }) : null,
7152
+ /* @__PURE__ */ jsxs("span", {
7153
+ className: "min-w-0 flex-1",
7154
+ children: [/* @__PURE__ */ jsx("span", {
7155
+ className: "block truncate font-medium",
7156
+ children: mode.label
7157
+ }), mode.description ? /* @__PURE__ */ jsx("span", {
7158
+ className: "block truncate text-foreground/70",
7159
+ children: mode.description
7160
+ }) : null]
7161
+ }),
7162
+ isActive ? /* @__PURE__ */ jsx(Check, {
7163
+ "aria-hidden": "true",
7164
+ className: "mt-0.5 size-3.5 shrink-0 text-foreground/60"
7165
+ }) : null
7166
+ ]
7167
+ }, mode.id);
7168
+ })
7169
+ }) : null
7073
7170
  });
7074
7171
  });
7075
7172
  function getDefaultFormSubmitter(form) {
@@ -8096,13 +8193,16 @@ function InputQuestionBar({ questionBar, navigation, roundedTop, onDismiss }) {
8096
8193
  onDismiss(questionBar.id);
8097
8194
  };
8098
8195
  return /* @__PURE__ */ jsxs("div", {
8099
- className: cn("mx-auto w-full max-w-[calc(100%-24px)] border-x border-t border-border", roundedTop ? "rounded-t-chat-input" : null),
8196
+ className: cn("w-full border-x border-t border-border", roundedTop ? "rounded-t-chat-input" : null),
8100
8197
  children: [
8101
8198
  /* @__PURE__ */ jsxs("div", {
8102
8199
  className: "flex h-7 items-center justify-between border-b border-border px-3 text-xs text-muted-foreground",
8103
8200
  children: [/* @__PURE__ */ jsxs("div", {
8104
8201
  className: "inline-flex items-center gap-1.5",
8105
- children: [/* @__PURE__ */ jsx(MessageCircleQuestionMark, { className: "size-3.5" }), "Question"]
8202
+ children: [/* @__PURE__ */ jsx(MessageCircleQuestionMark, {
8203
+ "aria-hidden": "true",
8204
+ className: "size-3.5"
8205
+ }), "Question"]
8106
8206
  }), showQuestionNavigation && /* @__PURE__ */ jsxs("div", {
8107
8207
  className: "inline-flex items-center gap-1",
8108
8208
  children: [
@@ -8110,9 +8210,12 @@ function InputQuestionBar({ questionBar, navigation, roundedTop, onDismiss }) {
8110
8210
  type: "button",
8111
8211
  onClick: goToPreviousQuestion,
8112
8212
  disabled: !canGoPrev,
8113
- className: "relative inline-flex size-5 items-center justify-center rounded-[4px] transition-[background-color,transform] duration-150 after:absolute after:inset-x-0 after:-top-2.5 after:-bottom-2.5 hover:bg-secondary active:scale-[0.96] disabled:opacity-40 disabled:active:scale-100",
8213
+ className: cn("relative after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5", "inline-flex size-6 items-center justify-center rounded-[4px] transition-[background-color,transform] duration-150 hover:bg-secondary focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.96] disabled:opacity-40 disabled:active:scale-100"),
8114
8214
  "aria-label": "Previous question",
8115
- children: /* @__PURE__ */ jsx(ChevronUp, { className: "size-3.5" })
8215
+ children: /* @__PURE__ */ jsx(ChevronUp, {
8216
+ "aria-hidden": "true",
8217
+ className: "size-3.5"
8218
+ })
8116
8219
  }),
8117
8220
  /* @__PURE__ */ jsxs("span", {
8118
8221
  className: "tabular-nums",
@@ -8126,9 +8229,12 @@ function InputQuestionBar({ questionBar, navigation, roundedTop, onDismiss }) {
8126
8229
  type: "button",
8127
8230
  onClick: goToNextQuestion,
8128
8231
  disabled: !canGoNext,
8129
- className: "relative inline-flex size-5 items-center justify-center rounded-[4px] transition-[background-color,transform] duration-150 after:absolute after:inset-x-0 after:-top-2.5 after:-bottom-2.5 hover:bg-secondary active:scale-[0.96] disabled:opacity-40 disabled:active:scale-100",
8232
+ className: cn("relative after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5", "inline-flex size-6 items-center justify-center rounded-[4px] transition-[background-color,transform] duration-150 hover:bg-secondary focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.96] disabled:opacity-40 disabled:active:scale-100"),
8130
8233
  "aria-label": "Next question",
8131
- children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5" })
8234
+ children: /* @__PURE__ */ jsx(ChevronDown, {
8235
+ "aria-hidden": "true",
8236
+ className: "size-3.5"
8237
+ })
8132
8238
  })
8133
8239
  ]
8134
8240
  })]
@@ -8174,13 +8280,16 @@ var ModelSelector = memo(function ModelSelector2({ models, value, effort, open:
8174
8280
  };
8175
8281
  const selectedModel = models.find((model) => model.id === value) ?? models[0];
8176
8282
  const selectedEffort = selectedModel?.efforts?.find((option) => option.id === effort) ?? selectedModel?.efforts?.[0];
8283
+ const modelName = selectedModel?.name ?? placeholder;
8284
+ const effortName = selectedEffort && selectedModel?.reasoning ? selectedEffort.name : void 0;
8285
+ const modelAriaLabel = effortName ? `Select model and reasoning effort, ${modelName}, ${effortName}` : `Select model and reasoning effort, ${modelName}`;
8177
8286
  const trigger = /* @__PURE__ */ jsx(ComposerSelectorTrigger, {
8178
- ariaLabel: "Select model and reasoning effort",
8179
- label: selectedModel?.name ?? placeholder,
8287
+ ariaLabel: modelAriaLabel,
8288
+ label: modelName,
8180
8289
  leadingIcon: selectedModel?.icon,
8181
- suffix: selectedEffort && selectedModel?.reasoning ? /* @__PURE__ */ jsxs("span", {
8182
- className: "hidden shrink-0 text-foreground/40 xl:inline",
8183
- children: ["\xB7 ", selectedEffort.name]
8290
+ suffix: effortName ? /* @__PURE__ */ jsxs("span", {
8291
+ className: "hidden shrink-0 text-foreground/70 xl:inline",
8292
+ children: ["\xB7 ", effortName]
8184
8293
  }) : null,
8185
8294
  open,
8186
8295
  combobox: true,
@@ -8284,7 +8393,7 @@ function slashArgumentHint(item) {
8284
8393
  if (fromMetadata) return fromMetadata;
8285
8394
  return (item.value?.trim() ?? "").match(/^\/\S+\s+(.+)$/)?.[1];
8286
8395
  }
8287
- function useInputBarState({ models, status, thinkingLevel, onModelChange, onThinkingLevelChange, onSend, onSlashCommandSelect, onLocalSlashSubmit, onDraftChange, intentSuggestion, inlineCompletion, modelPickerOpen, onModelPickerOpenChange, effortPickerOpen, onEffortPickerOpenChange, workspaceReferences = EMPTY_WORKSPACE_REFERENCES$1, workspaceSuggestions, onWorkspaceReferenceSelect, onRemoveWorkspaceReference, controlled, disabled: disabled2, questionBar, attachments, slashCommands }) {
8396
+ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThinkingLevelChange, onSend, onSlashCommandSelect, onLocalSlashSubmit, onDraftChange, inlineCompletion, modelPickerOpen, onModelPickerOpenChange, effortPickerOpen, onEffortPickerOpenChange, workspaceReferences = EMPTY_WORKSPACE_REFERENCES$1, workspaceSuggestions, onWorkspaceReferenceSelect, onRemoveWorkspaceReference, controlled, disabled: disabled2, questionBar, attachments, slashCommands }) {
8288
8397
  const [internalValue, setInternalValue] = useState2("");
8289
8398
  const [dismissedQuestionId, setDismissedQuestionId] = useState2(null);
8290
8399
  const [slashMenuPinned, setSlashMenuPinned] = useState2(false);
@@ -8359,16 +8468,6 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8359
8468
  const timer = setTimeout(() => onDraftChange(value), DRAFT_REPORT_DEBOUNCE_MS);
8360
8469
  return () => clearTimeout(timer);
8361
8470
  }, [onDraftChange, value]);
8362
- const visibleIntentSuggestion = intentSuggestion?.forValue === value ? intentSuggestion : void 0;
8363
- const acceptIntentSuggestion = useCallback2(() => {
8364
- if (visibleIntentSuggestion?.forValue !== value) return;
8365
- visibleIntentSuggestion.onAccept();
8366
- setValue("");
8367
- }, [
8368
- value,
8369
- visibleIntentSuggestion,
8370
- setValue
8371
- ]);
8372
8471
  const removeTriggerToken = useCallback2((match) => {
8373
8472
  if (!match) return value;
8374
8473
  const leadingWhitespace = match[0].length - match[0].trimStart().length;
@@ -8426,9 +8525,10 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8426
8525
  useEffect2(() => {
8427
8526
  if (!textarea) return;
8428
8527
  const publish = () => {
8528
+ if (composingRef.current) return;
8429
8529
  const next = {
8430
8530
  focused: document.activeElement === textarea,
8431
- composing: composingRef.current,
8531
+ composing: false,
8432
8532
  caretStart: textarea.selectionStart ?? null,
8433
8533
  caretEnd: textarea.selectionEnd ?? null
8434
8534
  };
@@ -8436,11 +8536,22 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8436
8536
  };
8437
8537
  const onCompositionStart = () => {
8438
8538
  composingRef.current = true;
8439
- publish();
8539
+ setEditing((previous) => previous.composing && previous.focused === (document.activeElement === textarea) ? previous : {
8540
+ focused: document.activeElement === textarea,
8541
+ composing: true,
8542
+ caretStart: previous.caretStart,
8543
+ caretEnd: previous.caretEnd
8544
+ });
8440
8545
  };
8441
8546
  const onCompositionEnd = () => {
8442
8547
  composingRef.current = false;
8443
- publish();
8548
+ const next = {
8549
+ focused: document.activeElement === textarea,
8550
+ composing: false,
8551
+ caretStart: textarea.selectionStart ?? null,
8552
+ caretEnd: textarea.selectionEnd ?? null
8553
+ };
8554
+ setEditing((previous) => sameEditingState(previous, next) ? previous : next);
8444
8555
  };
8445
8556
  const events = [
8446
8557
  "keyup",
@@ -8449,7 +8560,6 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8449
8560
  "select",
8450
8561
  "focus",
8451
8562
  "blur",
8452
- "input",
8453
8563
  "scroll"
8454
8564
  ];
8455
8565
  for (const type of events) textarea.addEventListener(type, publish);
@@ -8470,7 +8580,6 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8470
8580
  streaming: isStreaming,
8471
8581
  disabled: Boolean(disabled2),
8472
8582
  triggerOpen,
8473
- intentSuggestion: Boolean(visibleIntentSuggestion),
8474
8583
  dismissed
8475
8584
  }), [
8476
8585
  dismissed,
@@ -8479,8 +8588,7 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8479
8588
  inlineCompletion,
8480
8589
  isStreaming,
8481
8590
  triggerOpen,
8482
- value,
8483
- visibleIntentSuggestion
8591
+ value
8484
8592
  ]);
8485
8593
  const dismissInlineCompletion = useCallback2(() => {
8486
8594
  if (offeredCompletion) setDismissed({
@@ -8497,7 +8605,7 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8497
8605
  if (!offeredCompletion) return;
8498
8606
  const caret = readCaret();
8499
8607
  if (!caret || caret.start !== caret.end || caret.start !== value.length) return;
8500
- const next = spliceCompletion(value, offeredCompletion.text);
8608
+ const next = spliceCompletion(value, offeredCompletion.text, offeredCompletion.mode);
8501
8609
  setValue(next);
8502
8610
  pendingCaretRef.current = next.length;
8503
8611
  inlineCompletion?.onAccept?.(next);
@@ -8685,10 +8793,9 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8685
8793
  return () => document.removeEventListener("pointerdown", handlePointerDown);
8686
8794
  }, [closeTriggerMenu, triggerOpen]);
8687
8795
  return {
8688
- acceptIntentSuggestion,
8689
8796
  activeTriggerIndex,
8690
8797
  attachTextarea: setTextarea,
8691
- ghostText: offeredCompletion?.text,
8798
+ ghostText: ghostPaintText(value, offeredCompletion),
8692
8799
  combinedPickerOpen,
8693
8800
  commandGroups,
8694
8801
  files,
@@ -8718,8 +8825,7 @@ function useInputBarState({ models, status, thinkingLevel, onModelChange, onThin
8718
8825
  workspaceQuery,
8719
8826
  filteredCommands,
8720
8827
  filteredWorkspaceItems,
8721
- value,
8722
- visibleIntentSuggestion
8828
+ value
8723
8829
  };
8724
8830
  }
8725
8831
  var EMPTY_WORKSPACE_REFERENCES = [];
@@ -8727,8 +8833,8 @@ var CHAT_MODES = [...AGENT_CHAT_MODES];
8727
8833
  function InputBar(props) {
8728
8834
  return /* @__PURE__ */ jsx(InputBarContent, { ...props });
8729
8835
  }
8730
- function InputBarContent({ modelKey, models, status, infoDescription, chatMode = "agent", onChatModeChange, onModelChange, thinkingLevel, onThinkingLevelChange, onStop, onSend, onSlashCommandSelect, onLocalSlashSubmit, onDraftChange, intentSuggestion, inlineCompletion, modelPickerOpen, onModelPickerOpenChange, effortPickerOpen, onEffortPickerOpenChange, workspaceReferences = EMPTY_WORKSPACE_REFERENCES, workspaceSuggestions, onWorkspaceReferenceSelect, onRemoveWorkspaceReference, controlled, disabled: disabled2, autoFocus, placeholder, attachments, questionBar, slashCommands, className }) {
8731
- const { acceptIntentSuggestion, activeTriggerIndex, attachTextarea, combinedPickerOpen, commandGroups, closeTriggerMenu, files, ghostText, handleCombinedPickerOpenChange, handlePromptKeyDown, handleSelectorModelChange, images, isStreaming, navigation, openSlashMenu, filteredWorkspaceItems, selectCommand, selectWorkspaceReference, selectorModels, send, setActiveTriggerIndex, setDismissedQuestionId, setValue, showQuestion, slashQuery, triggerItems, triggerKind, triggerOpen, value, visibleIntentSuggestion, workspaceQuery } = useInputBarState({
8836
+ function InputBarContent({ modelKey, models, status, infoDescription, chatMode = "agent", onChatModeChange, onModelChange, thinkingLevel, onThinkingLevelChange, onStop, onSend, onSlashCommandSelect, onLocalSlashSubmit, onDraftChange, inlineCompletion, modelPickerOpen, onModelPickerOpenChange, effortPickerOpen, onEffortPickerOpenChange, workspaceReferences = EMPTY_WORKSPACE_REFERENCES, workspaceSuggestions, onWorkspaceReferenceSelect, onRemoveWorkspaceReference, controlled, disabled: disabled2, autoFocus, placeholder, attachments, questionBar, slashCommands, className }) {
8837
+ const { activeTriggerIndex, attachTextarea, combinedPickerOpen, commandGroups, files, ghostText, handleCombinedPickerOpenChange, handlePromptKeyDown, handleSelectorModelChange, images, isStreaming, navigation, openSlashMenu, filteredWorkspaceItems, selectCommand, selectWorkspaceReference, selectorModels, send, setActiveTriggerIndex, setDismissedQuestionId, setValue, showQuestion, slashQuery, triggerItems, triggerKind, triggerOpen, value, workspaceQuery } = useInputBarState({
8732
8838
  models,
8733
8839
  status,
8734
8840
  thinkingLevel,
@@ -8738,7 +8844,6 @@ function InputBarContent({ modelKey, models, status, infoDescription, chatMode =
8738
8844
  onSlashCommandSelect,
8739
8845
  onLocalSlashSubmit,
8740
8846
  onDraftChange,
8741
- intentSuggestion,
8742
8847
  inlineCompletion,
8743
8848
  modelPickerOpen,
8744
8849
  onModelPickerOpenChange,
@@ -8757,64 +8862,16 @@ function InputBarContent({ modelKey, models, status, infoDescription, chatMode =
8757
8862
  const handleChatModeChange = useCallback2((id) => onChatModeChange?.(id), [onChatModeChange]);
8758
8863
  const handleEffortChange = useCallback2((level) => onThinkingLevelChange?.(level), [onThinkingLevelChange]);
8759
8864
  return /* @__PURE__ */ jsx("div", {
8760
- className: cn("shrink-0 pb-3", CHAT_COLUMN_CLASS, className),
8865
+ className: cn("shrink-0 pb-[max(0.75rem,env(safe-area-inset-bottom))]", CHAT_COLUMN_CLASS, className),
8761
8866
  children: /* @__PURE__ */ jsxs("div", {
8762
- className: "relative w-full",
8867
+ className: "relative flex w-full flex-col gap-3",
8763
8868
  children: [
8764
8869
  /* @__PURE__ */ jsx(ComposerLoader, {
8765
8870
  label: infoDescription ?? void 0,
8766
8871
  isActive: isStreaming
8767
8872
  }),
8768
- visibleIntentSuggestion && !isStreaming && !disabled2 ? /* @__PURE__ */ jsxs("div", {
8769
- className: "mb-2 flex items-center gap-2 rounded-xl border bg-muted/40 px-2.5 py-1.5",
8770
- children: [
8771
- /* @__PURE__ */ jsx(Terminal, { className: "size-3.5 shrink-0 text-muted-foreground" }),
8772
- /* @__PURE__ */ jsxs("button", {
8773
- type: "button",
8774
- onClick: acceptIntentSuggestion,
8775
- className: "min-w-0 flex-1 truncate text-left text-sm hover:underline",
8776
- title: visibleIntentSuggestion.description,
8777
- children: [/* @__PURE__ */ jsx("span", {
8778
- className: "font-medium",
8779
- children: visibleIntentSuggestion.label
8780
- }), /* @__PURE__ */ jsxs("span", {
8781
- className: "text-muted-foreground",
8782
- children: [" \u2014 ", visibleIntentSuggestion.description]
8783
- })]
8784
- }),
8785
- /* @__PURE__ */ jsx("button", {
8786
- type: "button",
8787
- "aria-label": "Dismiss suggestion",
8788
- onClick: visibleIntentSuggestion.onDismiss,
8789
- className: "shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground",
8790
- children: /* @__PURE__ */ jsx(X, { className: "size-3" })
8791
- })
8792
- ]
8793
- }) : null,
8794
- showQuestion ? /* @__PURE__ */ jsx(InputQuestionBar, {
8795
- questionBar,
8796
- navigation,
8797
- roundedTop: true,
8798
- onDismiss: setDismissedQuestionId
8799
- }) : null,
8800
- /* @__PURE__ */ jsx(ComposerTriggerPopover, {
8801
- open: triggerOpen,
8802
- kind: triggerKind ?? "slash",
8803
- query: triggerKind === "slash" ? slashQuery : workspaceQuery,
8804
- items: triggerKind === "mention" ? filteredWorkspaceItems : void 0,
8805
- groups: triggerKind === "slash" ? commandGroups : void 0,
8806
- activeIndex: activeTriggerIndex,
8807
- onActiveIndexChange: setActiveTriggerIndex,
8808
- onSelect: (item) => {
8809
- if (triggerKind === "slash") selectCommand(item);
8810
- else selectWorkspaceReference(item);
8811
- },
8812
- onClose: closeTriggerMenu,
8813
- title: triggerKind === "slash" ? "Commands" : "Workspace references",
8814
- listId: "composer-trigger-list"
8815
- }),
8816
8873
  images.length > 0 || files.length > 0 ? /* @__PURE__ */ jsxs("div", {
8817
- className: "mb-2 flex flex-wrap gap-2 rounded-xl border bg-muted/40 p-2",
8874
+ className: "flex flex-wrap gap-2 rounded-xl border bg-muted/40 p-2",
8818
8875
  children: [images.map((image) => /* @__PURE__ */ jsxs("div", {
8819
8876
  className: "group relative",
8820
8877
  children: [/* @__PURE__ */ jsx("img", {
@@ -8830,9 +8887,10 @@ function InputBarContent({ modelKey, models, status, infoDescription, chatMode =
8830
8887
  size: "icon-xs",
8831
8888
  "aria-label": `Remove ${image.filename}`,
8832
8889
  onClick: () => attachments?.onRemoveImage?.(image.id),
8833
- className: "absolute -right-1 -top-1 size-5 rounded-full bg-background opacity-0 shadow-sm transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100",
8890
+ className: cn(HIT_AREA_EXPAND_CLASS, "absolute -end-1 -top-1 size-6 rounded-full bg-background opacity-0 shadow-sm transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100"),
8834
8891
  children: /* @__PURE__ */ jsx(X, {
8835
8892
  "data-icon": "inline-start",
8893
+ "aria-hidden": "true",
8836
8894
  className: "size-3"
8837
8895
  })
8838
8896
  })]
@@ -8844,73 +8902,109 @@ function InputBarContent({ modelKey, models, status, infoDescription, chatMode =
8844
8902
  }, file.id))]
8845
8903
  }) : null,
8846
8904
  workspaceReferences.length > 0 ? /* @__PURE__ */ jsx("div", {
8847
- className: "mb-2 flex flex-wrap gap-1.5 rounded-xl border bg-muted/40 p-2",
8905
+ className: "flex flex-wrap gap-1.5 rounded-xl border bg-muted/40 p-2",
8848
8906
  children: workspaceReferences.map((attachment) => /* @__PURE__ */ jsxs("div", {
8849
8907
  className: "inline-flex max-w-full items-center gap-1.5 rounded-lg border bg-background px-2 py-1 text-xs text-foreground/75",
8850
8908
  children: [
8851
- /* @__PURE__ */ jsx(FileCodeCorner, { className: "size-3.5 shrink-0 text-muted-foreground" }),
8909
+ /* @__PURE__ */ jsx(FileCodeCorner, {
8910
+ "aria-hidden": "true",
8911
+ className: "size-3.5 shrink-0 text-muted-foreground"
8912
+ }),
8852
8913
  /* @__PURE__ */ jsxs("span", {
8853
8914
  className: "max-w-[min(28rem,70vw)] truncate",
8915
+ title: `@${attachment.relativePath}`,
8854
8916
  children: ["@", attachment.relativePath]
8855
8917
  }),
8856
8918
  /* @__PURE__ */ jsx("button", {
8857
8919
  type: "button",
8858
8920
  "aria-label": `Remove workspace reference ${attachment.relativePath}`,
8859
8921
  onClick: () => onRemoveWorkspaceReference?.(attachment.relativePath),
8860
- className: "grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
8861
- children: /* @__PURE__ */ jsx(X, { className: "size-3" })
8922
+ className: cn(HIT_AREA_EXPAND_CLASS, "grid size-6 shrink-0 place-items-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"),
8923
+ children: /* @__PURE__ */ jsx(X, {
8924
+ "aria-hidden": "true",
8925
+ className: "size-3"
8926
+ })
8862
8927
  })
8863
8928
  ]
8864
8929
  }, attachment.relativePath))
8865
8930
  }) : null,
8866
- /* @__PURE__ */ jsx(PromptInput, {
8867
- id: "composer-prompt",
8868
- name: "prompt",
8869
- value,
8870
- onValueChange: setValue,
8871
- onSubmit: (content) => send(content),
8872
- loading: isStreaming,
8873
- submitWhileLoading: true,
8874
- onStop,
8875
- disabled: disabled2,
8876
- autoFocus,
8877
- placeholder: placeholder ?? "Send a message\u2026",
8878
- onPaste: attachments?.onPaste,
8879
- "aria-controls": triggerOpen ? "composer-trigger-list" : void 0,
8880
- "aria-expanded": triggerOpen,
8881
- "aria-haspopup": "listbox",
8882
- "aria-activedescendant": triggerOpen && triggerItems[activeTriggerIndex] ? `composer-trigger-list-${triggerItems[activeTriggerIndex].id.replace(/[^a-zA-Z0-9_-]/g, "-")}` : void 0,
8883
- onKeyDown: handlePromptKeyDown,
8884
- onTextareaRef: attachTextarea,
8885
- ghostText,
8886
- leadingAction: /* @__PURE__ */ jsxs(Fragment$1, { children: [
8887
- /* @__PURE__ */ jsx(Button, {
8888
- type: "button",
8889
- variant: "outline",
8890
- size: "icon",
8891
- disabled: disabled2 || isStreaming,
8892
- "aria-label": "Open slash commands",
8893
- "data-slot": "composer-add",
8894
- onClick: openSlashMenu,
8895
- className: COMPOSER_ADD_BUTTON_CLASS,
8896
- children: /* @__PURE__ */ jsx(Plus, { className: "size-4" })
8897
- }),
8898
- /* @__PURE__ */ jsx(ModeSelector, {
8899
- modes: CHAT_MODES,
8900
- value: chatMode,
8901
- onChange: handleChatModeChange
8931
+ /* @__PURE__ */ jsxs("div", {
8932
+ className: "relative w-full",
8933
+ children: [
8934
+ showQuestion ? /* @__PURE__ */ jsx(InputQuestionBar, {
8935
+ questionBar,
8936
+ navigation,
8937
+ roundedTop: true,
8938
+ onDismiss: setDismissedQuestionId
8939
+ }) : null,
8940
+ /* @__PURE__ */ jsx(ComposerTriggerPopover, {
8941
+ open: triggerOpen,
8942
+ kind: triggerKind ?? "slash",
8943
+ query: triggerKind === "slash" ? slashQuery : workspaceQuery,
8944
+ items: triggerKind === "mention" ? filteredWorkspaceItems : void 0,
8945
+ groups: triggerKind === "slash" ? commandGroups : void 0,
8946
+ activeIndex: activeTriggerIndex,
8947
+ onActiveIndexChange: setActiveTriggerIndex,
8948
+ onSelect: (item) => {
8949
+ if (triggerKind === "slash") selectCommand(item);
8950
+ else selectWorkspaceReference(item);
8951
+ },
8952
+ title: triggerKind === "slash" ? "Commands" : "Workspace references",
8953
+ listId: "composer-trigger-list"
8902
8954
  }),
8903
- /* @__PURE__ */ jsx(ModelSelector, {
8904
- models: selectorModels,
8905
- value: modelKey,
8906
- effort: thinkingLevel,
8907
- onModelChange: handleSelectorModelChange,
8908
- onEffortChange: handleEffortChange,
8909
- open: combinedPickerOpen,
8910
- onOpenChange: handleCombinedPickerOpenChange,
8911
- placeholder: "Model"
8955
+ /* @__PURE__ */ jsx(PromptInput, {
8956
+ id: "composer-prompt",
8957
+ name: "prompt",
8958
+ value,
8959
+ onValueChange: setValue,
8960
+ onSubmit: (content) => send(content),
8961
+ loading: isStreaming,
8962
+ submitWhileLoading: true,
8963
+ onStop,
8964
+ disabled: disabled2,
8965
+ autoFocus,
8966
+ placeholder: placeholder ?? "Send a message\u2026",
8967
+ onPaste: attachments?.onPaste,
8968
+ "aria-controls": triggerOpen ? "composer-trigger-list" : void 0,
8969
+ "aria-expanded": triggerOpen,
8970
+ "aria-haspopup": "listbox",
8971
+ "aria-activedescendant": triggerOpen && triggerItems[activeTriggerIndex] ? `composer-trigger-list-${triggerItems[activeTriggerIndex].id.replace(/[^a-zA-Z0-9_-]/g, "-")}` : void 0,
8972
+ onKeyDown: handlePromptKeyDown,
8973
+ onTextareaRef: attachTextarea,
8974
+ ghostText,
8975
+ leadingAction: /* @__PURE__ */ jsxs(Fragment$1, { children: [
8976
+ /* @__PURE__ */ jsx(Button, {
8977
+ type: "button",
8978
+ variant: "outline",
8979
+ size: "icon",
8980
+ disabled: disabled2 || isStreaming,
8981
+ "aria-label": "Open slash commands",
8982
+ "data-slot": "composer-add",
8983
+ onClick: openSlashMenu,
8984
+ className: COMPOSER_ADD_BUTTON_CLASS,
8985
+ children: /* @__PURE__ */ jsx(Plus, {
8986
+ "aria-hidden": "true",
8987
+ className: "size-4"
8988
+ })
8989
+ }),
8990
+ /* @__PURE__ */ jsx(ModeSelector, {
8991
+ modes: CHAT_MODES,
8992
+ value: chatMode,
8993
+ onChange: handleChatModeChange
8994
+ }),
8995
+ /* @__PURE__ */ jsx(ModelSelector, {
8996
+ models: selectorModels,
8997
+ value: modelKey,
8998
+ effort: thinkingLevel,
8999
+ onModelChange: handleSelectorModelChange,
9000
+ onEffortChange: handleEffortChange,
9001
+ open: combinedPickerOpen,
9002
+ onOpenChange: handleCombinedPickerOpenChange,
9003
+ placeholder: "Model"
9004
+ })
9005
+ ] })
8912
9006
  })
8913
- ] })
9007
+ ]
8914
9008
  })
8915
9009
  ]
8916
9010
  })
@@ -9108,6 +9202,7 @@ function SessionToolRenderer(props) {
9108
9202
  return /* @__PURE__ */ jsx(Suspense, {
9109
9203
  fallback: /* @__PURE__ */ jsx("div", {
9110
9204
  className: "h-7 animate-pulse rounded-md bg-muted/40",
9205
+ role: "status",
9111
9206
  "aria-label": "Loading tool"
9112
9207
  }),
9113
9208
  children: /* @__PURE__ */ jsx(LazySessionToolRenderer, { ...props })
@@ -9118,6 +9213,7 @@ function SessionReasoningPanel(props) {
9118
9213
  return /* @__PURE__ */ jsx(Suspense, {
9119
9214
  fallback: /* @__PURE__ */ jsx("div", {
9120
9215
  className: "mb-2 h-6 animate-pulse rounded-md bg-muted/40",
9216
+ role: "status",
9121
9217
  "aria-label": "Loading reasoning"
9122
9218
  }),
9123
9219
  children: /* @__PURE__ */ jsx(LazySessionReasoningPanel, { ...props })
@@ -9128,25 +9224,27 @@ function ToolTimeline(props) {
9128
9224
  return /* @__PURE__ */ jsx(Suspense, {
9129
9225
  fallback: /* @__PURE__ */ jsx("div", {
9130
9226
  className: "h-6 animate-pulse rounded-md bg-muted/40",
9227
+ role: "status",
9131
9228
  "aria-label": "Loading timeline"
9132
9229
  }),
9133
9230
  children: /* @__PURE__ */ jsx(LazyToolTimeline, { ...props })
9134
9231
  });
9135
9232
  }
9136
- var LazyPromptSuggestions = lazy(() => import("./prompt-suggestions-D6RXFQF4-7WHYRNMN.js").then(({ PromptSuggestions: PromptSuggestions2 }) => ({ default: PromptSuggestions2 })));
9233
+ var LazyPromptSuggestions = lazy(() => import("./prompt-suggestions-h17Gu7u1-BS5SU2FY.js").then(({ PromptSuggestions: PromptSuggestions2 }) => ({ default: PromptSuggestions2 })));
9137
9234
  function PromptSuggestions(props) {
9138
9235
  return /* @__PURE__ */ jsx("div", {
9139
9236
  className: "min-h-8",
9140
9237
  children: /* @__PURE__ */ jsx(Suspense, {
9141
9238
  fallback: /* @__PURE__ */ jsx("div", {
9142
9239
  className: "h-8 animate-pulse rounded-full bg-muted/40",
9240
+ role: "status",
9143
9241
  "aria-label": "Loading suggestions"
9144
9242
  }),
9145
9243
  children: /* @__PURE__ */ jsx(LazyPromptSuggestions, { ...props })
9146
9244
  })
9147
9245
  });
9148
9246
  }
9149
- var LazyMessageQueue = lazy(() => import("./message-queue-BsrLcNPX-CUCBSF6U.js").then(({ MessageQueue: MessageQueue2 }) => ({ default: MessageQueue2 })));
9247
+ var LazyMessageQueue = lazy(() => import("./message-queue-Dg2okv2L-SJTUUJS7.js").then(({ MessageQueue: MessageQueue2 }) => ({ default: MessageQueue2 })));
9150
9248
  function MessageQueue(props) {
9151
9249
  return /* @__PURE__ */ jsx(Suspense, {
9152
9250
  fallback: null,
@@ -9298,7 +9396,7 @@ function ChatComposerHost({ inputBar, status, suggestions, onSend, onStop, isEmp
9298
9396
  }, [draftSetterRef]);
9299
9397
  return /* @__PURE__ */ jsx(InputBar, {
9300
9398
  ...inputBar,
9301
- className: cn(inputBar.className, isEmpty && "px-0 pb-0"),
9399
+ className: inputBar.className,
9302
9400
  placeholder: isEmpty ? "Ask Prime to build, investigate, or change something\u2026" : inputBar.placeholder,
9303
9401
  controlled: {
9304
9402
  value: draft,
@@ -9417,8 +9515,7 @@ function AgentChat({ toolRenderers, suggestions, status, onStop, onSend, inputBa
9417
9515
  children: [
9418
9516
  isEmpty ? /* @__PURE__ */ jsx(ChatWelcome, {
9419
9517
  disabled: isStreaming,
9420
- onSelect: (item) => setDraft(item.value ?? item.label),
9421
- composer: composerNode
9518
+ onSelect: (item) => setDraft(item.value ?? item.label)
9422
9519
  }) : null,
9423
9520
  /* @__PURE__ */ jsx(VirtualizedTurnList, {
9424
9521
  estimateSize: 400,
@@ -9451,7 +9548,7 @@ function AgentChat({ toolRenderers, suggestions, status, onStop, onSend, inputBa
9451
9548
  }) : null
9452
9549
  ]
9453
9550
  }),
9454
- !isEmpty ? composerNode : null,
9551
+ composerNode,
9455
9552
  queue && (queue.steering.length > 0 || queue.followUp.length > 0) ? /* @__PURE__ */ jsx(MessageQueue, {
9456
9553
  queue,
9457
9554
  onDelete: onDeleteQueuedMessage,
@@ -9506,8 +9603,8 @@ function ChatPanel({ messages, highlightedMessageId, status, error, workspaceNam
9506
9603
  }) })
9507
9604
  });
9508
9605
  }
9509
- var LazyChatCommandPalette = lazy(() => import("./chat-command-palette-BLGKnp-w-OKFIKD3T.js").then(({ ChatCommandPalette }) => ({ default: ChatCommandPalette })));
9510
- var LazySettingsDialog = lazy(() => import("./settings-dialog-CzeangBl-YKL7CLPF.js").then(({ SettingsDialog }) => ({ default: SettingsDialog })));
9606
+ var LazyChatCommandPalette = lazy(() => import("./chat-command-palette-BMR7RsuI-U5S4X44U.js").then(({ ChatCommandPalette }) => ({ default: ChatCommandPalette })));
9607
+ var LazySettingsDialog = lazy(() => import("./settings-dialog-C-xwPYy8-TFICZWEM.js").then(({ SettingsDialog }) => ({ default: SettingsDialog })));
9511
9608
  var LazyForkPickerDialog = lazy(() => import("./fork-picker-dialog-B5J-S5Nm-QOMVVHI7.js").then(({ ForkPickerDialog }) => ({ default: ForkPickerDialog })));
9512
9609
  function ChatCommandPaletteOverlay({ chrome, conversation, dialogs, panels, session }) {
9513
9610
  return /* @__PURE__ */ jsx(Fragment$1, { children: dialogs.commandPaletteOpen ? /* @__PURE__ */ jsx(Suspense, {
@@ -10143,7 +10240,10 @@ function isCompletable(text) {
10143
10240
  function normalizedKey(text) {
10144
10241
  return text.trim().replace(/\s+/g, " ").toLowerCase();
10145
10242
  }
10146
- function useComposerInlineCompletion(available) {
10243
+ function cacheKey(sessionId, text) {
10244
+ return `${sessionId ?? ""}\0${normalizedKey(text)}`;
10245
+ }
10246
+ function useComposerInlineCompletion({ available, sessionId }) {
10147
10247
  const cache = useRef2(/* @__PURE__ */ new Map());
10148
10248
  const latestDraft = useRef2("");
10149
10249
  const inFlight = useRef2(null);
@@ -10169,7 +10269,7 @@ function useComposerInlineCompletion(available) {
10169
10269
  return entry;
10170
10270
  }, []);
10171
10271
  const fetchCompletion = useCallback2(async (draft) => {
10172
- const key = normalizedKey(draft);
10272
+ const key = cacheKey(sessionId, draft);
10173
10273
  inFlight.current?.abort();
10174
10274
  const controller = new AbortController();
10175
10275
  inFlight.current = controller;
@@ -10177,29 +10277,39 @@ function useComposerInlineCompletion(available) {
10177
10277
  const response = await fetch(resolveChatApiUrl("/api/chat/completion"), {
10178
10278
  method: "POST",
10179
10279
  headers: { "Content-Type": "application/json" },
10180
- body: JSON.stringify({ text: draft }),
10280
+ body: JSON.stringify(sessionId ? {
10281
+ text: draft,
10282
+ sessionId
10283
+ } : { text: draft }),
10181
10284
  signal: controller.signal
10182
10285
  });
10183
10286
  if (!response.ok) return;
10184
10287
  const body = await response.json();
10185
10288
  if (body.completion) remember(key, body.completion);
10186
- if (latestDraft.current !== draft) return;
10289
+ if (inFlight.current !== controller || latestDraft.current !== draft) return;
10187
10290
  setOffer(body.completion ? {
10291
+ key,
10188
10292
  forValue: draft,
10189
10293
  text: body.completion
10190
10294
  } : void 0);
10191
10295
  } catch {
10192
10296
  }
10193
- }, [remember]);
10297
+ }, [remember, sessionId]);
10194
10298
  const onDraftChange = useCallback2((text) => {
10195
10299
  latestDraft.current = text;
10196
10300
  if (!available || !isCompletable(text)) {
10301
+ inFlight.current?.abort();
10302
+ inFlight.current = null;
10197
10303
  setOffer(void 0);
10198
10304
  return;
10199
10305
  }
10200
- const cached = readCache(normalizedKey(text));
10306
+ const key = cacheKey(sessionId, text);
10307
+ const cached = readCache(key);
10201
10308
  if (cached) {
10309
+ inFlight.current?.abort();
10310
+ inFlight.current = null;
10202
10311
  setOffer(cached.completion ? {
10312
+ key,
10203
10313
  forValue: text,
10204
10314
  text: cached.completion
10205
10315
  } : void 0);
@@ -10210,15 +10320,24 @@ function useComposerInlineCompletion(available) {
10210
10320
  }, [
10211
10321
  available,
10212
10322
  fetchCompletion,
10213
- readCache
10323
+ readCache,
10324
+ sessionId
10214
10325
  ]);
10215
- useEffect2(() => () => inFlight.current?.abort(), []);
10216
- const ghost = offer ? composerCompletionGhost(offer.forValue, offer.text) : void 0;
10326
+ useEffect2(() => () => {
10327
+ inFlight.current?.abort();
10328
+ inFlight.current = null;
10329
+ }, []);
10330
+ useEffect2(() => {
10331
+ if (latestDraft.current) onDraftChange(latestDraft.current);
10332
+ }, [onDraftChange]);
10333
+ const currentOffer = offer && offer.key === cacheKey(sessionId, offer.forValue) ? offer : void 0;
10334
+ const ghost = currentOffer ? composerCompletionGhost(currentOffer.forValue, currentOffer.text, "append") : void 0;
10217
10335
  return {
10218
10336
  onDraftChange,
10219
- inlineCompletion: offer && ghost ? {
10220
- forValue: offer.forValue,
10337
+ inlineCompletion: currentOffer && ghost ? {
10338
+ forValue: currentOffer.forValue,
10221
10339
  text: ghost,
10340
+ mode: "append",
10222
10341
  onDismiss: () => setOffer(void 0)
10223
10342
  } : void 0
10224
10343
  };
@@ -10237,15 +10356,13 @@ function isClassifiable(draft) {
10237
10356
  if (text.startsWith("@") && !text.includes(" ")) return false;
10238
10357
  return true;
10239
10358
  }
10240
- function suggestionFor(response, forValue) {
10241
- if (response.outcome !== "matched" || response.disposition !== "suggest" || !response.command) return void 0;
10359
+ function commandOfferFor(response, forValue) {
10360
+ if (response.outcome !== "matched" || !response.command) return void 0;
10242
10361
  const command = composerIntentCommand(response.command);
10243
10362
  if (!command) return void 0;
10244
10363
  return {
10245
10364
  forValue,
10246
- command: command.id,
10247
- label: `/${command.id}`,
10248
- description: command.description
10365
+ command: command.id
10249
10366
  };
10250
10367
  }
10251
10368
  function useComposerIntentRouting(available) {
@@ -10253,8 +10370,8 @@ function useComposerIntentRouting(available) {
10253
10370
  const timer = useRef2(void 0);
10254
10371
  const inFlight = useRef2(null);
10255
10372
  const latestDraft = useRef2("");
10256
- const dismissedKey = useRef2(void 0);
10257
- const [suggestion, setSuggestion] = useState2(void 0);
10373
+ const suppressedKey = useRef2(void 0);
10374
+ const [command, setCommand] = useState2(void 0);
10258
10375
  const readCache = useCallback2((key) => {
10259
10376
  const entry = cache.current.get(key);
10260
10377
  if (!entry) return void 0;
@@ -10275,6 +10392,10 @@ function useComposerIntentRouting(available) {
10275
10392
  cache.current.delete(oldest.value);
10276
10393
  }
10277
10394
  }, []);
10395
+ const offerFor = useCallback2((response, forValue, key) => {
10396
+ if (suppressedKey.current === key) return void 0;
10397
+ return commandOfferFor(response, forValue);
10398
+ }, []);
10278
10399
  const classify = useCallback2(async (draft) => {
10279
10400
  const key = normalizeIntentDraft(draft);
10280
10401
  inFlight.current?.abort();
@@ -10290,29 +10411,29 @@ function useComposerIntentRouting(available) {
10290
10411
  if (!response.ok) return;
10291
10412
  const parsed = await response.json();
10292
10413
  remember(key, parsed);
10293
- if (latestDraft.current !== draft || dismissedKey.current === key) return;
10294
- setSuggestion(suggestionFor(parsed, draft));
10414
+ if (latestDraft.current !== draft) return;
10415
+ setCommand(offerFor(parsed, draft, key));
10295
10416
  } catch {
10296
10417
  }
10297
- }, [remember]);
10418
+ }, [offerFor, remember]);
10298
10419
  const onDraftChange = useCallback2((text) => {
10299
10420
  latestDraft.current = text;
10300
10421
  if (timer.current !== void 0) {
10301
10422
  clearTimeout(timer.current);
10302
10423
  timer.current = void 0;
10303
10424
  }
10425
+ const key = normalizeIntentDraft(text);
10426
+ if (suppressedKey.current !== void 0 && suppressedKey.current !== key) suppressedKey.current = void 0;
10304
10427
  if (!available || !isClassifiable(text)) {
10305
- setSuggestion(void 0);
10428
+ setCommand(void 0);
10306
10429
  return;
10307
10430
  }
10308
- const key = normalizeIntentDraft(text);
10309
- if (dismissedKey.current !== void 0 && dismissedKey.current !== key) dismissedKey.current = void 0;
10310
10431
  const cached = readCache(key);
10311
10432
  if (cached) {
10312
- setSuggestion(suggestionFor(cached, text));
10433
+ setCommand(offerFor(cached, text, key));
10313
10434
  return;
10314
10435
  }
10315
- setSuggestion(void 0);
10436
+ setCommand(void 0);
10316
10437
  timer.current = setTimeout(() => {
10317
10438
  timer.current = void 0;
10318
10439
  classify(text);
@@ -10320,17 +10441,20 @@ function useComposerIntentRouting(available) {
10320
10441
  }, [
10321
10442
  available,
10322
10443
  classify,
10444
+ offerFor,
10323
10445
  readCache
10324
10446
  ]);
10325
10447
  const takeCached = useCallback2((text) => {
10326
10448
  if (!available) return null;
10327
- const entry = readCache(normalizeIntentDraft(text));
10449
+ const key = normalizeIntentDraft(text);
10450
+ if (suppressedKey.current === key) return null;
10451
+ const entry = readCache(key);
10328
10452
  if (!entry || entry.outcome !== "matched" || entry.disposition !== "execute") return null;
10329
10453
  return entry;
10330
10454
  }, [available, readCache]);
10331
- const dismissSuggestion = useCallback2(() => {
10332
- dismissedKey.current = normalizeIntentDraft(latestDraft.current);
10333
- setSuggestion(void 0);
10455
+ const dismissCommand = useCallback2(() => {
10456
+ suppressedKey.current = normalizeIntentDraft(latestDraft.current);
10457
+ setCommand(void 0);
10334
10458
  }, []);
10335
10459
  useEffect2(() => {
10336
10460
  if (available) return;
@@ -10341,8 +10465,13 @@ function useComposerIntentRouting(available) {
10341
10465
  inFlight.current?.abort();
10342
10466
  inFlight.current = null;
10343
10467
  cache.current.clear();
10344
- setSuggestion(void 0);
10468
+ suppressedKey.current = void 0;
10469
+ setCommand(void 0);
10345
10470
  }, [available]);
10471
+ useEffect2(() => {
10472
+ if (!available) return;
10473
+ if (latestDraft.current) onDraftChange(latestDraft.current);
10474
+ }, [available, onDraftChange]);
10346
10475
  useEffect2(() => () => {
10347
10476
  if (timer.current !== void 0) clearTimeout(timer.current);
10348
10477
  inFlight.current?.abort();
@@ -10350,8 +10479,8 @@ function useComposerIntentRouting(available) {
10350
10479
  return {
10351
10480
  onDraftChange,
10352
10481
  takeCached,
10353
- suggestion,
10354
- dismissSuggestion
10482
+ command,
10483
+ dismissCommand
10355
10484
  };
10356
10485
  }
10357
10486
  function useComposerIntentAvailability() {
@@ -12160,7 +12289,7 @@ function AgentTabBar({ tabs, value, onValueChange, onClose, onNewSession }) {
12160
12289
  "aria-controls": agentTabPanelId(tab.id),
12161
12290
  "aria-selected": active,
12162
12291
  "aria-label": `${tab.label}, ${status}`,
12163
- className: cn("h-7 w-full min-w-0 justify-start text-left gap-1.5 rounded-[7px] border border-transparent px-2 text-label font-medium leading-none transition-colors motion-reduce:transition-none", active ? "bg-surface-4 text-foreground shadow-none" : "bg-transparent text-foreground/45 hover:bg-foreground/5 hover:text-foreground/75", tab.kind === "subagent" && onClose && "pr-7"),
12292
+ className: cn("h-7 w-full min-w-0 justify-start text-start gap-1.5 rounded-[7px] border border-transparent px-2 text-label font-medium leading-none transition-colors motion-reduce:transition-none", active ? "bg-surface-4 text-foreground shadow-none" : "bg-transparent text-foreground/45 hover:bg-foreground/5 hover:text-foreground/75", tab.kind === "subagent" && onClose && "pe-7"),
12164
12293
  "data-state": active ? "active" : "inactive",
12165
12294
  id: agentTabTriggerId(tab.id),
12166
12295
  onClick: () => onValueChange(tab.id),
@@ -12177,12 +12306,12 @@ function AgentTabBar({ tabs, value, onValueChange, onClose, onNewSession }) {
12177
12306
  "aria-hidden": "true",
12178
12307
  className: cn("size-1.5 shrink-0 rounded-full", statusDotClass(tab.status))
12179
12308
  }), /* @__PURE__ */ jsx("span", {
12180
- className: "min-w-0 flex-1 truncate text-left",
12309
+ className: "min-w-0 flex-1 truncate text-start",
12181
12310
  children: tab.label
12182
12311
  })]
12183
12312
  }), tab.kind === "subagent" && onClose ? /* @__PURE__ */ jsx(Button, {
12184
12313
  "aria-label": `Close ${tab.label} tab`,
12185
- className: "absolute top-1/2 right-1 size-5 -translate-y-1/2 rounded-[5px] p-0 text-foreground/35 opacity-0 transition-opacity motion-reduce:transition-none hover:bg-foreground/10 hover:text-foreground/75 focus-visible:opacity-100 group-hover/tab:opacity-100",
12314
+ className: "absolute top-1/2 left-auto size-5 -translate-y-1/2 rounded-[5px] p-0 text-foreground/35 opacity-0 transition-opacity motion-reduce:transition-none hover:bg-foreground/10 hover:text-foreground/75 focus-visible:opacity-100 group-hover/tab:opacity-100 [inset-inline-start:auto] [inset-inline-end:0.25rem]",
12186
12315
  onClick: (event) => {
12187
12316
  event.stopPropagation();
12188
12317
  onClose(tab.id);
@@ -12245,7 +12374,7 @@ function AccountMenu({ user, onSignOut, onOpenSettings, compact = false, label =
12245
12374
  align: "start",
12246
12375
  trigger: /* @__PURE__ */ jsxs(ChromePillButton, {
12247
12376
  ariaLabel: "Open account menu",
12248
- className: cn("min-w-0 border-transparent shadow-none", compact ? "size-8 justify-center px-2" : "w-full justify-start"),
12377
+ className: cn("min-w-0 border-transparent shadow-none", compact ? "size-8 justify-center px-2" : "w-full justify-start px-2 text-start"),
12249
12378
  children: [
12250
12379
  /* @__PURE__ */ jsx(QredenceLogo, { className: "size-3.5 shrink-0" }),
12251
12380
  /* @__PURE__ */ jsx("span", {
@@ -14932,8 +15061,27 @@ function useChatWorkspaceData() {
14932
15061
  workspaceAttachments
14933
15062
  ]);
14934
15063
  const composerIntentAvailability = useComposerIntentAvailability();
14935
- const { onDraftChange: onComposerDraftChange, takeCached: takeCachedIntent, suggestion: offeredIntent, dismissSuggestion: dismissIntentSuggestion } = useComposerIntentRouting(composerIntentAvailability.available);
14936
- const { onDraftChange: onCompletionDraftChange, inlineCompletion } = useComposerInlineCompletion(true);
15064
+ const { onDraftChange: onComposerDraftChange, takeCached: takeCachedIntent, command: offeredCommand, dismissCommand } = useComposerIntentRouting(composerIntentAvailability.available);
15065
+ const { onDraftChange: onCompletionDraftChange, inlineCompletion: historyCompletion } = useComposerInlineCompletion({
15066
+ available: true,
15067
+ sessionId: sessionMetadata.sessionId
15068
+ });
15069
+ const inlineCompletion = useMemo2(() => {
15070
+ if (offeredCommand) return {
15071
+ forValue: offeredCommand.forValue,
15072
+ text: `/${offeredCommand.command}`,
15073
+ mode: "replace",
15074
+ onDismiss: () => {
15075
+ dismissCommand();
15076
+ historyCompletion?.onDismiss?.();
15077
+ }
15078
+ };
15079
+ return historyCompletion;
15080
+ }, [
15081
+ dismissCommand,
15082
+ historyCompletion,
15083
+ offeredCommand
15084
+ ]);
14937
15085
  const handleComposerDraftChange = useCallback2((text) => {
14938
15086
  onComposerDraftChange(text);
14939
15087
  onCompletionDraftChange(text);
@@ -14956,36 +15104,6 @@ function useChatWorkspaceData() {
14956
15104
  startNewSession: startNewSessionForWorkspace,
14957
15105
  takeCachedIntent
14958
15106
  });
14959
- const acceptIntentSuggestion = useCallback2(() => {
14960
- if (!offeredIntent) return;
14961
- dismissIntentSuggestion();
14962
- if (composerIntentCommand(offeredIntent.command)?.handling === "session") {
14963
- sendMessage({
14964
- text: `/${offeredIntent.command}`,
14965
- altKey: false,
14966
- mode: chatMode
14967
- });
14968
- return;
14969
- }
14970
- handleLocalSlashSubmit(`/${offeredIntent.command}`);
14971
- }, [
14972
- chatMode,
14973
- dismissIntentSuggestion,
14974
- handleLocalSlashSubmit,
14975
- offeredIntent,
14976
- sendMessage
14977
- ]);
14978
- const intentSuggestion = useMemo2(() => offeredIntent ? {
14979
- forValue: offeredIntent.forValue,
14980
- label: offeredIntent.label,
14981
- description: offeredIntent.description,
14982
- onAccept: acceptIntentSuggestion,
14983
- onDismiss: dismissIntentSuggestion
14984
- } : void 0, [
14985
- acceptIntentSuggestion,
14986
- dismissIntentSuggestion,
14987
- offeredIntent
14988
- ]);
14989
15107
  const setComposerIntentEnabled = useCallback2(async (enabled) => {
14990
15108
  try {
14991
15109
  await fetch(resolveChatApiUrl("/api/chat/intent"), {
@@ -15152,7 +15270,6 @@ function useChatWorkspaceData() {
15152
15270
  handleSlashCommandSelect,
15153
15271
  infoDescription,
15154
15272
  inputSuggestionItems,
15155
- intentSuggestion,
15156
15273
  inlineCompletion,
15157
15274
  onComposerDraftChange: handleComposerDraftChange,
15158
15275
  workspaceReferenceSuggestions,
@@ -15201,7 +15318,7 @@ function useChatWorkspaceData() {
15201
15318
  }
15202
15319
  };
15203
15320
  }
15204
- var LazySubagentChatPanel = lazy(() => import("./subagent-chat-panel-Fa31QewE-YDPOKN74.js").then(({ SubagentChatPanel }) => ({ default: SubagentChatPanel })));
15321
+ var LazySubagentChatPanel = lazy(() => import("./subagent-chat-panel-VEVu0QXU-DPWJFCYR.js").then(({ SubagentChatPanel }) => ({ default: SubagentChatPanel })));
15205
15322
  function ChatWorkspaceShell() {
15206
15323
  const { session, conversation, composer, panels, dialogs, chrome, agentTabs } = useChatWorkspaceData();
15207
15324
  const toggleCommandPalette = useCallback2(() => {