@alivault/pico 0.3.1 → 0.4.0

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 (35) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{index-CksX3NW4.js → index-BiaOlsw0.js} +3 -3
  3. package/.output/public/assets/routes-C7eqqi44.js +2152 -0
  4. package/.output/public/assets/styles-4lJzavCj.css +2 -0
  5. package/.output/public/screenshots/pico-mobile-alt.png +0 -0
  6. package/.output/public/screenshots/pico-mobile.png +0 -0
  7. package/.output/public/screenshots/pico-workspace-alt.png +0 -0
  8. package/.output/public/screenshots/pico-workspace.png +0 -0
  9. package/.output/server/_libs/@pierre/diffs+[...].mjs +53 -1
  10. package/.output/server/_libs/entities.mjs +372 -0
  11. package/.output/server/_libs/hast-util-from-parse5+[...].mjs +741 -0
  12. package/.output/server/_libs/hast-util-raw+[...].mjs +7897 -0
  13. package/.output/server/_libs/hast-util-sanitize.mjs +780 -0
  14. package/.output/server/_libs/hast-util-to-jsx-runtime+[...].mjs +3 -82
  15. package/.output/server/_libs/mdast-util-find-and-replace.mjs +198 -0
  16. package/.output/server/_libs/mdast-util-gfm+[...].mjs +4 -288
  17. package/.output/server/_libs/mdast-util-to-hast+[...].mjs +1 -2
  18. package/.output/server/_libs/react-markdown+[...].mjs +1 -1
  19. package/.output/server/_libs/rehype-raw.mjs +37 -0
  20. package/.output/server/_libs/rehype-sanitize.mjs +27 -0
  21. package/.output/server/_ssr/{router-Di8B08B6.mjs → router-CgnX-Js0.mjs} +3 -3
  22. package/.output/server/_ssr/{routes-CRDrPu8Q.mjs → routes-CmLc8G9G.mjs} +223 -176
  23. package/.output/server/_ssr/{routes-B99MXwvx.mjs → routes-D2MVUd_A.mjs} +2 -2
  24. package/.output/server/_ssr/ssr.mjs +2 -2
  25. package/.output/server/{_tanstack-start-manifest_v-DK9pZs2A.mjs → _tanstack-start-manifest_v-BSXP2b2T.mjs} +4 -4
  26. package/.output/server/index.mjs +484 -470
  27. package/README.md +6 -2
  28. package/package.json +3 -1
  29. package/public/screenshots/pico-mobile-alt.png +0 -0
  30. package/public/screenshots/pico-mobile.png +0 -0
  31. package/public/screenshots/pico-workspace-alt.png +0 -0
  32. package/public/screenshots/pico-workspace.png +0 -0
  33. package/.output/public/assets/routes-VohBsBcC.js +0 -2151
  34. package/.output/public/assets/styles-ej_ltn_F.css +0 -2
  35. package/.output/server/_libs/mdast-util-find-and-replace+[...].mjs +0 -636
@@ -2,7 +2,7 @@ import { i as __toESM } from "../_runtime.mjs";
2
2
  import { X as require_react, Y as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
3
3
  import { a as createRouter, c as createRootRoute, n as Scripts, r as HeadContent, s as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
4
4
  import { h as OctagonX, i as TriangleAlert, k as CircleCheck, v as Info } from "../_libs/lucide-react.mjs";
5
- import { A as createCompactionSummaryItem, D as assistantBlocksFromMessage, F as extractToolText, N as extractMessageImages, O as buildItemsFromSync, P as extractMessageText$1, R as mergeAssistantBlocksForStreaming, b as THEME_STORAGE_KEY, h as Route$46, lt as toolCategoryFromTool, w as TooltipProvider, y as Spinner } from "./routes-B99MXwvx.mjs";
5
+ import { A as createCompactionSummaryItem, D as assistantBlocksFromMessage, F as extractToolText, N as extractMessageImages, O as buildItemsFromSync, P as extractMessageText$1, R as mergeAssistantBlocksForStreaming, b as THEME_STORAGE_KEY, h as Route$46, lt as toolCategoryFromTool, w as TooltipProvider, y as Spinner } from "./routes-D2MVUd_A.mjs";
6
6
  import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
7
7
  import { t as setupRouterSsrQueryIntegration } from "../_libs/@tanstack/react-router-ssr-query+[...].mjs";
8
8
  import { n as HotkeysProvider } from "../_libs/tanstack__react-hotkeys.mjs";
@@ -20,7 +20,7 @@ import os, { homedir } from "node:os";
20
20
  import { performance } from "node:perf_hooks";
21
21
  import { isMainThread } from "node:worker_threads";
22
22
  import { execSync, spawn } from "node:child_process";
23
- //#region node_modules/.nitro/vite/services/ssr/assets/router-Di8B08B6.js
23
+ //#region node_modules/.nitro/vite/services/ssr/assets/router-CgnX-Js0.js
24
24
  var import_react = /* @__PURE__ */ __toESM(require_react());
25
25
  var import_jsx_runtime = require_jsx_runtime();
26
26
  var Toaster$1 = ({ ...props }) => {
@@ -70,7 +70,7 @@ function AppProviders({ children }) {
70
70
  })
71
71
  });
