@alivault/pico 0.7.1 → 0.7.3

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.
@@ -2,7 +2,7 @@ import { i as __toESM } from "../_runtime.mjs";
2
2
  import { A as DialogRoot, C as MenuPortal, D as TabsTab, E as TabsList$1, F as DialogBackdrop, I as Separator, K as mergeProps, L as Input, M as DialogPopup, N as DialogDescription$1, O as TabsRoot, P as DialogClose, R as Button, S as MenuPositioner, T as MenuItem, X as require_react, Y as require_jsx_runtime, _ as AccordionRoot, a as CollapsiblePanel, b as MenuSubmenuRoot, c as PopoverPopup, d as PopoverTrigger$1, f as PopoverRoot, g as AccordionItem$1, h as AccordionHeader, i as ContextMenuRoot, j as DialogPortal$1, k as DialogTitle$1, l as PopoverPositioner, m as AccordionTrigger$1, n as Toggle, o as CollapsibleTrigger$1, p as AccordionPanel, r as ContextMenuTrigger$1, s as CollapsibleRoot, t as ToggleGroup, u as PopoverPortal, v as MenuSubmenuTrigger, w as MenuPopup, x as MenuRoot, y as MenuTrigger, z as useRender } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
4
4
  import { A as Command, C as Folder, D as EllipsisVertical, E as Ellipsis, F as ChevronRight, H as ArrowDown, I as ChevronDown, L as Check, M as ChevronsUpDown, N as ChevronsDownUp, O as Download, R as ArrowUp, S as GitCommitHorizontal, T as FileInput, V as ArrowLeft, _ as ListStart, b as ImagePlus, c as Settings2, d as PanelRight, f as PanelLeft, g as OctagonX, i as Undo2, k as Copy, l as Search, m as PanelLeftClose, n as WandSparkles, o as Square, p as PanelLeftOpen, r as Upload, s as SquarePen, t as X, u as Plus, v as ListEnd, w as FolderPlus, x as GitBranch, z as ArrowUpToLine } from "../_libs/lucide-react.mjs";
