@alivault/pico 0.6.1 → 0.7.1

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.
@@ -1,8 +1,8 @@
1
1
  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
- import { A as ChevronsUpDown, B as ArrowDown, C as FolderPlus, D as Copy, E as Download, F as Check, I as ArrowUp, L as ArrowUpToLine, N as ChevronRight, O as Command, P as ChevronDown, S as Folder, T as EllipsisVertical, _ as ListEnd, a as Square, b as GitBranch, c as Settings2, d as PanelLeft, f as PanelLeftOpen, g as ListStart, h as OctagonX, j as ChevronsDownUp, l as Search, n as WandSparkles, o as SquarePen, p as PanelLeftClose, r as Upload, s as SquareArrowOutUpRight, t as X, u as PanelRight, w as Ellipsis, x as GitCommitHorizontal, y as ImagePlus, z as ArrowLeft } 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-Qk9CE25v.mjs";
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";
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-C5zYkwvE.js
25
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-y2ECFOMd.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;
@@ -14820,7 +14820,7 @@ var GIT_GRAPH_LANE_COLORS = [
14820
14820
  "#14b8a6"
14821
14821
  ];
14822
14822
  var GIT_GRAPH_NULL_VERTEX_ID = -1;
14823
- var GIT_GRAPH_ROW_HEIGHT = 20;
14823
+ var GIT_GRAPH_ROW_HEIGHT = 32;
14824
14824
  var GIT_GRAPH_COMMIT_DETAILS_HEIGHT = 150;
14825
14825
  var GIT_GRAPH_LANE_WIDTH = 14;
14826
14826
  var GIT_GRAPH_OFFSET_X = 12;
@@ -15106,7 +15106,7 @@ function GitCommitRow({ graphWidth, line, value }) {
15106
15106
  });
15107
15107
  };
15108
15108
  if (!parsed.hash && !parsed.subject) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
15109
- className: "flex h-5 max-w-full min-w-0 items-center font-mono text-[13px] leading-5",
15109
+ className: "flex h-8 max-w-full min-w-0 items-center font-mono text-[13px] leading-5",
15110
15110
  children: parsed.subject ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
15111
15111
  className: "min-w-0 flex-1 truncate text-foreground",
15112
15112
  children: parsed.subject