72
72
  }
73
- var styles_default = "/assets/styles-ej_ltn_F.css";
73
+ var styles_default = "/assets/styles-4lJzavCj.css";
74
74
  var TANSTACK_DEVTOOLS_SETTINGS_KEY = "tanstack_devtools_settings";
75
75
  var TANSTACK_DEVTOOLS_DEFAULTS_STORAGE_KEY = "pico-tanstack-devtools-defaults-v1";
76
76
  var TANSTACK_DEVTOOLS_CONFIG = {
@@ -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 ChevronsUpDown, B as ArrowDown, C as FolderPlus, D as Copy, E as Download, F as Check, I as ArrowUp, L as ArrowUpToLine, M as ChevronUp, 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 readStoredRightSidebarOpen, B as normalizeSessionSelectionKeys, C as TooltipContent, E as VIEWER_CONTEXT_STORAGE_KEY, G as readStoredAutoScrollEnabled, H as normalizeThemeMode, I as flattenTree, J as readStoredDraftDirectory, K as readStoredCenterMessages, L as getSessionTitle, M as createInitialSessionState, O as buildItemsFromSync, Q as readStoredRecentDirectories, S as Tooltip$1, T as TooltipTrigger, U as previewUrlForImage, V as normalizeStoredDirectoryList, W as promptDraftKey, X as readStoredPinnedSessionKeys, Y as readStoredHideToolBlocks, Z as readStoredPromptDraft, _ as SESSION_DONE_SOUND_ENABLED_STORAGE_KEY, a as HIDE_TOOL_BLOCKS_STORAGE_KEY, at as safeLocalStorageSetItem, c as PINNED_SESSIONS_STORAGE_KEY, ct as thinkingSummaryText, d as RIGHT_SIDEBAR_FILE_TREE_WIDTH_STORAGE_KEY, et as readStoredSessionDoneDesktopNotificationsEnabled, f as RIGHT_SIDEBAR_HISTORY_HEIGHT_STORAGE_KEY, g as SESSION_DONE_DESKTOP_NOTIFICATIONS_ENABLED_STORAGE_KEY, h as Route, i as DRAFT_DIRECTORY_STORAGE_KEY, it as safeLocalStorageGetItem, j as createContextId, k as cn, l as RECENT_DIRECTORIES_STORAGE_KEY, m as RIGHT_SIDEBAR_WIDTHS_STORAGE_KEY, n as CENTER_MESSAGES_STORAGE_KEY, nt as readStoredSidebarDirectories, o as Kbd, ot as sameContextUsage, p as RIGHT_SIDEBAR_OPEN_STORAGE_KEY, q as readStoredCollapsedDirectories, r as COLLAPSED_DIRECTORIES_STORAGE_KEY, rt as rememberStoredPromptDraft, s as KeyboardShortcutContent, st as sessionListEntryKey, t as AUTO_SCROLL_ENABLED_STORAGE_KEY, tt as readStoredSessionDoneSoundEnabled, u as RIGHT_SIDEBAR_ACTIVE_TAB_STORAGE_KEY, v as SIDEBAR_DIRECTORIES_STORAGE_KEY, x as TitleTooltip, y as Spinner, z as normalizePromptImage } from "./routes-B99MXwvx.mjs";
5
+ import { $ as readStoredRightSidebarOpen, B as normalizeSessionSelectionKeys, C as TooltipContent, E as VIEWER_CONTEXT_STORAGE_KEY, G as readStoredAutoScrollEnabled, H as normalizeThemeMode, I as flattenTree, J as readStoredDraftDirectory, K as readStoredCenterMessages, L as getSessionTitle, M as createInitialSessionState, O as buildItemsFromSync, Q as readStoredRecentDirectories, S as Tooltip$1, T as TooltipTrigger, U as previewUrlForImage, V as normalizeStoredDirectoryList, W as promptDraftKey, X as readStoredPinnedSessionKeys, Y as readStoredHideToolBlocks, Z as readStoredPromptDraft, _ as SESSION_DONE_SOUND_ENABLED_STORAGE_KEY, a as HIDE_TOOL_BLOCKS_STORAGE_KEY, at as safeLocalStorageSetItem, c as PINNED_SESSIONS_STORAGE_KEY, ct as thinkingSummaryText, d as RIGHT_SIDEBAR_FILE_TREE_WIDTH_STORAGE_KEY, et as readStoredSessionDoneDesktopNotificationsEnabled, f as RIGHT_SIDEBAR_HISTORY_HEIGHT_STORAGE_KEY, g as SESSION_DONE_DESKTOP_NOTIFICATIONS_ENABLED_STORAGE_KEY, h as Route, i as DRAFT_DIRECTORY_STORAGE_KEY, it as safeLocalStorageGetItem, j as createContextId, k as cn, l as RECENT_DIRECTORIES_STORAGE_KEY, m as RIGHT_SIDEBAR_WIDTHS_STORAGE_KEY, n as CENTER_MESSAGES_STORAGE_KEY, nt as readStoredSidebarDirectories, o as Kbd, ot as sameContextUsage, p as RIGHT_SIDEBAR_OPEN_STORAGE_KEY, q as readStoredCollapsedDirectories, r as COLLAPSED_DIRECTORIES_STORAGE_KEY, rt as rememberStoredPromptDraft, s as KeyboardShortcutContent, st as sessionListEntryKey, t as AUTO_SCROLL_ENABLED_STORAGE_KEY, tt as readStoredSessionDoneSoundEnabled, u as RIGHT_SIDEBAR_ACTIVE_TAB_STORAGE_KEY, v as SIDEBAR_DIRECTORIES_STORAGE_KEY, x as TitleTooltip, y as Spinner, z as normalizePromptImage } from "./routes-D2MVUd_A.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";
@@ -15,11 +15,14 @@ import { t as _e } from "../_libs/cmdk.mjs";
15
15
  import { t as Drawer } from "../_libs/vaul.mjs";