5
- import { $ as readStoredCenterMessages, A as TooltipTrigger, C as THEME_COLOR_MODE_STORAGE_KEY, D as Tooltip$1, E as TitleTooltip, F as cn, G as normalizePromptImage, H as flattenTree, J as normalizeThemeColorMode, K as normalizeSessionSelectionKeys, L as createContextId, M as appliedThemeClass, O as TooltipContent, P as buildItemsFromSync, Q as readStoredAutoScrollEnabled, R as createInitialSessionState, S as THEME_COLOR_MODES, T as THEME_STORAGE_KEY, U as getSessionTitle, X as previewUrlForImage, Y as normalizeThemeFamily, Z as promptDraftKey, _ as Route, _t as themeColorModeLabel, a as COLLAPSED_DIRECTORIES_STORAGE_KEY, at as readStoredRecentDirectories, b as SIDEBAR_DIRECTORIES_STORAGE_KEY, c as Kbd, ct as readStoredSessionDoneSoundEnabled, d as RECENT_DIRECTORIES_STORAGE_KEY, dt as readStoredThemeColorMode, et as readStoredCollapsedDirectories, f as RIGHT_SIDEBAR_ACTIVE_TAB_STORAGE_KEY, ft as rememberStoredPromptDraft, g as RIGHT_SIDEBAR_WIDTHS_STORAGE_KEY, gt as sessionListEntryKey, h as RIGHT_SIDEBAR_OPEN_STORAGE_KEY, ht as sameContextUsage, i as CENTER_MESSAGES_STORAGE_KEY, it as readStoredPromptDraft, j as VIEWER_CONTEXT_STORAGE_KEY, l as KeyboardShortcutContent, lt as readStoredSidebarDirectories, m as RIGHT_SIDEBAR_HISTORY_HEIGHT_STORAGE_KEY, mt as safeLocalStorageSetItem, n as APPLIED_THEME_STORAGE_KEY, nt as readStoredHideToolBlocks, o as DRAFT_DIRECTORY_STORAGE_KEY, ot as readStoredRightSidebarOpen, p as RIGHT_SIDEBAR_FILE_TREE_WIDTH_STORAGE_KEY, pt as safeLocalStorageGetItem, q as normalizeStoredDirectoryList, r as AUTO_SCROLL_ENABLED_STORAGE_KEY, rt as readStoredPinnedSessionKeys, s as HIDE_TOOL_BLOCKS_STORAGE_KEY, st as readStoredSessionDoneDesktopNotificationsEnabled, tt as readStoredDraftDirectory, u as PINNED_SESSIONS_STORAGE_KEY, ut as readStoredTheme, v as SESSION_DONE_DESKTOP_NOTIFICATIONS_ENABLED_STORAGE_KEY, vt as themeFamilyLabel, w as THEME_FAMILIES, x as Spinner, y as SESSION_DONE_SOUND_ENABLED_STORAGE_KEY, yt as thinkingSummaryText } from "./routes-DGmloWuq.mjs";
5
+ import { $ as readStoredCenterMessages, A as TooltipTrigger, C as THEME_COLOR_MODE_STORAGE_KEY, D as Tooltip$1, E as TitleTooltip, F as cn, G as normalizePromptImage, H as flattenTree, J as normalizeThemeColorMode, K as normalizeSessionSelectionKeys, L as createContextId, M as appliedThemeClass, O as TooltipContent, P as buildItemsFromSync, Q as readStoredAutoScrollEnabled, R as createInitialSessionState, S as THEME_COLOR_MODES, T as THEME_STORAGE_KEY, U as getSessionTitle, X as previewUrlForImage, Y as normalizeThemeFamily, Z as promptDraftKey, _ as Route, _t as themeColorModeLabel, a as COLLAPSED_DIRECTORIES_STORAGE_KEY, at as readStoredRecentDirectories, b as SIDEBAR_DIRECTORIES_STORAGE_KEY, c as Kbd, ct as readStoredSessionDoneSoundEnabled, d as RECENT_DIRECTORIES_STORAGE_KEY, dt as readStoredThemeColorMode, et as readStoredCollapsedDirectories, f as RIGHT_SIDEBAR_ACTIVE_TAB_STORAGE_KEY, ft as rememberStoredPromptDraft, g as RIGHT_SIDEBAR_WIDTHS_STORAGE_KEY, gt as sessionListEntryKey, h as RIGHT_SIDEBAR_OPEN_STORAGE_KEY, ht as sameContextUsage, i as CENTER_MESSAGES_STORAGE_KEY, it as readStoredPromptDraft, j as VIEWER_CONTEXT_STORAGE_KEY, l as KeyboardShortcutContent, lt as readStoredSidebarDirectories, m as RIGHT_SIDEBAR_HISTORY_HEIGHT_STORAGE_KEY, mt as safeLocalStorageSetItem, n as APPLIED_THEME_STORAGE_KEY, nt as readStoredHideToolBlocks, o as DRAFT_DIRECTORY_STORAGE_KEY, ot as readStoredRightSidebarOpen, p as RIGHT_SIDEBAR_FILE_TREE_WIDTH_STORAGE_KEY, pt as safeLocalStorageGetItem, q as normalizeStoredDirectoryList, r as AUTO_SCROLL_ENABLED_STORAGE_KEY, rt as readStoredPinnedSessionKeys, s as HIDE_TOOL_BLOCKS_STORAGE_KEY, st as readStoredSessionDoneDesktopNotificationsEnabled, tt as readStoredDraftDirectory, u as PINNED_SESSIONS_STORAGE_KEY, ut as readStoredTheme, v as SESSION_DONE_DESKTOP_NOTIFICATIONS_ENABLED_STORAGE_KEY, vt as themeFamilyLabel, w as THEME_FAMILIES, x as Spinner, y as SESSION_DONE_SOUND_ENABLED_STORAGE_KEY, yt as thinkingSummaryText } from "./routes-D0Wr70q9.mjs";
6
6
  import { i as useQuery, n as useIsMutating, o as useQueryClient, r as useIsFetching, t as useMutation } from "../_libs/tanstack__react-query.mjs";
7
7
  import { t as useHotkeys } from "../_libs/tanstack__react-hotkeys.mjs";
8
8
  import { a as matchesKeyboardEvent, i as batch, o as formatForDisplay, r as createStore } from "../_libs/@tanstack/hotkeys+[...].mjs";
@@ -22,7 +22,7 @@ import { t as remarkGfm } from "../_libs/remark-gfm.mjs";
22
22
  import { a as getBuiltInSpriteSheet, i as getBuiltInFileIconColor, n as FileTree, r as createFileTreeIconResolver, t as useFileTree } from "../_libs/@pierre/trees+[...].mjs";
23
23
  import { a as closestCenter, d as useSensors, f as CSS$1, i as PointerSensor, n as DragOverlay, t as DndContext, u as useSensor } from "../_libs/@dnd-kit/core+[...].mjs";