@@ -15117,7 +15117,7 @@ function GitCommitRow({ graphWidth, line, value }) {
15117
15117
  className: "border-0",
15118
15118
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ContextMenu$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContextMenuTrigger, { render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
15119
15119
  headerClassName: "min-w-0",
15120
- className: "h-5 min-h-5 w-full items-center gap-2 rounded-none px-1.5 py-0 font-mono text-[13px] leading-5 font-normal transition-colors hover:bg-muted/50 hover:text-foreground hover:no-underline focus-visible:ring-0 aria-expanded:bg-muted aria-expanded:text-foreground **:data-[slot=accordion-trigger-icon]:size-4",
15120
+ className: "h-8 min-h-8 w-full items-center gap-2 rounded-none px-1.5 py-0 font-mono text-[13px] leading-5 font-normal transition-colors hover:bg-muted/50 hover:text-foreground hover:no-underline focus-visible:ring-0 aria-expanded:bg-muted aria-expanded:text-foreground **:data-[slot=accordion-trigger-icon]:size-4",
15121
15121
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
15122
15122
  className: "min-w-0 flex-1 truncate text-foreground",
15123
15123
  style: { paddingLeft: graphWidth },
@@ -15703,6 +15703,7 @@ function FileReviewContent({ viewerContextId, cwd, active, onOpenFile }) {
15703
15703
  }
15704
15704
  function ReviewFileAccordionItem({ viewerContextId, cwd, active, diffStyle, file, open, stuck, onOpenFile }) {
15705
15705
  const normalizedCwd = normalizeCwd(cwd);
15706
+ const queryClient = useQueryClient();
15706
15707
  const value = reviewFileValue(file);
15707
15708
  const [fullContextRequested, setFullContextRequested] = import_react.useState(false);
15708
15709
  const previewPatch = gitFileShouldPreviewPatch(file) && !fullContextRequested;
@@ -15736,6 +15737,65 @@ function ReviewFileAccordionItem({ viewerContextId, cwd, active, diffStyle, file
15736
15737
  const oldContent = reviewQuery.data?.oldContent ?? "";
15737
15738
  const newContent = reviewQuery.data?.newContent ?? "";
15738
15739
  const patch = diffQuery.data?.patch ?? "";
15740
+ const [indexStatus, worktreeStatus] = gitFileStatusCharacters(file.status);
15741
+ const canStage = worktreeStatus !== " " || indexStatus === "?";
15742
+ const invalidateChangedFileQueries = async () => {
15743
+ await invalidateGitQueries({
15744
+ queryClient,
15745
+ viewerContextId,
15746
+ cwd: normalizedCwd
15747
+ });
15748
+ };
15749
+ const stageMutation = useMutation({
15750
+ mutationFn: async () => await fetchJson(buildRequestUrl("/api/git-stage", { contextId: viewerContextId }), {
15751
+ method: "POST",
15752
+ headers: { "content-type": "application/json" },
15753
+ body: JSON.stringify({
15754
+ cwd: normalizedCwd,
15755
+ path: file.path,
15756
+ previousPath: file.previousPath
15757
+ })
15758
+ }),
15759
+ onSuccess: async () => {
15760
+ await invalidateChangedFileQueries();
15761
+ toast.success("Staged changes", { description: file.path });
15762
+ },
15763
+ onError: (error) => {
15764
+ toast.error(getErrorMessage(error, "Failed to stage changes"));
15765
+ }
15766
+ });
15767
+ const discardMutation = useMutation({
15768
+ mutationFn: async () => await fetchJson(buildRequestUrl("/api/git-discard", { contextId: viewerContextId }), {
15769
+ method: "POST",
15770
+ headers: { "content-type": "application/json" },
15771
+ body: JSON.stringify({
15772
+ cwd: normalizedCwd,
15773
+ path: file.path,
15774
+ previousPath: file.previousPath,
15775
+ status: file.status
15776
+ })
15777
+ }),
15778
+ onSuccess: async () => {
15779
+ await invalidateChangedFileQueries();
15780
+ toast.success("Discarded changes", { description: file.path });
15781
+ },
15782
+ onError: (error) => {
15783
+ toast.error(getErrorMessage(error, "Failed to discard changes"));
15784
+ }
15785
+ });
15786
+ const actionPending = stageMutation.isPending || discardMutation.isPending;
15787
+ const openFile = (event) => {
15788
+ event?.stopPropagation();
15789
+ onOpenFile?.(file.path, { pin: true });
15790
+ };
15791
+ const discardFileChanges = (event) => {
15792
+ event?.stopPropagation();
15793
+ discardMutation.mutate();
15794
+ };
15795
+ const stageFileChanges = (event) => {
15796
+ event?.stopPropagation();
15797
+ stageMutation.mutate();
15798
+ };
15739
15799
  import_react.useEffect(() => {
15740
15800
  setFullContextRequested(false);
15741
15801
  }, [value]);
@@ -15779,22 +15839,85 @@ function ReviewFileAccordionItem({ viewerContextId, cwd, active, diffStyle, file
15779
15839
  className: "pointer-events-none hidden size-4 shrink-0 group-aria-expanded/review-file-trigger:inline"
15780
15840
  })
15781
15841
  ]
15782
- }), onOpenFile ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
15783
- type: "button",
15784
- variant: "ghost",
15785
- size: "icon-xs",
15786
- "aria-label": `Open ${file.path}`,
15787
- title: "Open file",
15788
- className: "mr-2 self-center",
15789
- onClick: (event) => {
15790
- event.stopPropagation();
15791
- onOpenFile(file.path, { pin: true });
15792
- },
15793
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SquareArrowOutUpRight, { className: "size-3.5" })
15794
- }) : null]
15795
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
15842
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
15843
+ className: "mr-2 hidden self-center overflow-hidden rounded-lg border border-border/70 bg-card/80 shadow-sm md:flex",
15844
+ children: [
15845
+ onOpenFile ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleTooltip, {
15846
+ title: "Open file",
15847
+ side: "top",
15848
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
15849
+ type: "button",
15850
+ variant: "ghost",
15851
+ size: "icon-xs",
15852
+ "aria-label": `Open ${file.path}`,
15853
+ className: "rounded-none border-0",
15854
+ onClick: openFile,
15855
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FileInput, { className: "size-3.5" })
15856
+ })
15857
+ }) : null,
15858
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleTooltip, {
15859
+ title: "Discard changes",
15860
+ side: "top",
15861
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
15862
+ type: "button",
15863
+ variant: "ghost",
15864
+ size: "icon-xs",
15865
+ "aria-label": `Discard changes to ${file.path}`,
15866
+ className: "rounded-none border-0 border-l border-border/70 text-muted-foreground hover:text-destructive",
15867
+ disabled: actionPending || !viewerContextId || !normalizedCwd,
15868
+ onClick: discardFileChanges,
15869
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Undo2, { className: "size-3.5" })
15870
+ })
15871
+ }),
15872
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleTooltip, {
15873
+ title: "Stage changes",
15874
+ side: "top",
15875
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
15876
+ type: "button",
15877
+ variant: "ghost",
15878
+ size: "icon-xs",
15879
+ "aria-label": `Stage changes to ${file.path}`,
15880
+ className: "rounded-none border-0 border-l border-border/70 text-muted-foreground hover:text-emerald-500",
15881
+ disabled: actionPending || !canStage || !viewerContextId || !normalizedCwd,
15882
+ onClick: stageFileChanges,
15883
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Plus, { className: "size-3.5" })
15884
+ })
15885
+ })
15886
+ ]
15887
+ })]
15888
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionContent, {
15796
15889
  className: "bg-background p-0",
15797
- children: previewPatch ? diffQuery.isPending && !diffQuery.data ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
15890
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
15891
+ className: "flex gap-2 border-b border-border/70 bg-card/40 p-2 md:hidden",
15892
+ children: [
15893
+ onOpenFile ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
15894
+ type: "button",
15895
+ variant: "outline",
15896
+ "aria-label": `Open ${file.path}`,
15897
+ className: "min-w-0 flex-1",
15898
+ onClick: openFile,
15899
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(FileInput, { className: "size-3.5" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Open file" })]
15900
+ }) : null,
15901
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
15902
+ type: "button",
15903
+ variant: "outline",
15904
+ "aria-label": `Discard changes to ${file.path}`,
15905
+ className: "min-w-0 flex-1 text-muted-foreground hover:text-destructive",
15906
+ disabled: actionPending || !viewerContextId || !normalizedCwd,
15907
+ onClick: discardFileChanges,
15908
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Undo2, { className: "size-3.5" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Discard" })]
15909
+ }),
15910
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
15911
+ type: "button",
15912
+ variant: "outline",
15913
+ "aria-label": `Stage changes to ${file.path}`,
15914
+ className: "min-w-0 flex-1 text-muted-foreground hover:text-emerald-500",
15915
+ disabled: actionPending || !canStage || !viewerContextId || !normalizedCwd,
15916
+ onClick: stageFileChanges,
15917
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Plus, { className: "size-3.5" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Stage" })]
15918
+ })
15919
+ ]
15920
+ }), previewPatch ? diffQuery.isPending && !diffQuery.data ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
15798
15921
  className: "p-3",