16
16
  import { n as MultiFileDiff, t as PatchDiff } from "../_libs/@pierre/diffs+[...].mjs";
17
17
  import { t as Markdown } from "../_libs/react-markdown+[...].mjs";
18
+ import { t as rehypeRaw } from "../_libs/rehype-raw.mjs";
19
+ import { n as defaultSchema } from "../_libs/hast-util-sanitize.mjs";
20
+ import { t as rehypeSanitize } from "../_libs/rehype-sanitize.mjs";
18
21
  import { t as remarkGfm } from "../_libs/remark-gfm.mjs";
19
22
  import { a as getBuiltInSpriteSheet, i as getBuiltInFileIconColor, n as FileTree, r as createFileTreeIconResolver, t as useFileTree } from "../_libs/@pierre/trees+[...].mjs";
20
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";
21
24
  import { a as verticalListSortingStrategy, i as useSortable, n as arrayMove, r as horizontalListSortingStrategy, t as SortableContext } from "../_libs/dnd-kit__sortable.mjs";
22
- //#region node_modules/.nitro/vite/services/ssr/assets/routes-CRDrPu8Q.js
25
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-CmLc8G9G.js
23
26
  var import_react = /* @__PURE__ */ __toESM(require_react());
24
27
  var import_jsx_runtime = require_jsx_runtime();
25
28
  var MOBILE_BREAKPOINT = 768;
@@ -8547,26 +8550,9 @@ function applyCompletionItem({ value, query, item }) {
8547
8550
  selectionEnd: selection
8548
8551
  };
8549
8552
  }
8550
- function Collapsible$1({ ...props }) {
8551
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleRoot, {
8552
- "data-slot": "collapsible",
8553
- ...props
8554
- });
8555
- }
8556
- function CollapsibleTrigger({ ...props }) {
8557
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleTrigger$1, {
8558
- "data-slot": "collapsible-trigger",
8559
- ...props
8560
- });
8561
- }
8562
- function CollapsibleContent({ ...props }) {
8563
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsiblePanel, {
8564
- "data-slot": "collapsible-content",
8565
- ...props
8566
- });
8567
- }
8568
8553
  var highlightCache = /* @__PURE__ */ new Map();
8569
8554
  var MemoizedReactMarkdown = import_react.memo(Markdown);
8555
+ var MARKDOWN_REHYPE_PLUGINS = [rehypeRaw, [rehypeSanitize, defaultSchema]];
8570
8556
  var MARKDOWN_REMARK_PLUGINS = [remarkGfm];
8571
8557
  var MarkdownRenderingContext = import_react.createContext({ streaming: false });
8572
8558
  function MarkdownAnchor({ children, href, node: _node, ...props }) {
@@ -8850,6 +8836,7 @@ var MarkdownBlock = import_react.memo(function MarkdownBlock({ streaming = false
8850
8836
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8851
8837
  className: "prose prose-sm max-w-none wrap-break-word dark:prose-invert prose-headings:font-semibold prose-p:my-2 prose-pre:m-0 prose-ol:my-2 prose-ul:my-2",
8852
8838
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MemoizedReactMarkdown, {
8839
+ rehypePlugins: MARKDOWN_REHYPE_PLUGINS,
8853
8840
  remarkPlugins: MARKDOWN_REMARK_PLUGINS,
8854
8841
  components: MARKDOWN_COMPONENTS,
8855
8842
  children: text
@@ -8857,6 +8844,24 @@ var MarkdownBlock = import_react.memo(function MarkdownBlock({ streaming = false
8857
8844
  })
8858
8845
  });
8859
8846
  });
8847
+ function Collapsible$1({ ...props }) {
8848
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleRoot, {
8849
+ "data-slot": "collapsible",
8850
+ ...props
8851
+ });
8852
+ }
8853
+ function CollapsibleTrigger({ ...props }) {
8854
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleTrigger$1, {
8855
+ "data-slot": "collapsible-trigger",
8856
+ ...props
8857
+ });
8858
+ }
8859
+ function CollapsibleContent({ ...props }) {
8860
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsiblePanel, {
8861
+ "data-slot": "collapsible-content",
8862
+ ...props
8863
+ });
8864
+ }
8860
8865
  function promptImageKey(image) {
8861
8866
  return `${image.previewUrl}:${image.data.slice(0, 24)}`;
8862
8867
  }