24
24
  import { a as verticalListSortingStrategy, i as useSortable, n as arrayMove, r as horizontalListSortingStrategy, t as SortableContext } from "../_libs/dnd-kit__sortable.mjs";
25
- //#region node_modules/.nitro/vite/services/ssr/assets/routes-y2ECFOMd.js
25
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-DYYwW0gk.js
26
26
  var import_react = /* @__PURE__ */ __toESM(require_react());
27
27
  var import_jsx_runtime = require_jsx_runtime();
28
28
  var MOBILE_BREAKPOINT = 768;
@@ -717,6 +717,13 @@ function SidebarMenuButton({ render, isActive = false, variant = "default", size
717
717
  ...tooltip
718
718
  })] });
719
719
  }
720
+ var PICO_DIALOG_CLOSED_EVENT$1 = "pico:dialog-closed";
721
+ function dispatchDialogClosedEvent() {
722
+ if (typeof window === "undefined") return;
723
+ window.setTimeout(() => {
724
+ window.dispatchEvent(new CustomEvent(PICO_DIALOG_CLOSED_EVENT$1));
725
+ }, 160);
726
+ }
720
727
  function blurFocusedElementOutsideDialog() {
721
728
  if (typeof document === "undefined") return;
722
729
  const activeElement = document.activeElement;
@@ -729,6 +736,7 @@ function Dialog$1({ open, ...props }) {
729
736
  import_react.useLayoutEffect(() => {
730
737
  const nextOpen = open === true;
731
738
  if (nextOpen && !wasOpenRef.current) blurFocusedElementOutsideDialog();
739
+ if (!nextOpen && wasOpenRef.current) dispatchDialogClosedEvent();
732
740
  wasOpenRef.current = nextOpen;
733
741
  }, [open]);
734
742
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRoot, {
@@ -919,10 +927,24 @@ function CommandShortcut({ className, children, ...props }) {
919
927
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyboardShortcutContent, { children })
920
928
  });
921
929
  }
922
- function Drawer$1({ shouldScaleBackground = false, ...props }) {
930
+ var PICO_DIALOG_CLOSED_EVENT = "pico:dialog-closed";
931
+ function dispatchDrawerClosedEvent() {
932
+ if (typeof window === "undefined") return;
933
+ window.setTimeout(() => {
934
+ window.dispatchEvent(new CustomEvent(PICO_DIALOG_CLOSED_EVENT));
935
+ }, 160);
936
+ }
937
+ function Drawer$1({ shouldScaleBackground = false, open, ...props }) {
938
+ const wasOpenRef = import_react.useRef(open === true);
939
+ import_react.useLayoutEffect(() => {
940
+ const nextOpen = open === true;
941
+ if (!nextOpen && wasOpenRef.current) dispatchDrawerClosedEvent();
942
+ wasOpenRef.current = nextOpen;
943
+ }, [open]);
923
944
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Drawer.Root, {
924
945
  "data-slot": "drawer",
925
946
  shouldScaleBackground,
947
+ open,
926
948
  ...props
927
949
  });
928
950
  }
@@ -2283,11 +2305,6 @@ function formatSessionTime(value, now = Date.now()) {
2283
2305
  const years = Math.floor(days / 365);
2284
2306
  return `${Math.max(1, years)}y ${suffix}`;
2285
2307
  }
2286
- function formatSessionMessageCount(value) {
2287
- if (typeof value !== "number" || !Number.isFinite(value) || value < 0) return "";
2288
- const count = Math.floor(value);
2289
- return `${count.toLocaleString()} msg${count === 1 ? "" : "s"}`;
2290
- }
2291
2308
  function sessionActivityTime(entry) {
2292
2309
  const timestamp = entry.lastUserMessageAt || entry.modified;
2293
2310
  if (!timestamp) return 0;
@@ -2325,8 +2342,7 @@ function sessionSearchKeywords(entry, directory) {
2325
2342
  entry.name,
2326
2343
  entry.path,
2327
2344
  entry.cwd,
2328
- directory,
2329
- formatSessionMessageCount(entry.messageCount)
2345
+ directory
2330
2346
  ].filter(Boolean);
2331
2347
  }