15799
15922
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(GitSectionNote, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), " Loading hunk…"] })
15800
15923
  }) : diffQuery.error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
@@ -15851,7 +15974,7 @@ function ReviewFileAccordionItem({ viewerContextId, cwd, active, diffStyle, file
15851
15974
  }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
15852
15975
  className: "p-3",
15853
15976
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitSectionNote, { children: "No line changes." })
15854
- })
15977
+ })]
15855
15978
  })]
15856
15979
  });
15857
15980
  }
@@ -16351,7 +16474,8 @@ function AppShellDesktopResizeHandle({ label, max, min, onResize, onResizeEnd, o
16351
16474
  }
16352
16475
  function AppShellTabsController({ actionsRef, appUiStore, awaitingFirstTurn, composerPanelRef, contextUsageStore, conversationFrameRef, conversationItemsStore, defaultNewSessionDirectory, displaySettingsStore, fileInputRef, gitPanelOpen, hiddenThinkingPreviewStore, isSessionViewLoading, isSubmitting, isMobile, newSessionDirectoryOptions, onCancelCompaction, onCreateSession, onOpenAddDirectoryDialog, onCloseAllFileViewTabs, onCloseFileViewTab, onCloseFileViewTabsToRight, onCloseOtherFileViewTabs, onOpenFileViewTab, onReorderFileViewTabs, onValueChange, rightSidebarStore, sessionStore, store, viewerContextId, workingStateStore }) {
16353
16476
  const currentTab = useSelector(appUiStore, (state) => state.currentTab);
16354
- const showTabsList = !useSelector(sessionStore, (sessionState) => sessionState.draft) || isSessionViewLoading;
16477
+ const isDraftSession = useSelector(sessionStore, (sessionState) => sessionState.draft);
16478
+ const showTabsList = isMobile || !isDraftSession || isSessionViewLoading;
16355
16479
  const sessionVisibleClassName = currentTab === "git" ? "hidden min-h-0 flex-1 flex-col md:flex" : "flex min-h-0 flex-1 flex-col";
16356
16480
  const mobileGitClassName = currentTab === "git" ? "min-h-0 flex-1 overflow-hidden md:hidden" : "hidden";
16357
16481
  const rightSidebarHasVisibleFiles = useSelector(rightSidebarStore, selectRightSidebarHasVisibleFiles);
@@ -17390,20 +17514,21 @@ function AppSidebarHeader({ onOpenSessionsDialog, onCreateSession }) {
17390
17514
  function AppSidebarDirectoriesHeader({ sessionSearch, visibleDirectories, matchingSessionCount, collapsed, collapsedDirectoryStore, onOpenAddDirectoryDialog }) {
17391
17515
  const searchActive = sessionSearch.trim().length > 0;
17392
17516
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarGroupLabel, {
17393
- render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleTrigger, { className: "group/directories-label justify-between gap-3" }),
17394
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
17395
- className: "flex min-w-0 flex-1 items-center gap-2 text-left",
17517
+ className: "justify-between gap-3",
17518
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CollapsibleTrigger, {
17519
+ type: "button",
17520
+ className: "group/directories-label flex min-w-0 flex-1 items-center gap-2 text-left outline-hidden",
17396
17521
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17397
17522
  className: "min-w-0 truncate",
17398
17523
  children: searchActive ? `${matchingSessionCount} matching session${matchingSessionCount === 1 ? "" : "s"}` : "Directories"
17399
- }), !searchActive ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRight, { className: "size-4 shrink-0 opacity-0 transition-opacity group-hover/directories-label:opacity-100 group-focus-visible/directories-label:opacity-100" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: "size-4 shrink-0 opacity-0 transition-opacity group-hover/directories-label:opacity-100 group-focus-visible/directories-label:opacity-100" }) : null]
17524
+ }), !searchActive ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRight, { className: "size-4 shrink-0 text-sidebar-foreground/60" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: "size-4 shrink-0 text-sidebar-foreground/60" }) : null]
17400
17525
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
17401
17526
  className: "flex items-center gap-1",