@@ -10111,7 +10116,7 @@ function ToolBlockCardContent({ blockKey, header, store }) {
10111
10116
  className: "truncate font-medium whitespace-nowrap text-foreground",
10112
10117
  children: toolDisplayName(header.name)
10113
10118
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
10114
- className: "truncate text-muted-foreground",
10119
+ className: cn("truncate text-muted-foreground", header.name === "write" && "tabular-nums"),
10115
10120
  children: header.summary
10116
10121
  })]
10117
10122
  }),
@@ -13104,6 +13109,65 @@ function ContextMenuSeparator({ className, ...props }) {
13104
13109
  ...props
13105
13110
  });
13106
13111
  }
13112
+ var toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
13113
+ variants: {
13114
+ variant: {
13115
+ default: "bg-transparent",
13116
+ outline: "border border-input bg-transparent hover:bg-muted"
13117
+ },
13118
+ size: {
13119
+ default: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
13120
+ sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
13121
+ lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
13122
+ }
13123
+ },
13124
+ defaultVariants: {
13125
+ variant: "default",
13126
+ size: "default"
13127
+ }
13128
+ });
13129
+ var ToggleGroupContext = import_react.createContext({
13130
+ size: "default",
13131
+ variant: "default",
13132
+ spacing: 0,
13133
+ orientation: "horizontal"
13134
+ });
13135
+ function ToggleGroup$1({ className, variant, size, spacing = 0, orientation = "horizontal", children, ...props }) {
13136
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup, {
13137
+ "data-slot": "toggle-group",
13138
+ "data-variant": variant,
13139
+ "data-size": size,
13140
+ "data-spacing": spacing,
13141
+ "data-orientation": orientation,
13142
+ style: { "--gap": spacing },
13143
+ className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch", className),
13144
+ ...props,
13145
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupContext.Provider, {
13146
+ value: {
13147
+ variant,
13148
+ size,
13149
+ spacing,
13150
+ orientation
13151
+ },
13152
+ children
13153
+ })
13154
+ });
13155
+ }
13156
+ function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
13157
+ const context = import_react.useContext(ToggleGroupContext);
13158
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toggle, {
13159
+ "data-slot": "toggle-group-item",
13160
+ "data-variant": context.variant || variant,
13161
+ "data-size": context.size || size,
13162
+ "data-spacing": context.spacing,
13163
+ className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
13164
+ variant: context.variant || variant,
13165
+ size: context.size || size
13166
+ }), className),
13167
+ ...props,
13168
+ children
13169
+ });
13170
+ }
13107
13171
  function GitSectionNote({ children, tone = "muted", className }) {
13108
13172
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13109
13173
  className: cn("flex min-h-8 items-center gap-2 text-sm leading-6", tone === "destructive" ? "text-destructive" : "text-muted-foreground", className),
@@ -13135,6 +13199,8 @@ var CODE_LANGUAGE_BY_EXTENSION = {
13135
13199
  js: "javascript",
13136
13200
  jsx: "jsx",
13137
13201
  json: "json",
13202
+ markdown: "markdown",
13203
+ md: "markdown",
13138
13204
  jsonc: "jsonc",
13139
13205
  mjs: "javascript",
13140
13206
  mdx: "mdx",
@@ -13146,11 +13212,18 @@ var CODE_LANGUAGE_BY_EXTENSION = {
13146
13212
  yaml: "yaml",
13147
13213
  yml: "yaml"
13148
13214
  };
13215
+ function fileExtensionFromPath(path) {
13216
+ return (path.split(/[?#]/)[0] || "").match(/\.([A-Za-z0-9]+)$/)?.[1]?.toLowerCase();
13217
+ }
13149
13218
  function codeLanguageFromPath(path) {
13150
- const extension = (path.split(/[?#]/)[0] || "").match(/\.([A-Za-z0-9]+)$/)?.[1]?.toLowerCase();
13219
+ const extension = fileExtensionFromPath(path);
13151
13220
  if (!extension) return void 0;
13152
13221
  return CODE_LANGUAGE_BY_EXTENSION[extension];
13153
13222
  }
13223
+ function isMarkdownFilePath(path) {
13224
+ const extension = fileExtensionFromPath(path);
13225
+ return extension === "md" || extension === "markdown";
13226
+ }
13154
13227
  function hasHighlightHtml(payload) {
13155
13228
  return Boolean(payload && "html" in payload && payload.html);
13156
13229
  }
@@ -13464,10 +13537,14 @@ function ProjectFileContent({ viewerContextId, cwd, active, path }) {
13464
13537
  });
13465
13538
  const content = fileQuery.data?.content ?? "";
13466
13539
  const language = codeLanguageFromPath(path);
13540
+ const isMarkdownFile = isMarkdownFilePath(path);
13541
+ const [markdownViewModes, setMarkdownViewModes] = import_react.useState({});
13542
+ const markdownViewMode = isMarkdownFile ? markdownViewModes[path] || "preview" : "source";
13543
+ const showMarkdownPreview = isMarkdownFile && markdownViewMode === "preview";
13467
13544
  const [highlighted, setHighlighted] = import_react.useState(null);
13468
13545
  import_react.useEffect(() => {
13469
13546
  let cancelled = false;
13470
- if (!active || !content || !language) {
13547
+ if (!active || !content || !language || showMarkdownPreview) {
13471
13548
  setHighlighted(null);
13472
13549
  return;
13473
13550
  }
@@ -13486,33 +13563,63 @@ function ProjectFileContent({ viewerContextId, cwd, active, path }) {
13486
13563
  }, [
13487
13564
  active,
13488
13565
  content,
13489
- language
13566
+ language,
13567
+ showMarkdownPreview
13490
13568
  ]);
13491
13569
  if (!path) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13492
13570
  className: "flex h-full items-center justify-center p-6 text-center text-sm text-muted-foreground",
13493
13571
  children: "Select a file to preview it."
13494
13572
  });
13495
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13496
- className: "h-full min-h-0 overflow-auto bg-background",
13497
- children: fileQuery.isPending && !fileQuery.data ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13498
- className: "p-4",
13499
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(GitSectionNote, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), " Loading file…"] })
13500
- }) : fileQuery.error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13501
- className: "p-4",
13502
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitSectionNote, {
13503
- tone: "destructive",
13504
- children: getErrorMessage(fileQuery.error, "Failed to load file")
13505
- })
13506
- }) : hasHighlightHtml(highlighted) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
13507
- className: "m-0 min-h-full p-4 font-mono text-[13px] leading-5 whitespace-pre-wrap text-foreground",
13508
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
13509
- className: cn(language && `language-${language}`),
13510
- dangerouslySetInnerHTML: { __html: highlighted.html }
13573
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
13574
+ className: "flex h-full min-h-0 flex-col bg-background",
13575
+ children: [isMarkdownFile ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
13576
+ className: "flex shrink-0 items-center justify-between gap-3 border-b border-border/70 px-3 py-2",
13577
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13578
+ className: "truncate text-xs font-medium text-muted-foreground",
13579
+ children: "Markdown"
13580
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ToggleGroup$1, {
13581
+ variant: "outline",
13582
+ value: [markdownViewMode],
13583
+ onValueChange: (values) => {
13584
+ const value = values[0];
13585
+ if (value === "preview" || value === "source") setMarkdownViewModes((current) => ({
13586
+ ...current,
13587
+ [path]: value
13588
+ }));
13589
+ },
13590
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
13591
+ value: "preview",
13592
+ children: "Preview"
13593
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItem, {
13594
+ value: "source",
13595
+ children: "Source"
13596
+ })]
13597
+ })]
13598
+ }) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13599
+ className: "min-h-0 flex-1 overflow-auto",
13600
+ children: fileQuery.isPending && !fileQuery.data ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13601
+ className: "p-4",
13602
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(GitSectionNote, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}), " Loading file…"] })
13603
+ }) : fileQuery.error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13604
+ className: "p-4",
13605
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GitSectionNote, {
13606
+ tone: "destructive",
13607
+ children: getErrorMessage(fileQuery.error, "Failed to load file")
13608
+ })
13609
+ }) : showMarkdownPreview ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
13610
+ className: "min-h-full p-4 text-foreground",
13611
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownBlock, { text: content })
13612
+ }) : hasHighlightHtml(highlighted) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
13613
+ className: "m-0 min-h-full p-4 font-mono text-[13px] leading-5 whitespace-pre-wrap text-foreground",
13614
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
13615
+ className: cn(language && `language-${language}`),
13616
+ dangerouslySetInnerHTML: { __html: highlighted.html }
13617
+ })
13618
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
13619
+ className: "m-0 min-h-full p-4 font-mono text-[13px] leading-5 whitespace-pre-wrap text-foreground",
13620
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: content })
13511
13621
  })