2332
2348
  function isActiveSession(entry, activeSessionId, activeSessionPath) {
@@ -2526,7 +2542,7 @@ function AppShellSessionsDialog({ open, onOpenChange, viewerContextId, currentDi
2526
2542
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CommandList, {
2527
2543
  className: "max-h-none min-h-0 flex-1 md:max-h-[min(70vh,32rem)]",
2528
2544
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandEmpty, { children: loading ? "Loading sessions…" : "No sessions found." }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CommandGroup, {
2529
- heading: `${scope === "all" ? "All sessions" : `Current directory · ${tildePath$1(currentDirectories[0] || "")}`}${loading ? " · loading" : ""}`,
2545
+ heading: `${scope === "all" ? "All sessions" : `Current directory: ${tildePath$1(currentDirectories[0] || "")}`}${loading ? " · loading" : ""}`,
2530
2546
  children: [loading && sortedSessionItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CommandItem, {
2531
2547
  value: "loading:sessions",
2532
2548
  disabled: true,
@@ -2537,7 +2553,6 @@ function AppShellSessionsDialog({ open, onOpenChange, viewerContextId, currentDi
2537
2553
  }) : null, sortedSessionItems.map(({ directory, entry }) => {
2538
2554
  const entryKey = sessionListEntryKey(entry);
2539
2555
  const sessionTime = formatSessionTime(entry.lastUserMessageAt || entry.modified);
2540
- const messageCount = formatSessionMessageCount(entry.messageCount);
2541
2556
  const active = isActiveSession(entry, activeSessionId, activeSessionPath);
2542
2557
  const showUnread = Boolean(entry.unread) && !entry.streaming;
2543
2558
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CommandItem, {
@@ -2558,28 +2573,23 @@ function AppShellSessionsDialog({ open, onOpenChange, viewerContextId, currentDi
2558
2573
  }),
2559
2574
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
2560
2575
  className: "flex min-w-0 flex-1 flex-col gap-0.5",
2561
- children: [
2562
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
2563
- className: "truncate font-medium",
2564
- children: entry.title
2565
- }),
2566
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
2567
- className: "line-clamp-1 text-xs text-muted-foreground",
2568
- children: tildePath$1(entry.cwd || directory)
2569
- }),
2570
- sessionTime || messageCount ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
2571
- className: "truncate text-[11px] text-muted-foreground/70",
2572
- children: [
2573
- sessionTime,
2574
- sessionTime && messageCount ? " · " : null,
2575
- messageCount
2576
- ]
2577
- }) : null
2578
- ]
2576
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
2577
+ className: "truncate font-medium",
2578
+ children: entry.title
2579
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
2580
+ className: "line-clamp-1 text-xs text-muted-foreground",
2581
+ children: tildePath$1(entry.cwd || directory)
2582
+ })]
2579
2583
  }),
2580
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandShortcut, {
2581
- className: cn("shrink-0 tracking-normal normal-case", !active && "opacity-0"),
2582
- children: "Current"
2584
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
2585
+ className: "flex shrink-0 flex-col items-end gap-1",
2586
+ children: [sessionTime ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
2587
+ className: "truncate text-[11px] text-muted-foreground/70",
2588
+ children: sessionTime
2589
+ }) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandShortcut, {
2590
+ className: cn("ml-0 shrink-0 tracking-normal normal-case", !active && "opacity-0"),
2591
+ children: "Current"
2592
+ })]
2583
2593
  })
2584
2594
  ]
2585
2595
  }, entryKey);