17402
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectoryCollapseAllButton, {
17527
+ children: [!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectoryCollapseAllButton, {
17403
17528
  searchActive,
17404
17529
  visibleDirectories,
17405
17530
  collapsedDirectoryStore
17406
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleTooltip, {
17531
+ }) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleTooltip, {
17407
17532
  title: "Add directory",
17408
17533
  kbd: formatShortcutLabel("Control+D"),
17409
17534
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
@@ -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-Bp-gg9fI.mjs");
3816
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-Du77hoaY.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-Bw2oDzya.mjs"),
4802
+ import("./router-BabRxx9-.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-Bp-gg9fI.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-Du77hoaY.js
2
2
  var tsrStartManifest = () => ({
3
3
  routes: {
4
4
  __root__: {
@@ -17,9 +17,11 @@ var tsrStartManifest = () => ({
17
17
  "/api/git-commit",
18
18
  "/api/git-commit-message",
19
19
  "/api/git-diff",
20
+ "/api/git-discard",
20
21
  "/api/git-pull",
21
22
  "/api/git-push",
22
23
  "/api/git-review",
24
+ "/api/git-stage",
23
25
  "/api/git-status",
24
26
  "/api/highlight",
25
27
  "/api/model",
@@ -50,16 +52,16 @@ var tsrStartManifest = () => ({
50
52
  "/api/ui/$id"
51
53
  ],
52
54
  assets: void 0,
53
- preloads: ["/assets/index-BHnoJmIv.js", "/assets/rolldown-runtime-S-ySWqyJ.js"]
55
+ preloads: ["/assets/index-DSY4c1uR.js", "/assets/rolldown-runtime-S-ySWqyJ.js"]
54
56
  },
55
57
  "/": {
56
58
  filePath: "/home/runner/work/pico/pico/src/routes/index.tsx",
57
59
  children: void 0,
58
60
  assets: void 0,
59
- preloads: ["/assets/routes-BfJLj6KG.js"]
61
+ preloads: ["/assets/routes-COjREp2x.js"]
60
62
  }
61
63
  },
62
- clientEntry: "/assets/index-BHnoJmIv.js"
64
+ clientEntry: "/assets/index-DSY4c1uR.js"
63
65
  });
64
66
  //#endregion
65
67
  export { tsrStartManifest };