13512
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
13513
- className: "m-0 min-h-full p-4 font-mono text-[13px] leading-5 whitespace-pre-wrap text-foreground",
13514
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: content })
13515
- })
13622
+ })]
13516
13623
  });
13517
13624
  }
13518
13625
  function FileViewerTabContent({ active, dragging = false, dragListeners, dragAttributes, index, onActiveFileChange, onActiveTabChange, onCloseAllFiles, onCloseFile, onCloseFilesToRight, onCloseOtherFiles, path, preview, tabCount }) {
@@ -14455,65 +14562,6 @@ function GitPanelToolbar({ viewerContextId, cwd, active }) {
14455
14562
  ]
14456
14563
  });
14457
14564
  }
14458
- var toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
14459
- variants: {
14460
- variant: {
14461
- default: "bg-transparent",
14462
- outline: "border border-input bg-transparent hover:bg-muted"
14463
- },
14464
- size: {
14465
- default: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
14466
- sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
14467
- lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
14468
- }
14469
- },
14470
- defaultVariants: {
14471
- variant: "default",
14472
- size: "default"
14473
- }
14474
- });
14475
- var ToggleGroupContext = import_react.createContext({
14476
- size: "default",
14477
- variant: "default",
14478
- spacing: 0,
14479
- orientation: "horizontal"
14480
- });
14481
- function ToggleGroup$1({ className, variant, size, spacing = 0, orientation = "horizontal", children, ...props }) {
14482
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroup, {
14483
- "data-slot": "toggle-group",
14484
- "data-variant": variant,
14485
- "data-size": size,
14486
- "data-spacing": spacing,
14487
- "data-orientation": orientation,
14488
- style: { "--gap": spacing },
14489
- className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch", className),
14490
- ...props,
14491
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupContext.Provider, {
14492
- value: {
14493
- variant,
14494
- size,
14495
- spacing,
14496
- orientation
14497
- },
14498
- children
14499
- })
14500
- });
14501
- }
14502
- function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
14503
- const context = import_react.useContext(ToggleGroupContext);
14504
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Toggle, {
14505
- "data-slot": "toggle-group-item",
14506
- "data-variant": context.variant || variant,
14507
- "data-size": context.size || size,
14508
- "data-spacing": context.spacing,
14509
- className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
14510
- variant: context.variant || variant,
14511
- size: context.size || size
14512
- }), className),
14513
- ...props,
14514
- children
14515
- });
14516
- }
14517
14565
  function GitSection({ title, meta, controls, className, bodyClassName, children }) {
14518
14566
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
14519
14567
  className: cn("overflow-hidden rounded-xl border border-border/80 bg-card/50", className),
@@ -15501,21 +15549,18 @@ function ReviewFileAccordionItem({ viewerContextId, cwd, active, diffStyle, file
15501
15549
  className: "pointer-events-none hidden size-4 shrink-0 group-aria-expanded/review-file-trigger:inline"
15502
15550
  })
15503
15551
  ]