@@ -7432,7 +7442,7 @@ function DropdownMenuShortcut({ className, children, ...props }) {
7432
7442
  function visibleCompletionLabel(item) {
7433
7443
  return item.label || item.value;
7434
7444
  }
7435
- function ComposerAssistMenu({ visibleCompletion, slashMenuState, slashSelectionStore, onHoverCompletion, onApplyCompletion, onHoverSlashCommand, onApplySlashSuggestion }) {
7445
+ function ComposerAssistMenu({ visibleCompletion, slashMenuState, slashSelectionStore, pointerSelectionSuppressed, onHoverCompletion, onMoveCompletion, onApplyCompletion, onHoverSlashCommand, onMoveSlashCommand, onApplySlashSuggestion }) {
7436
7446
  const scrollAreaRef = import_react.useRef(null);
7437
7447
  const slashSelectionIndex = import_react.useSyncExternalStore(slashSelectionStore.subscribe, slashSelectionStore.getSnapshot, slashSelectionStore.getSnapshot);
7438
7448
  const selectedIndex = visibleCompletion ? visibleCompletion.selectedIndex : slashSelectionIndex;
@@ -7454,17 +7464,20 @@ function ComposerAssistMenu({ visibleCompletion, slashMenuState, slashSelectionS
7454
7464
  children: [
7455
7465
  visibleCompletion.items.map((item, index) => {
7456
7466
  const selected = index === visibleCompletion.selectedIndex;
7457
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
7467
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
7458
7468
  type: "button",
7459
7469
  "data-composer-assist-selected": selected ? "true" : void 0,
7460
- className: cn("flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left text-sm", selected ? "bg-muted" : "hover:bg-muted/70"),
7470
+ className: cn("flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left text-sm", selected ? "bg-muted" : pointerSelectionSuppressed ? "" : "hover:bg-muted/70"),
7461
7471
  onMouseEnter: () => {
7462
7472
  onHoverCompletion(index);
7463
7473
  },
7474
+ onMouseMove: () => {
7475
+ onMoveCompletion(index);
7476
+ },
7464
7477
  onClick: () => {
7465
7478
  onApplyCompletion(item);
7466
7479
  },
7467
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
7480
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
7468
7481
  className: "min-w-0 flex-1",
7469
7482
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
7470
7483
  className: "block truncate font-medium",
@@ -7473,7 +7486,7 @@ function ComposerAssistMenu({ visibleCompletion, slashMenuState, slashSelectionS
7473
7486
  className: "block truncate text-xs text-muted-foreground",
7474
7487
  children: item.description
7475
7488
  }) : null]
7476
- }), selected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Check, { className: "mt-0.5 shrink-0" }) : null]
7489
+ })
7477
7490
  }, `${item.value}:${item.description || item.label}`);
7478
7491
  }),
7479
7492
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Separator$1, {}),
@@ -7486,17 +7499,20 @@ function ComposerAssistMenu({ visibleCompletion, slashMenuState, slashSelectionS
7486
7499
  className: "flex flex-col gap-1",
7487
7500
  children: slashMenuState.commands.map((command, index) => {
7488
7501
  const selected = index === slashSelectionIndex;
7489
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
7502
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
7490
7503
  type: "button",
7491
7504
  "data-composer-assist-selected": selected ? "true" : void 0,
7492
- className: cn("flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left text-sm", selected ? "bg-muted" : "hover:bg-muted/70"),
7505
+ className: cn("flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left text-sm", selected ? "bg-muted" : pointerSelectionSuppressed ? "" : "hover:bg-muted/70"),
7493
7506
  onMouseEnter: () => {
7494
7507
  onHoverSlashCommand(index);
7495
7508
  },
7509
+ onMouseMove: () => {
7510
+ onMoveSlashCommand(index);
7511
+ },
7496
7512
  onClick: () => {
7497
7513
  onApplySlashSuggestion(command);
7498
7514
  },
7499
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
7515
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
7500
7516
  className: "min-w-0 flex-1",
7501
7517
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
7502
7518
  className: "block truncate font-medium",
@@ -7505,7 +7521,7 @@ function ComposerAssistMenu({ visibleCompletion, slashMenuState, slashSelectionS
7505
7521
  className: "block truncate text-xs text-muted-foreground",
7506
7522
  children: command.description
7507
7523
  }) : null]
7508
- }), selected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Check, { className: "mt-0.5 shrink-0" }) : null]
7524
+ })
7509
7525
  }, command.name);
7510
7526
  })
7511
7527
  }) : null