15504
- }), onOpenFile ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleTooltip, {
15552
+ }), onOpenFile ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
15553
+ type: "button",
15554
+ variant: "ghost",
15555
+ size: "icon-xs",
15556
+ "aria-label": `Open ${file.path}`,
15505
15557
  title: "Open file",
15506
- side: "top",
15507
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
15508
- type: "button",
15509
- variant: "ghost",
15510
- size: "icon-xs",
15511
- "aria-label": `Open ${file.path}`,
15512
- className: "mr-2 self-center",
15513
- onClick: (event) => {
15514
- event.stopPropagation();
15515
- onOpenFile(file.path, { pin: true });
15516
- },
15517
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SquareArrowOutUpRight, { className: "size-3.5" })
15518
- })
15558
+ className: "mr-2 self-center",
15559
+ onClick: (event) => {
15560
+ event.stopPropagation();
15561
+ onOpenFile(file.path, { pin: true });
15562
+ },
15563
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SquareArrowOutUpRight, { className: "size-3.5" })
15519
15564
  }) : null]
15520
15565
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
15521
15566
  className: "bg-background p-0",
@@ -16278,18 +16323,14 @@ var AppShellSessionHeader = import_react.memo(function AppShellSessionHeader({ a
16278
16323
  }), { compare: shallowRecordEqual });
16279
16324
  const hideToolBlocks = useSelector(displaySettingsStore, (settings) => settings.hideToolBlocks);
16280
16325
  const { isMobile: sidebarIsMobile, openMobile: sidebarOpenMobile, state: sidebarState } = useSidebar();
16281
- const sidebarOpen = sidebarIsMobile ? sidebarOpenMobile : sidebarState === "expanded";
16282
- const showCollapsedNewSessionButton = !sidebarOpen;
16326
+ const showCollapsedNewSessionButton = !(sidebarIsMobile ? sidebarOpenMobile : sidebarState === "expanded");
16283
16327
  const displaySessionTitle = isSessionViewLoading ? loadingDisplaySessionTitle : getCurrentSessionTitleFromState(sessionHeaderState);
16284
16328
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
16285
16329
  className: "sticky top-0 z-50 flex h-[var(--header-height)] w-full shrink-0 items-center border-b border-border/70 bg-background p-2",
16286
16330
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
16287
16331
  className: "relative flex w-full items-center gap-1",
16288
16332
  children: [
16289
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, {
16290
- variant: sidebarOpen ? "secondary" : "ghost",
16291
- className: "shrink-0"
16292
- }),
16333
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarTrigger, { className: "shrink-0" }),
16293
16334
  showCollapsedNewSessionButton ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleTooltip, {
16294
16335
  title: defaultNewSessionDirectory ? `Create a new session in ${formatDisplayPath$1(defaultNewSessionDirectory)}` : "Create a new session",
16295
16336
  kbd: formatShortcutLabel("Control+N"),
@@ -16439,7 +16480,7 @@ var AppShellSessionHeader = import_react.memo(function AppShellSessionHeader({ a
16439
16480
  kbd: formatShortcutLabel("Control+\\"),
16440
16481
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
16441
16482
  size: "icon",
16442
- variant: gitPanelOpen ? "secondary" : "ghost",
16483
+ variant: "ghost",
16443
16484
  className: "hidden md:inline-flex",
16444
16485
  "aria-pressed": gitPanelOpen,
16445
16486
  "aria-label": "Toggle right sidebar",
@@ -16902,7 +16943,7 @@ var DirectorySessionGroup = import_react.memo(function DirectorySessionGroup({ d
16902
16943
  const showHeaderLoadingSpinner = showLoadingSpinner && unpinnedSessionKeys.length === 0 && collapsed;
16903
16944
  const hasDirectoryActions = !overlay && Boolean(onCreateSessionInDirectory || onDeleteOldSessionsInDirectory || onRemoveDirectory);
16904
16945
  const directoryHeader = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
16905
- className: "flex items-center gap-2 rounded-lg px-2",
16946
+ className: "flex items-center gap-2 rounded-lg",
16906
16947
  children: [
16907
16948
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CollapsibleTrigger, {
16908
16949
  type: "button",
@@ -16916,7 +16957,7 @@ var DirectorySessionGroup = import_react.memo(function DirectorySessionGroup({ d
16916
16957
  className: "max-w-full min-w-0",
16917
16958
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectoryPathLabel, { path: directory })
16918
16959
  }),
16919
- !searchActive ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRight, { className: "size-4 shrink-0 opacity-0 transition-opacity group-hover/directory-label:opacity-100 group-focus-visible/directory-label:opacity-100" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: "size-4 shrink-0 opacity-0 transition-opacity group-hover/directory-label:opacity-100 group-focus-visible/directory-label:opacity-100" }) : null,
16960
+ !searchActive && !overlay ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRight, { className: "size-4 shrink-0 opacity-0 transition-opacity group-hover/directory-label:opacity-100 group-focus-visible/directory-label:opacity-100" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: "size-4 shrink-0 opacity-0 transition-opacity group-hover/directory-label:opacity-100 group-focus-visible/directory-label:opacity-100" }) : null,
16920
16961
  showHeaderLoadingSpinner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, { className: "size-3.5 shrink-0" }) : null
16921
16962
  ]
16922
16963
  }),
@@ -16965,7 +17006,7 @@ var DirectorySessionGroup = import_react.memo(function DirectorySessionGroup({ d
16965
17006
  if (searchActive || overlay) return;
16966
17007
  collapsedDirectoryStore.setCollapsed(directory, !open);
16967
17008
  },
16968
- className: cn("rounded-lg py-1", isDragging && !overlay && "opacity-0"),
17009
+ className: cn("rounded-lg py-1", overlay && "bg-sidebar shadow-lg ring-1 ring-sidebar-border/70", isDragging && !overlay && "opacity-0"),
16969
17010
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarGroup, {
16970
17011
  className: "py-0",
16971
17012
  children: [hasDirectoryActions && !isMobile ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ContextMenu$1, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContextMenuTrigger, { render: directoryHeader }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ContextMenuContent, {
@@ -16985,7 +17026,7 @@ var DirectorySessionGroup = import_react.memo(function DirectorySessionGroup({ d
16985
17026
  children: "Remove from sidebar"
16986
17027
  }) : null
16987
17028
  ]
16988
- })] }) : directoryHeader, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupContent, { children: showLoadingState ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
17029
+ })] }) : directoryHeader, !overlay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarGroupContent, { children: showLoadingState ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
16989
17030
  className: "flex items-center gap-2 px-2 py-2 text-sm text-sidebar-foreground/70",
16990
17031
  children: [showLoadingSpinner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
16991
17032
  className: "size-4",
@@ -17006,7 +17047,7 @@ var DirectorySessionGroup = import_react.memo(function DirectorySessionGroup({ d
17006
17047
  onRenameSession,
17007
17048
  onDeleteSession,
17008
17049
  onTogglePinnedSession
17009
- }, entryKey)) }), hasMoreSessions && !overlay ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
17050
+ }, entryKey)) }), hasMoreSessions ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button$1, {
17010
17051
  variant: "ghost",
17011
17052
  className: "h-8 justify-start pl-8 text-sidebar-foreground/60 hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground",
17012
17053
  onClick: () => {
@@ -17023,7 +17064,7 @@ var DirectorySessionGroup = import_react.memo(function DirectorySessionGroup({ d
17023
17064
  }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
17024
17065
  className: "px-2 py-2 text-sm text-sidebar-foreground/70",
17025
17066
  children: searchActive ? "No matching unpinned sessions." : "No unpinned sessions."
17026
- }) }) })]
17067
+ }) }) }) : null]
17027
17068
  })
17028
17069
  });
17029
17070
  });