@@ -11153,6 +11169,8 @@ var ComposerPromptEditor = import_react.memo(function ComposerPromptEditor({ com
11153
11169
  const [draftSkill, setDraftSkill] = import_react.useState(composerSkill);
11154
11170
  const [hasDraftText, setHasDraftText] = import_react.useState(hasDraftTextRef.current);
11155
11171
  const refreshAssistStateRef = import_react.useRef(() => {});
11172
+ const assistPointerSelectionSuppressedRef = import_react.useRef(false);
11173
+ const [assistPointerSelectionSuppressed, setAssistPointerSelectionSuppressed] = import_react.useState(false);
11156
11174
  const syncDraftToParent = (text, skillName) => {
11157
11175
  onComposerTextChange(serializeComposerDraft({
11158
11176
  text,
@@ -11224,6 +11242,10 @@ var ComposerPromptEditor = import_react.memo(function ComposerPromptEditor({ com
11224
11242
  ]);
11225
11243
  const hasSubmittableContent = hasDraftText || composerImages.length > 0;
11226
11244
  const acceptFollowUps = isStreaming || awaitingFirstTurn;
11245
+ const setAssistPointerSelectionSuppressedValue = (next) => {
11246
+ assistPointerSelectionSuppressedRef.current = next;
11247
+ setAssistPointerSelectionSuppressed(next);
11248
+ };
11227
11249
  const blockInitialSubmit = isSubmitting && !acceptFollowUps;
11228
11250
  const handleComposerMouseDown = (event) => {
11229
11251
  const target = event.target;
@@ -11296,11 +11318,13 @@ var ComposerPromptEditor = import_react.memo(function ComposerPromptEditor({ com
11296
11318
  }
11297
11319
  if (visibleCompletion && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
11298
11320
  event.preventDefault();
11321
+ setAssistPointerSelectionSuppressedValue(true);
11299
11322
  moveCompletionSelection(event.key === "ArrowDown" ? 1 : -1);
11300
11323
  return;
11301
11324
  }
11302
11325
  if (slashMenuState && !visibleCompletion && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
11303
11326
  event.preventDefault();
11327
+ setAssistPointerSelectionSuppressedValue(true);
11304
11328
  moveSlashSelection(event.key === "ArrowDown" ? 1 : -1);
11305
11329
  return;
11306
11330
  }
@@ -11308,11 +11332,15 @@ var ComposerPromptEditor = import_react.memo(function ComposerPromptEditor({ com
11308
11332
  const direction = moveDownShortcut ? 1 : -1;
11309
11333
  if (visibleCompletion) {
11310
11334
  event.preventDefault();
11335
+ event.stopPropagation();
11336
+ setAssistPointerSelectionSuppressedValue(true);
11311
11337
  moveCompletionSelection(direction);
11312
11338
  return;
11313
11339
  }
11314
11340
  if (slashMenuState) {
11315
11341
  event.preventDefault();
11342
+ event.stopPropagation();
11343
+ setAssistPointerSelectionSuppressedValue(true);
11316
11344
  moveSlashSelection(direction);
11317
11345
  }
11318
11346
  }
@@ -11355,6 +11383,22 @@ var ComposerPromptEditor = import_react.memo(function ComposerPromptEditor({ com
11355
11383
  }
11356
11384
  if (event.key === "ArrowUp" && !visibleCompletion && !slashMenuState && !draftText && currentDraftSkill && selectionIsAtStart(promptRef.current)) applyDraft("", void 0, { immediate: true });
11357
11385
  };
11386
+ const handleHoverCompletion = (index) => {
11387
+ if (assistPointerSelectionSuppressedRef.current) return;
11388
+ selectCompletionIndex(index);
11389
+ };
11390
+ const handleMoveCompletion = (index) => {
11391
+ setAssistPointerSelectionSuppressedValue(false);
11392
+ selectCompletionIndex(index);
11393
+ };
11394
+ const handleHoverSlashCommand = (index) => {
11395
+ if (assistPointerSelectionSuppressedRef.current) return;
11396
+ selectSlashIndex(index);
11397
+ };
11398
+ const handleMoveSlashCommand = (index) => {
11399
+ setAssistPointerSelectionSuppressedValue(false);
11400
+ selectSlashIndex(index);
11401
+ };
11358
11402
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
11359
11403
  className: "relative min-h-[90px] cursor-text overflow-visible rounded-t-[18px] border-b border-border/70 bg-card px-3 pt-3 pb-14",
11360
11404
  onMouseDown: handleComposerMouseDown,
@@ -11365,9 +11409,12 @@ var ComposerPromptEditor = import_react.memo(function ComposerPromptEditor({ com
11365
11409
  visibleCompletion,
11366
11410
  slashMenuState,
11367
11411
  slashSelectionStore,
11368
- onHoverCompletion: selectCompletionIndex,
11412
+ pointerSelectionSuppressed: assistPointerSelectionSuppressed,
11413
+ onHoverCompletion: handleHoverCompletion,
11414
+ onMoveCompletion: handleMoveCompletion,
11369
11415
  onApplyCompletion: applyCompletion,
11370
- onHoverSlashCommand: selectSlashIndex,
11416
+ onHoverSlashCommand: handleHoverSlashCommand,
11417
+ onMoveSlashCommand: handleMoveSlashCommand,
11371
11418
  onApplySlashSuggestion: applySlashSuggestion
11372
11419
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
11373
11420
  className: "min-w-0",
@@ -15034,7 +15081,7 @@ function gitCommitGraphSegmentPath({ line, rowTops }) {
15034
15081
  const d = GIT_GRAPH_ROW_HEIGHT * .8;
15035
15082
  return `M ${x1} ${y1} C ${x1} ${y1 + d}, ${x2} ${y2 - d}, ${x2} ${y2}`;
15036
15083
  }
15037
- function GitCommitPageGraph({ lines, openCommitValues, unpushedCommitShortHashes }) {
15084
+ function GitCommitPageGraph({ lines, openCommitValues, unpushedCommitHashes }) {
15038
15085
  const { branches, maxLaneCount, rows } = buildGitCommitGraphRows(lines);
15039
15086
  const rowHeights = gitCommitGraphRowHeights(rows, openCommitValues);
15040
15087
  const rowTops = gitCommitGraphRowTops(rowHeights);
@@ -15060,7 +15107,7 @@ function GitCommitPageGraph({ lines, openCommitValues, unpushedCommitShortHashes
15060
15107
  if (row.commitLane < 0) return;
15061
15108
  const x = row.commitLane * GIT_GRAPH_LANE_WIDTH + GIT_GRAPH_OFFSET_X;
15062
15109
  const y = gitCommitGraphRowCenter(rowTops, rowIndex);
15063
- const active = Boolean(row.parsed.hash && unpushedCommitShortHashes.has(row.parsed.hash));
15110
+ const active = Boolean(row.parsed.fullHash && unpushedCommitHashes.has(row.parsed.fullHash));
15064
15111
  circles.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
15065
15112
  cx: x,
15066
15113
  cy: y,
@@ -15205,7 +15252,7 @@ function GitCommitRow({ graphWidth, line, value }) {
15205
15252
  })]
15206
15253
  });
15207
15254
  }
15208
- function GitCommitRows({ lines, unpushedCommitShortHashes }) {
15255
+ function GitCommitRows({ lines, unpushedCommitHashes }) {
15209
15256
  const { maxLaneCount, rows } = buildGitCommitGraphRows(lines);
15210
15257
  const graphWidth = Math.max(24, maxLaneCount * GIT_GRAPH_LANE_WIDTH + 4);
15211
15258
  const rowValues = rows.map((row, index) => gitCommitGraphRowValue(row, index));
@@ -15217,7 +15264,7 @@ function GitCommitRows({ lines, unpushedCommitShortHashes }) {
15217
15264
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitCommitPageGraph, {
15218
15265
  lines,
15219
15266
  openCommitValues: visibleOpenCommitValues,
15220
- unpushedCommitShortHashes
15267
+ unpushedCommitHashes
15221
15268
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion$1, {
15222
15269
  multiple: true,
15223
15270
  value: visibleOpenCommitValues,
@@ -15268,7 +15315,7 @@ function GitCommitsSection({ viewerContextId, cwd, active, embedded = false, flu
15268
15315
  const commits = commitsData?.commits;
15269
15316
  const commitsHasMore = Boolean(commitsData?.commitsHasMore);
15270
15317
  const meta = Array.isArray(commits) ? gitCommitsSummaryText(commits) : "";
15271
- const unpushedCommitShortHashes = new Set(commitsData?.unpushedCommitShortHashes ?? []);
15318
+ const unpushedCommitHashes = new Set(commitsData?.unpushedCommitHashes ?? []);
15272
15319
  import_react.useEffect(() => {
15273
15320
  const target = commitsLoadMoreRef.current;
15274
15321
  if (!target || !active || !commitsHasMore || commitsQuery.isFetching || typeof IntersectionObserver === "undefined") return;
@@ -15307,7 +15354,7 @@ function GitCommitsSection({ viewerContextId, cwd, active, embedded = false, flu
15307
15354
  className: "grid min-w-0 gap-3",
15308
15355
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitCommitRows, {
15309
15356
  lines: commits,
15310
- unpushedCommitShortHashes
15357
+ unpushedCommitHashes
15311
15358
  }), commitsHasMore ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
15312
15359
  ref: commitsLoadMoreRef,
15313
15360
  className: "flex",
@@ -20255,7 +20302,7 @@ function useAppShellShortcuts({ addDirectoryOpenRef, commandPaletteOpenRef, comp
20255
20302
  const handleGlobalShortcut = (event) => {
20256
20303
  const key = event.altKey && event.code.startsWith("Key") ? event.code.slice(3).toLowerCase() : event.key.toLowerCase();
20257
20304
  const context = getShortcutContext(event);
20258
- if (context.blockingModalOpen) return;
20305
+ if (context.blockingModalOpen || event.defaultPrevented) return;
20259
20306
  if (key === "\\") {
20260
20307
  event.preventDefault();
20261
20308
  closeCommandPaletteForShortcut(context.commandPaletteOpen);
@@ -21261,6 +21308,30 @@ var AppShellSessionWorkspace = import_react.forwardRef(function AppShellSessionW
21261
21308
  composerPanelRef.current?.openModelPicker();
21262
21309
  };
21263
21310
  const focusPromptRef = useLatestRef(focusPrompt);
21311
+ const promptFocusAfterDialogCloseTimeoutRef = import_react.useRef(null);
21312
+ import_react.useEffect(() => {
21313
+ const hasOpenDialogSurface = () => {
21314
+ if (addDirectoryOpenRef.current || authOpenRef.current || commandPaletteOpenRef.current || deleteOldDirectorySessionsOpenRef.current || deleteOpenRef.current || forkOpenRef.current || gitCommitOpenRef.current || renameOpenRef.current || sessionsOpenRef.current || settingsOpenRef.current || treeOpenRef.current || uiRequestOpenRef.current) return true;
21315
+ if (typeof document === "undefined") return false;
21316
+ return Boolean(document.querySelector("[data-slot=\"dialog-content\"][data-open], [data-slot=\"drawer-content\"][data-state=\"open\"]"));
21317
+ };
21318
+ const handleDialogClosed = () => {
21319
+ if (promptFocusAfterDialogCloseTimeoutRef.current !== null) window.clearTimeout(promptFocusAfterDialogCloseTimeoutRef.current);
21320
+ promptFocusAfterDialogCloseTimeoutRef.current = window.setTimeout(() => {
21321
+ promptFocusAfterDialogCloseTimeoutRef.current = null;
21322
+ if (hasOpenDialogSurface()) return;
21323
+ focusPromptRef.current();
21324
+ }, 0);
21325
+ };
21326
+ window.addEventListener("pico:dialog-closed", handleDialogClosed);
21327
+ return () => {
21328
+ window.removeEventListener("pico:dialog-closed", handleDialogClosed);
21329
+ if (promptFocusAfterDialogCloseTimeoutRef.current !== null) {
21330
+ window.clearTimeout(promptFocusAfterDialogCloseTimeoutRef.current);
21331
+ promptFocusAfterDialogCloseTimeoutRef.current = null;
21332
+ }
21333
+ };
21334
+ }, [focusPromptRef]);
21264
21335
  const [promptFocusRequest, setPromptFocusRequest] = import_react.useState({
21265
21336
  sessionId: "",
21266
21337
  nonce: 0
@@ -3813,7 +3813,7 @@ var defaultSerovalPlugins = [
3813
3813
  * the dev styles URL for route-scoped CSS collection.
3814
3814
  */
3815
3815
  async function getStartManifest(matchedRoutes) {
3816
- const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-Du77hoaY.mjs");
3816
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-D_Gz4NsA.mjs");
3817
3817
  const startManifest = tsrStartManifest();
3818
3818
  const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes["__root__"] || {};
3819
3819
  rootRoute.assets = rootRoute.assets || [];
@@ -4799,7 +4799,7 @@ var baseManifestPromise;
4799
4799
  var cachedFinalManifestPromise;
4800
4800
  async function loadEntries() {
4801
4801
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
4802
- import("./router-BabRxx9-.mjs"),
4802
+ import("./router-S2V8f9B5.mjs"),
4803
4803
  import("./start-Captdpmb.mjs"),
4804
4804
  import("../__23tanstack-start-plugin-adapters-y_fshQDY.mjs")
4805
4805
  ]);
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-Du77hoaY.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-D_Gz4NsA.js
2
2
  var tsrStartManifest = () => ({
3
3
  routes: {
4
4
  __root__: {
@@ -52,16 +52,16 @@ var tsrStartManifest = () => ({
52
52
  "/api/ui/$id"
53
53
  ],
54
54
  assets: void 0,
55
- preloads: ["/assets/index-DSY4c1uR.js", "/assets/rolldown-runtime-S-ySWqyJ.js"]
55
+ preloads: ["/assets/index-qJuqOQAb.js", "/assets/rolldown-runtime-S-ySWqyJ.js"]
56
56
  },
57
57
  "/": {
58
58
  filePath: "/home/runner/work/pico/pico/src/routes/index.tsx",
59
59
  children: void 0,
60
60
  assets: void 0,
61
- preloads: ["/assets/routes-COjREp2x.js"]
61
+ preloads: ["/assets/routes-DZJgqxHu.js"]
62
62
  }
63
63
  },
64
- clientEntry: "/assets/index-DSY4c1uR.js"
64
+ clientEntry: "/assets/index-qJuqOQAb.js"
65
65
  });
66
66
  //#endregion
67
67
  export { tsrStartManifest };