@@ -17088,29 +17129,32 @@ function DirectoryCollapseAllButton({ searchActive, visibleDirectories, collapse
17088
17129
  function AppSidebarHeader({ onOpenSessionsDialog, onCreateSession }) {
17089
17130
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarHeader, {
17090
17131
  className: "gap-2 border-b border-sidebar-border/70",
17091
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenu, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17092
- type: "button",
17093
- onClick: onOpenSessionsDialog,
17094
- children: [
17095
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Search, {}),
17096
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Search sessions..." }),
17097
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17098
- className: "ml-auto hidden items-center md:flex",
17099
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+S") })
17100
- })
17101
- ]
17102
- }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17103
- type: "button",
17104
- onClick: onCreateSession,
17105
- children: [
17106
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SquarePen, {}),
17107
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "New session" }),
17108
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17109
- className: "ml-auto hidden items-center md:flex",
17110
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+N") })
17111
- })
17112
- ]
17113
- }) })] })
17132
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenu, {
17133
+ className: "gap-1",
17134
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17135
+ type: "button",
17136
+ onClick: onOpenSessionsDialog,
17137
+ children: [
17138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Search, {}),
17139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Search sessions..." }),
17140
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17141
+ className: "ml-auto hidden items-center md:flex",
17142
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+S") })
17143
+ })
17144
+ ]
17145
+ }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17146
+ type: "button",
17147
+ onClick: onCreateSession,
17148
+ children: [
17149
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SquarePen, {}),
17150
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "New session" }),
17151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17152
+ className: "ml-auto hidden items-center md:flex",
17153
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+N") })
17154
+ })
17155
+ ]
17156
+ }) })]
17157
+ })
17114
17158
  });
17115
17159
  }
17116
17160
  function AppSidebarDirectoriesHeader({ sessionSearch, visibleDirectories, matchingSessionCount, collapsed, collapsedDirectoryStore, onOpenAddDirectoryDialog }) {
@@ -17340,29 +17384,32 @@ function AppSidebar({ sessionSearch, onOpenSessionsDialog, visibleDirectories, d
17340
17384
  })] }),
17341
17385
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarFooter, {
17342
17386
  className: "gap-2 border-t border-sidebar-border/70",
17343
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenu, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17344
- type: "button",
17345
- onClick: onOpenCommandPalette,
17346
- children: [
17347
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Command, {}),
17348
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Commands" }),
17349
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17350
- className: "ml-auto hidden items-center md:flex",
17351
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+K") })
17352
- })
17353
- ]
17354
- }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17355
- type: "button",
17356
- onClick: onOpenSettings,
17357
- children: [
17358
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Settings2, {}),
17359
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Settings" }),
17360
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17361
- className: "ml-auto hidden items-center md:flex",
17362
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+,") })
17363
- })
17364
- ]
17365
- }) })] })
17387
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenu, {
17388
+ className: "gap-1",
17389
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17390
+ type: "button",
17391
+ onClick: onOpenCommandPalette,
17392
+ children: [
17393
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Command, {}),
17394
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Commands" }),
17395
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17396
+ className: "ml-auto hidden items-center md:flex",
17397
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+K") })
17398
+ })
17399
+ ]
17400
+ }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SidebarMenuButton, {
17401
+ type: "button",
17402
+ onClick: onOpenSettings,
17403
+ children: [
17404
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Settings2, {}),
17405
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Settings" }),
17406
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
17407
+ className: "ml-auto hidden items-center md:flex",
17408
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Kbd, { children: formatShortcutLabel("Control+,") })
17409
+ })
17410
+ ]
17411
+ }) })]
17412
+ })
17366
17413
  }),
17367
17414
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarRail, {})
17368
17415
  ]
@@ -5,7 +5,7 @@ import { n as clsx } from "../_libs/class-variance-authority+clsx.mjs";
5
5
  import { t as twMerge } from "../_libs/tailwind-merge.mjs";
6
6
  import { B as ArrowDown, I as ArrowUp, M as ChevronUp, O as Command, R as ArrowRight, V as ArrowBigUp, m as Option, z as ArrowLeft } from "../_libs/lucide-react.mjs";
7
7
  import { n as string, t as object } from "../_libs/zod.mjs";
8
- //#region node_modules/.nitro/vite/services/ssr/assets/routes-B99MXwvx.js
8
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-D2MVUd_A.js
9
9
  var import_react = /* @__PURE__ */ __toESM(require_react());
10
10
  var import_jsx_runtime = require_jsx_runtime();
11
11
  function cn(...inputs) {
@@ -1279,7 +1279,7 @@ function getSessionTitle(summary) {
1279
1279
  if (summary?.name?.trim()) return summary.name.trim();
1280
1280
  return "New session";
1281
1281
  }
1282
- var $$splitComponentImporter = () => import("./routes-CRDrPu8Q.mjs");
1282
+ var $$splitComponentImporter = () => import("./routes-CmLc8G9G.mjs");
1283
1283
  var indexSearchSchema = object({ session: string().optional() });
1284
1284
  var Route = createFileRoute("/")({
1285
1285
  validateSearch: indexSearchSchema,