@laoyuehanni/dsh-git-worktree 0.4.2 → 0.4.3-dsh-0.1.2-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -8,7 +8,6 @@ window.__ModuleLoader__.load({
8
8
  let react_dom = require("react-dom");
9
9
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
10
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
- let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
12
11
  //#region src/normalize.ts
13
12
  /**
14
13
  * Local branch name for a display name: strip the leading `<remote>/` segment
@@ -242,8 +241,8 @@ window.__ModuleLoader__.load({
242
241
  return post(ROUTE_ENSURE_DIRECTORY, { path });
243
242
  }
244
243
  //#endregion
245
- //#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\BranchChip.module.css?inline
246
- const css$3 = "/* Branch chip row inside the composer tool row (conversation.input_2006230319.left_2006230319,\n * right of the mode chips). Modeled as a single rounded-rectangle\n * segmented control: the branch picker and the worktree toggle share one\n * container with a thin divider between them, so they read as one\n * affordance instead of two loose buttons.\n *\n * Geometry mirrors the composer trigger chips in the DSH base (see\n * PermissionSelect / ModelSelect): 28px height, 13/20 medium-secondary\n * label, transparent fill, no outline 鈥?the dock stays at the same\n * visual weight as the surrounding chips (dsh-worktree select, standard\n * mode select, Workspace Write, MiniMax-M3 High). The corners stop short\n * of the base's full pill (24px) so the silhouette stays a chip rather\n * than a capsule, per the design brief. */\n\n/* Shared trigger geometry 鈥?copied 1:1 from the base composer triggers\n * (PermissionSelect .trigger_2006230319 / ModelSelect .trigger_2006230319). Centralizing here\n * keeps the two segments visually fused so the divider reads as part of\n * one component, not two loose buttons. */\n.dock_2006230319 {\n display: inline-flex;\n align-items: stretch;\n height: 28px;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #81858c);\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n min-height: 28px;\n overflow: hidden;\n}\n\n/* Vertical separator between the two segments. Uses the secondary label\n * color so it stays in the same tonal family as the surrounding trigger\n * outlines and chevrons. */\n.divider_2006230319 {\n width: 1px;\n margin: 6px 0;\n background: color-mix(in srgb, currentColor 22%, transparent);\n flex-shrink: 0;\n}\n\n.chip_2006230319 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n padding: 0 8px 0 8px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n}\n\n.chip_2006230319:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The leftmost segment rounds only its left corners so it tucks into the dock. */\n.chip_2006230319:first-child {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n}\n\n/* Started sessions drop the worktree segment: the lone chip rounds all\n * corners and reads as a plain button, not a broken-off half control. */\n.chip_2006230319:only-child {\n border-radius: 6px;\n}\n\n.branch_2006230319 {\n max-width: 16em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.check_2006230319,\n.checkOn_2006230319 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n padding: 0 4px 0 8px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n}\n\n.check_2006230319:hover,\n.checkOn_2006230319:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The rightmost segment rounds only its right corners. */\n.check_2006230319:last-child,\n.checkOn_2006230319:last-child {\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n}\n\n.box_2006230319 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border: 1px solid color-mix(in srgb, currentColor 45%, transparent);\n border-radius: 4px;\n}\n\n/* Selected worktree: only the checkbox itself turns bluish and fills 鈥?the\n * surrounding button stays transparent so the label keeps the same\n * secondary tone. Mirrors the Claude Code toggle treatment. The inner\n * check rides the bluish fill with an inverted foreground token so the\n * glyph stays legible. */\n.checkOn_2006230319 .box_2006230319 {\n border-color: var(--dsw-alias-label-primary-bluish, #4186f0);\n background: var(--dsw-alias-label-primary-bluish, #4186f0);\n color: var(--dsw-alias-label-primary-foreground, #ffffff);\n}\n\n.checkLabel_2006230319 {\n white-space: nowrap;\n}\n\n/* Confirm flyout: the second-level panel opening right of the branch\n * card (the base Menu's submenu posture: r12, inverted hairline,\n * shadow-lv3, --dsw-specific-menu). Width is content-driven — it follows\n * the longest line (for remote picks that is the subject line's branch\n * name) — floored at 168px (the Cancel/Confirm pair plus padding: short\n * branch names must not squeeze the buttons into wrapping \"切换中…\"\n * mid-word) and capped at 400px; BranchMenu also clamps it inline to the\n * room right of the card. Beyond the cap the lines wrap. border-box so\n * every width arm includes the card chrome. */\n.popCard_2006230319 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n width: max-content;\n min-width: 168px;\n max-width: min(400px, 80vw);\n padding: 4px;\n border: 1px solid var(--dsw-alias-border-inverted);\n border-radius: 12px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n box-shadow: var(--dsw-shadow-lv3);\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.popAsk_2006230319 {\n margin: 0;\n padding: 6px 8px;\n font-size: 13px;\n line-height: 20px;\n color: inherit;\n /* Branch names are long unbroken tokens — plain wrapping would let them\n * overflow the capped card instead of breaking. */\n overflow-wrap: anywhere;\n}\n\n/* Remote confirm's name line: the branch itself, weight 500 like the leaf\n * rows — the subject the ask line refers to (\"该远程分支\"). A dedicated\n * line keeps the long unbroken token away from the sentence, so wraps\n * happen inside the name instead of shredding the Chinese around it. */\n.popSubject_2006230319 {\n margin: 0;\n padding: 0 8px 2px;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n.popActions_2006230319 {\n display: flex;\n gap: 2px;\n padding: 2px;\n}\n\n/* Menu-row-like buttons: transparent fill, hover tint, same 13px type.\n * nowrap keeps labels like 切换中… from splitting mid-word when the flyout\n * is pinned to its minimum width by a short branch name. */\n.popActions_2006230319 button {\n flex: 1 1 0;\n height: 28px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.popActions_2006230319 button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.popActions_2006230319 button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.popActions_2006230319 button:last-child {\n color: var(--dsw-alias-label-primary-bluish, #4186f0);\n font-weight: 500;\n}\n\n/* ── Branch picker popup (BranchMenu) ──────────────────────────────\n * Upward-opening card pinned above the chip, in the Menu's card chrome\n * (r12, inverted hairline, shadow-lv3, --dsw-specific-menu — same family\n * as .popCard_2006230319). Three owner requirements shape the geometry:\n *\n * 1. height cap: min(420px, 60vh) on the card, only the rows area\n * scrolls (.menuRows_2006230319) — heading and search stay pinned;\n * 2. the search field sits pinned at the card's bottom edge, directly\n * above the chip, with the scrolling rows above it;\n * 3. the card is CSS-`bottom`-pinned ~6px above the chip's top and so\n * grows entirely upward — it can never cover the composer or fill\n * the viewport, whatever the branch count.\n *\n * The inline `left`/`bottom` come from BranchMenu's placement pass; the\n * width is fixed here (design 360px — 320 tree + 40 tool strip — and\n * viewport-capped) so horizontal clamping stays deterministic without\n * measuring the card. */\n\n/* The portal lands directly under document.body_2006230319, outside the shell's\n * box-sizing reset — content-box default would add padding/border on top\n * of the declared width (360 became 370, and the width:100% children\n * padded 16px past the card's right clip, shearing off their rounded\n * corners). Every width-declared box in this popup opts back into\n * border-box: the card, the toolbar, the rows, and the search input. */\n.menuCard_2006230319 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n display: flex;\n flex-direction: row;\n width: min(360px, calc(100vw - 24px));\n max-height: min(420px, 60vh);\n overflow: hidden;\n padding: 4px;\n border: 1px solid var(--dsw-alias-border-inverted);\n border-radius: 12px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n box-shadow: var(--dsw-shadow-lv3);\n}\n\n/* Left tool strip (IDEA branch-panel posture at popup scale): a narrow\n * column of icon-only buttons for actions that do not belong in the tree\n * — locate the checked-out branch, expand/collapse the whole tree.\n * Buttons stack from the BOTTOM up: the card's height shrinks when the\n * repo has few branches, so a top-anchored strip would drift around and\n * the buttons would sit far from the search bar; anchoring to the bottom\n * pins them at a stable spot (beside the search row) whatever the height. */\n.menuToolbar_2006230319 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 2px;\n flex-shrink: 0;\n width: 32px;\n padding: 0 2px;\n margin-right: 4px;\n border-right: 1px solid color-mix(in srgb, currentColor 12%, transparent);\n}\n\n.menuToolButton_2006230319 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n margin: 0 auto;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n.menuToolButton_2006230319:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n.menuToolButton_2006230319:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n/* The sync tools while their action runs: a soft opacity pulse. The glyph\n * is a directional arrow, so the circular-refresh spin read as garbled\n * rotation — pulsing keeps the arrow legible while clearly \"live\", and the\n * button keeps full opacity (the usual disabled dim would read as broken\n * for an in-flight network operation). */\n.menuToolButtonRunning_2006230319 svg {\n animation: menuToolPulse 700ms ease-in-out infinite alternate;\n}\n\n.menuToolButtonRunning_2006230319:disabled {\n opacity: 1;\n cursor: progress;\n}\n\n@keyframes menuToolPulse {\n from { opacity: 1; }\n to { opacity: 0.25; }\n}\n\n/* The main column: heading + scrollable rows + pinned search. */\n.menuMain_2006230319 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n/* Non-interactive group heading — the Menu label row's posture. */\n.menuHeading_2006230319 {\n padding: 6px 8px 4px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #81858c);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n}\n\n/* The only scrollable region: shrinks within the capped card so the\n * heading above and the search below stay visible while rows scroll. */\n.menuRows_2006230319 {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n/* Menu-row-like buttons: transparent fill, hover tint, same 13px type.\n * Weight 500 mirrors the chip's branch label (the portal escapes the\n * composer's font context, so the match must be explicit — the inherited\n * body weight is 400 and reads visibly lighter than the chip beside it). */\n.menuRow_2006230319 {\n box-sizing: border-box; /* width:100% + padding must stay inside .menuRows_2006230319 */\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n.menuRow_2006230319:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* Locked rows (a linked-worktree session answers every non-current pick\n * with the main-checkout toast): dimmed with a default cursor, but KEEP\n * the click path alive — no disabled attribute, the double-click is the\n * toast's stage. Hover stays quiet: nothing is on offer here. */\n.menuRowLocked_2006230319 {\n opacity: 0.45;\n cursor: default;\n}\n\n.menuRowLocked_2006230319:hover {\n background: transparent;\n}\n\n/* The checked-out branch: a persistent tint a step above the resting rows\n * so it reads as \"you are here\" the moment the list scrolls it into view\n * (BranchMenu centers it on open) — the trailing check alone is easy to\n * miss from a distance. */\n.menuRowSelected_2006230319,\n.menuRowSelected_2006230319:hover:not(:disabled) {\n background: color-mix(in srgb, currentColor 10%, transparent);\n}\n\n/* IDEA-style selection: the clicked row gets a bluish fill, layering over\n * the HEAD tint when the same row is both — selection communicates intent,\n * the HEAD tint communicates position, and they coexist (IDEA 4.4). */\n.menuRowPicked_2006230319,\n.menuRowPicked_2006230319:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-label-primary-bluish, #4186f0) 18%, transparent);\n}\n\n.menuRowLabel_2006230319 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Upstream divergence arrows (↑N/↓N) trailing a local branch row, before\n * the HEAD check: the count badge tone at a smaller size so a busy list\n * still reads the name first. Plain text arrows — no base-set icon pairs\n * a direction with a count. tabular-nums keeps ↑10 from nudging neighbors\n * as the digits tick. */\n.menuRowArrow_2006230319 {\n flex-shrink: 0;\n font-size: 11px;\n line-height: 20px;\n font-weight: 400;\n font-variant-numeric: tabular-nums;\n color: color-mix(in srgb, currentColor 55%, transparent);\n}\n\n/* Search hit highlight (IDEA): the matched substring gets a warm tint\n * behind it — theme-agnostic, legible in both light and dark cards. */\n.menuSearchMark_2006230319 {\n background: color-mix(in srgb, #b58900 38%, transparent);\n border-radius: 2px;\n}\n\n/* Tree group rows (folder headers) — BranchMenu's '/' prefix tree: the\n * same row geometry as .menuRow_2006230319, but labeled in the secondary tone so the\n * leaf rows pop, with a count badge and a chevron that turns on expand. */\n.menuGroup_2006230319 {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #81858c);\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n.menuGroup_2006230319:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The two top-level section headers (local/remote branches) step ABOVE the\n * folder headers they contain: primary label tone like the leaf rows plus\n * a heavier weight, so the nav hierarchy reads group > row > folder — the\n * folder headers keep the secondary tone that alone would leave the\n * sections as the faintest (and most important) rows on the list. */\n.menuGroupTop_2006230319 {\n color: inherit;\n font-weight: 600;\n}\n\n.menuGroupLabel_2006230319 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.menuGroupChevron_2006230319 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 12px;\n transition: transform 120ms ease;\n}\n\n.menuGroupChevronOpen_2006230319 {\n transform: rotate(90deg);\n}\n\n.menuGroupCount_2006230319 {\n flex-shrink: 0;\n font-size: 12px;\n line-height: 20px;\n font-weight: 400;\n color: color-mix(in srgb, currentColor 55%, transparent);\n}\n\n/* Zero-search-hit state: centered secondary line inside the rows area. */\n.menuEmpty_2006230319 {\n padding: 10px 8px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #81858c);\n text-align: center;\n}\n\n/* Bottom-pinned search field, separated from the rows by a hairline.\n * Borderless so it reads as part of the card, focus shown as the\n * standard hover tint rather than an outline. */\n.menuSearchWrap_2006230319 {\n flex-shrink: 0;\n margin-top: 2px;\n padding-top: 4px;\n border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);\n}\n\n.menuSearch_2006230319 {\n box-sizing: border-box; /* width:100% + padding must stay inside the wrap */\n width: 100%;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n /* Weight 500 mirrors the chip's branch label (see .menuRow_2006230319) — the portal\n * escapes the composer's font context and would inherit body's 400. */\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuSearch_2006230319::placeholder {\n color: var(--dsw-alias-label-secondary, #81858c);\n}\n\n.menuSearch_2006230319:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* ── New-branch create flyout (BranchMenu toolbar plus) ─────────────\n * Opens to the RIGHT of the card (the confirm flyout's posture) and holds\n * the whole flow in one panel: ask line, naming input, live hint, and the\n * Cancel/Create pair — typing the name and pressing Create fires the\n * create in one stroke, no second confirm step. */\n\n/* The toolbar plus in its active (flyout open) state: a bluish tint\n * layering the same way the picked row does, so the toggled state reads at\n * a glance. */\n.menuToolButtonOn_2006230319,\n.menuToolButtonOn_2006230319:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-label-primary-bluish, #4186f0) 18%, transparent);\n color: var(--dsw-alias-label-primary-bluish, #4186f0);\n}\n\n/* The naming input inside the flyout: borderless, part of the card, focus\n * shown as the standard hover tint. Fixed width — the popCard is\n * max-content, so a percentage width would chase the input's own default\n * size instead of the design width. */\n.menuCreate_2006230319 {\n box-sizing: border-box;\n width: 248px;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n /* Weight 500 mirrors the chip's branch label (see .menuSearch_2006230319). */\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuCreate_2006230319::placeholder {\n color: var(--dsw-alias-label-secondary, #81858c);\n}\n\n.menuCreate_2006230319:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n.menuCreate_2006230319:disabled {\n opacity: 0.5;\n}\n\n/* The error line under the input — only rendered while the draft is\n * unacceptable with a non-empty reason; the input itself stays neutral,\n * the line carries the state. */\n.menuCreateHintBad_2006230319 {\n margin: 0;\n padding: 0 8px;\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-error);\n}\n";
244
+ //#region \0git-worktree-css:C:\Users\OYW\.dsh\gitworktree\dsh-worktree-feature-0.1.2-alpha.5\src\client\BranchChip.module.css?inline
245
+ const css$3 = "/* Branch chip row inside the composer tool row (conversation.input_2098199083.left_2098199083,\n * right of the mode chips). Modeled as a single rounded-rectangle\n * segmented control: the branch picker and the worktree toggle share one\n * container with a thin divider between them, so they read as one\n * affordance instead of two loose buttons.\n *\n * Geometry mirrors the composer trigger chips in the DSH base (see\n * PermissionSelect / ModelSelect): 28px height, 13/20 medium-secondary\n * label, transparent fill, no outline 鈥?the dock stays at the same\n * visual weight as the surrounding chips (dsh-worktree select, standard\n * mode select, Workspace Write, MiniMax-M3 High). The corners stop short\n * of the base's full pill (24px) so the silhouette stays a chip rather\n * than a capsule, per the design brief. */\n\n/* Shared trigger geometry 鈥?copied 1:1 from the base composer triggers\n * (PermissionSelect .trigger_2098199083 / ModelSelect .trigger_2098199083). Centralizing here\n * keeps the two segments visually fused so the divider reads as part of\n * one component, not two loose buttons. */\n.dock_2098199083 {\n display: inline-flex;\n align-items: stretch;\n height: 28px;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #81858c);\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n min-height: 28px;\n overflow: hidden;\n}\n\n/* Vertical separator between the two segments. Uses the secondary label\n * color so it stays in the same tonal family as the surrounding trigger\n * outlines and chevrons. */\n.divider_2098199083 {\n width: 1px;\n margin: 6px 0;\n background: color-mix(in srgb, currentColor 22%, transparent);\n flex-shrink: 0;\n}\n\n.chip_2098199083 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n padding: 0 8px 0 8px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n}\n\n.chip_2098199083:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The leftmost segment rounds only its left corners so it tucks into the dock. */\n.chip_2098199083:first-child {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n}\n\n/* Started sessions drop the worktree segment: the lone chip rounds all\n * corners and reads as a plain button, not a broken-off half control. */\n.chip_2098199083:only-child {\n border-radius: 6px;\n}\n\n.branch_2098199083 {\n max-width: 16em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.check_2098199083,\n.checkOn_2098199083 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n padding: 0 4px 0 8px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n}\n\n.check_2098199083:hover,\n.checkOn_2098199083:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The rightmost segment rounds only its right corners. */\n.check_2098199083:last-child,\n.checkOn_2098199083:last-child {\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n}\n\n.box_2098199083 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border: 1px solid color-mix(in srgb, currentColor 45%, transparent);\n border-radius: 4px;\n}\n\n/* Selected worktree: only the checkbox itself turns bluish and fills 鈥?the\n * surrounding button stays transparent so the label keeps the same\n * secondary tone. Mirrors the Claude Code toggle treatment. The inner\n * check rides the bluish fill with an inverted foreground token so the\n * glyph stays legible. */\n.checkOn_2098199083 .box_2098199083 {\n border-color: var(--dsw-alias-label-primary-bluish, #4186f0);\n background: var(--dsw-alias-label-primary-bluish, #4186f0);\n color: var(--dsw-alias-label-primary-foreground, #ffffff);\n}\n\n.checkLabel_2098199083 {\n white-space: nowrap;\n}\n\n/* Confirm flyout: the second-level panel opening right of the branch\n * card (the base Menu's submenu posture: r20, elevation-prominent\n * hairline, --dsw-specific-menu — host alpha.4 Menu card; on alpha.3\n * hosts the missing token falls back to the old r12-era shadow-lv3).\n * Width is content-driven — it follows\n * the longest line (for remote picks that is the subject line's branch\n * name) — floored at 168px (the Cancel/Confirm pair plus padding: short\n * branch names must not squeeze the buttons into wrapping \"切换中…\"\n * mid-word) and capped at 400px; BranchMenu also clamps it inline to the\n * room right of the card. Beyond the cap the lines wrap. border-box so\n * every width arm includes the card chrome. */\n.popCard_2098199083 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n width: max-content;\n min-width: 168px;\n max-width: min(400px, 80vw);\n padding: 4px;\n border: 0;\n border-radius: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n /* Elevation-prominent carries the hairline stroke (host alpha.4); the\n * lv3 fallback keeps a shadow where the token does not exist. */\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.popAsk_2098199083 {\n margin: 0;\n padding: 6px 8px;\n font-size: 13px;\n line-height: 20px;\n color: inherit;\n /* Branch names are long unbroken tokens — plain wrapping would let them\n * overflow the capped card instead of breaking. */\n overflow-wrap: anywhere;\n}\n\n/* Remote confirm's name line: the branch itself, weight 500 like the leaf\n * rows — the subject the ask line refers to (\"该远程分支\"). A dedicated\n * line keeps the long unbroken token away from the sentence, so wraps\n * happen inside the name instead of shredding the Chinese around it. */\n.popSubject_2098199083 {\n margin: 0;\n padding: 0 8px 2px;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n.popActions_2098199083 {\n display: flex;\n gap: 2px;\n padding: 2px;\n}\n\n/* Menu-row-like buttons: transparent fill, hover tint, same 13px type.\n * nowrap keeps labels like 切换中… from splitting mid-word when the flyout\n * is pinned to its minimum width by a short branch name. */\n.popActions_2098199083 button {\n flex: 1 1 0;\n height: 28px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.popActions_2098199083 button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.popActions_2098199083 button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.popActions_2098199083 button:last-child {\n color: var(--dsw-alias-label-primary-bluish, #4186f0);\n font-weight: 500;\n}\n\n/* ── Branch picker popup (BranchMenu) ──────────────────────────────\n * Upward-opening card pinned above the chip, in the Menu's card chrome\n * (r12, inverted hairline, shadow-lv3, --dsw-specific-menu — same family\n * as .popCard_2098199083). Three owner requirements shape the geometry:\n *\n * 1. height cap: min(420px, 60vh) on the card, only the rows area\n * scrolls (.menuRows_2098199083) — heading and search stay pinned;\n * 2. the search field sits pinned at the card's bottom edge, directly\n * above the chip, with the scrolling rows above it;\n * 3. the card is CSS-`bottom`-pinned ~6px above the chip's top and so\n * grows entirely upward — it can never cover the composer or fill\n * the viewport, whatever the branch count.\n *\n * The inline `left`/`bottom` come from BranchMenu's placement pass; the\n * width is fixed here (design 360px — 320 tree + 40 tool strip — and\n * viewport-capped) so horizontal clamping stays deterministic without\n * measuring the card. */\n\n/* The portal lands directly under document.body_2098199083, outside the shell's\n * box-sizing reset — content-box default would add padding/border on top\n * of the declared width (360 became 370, and the width:100% children\n * padded 16px past the card's right clip, shearing off their rounded\n * corners). Every width-declared box in this popup opts back into\n * border-box: the card, the toolbar, the rows, and the search input. */\n.menuCard_2098199083 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n display: flex;\n flex-direction: row;\n width: min(360px, calc(100vw - 24px));\n max-height: min(420px, 60vh);\n overflow: hidden;\n padding: 4px;\n border: 0;\n border-radius: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n /* Same elevation card as .popCard_2098199083 (host alpha.4 Menu); lv3 fallback for\n * alpha.3 hosts. */\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n}\n\n/* Left tool strip (IDEA branch-panel posture at popup scale): a narrow\n * column of icon-only buttons for actions that do not belong in the tree\n * — locate the checked-out branch, expand/collapse the whole tree.\n * Buttons stack from the BOTTOM up: the card's height shrinks when the\n * repo has few branches, so a top-anchored strip would drift around and\n * the buttons would sit far from the search bar; anchoring to the bottom\n * pins them at a stable spot (beside the search row) whatever the height. */\n.menuToolbar_2098199083 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 2px;\n flex-shrink: 0;\n width: 32px;\n padding: 0 2px;\n margin-right: 4px;\n border-right: 0.5px solid color-mix(in srgb, currentColor 12%, transparent);\n}\n\n.menuToolButton_2098199083 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n margin: 0 auto;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n.menuToolButton_2098199083:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n.menuToolButton_2098199083:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n/* The sync tools while their action runs: a soft opacity pulse. The glyph\n * is a directional arrow, so the circular-refresh spin read as garbled\n * rotation — pulsing keeps the arrow legible while clearly \"live\", and the\n * button keeps full opacity (the usual disabled dim would read as broken\n * for an in-flight network operation). */\n.menuToolButtonRunning_2098199083 svg {\n animation: menuToolPulse 700ms ease-in-out infinite alternate;\n}\n\n.menuToolButtonRunning_2098199083:disabled {\n opacity: 1;\n cursor: progress;\n}\n\n@keyframes menuToolPulse {\n from { opacity: 1; }\n to { opacity: 0.25; }\n}\n\n/* The main column: heading + scrollable rows + pinned search. */\n.menuMain_2098199083 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n/* Non-interactive group heading — the Menu label row's posture. */\n.menuHeading_2098199083 {\n padding: 6px 8px 4px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #81858c);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n}\n\n/* The only scrollable region: shrinks within the capped card so the\n * heading above and the search below stay visible while rows scroll. */\n.menuRows_2098199083 {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n/* Menu-row-like buttons: transparent fill, hover tint, same 13px type.\n * Weight 500 mirrors the chip's branch label (the portal escapes the\n * composer's font context, so the match must be explicit — the inherited\n * body weight is 400 and reads visibly lighter than the chip beside it). */\n.menuRow_2098199083 {\n box-sizing: border-box; /* width:100% + padding must stay inside .menuRows_2098199083 */\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n.menuRow_2098199083:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* Locked rows (a linked-worktree session answers every non-current pick\n * with the main-checkout toast): dimmed with a default cursor, but KEEP\n * the click path alive — no disabled attribute, the double-click is the\n * toast's stage. Hover stays quiet: nothing is on offer here. */\n.menuRowLocked_2098199083 {\n opacity: 0.45;\n cursor: default;\n}\n\n.menuRowLocked_2098199083:hover {\n background: transparent;\n}\n\n/* The checked-out branch: a persistent tint a step above the resting rows\n * so it reads as \"you are here\" the moment the list scrolls it into view\n * (BranchMenu centers it on open) — the trailing check alone is easy to\n * miss from a distance. */\n.menuRowSelected_2098199083,\n.menuRowSelected_2098199083:hover:not(:disabled) {\n background: color-mix(in srgb, currentColor 10%, transparent);\n}\n\n/* IDEA-style selection: the clicked row gets a bluish fill, layering over\n * the HEAD tint when the same row is both — selection communicates intent,\n * the HEAD tint communicates position, and they coexist (IDEA 4.4). */\n.menuRowPicked_2098199083,\n.menuRowPicked_2098199083:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-label-primary-bluish, #4186f0) 18%, transparent);\n}\n\n.menuRowLabel_2098199083 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Upstream divergence arrows (↑N/↓N) trailing a local branch row, before\n * the HEAD check: the count badge tone at a smaller size so a busy list\n * still reads the name first. Plain text arrows — no base-set icon pairs\n * a direction with a count. tabular-nums keeps ↑10 from nudging neighbors\n * as the digits tick. */\n.menuRowArrow_2098199083 {\n flex-shrink: 0;\n font-size: 11px;\n line-height: 20px;\n font-weight: 400;\n font-variant-numeric: tabular-nums;\n color: color-mix(in srgb, currentColor 55%, transparent);\n}\n\n/* Search hit highlight (IDEA): the matched substring gets a warm tint\n * behind it — theme-agnostic, legible in both light and dark cards. */\n.menuSearchMark_2098199083 {\n background: color-mix(in srgb, #b58900 38%, transparent);\n border-radius: 2px;\n}\n\n/* Tree group rows (folder headers) — BranchMenu's '/' prefix tree: the\n * same row geometry as .menuRow_2098199083, but labeled in the secondary tone so the\n * leaf rows pop, with a count badge and a chevron that turns on expand. */\n.menuGroup_2098199083 {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #81858c);\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n.menuGroup_2098199083:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The two top-level section headers (local/remote branches) step ABOVE the\n * folder headers they contain: primary label tone like the leaf rows plus\n * a heavier weight, so the nav hierarchy reads group > row > folder — the\n * folder headers keep the secondary tone that alone would leave the\n * sections as the faintest (and most important) rows on the list. */\n.menuGroupTop_2098199083 {\n color: inherit;\n font-weight: 600;\n}\n\n.menuGroupLabel_2098199083 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.menuGroupChevron_2098199083 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 12px;\n transition: transform 120ms ease;\n}\n\n.menuGroupChevronOpen_2098199083 {\n transform: rotate(90deg);\n}\n\n.menuGroupCount_2098199083 {\n flex-shrink: 0;\n font-size: 12px;\n line-height: 20px;\n font-weight: 400;\n color: color-mix(in srgb, currentColor 55%, transparent);\n}\n\n/* Zero-search-hit state: centered secondary line inside the rows area. */\n.menuEmpty_2098199083 {\n padding: 10px 8px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #81858c);\n text-align: center;\n}\n\n/* Bottom-pinned search field, separated from the rows by a hairline.\n * Borderless so it reads as part of the card, focus shown as the\n * standard hover tint rather than an outline. */\n.menuSearchWrap_2098199083 {\n flex-shrink: 0;\n margin-top: 2px;\n padding-top: 4px;\n border-top: 0.5px solid color-mix(in srgb, currentColor 12%, transparent);\n}\n\n.menuSearch_2098199083 {\n box-sizing: border-box; /* width:100% + padding must stay inside the wrap */\n width: 100%;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n /* Weight 500 mirrors the chip's branch label (see .menuRow_2098199083) — the portal\n * escapes the composer's font context and would inherit body's 400. */\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuSearch_2098199083::placeholder {\n color: var(--dsw-alias-label-secondary, #81858c);\n}\n\n.menuSearch_2098199083:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* ── New-branch create flyout (BranchMenu toolbar plus) ─────────────\n * Opens to the RIGHT of the card (the confirm flyout's posture) and holds\n * the whole flow in one panel: ask line, naming input, live hint, and the\n * Cancel/Create pair — typing the name and pressing Create fires the\n * create in one stroke, no second confirm step. */\n\n/* The toolbar plus in its active (flyout open) state: a bluish tint\n * layering the same way the picked row does, so the toggled state reads at\n * a glance. */\n.menuToolButtonOn_2098199083,\n.menuToolButtonOn_2098199083:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-label-primary-bluish, #4186f0) 18%, transparent);\n color: var(--dsw-alias-label-primary-bluish, #4186f0);\n}\n\n/* The naming input inside the flyout: borderless, part of the card, focus\n * shown as the standard hover tint. Fixed width — the popCard is\n * max-content, so a percentage width would chase the input's own default\n * size instead of the design width. */\n.menuCreate_2098199083 {\n box-sizing: border-box;\n width: 248px;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n /* Weight 500 mirrors the chip's branch label (see .menuSearch_2098199083). */\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuCreate_2098199083::placeholder {\n color: var(--dsw-alias-label-secondary, #81858c);\n}\n\n.menuCreate_2098199083:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n.menuCreate_2098199083:disabled {\n opacity: 0.5;\n}\n\n/* The error line under the input — only rendered while the draft is\n * unacceptable with a non-empty reason; the input itself stays neutral,\n * the line carries the state. */\n.menuCreateHintBad_2098199083 {\n margin: 0;\n padding: 0 8px;\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-error);\n}\n";
247
246
  const tagId$3 = "@laoyuehanni/dsh-git-worktree/BranchChip.module.css";
248
247
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$3 + "\"]") === null) {
249
248
  const tag = document.createElement("style");
@@ -253,48 +252,48 @@ window.__ModuleLoader__.load({
253
252
  document.head.appendChild(tag);
254
253
  }
255
254
  var BranchChip_module_default = {
256
- "input": "input_2006230319",
257
- "left": "left_2006230319",
258
- "trigger": "trigger_2006230319",
259
- "dock": "dock_2006230319",
260
- "divider": "divider_2006230319",
261
- "chip": "chip_2006230319",
262
- "branch": "branch_2006230319",
263
- "check": "check_2006230319",
264
- "checkOn": "checkOn_2006230319",
265
- "box": "box_2006230319",
266
- "checkLabel": "checkLabel_2006230319",
267
- "popCard": "popCard_2006230319",
268
- "popAsk": "popAsk_2006230319",
269
- "popSubject": "popSubject_2006230319",
270
- "popActions": "popActions_2006230319",
271
- "menuRows": "menuRows_2006230319",
272
- "body": "body_2006230319",
273
- "menuCard": "menuCard_2006230319",
274
- "menuToolbar": "menuToolbar_2006230319",
275
- "menuToolButton": "menuToolButton_2006230319",
276
- "menuToolButtonRunning": "menuToolButtonRunning_2006230319",
277
- "menuMain": "menuMain_2006230319",
278
- "menuHeading": "menuHeading_2006230319",
279
- "menuRow": "menuRow_2006230319",
280
- "menuRowLocked": "menuRowLocked_2006230319",
281
- "menuRowSelected": "menuRowSelected_2006230319",
282
- "menuRowPicked": "menuRowPicked_2006230319",
283
- "menuRowLabel": "menuRowLabel_2006230319",
284
- "menuRowArrow": "menuRowArrow_2006230319",
285
- "menuSearchMark": "menuSearchMark_2006230319",
286
- "menuGroup": "menuGroup_2006230319",
287
- "menuGroupTop": "menuGroupTop_2006230319",
288
- "menuGroupLabel": "menuGroupLabel_2006230319",
289
- "menuGroupChevron": "menuGroupChevron_2006230319",
290
- "menuGroupChevronOpen": "menuGroupChevronOpen_2006230319",
291
- "menuGroupCount": "menuGroupCount_2006230319",
292
- "menuEmpty": "menuEmpty_2006230319",
293
- "menuSearchWrap": "menuSearchWrap_2006230319",
294
- "menuSearch": "menuSearch_2006230319",
295
- "menuToolButtonOn": "menuToolButtonOn_2006230319",
296
- "menuCreate": "menuCreate_2006230319",
297
- "menuCreateHintBad": "menuCreateHintBad_2006230319"
255
+ "input": "input_2098199083",
256
+ "left": "left_2098199083",
257
+ "trigger": "trigger_2098199083",
258
+ "dock": "dock_2098199083",
259
+ "divider": "divider_2098199083",
260
+ "chip": "chip_2098199083",
261
+ "branch": "branch_2098199083",
262
+ "check": "check_2098199083",
263
+ "checkOn": "checkOn_2098199083",
264
+ "box": "box_2098199083",
265
+ "checkLabel": "checkLabel_2098199083",
266
+ "popCard": "popCard_2098199083",
267
+ "popAsk": "popAsk_2098199083",
268
+ "popSubject": "popSubject_2098199083",
269
+ "popActions": "popActions_2098199083",
270
+ "menuRows": "menuRows_2098199083",
271
+ "body": "body_2098199083",
272
+ "menuCard": "menuCard_2098199083",
273
+ "menuToolbar": "menuToolbar_2098199083",
274
+ "menuToolButton": "menuToolButton_2098199083",
275
+ "menuToolButtonRunning": "menuToolButtonRunning_2098199083",
276
+ "menuMain": "menuMain_2098199083",
277
+ "menuHeading": "menuHeading_2098199083",
278
+ "menuRow": "menuRow_2098199083",
279
+ "menuRowLocked": "menuRowLocked_2098199083",
280
+ "menuRowSelected": "menuRowSelected_2098199083",
281
+ "menuRowPicked": "menuRowPicked_2098199083",
282
+ "menuRowLabel": "menuRowLabel_2098199083",
283
+ "menuRowArrow": "menuRowArrow_2098199083",
284
+ "menuSearchMark": "menuSearchMark_2098199083",
285
+ "menuGroup": "menuGroup_2098199083",
286
+ "menuGroupTop": "menuGroupTop_2098199083",
287
+ "menuGroupLabel": "menuGroupLabel_2098199083",
288
+ "menuGroupChevron": "menuGroupChevron_2098199083",
289
+ "menuGroupChevronOpen": "menuGroupChevronOpen_2098199083",
290
+ "menuGroupCount": "menuGroupCount_2098199083",
291
+ "menuEmpty": "menuEmpty_2098199083",
292
+ "menuSearchWrap": "menuSearchWrap_2098199083",
293
+ "menuSearch": "menuSearch_2098199083",
294
+ "menuToolButtonOn": "menuToolButtonOn_2098199083",
295
+ "menuCreate": "menuCreate_2098199083",
296
+ "menuCreateHintBad": "menuCreateHintBad_2098199083"
298
297
  };
299
298
  //#endregion
300
299
  //#region src/client/BranchMenu.tsx
@@ -302,8 +301,9 @@ window.__ModuleLoader__.load({
302
301
  * BranchMenu: the branch picker popup anchored to the composer branch chip.
303
302
  * The base Menu primitive exposes neither a height cap nor a search field,
304
303
  * so with many branches its portal list fills the viewport — this popup
305
- * replaces it with an owner-styled card: Menu's card chrome (r12, inverted
306
- * hairline, shadow-lv3, --dsw-specific-menu, see .menuCard) on a
304
+ * replaces it with an owner-styled card: Menu's card chrome (r20,
305
+ * elevation-prominent hairline, --dsw-specific-menu, see .menuCard;
306
+ * alpha.3 hosts fall back to shadow-lv3) on a
307
307
  * portal-fixed posture, with owner requirements baked in:
308
308
  *
309
309
  * 1. the card is capped at min(420px, 60vh) and only the branch rows
@@ -1822,8 +1822,9 @@ window.__ModuleLoader__.load({
1822
1822
  }), document.body);
1823
1823
  }
1824
1824
  /** The tool-row entry registered into conversation.input.left. */
1825
- function BranchChipDock({ session, sessionId, useSessions, adoptWorktree, t }) {
1826
- const cwd = useSessions((state) => state.byId[sessionId])?.cwd;
1825
+ function BranchChipDock({ sessionId, useSession, adoptWorktree, sessionsList, t }) {
1826
+ const blank = useSession((snapshot) => snapshot.blank);
1827
+ const cwd = (0, react.useSyncExternalStore)(sessionsList.subscribe, () => sessionsList.getSnapshot().byId[sessionId])?.cwd;
1827
1828
  const [repo, refresh] = useRepoStatus(cwd);
1828
1829
  const [menuOpen, setMenuOpen] = (0, react.useState)(false);
1829
1830
  const [worktreeMode, setWorktreeMode] = (0, react.useState)(false);
@@ -1843,11 +1844,11 @@ window.__ModuleLoader__.load({
1843
1844
  setMenuOpen(false);
1844
1845
  }, [cwd]);
1845
1846
  (0, react.useEffect)(() => {
1846
- if (!session.blank) {
1847
+ if (!blank) {
1847
1848
  setWorktreeMode(false);
1848
1849
  setConfirm((current) => current !== null && current.kind !== "switch" ? null : current);
1849
1850
  }
1850
- }, [session.blank]);
1851
+ }, [blank]);
1851
1852
  (0, react.useEffect)(() => {
1852
1853
  const refreshIfIdle = () => {
1853
1854
  if (busyRef.current) return;
@@ -2014,7 +2015,7 @@ window.__ModuleLoader__.load({
2014
2015
  const inLinkedWorktree = facts !== null && facts.worktrees.find((w) => w.main)?.path !== facts.repoRoot;
2015
2016
  const rows = (0, react.useMemo)(() => {
2016
2017
  if (facts === null) return [];
2017
- if (inLinkedWorktree && !session.blank) {
2018
+ if (inLinkedWorktree && !blank) {
2018
2019
  const current = facts.branches.find((b) => b.kind === "local" && b.name === facts.currentBranch);
2019
2020
  return current === void 0 ? [] : [{
2020
2021
  name: current.name,
@@ -2027,7 +2028,7 @@ window.__ModuleLoader__.load({
2027
2028
  }, [
2028
2029
  facts,
2029
2030
  inLinkedWorktree,
2030
- session.blank
2031
+ blank
2031
2032
  ]);
2032
2033
  const localNames = (0, react.useMemo)(() => rows.filter((row) => row.kind !== "remote").map((row) => row.name), [rows]);
2033
2034
  if (facts === null) return null;
@@ -2078,7 +2079,7 @@ window.__ModuleLoader__.load({
2078
2079
  className: BranchChip_module_default.branch,
2079
2080
  children: displayBranch(facts.currentBranch)
2080
2081
  })]
2081
- }), session.blank && !inLinkedWorktree && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2082
+ }), blank && !inLinkedWorktree && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2082
2083
  className: BranchChip_module_default.divider,
2083
2084
  "aria-hidden": "true"
2084
2085
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
@@ -2114,7 +2115,7 @@ window.__ModuleLoader__.load({
2114
2115
  currentBranch: facts.currentBranch,
2115
2116
  confirm: confirmBundle,
2116
2117
  canCreate: !worktreeMode && !inLinkedWorktree,
2117
- canAdopt: session.blank,
2118
+ canAdopt: blank,
2118
2119
  busy,
2119
2120
  onCreate: (name) => {
2120
2121
  doCreateBranch(name);
@@ -2372,8 +2373,8 @@ window.__ModuleLoader__.load({
2372
2373
  });
2373
2374
  }
2374
2375
  //#endregion
2375
- //#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\GitWorktreeCard.module.css?inline
2376
- const css$2 = "/* git-worktree settings card on the Plugins configuration tab. Visual\n * language mirrors the settings section's own card chrome (border radius,\n * layer fills, pending badge, footer buttons) so cards from different\n * packages sit in one list without reading as two designs; tokens only, no\n * literal colors. */\n\n.card_1712176718 {\n list-style: none;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 12px;\n background: var(--dsw-alias-bg-layer-3);\n transition: border-color .16s, background .16s;\n}\n\n.card_1712176718:hover {\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n/* An open card reads as the one being worked on, not merely taller. */\n.cardOpen_1712176718 {\n background: var(--dsw-alias-bg-layer-2);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.header_1712176718 {\n width: 100%;\n appearance: none;\n border: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n}\n\n.header_1712176718:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n/* Name over description, mirroring the section's own plugin cards: the\n * description is what tells one plugin's settings from another's. */\n.headText_1712176718 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.name_1712176718 {\n font-size: 15px;\n font-weight: 600;\n line-height: 1.4;\n color: var(--dsw-alias-label-primary);\n}\n\n.description_1712176718 {\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* Carried on the header so a collapsed card still says it holds edits. */\n.pending_1712176718 {\n flex: none;\n border-radius: 999px;\n padding: 1px 8px;\n font-size: 11px;\n line-height: 17px;\n font-weight: 500;\n white-space: nowrap;\n background: var(--dsw-alias-bg-module-platform);\n color: var(--dsw-alias-label-secondary);\n}\n\n.chevron_1712176718 {\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n transition: transform .16s;\n}\n\n.chevronOpen_1712176718 {\n transform: rotate(180deg);\n}\n\n.body_1712176718 {\n border-top: 1px solid var(--dsw-alias-border-l2);\n margin: 0 16px;\n padding: 12px 0 8px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.note_1712176718 {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.field_1712176718 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.fieldLabel_1712176718 {\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n}\n\n.input_1712176718 {\n box-sizing: border-box;\n width: 100%;\n padding: 4px 8px;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-primary);\n background-color: var(--dsw-alias-bg-layer-2);\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n appearance: none;\n}\n\n.input_1712176718:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -1px;\n}\n\n.input_1712176718:disabled {\n opacity: 0.6;\n}\n\n/* The directory control and its native-dialog launcher share one row. */\n.inputRow_1712176718 {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.inputRow_1712176718 .input_1712176718 {\n flex: 1;\n min-width: 0;\n}\n\n.browse_1712176718 {\n appearance: none;\n flex: none;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n padding: 4px 10px;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary);\n background: none;\n cursor: pointer;\n white-space: nowrap;\n}\n\n.browse_1712176718:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.browse_1712176718:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.browse_1712176718:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.hint_1712176718 {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.footer_1712176718 {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 0 4px;\n border-top: 1px solid var(--dsw-alias-border-l2);\n}\n\n.failed_1712176718 {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-error);\n}\n\n.discard_1712176718,\n.save_1712176718 {\n appearance: none;\n border: 1px solid transparent;\n border-radius: 8px;\n padding: 5px 14px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n}\n\n.discard_1712176718 {\n border-color: var(--dsw-alias-border-l2);\n background: none;\n color: var(--dsw-alias-label-secondary);\n}\n\n.discard_1712176718:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.save_1712176718 {\n background: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n\n.discard_1712176718:disabled,\n.save_1712176718:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.discard_1712176718:focus-visible,\n.save_1712176718:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n/* Sidebar-grouping switch: title + hint + caution beside a checkbox. */\n.toggleRow_1712176718 {\n margin-top: 10px;\n flex-direction: row;\n align-items: flex-start;\n gap: 10px;\n}\n\n.toggleText_1712176718 {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.toggleLabel_1712176718 {\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.toggleMark_1712176718 {\n margin-left: 4px;\n font-weight: 400;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.toggleHint_1712176718 {\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 18px;\n}\n\n.toggleNote_1712176718 {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.toggleControl_1712176718 {\n display: flex;\n align-items: center;\n gap: 6px;\n flex: none;\n margin-top: 2px;\n}\n\n.spinner_1712176718 {\n display: flex;\n color: var(--dsw-alias-label-tertiary);\n animation: spin 0.7s linear infinite;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n\n.toggle_1712176718 {\n width: 16px;\n height: 16px;\n accent-color: var(--dsw-alias-brand-primary);\n cursor: pointer;\n}\n\n.toggle_1712176718:disabled {\n cursor: progress;\n}\n";
2376
+ //#region \0git-worktree-css:C:\Users\OYW\.dsh\gitworktree\dsh-worktree-feature-0.1.2-alpha.5\src\client\GitWorktreeCard.module.css?inline
2377
+ const css$2 = "/* git-worktree settings card on the Plugins configuration tab. Visual\n * language mirrors the settings section's own card chrome (border radius,\n * layer fills, pending badge, footer buttons) so cards from different\n * packages sit in one list without reading as two designs; tokens only, no\n * literal colors. */\n\n.card_1542936780 {\n list-style: none;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 16px;\n background: var(--dsw-alias-bg-layer-3);\n transition: border-color .16s, background .16s;\n}\n\n.card_1542936780:hover {\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n/* An open card reads as the one being worked on, not merely taller. */\n.cardOpen_1542936780 {\n background: var(--dsw-alias-bg-layer-2);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.header_1542936780 {\n width: 100%;\n appearance: none;\n border: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n}\n\n.header_1542936780:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n/* Name over description, mirroring the section's own plugin cards: the\n * description is what tells one plugin's settings from another's. */\n.headText_1542936780 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.name_1542936780 {\n font-size: 15px;\n font-weight: 600;\n line-height: 1.4;\n color: var(--dsw-alias-label-primary);\n}\n\n.description_1542936780 {\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* Carried on the header so a collapsed card still says it holds edits. */\n.pending_1542936780 {\n flex: none;\n border-radius: 999px;\n corner-shape: round;\n padding: 1px 8px;\n font-size: 11px;\n line-height: 17px;\n font-weight: 500;\n white-space: nowrap;\n background: var(--dsw-alias-bg-module-platform);\n color: var(--dsw-alias-label-secondary);\n}\n\n.chevron_1542936780 {\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n transition: transform .16s;\n}\n\n.chevronOpen_1542936780 {\n transform: rotate(180deg);\n}\n\n.body_1542936780 {\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n margin: 0 16px;\n padding: 12px 0 8px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.note_1542936780 {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.field_1542936780 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.fieldLabel_1542936780 {\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n}\n\n.input_1542936780 {\n box-sizing: border-box;\n width: 100%;\n padding: 4px 8px;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-primary);\n background-color: var(--dsw-alias-bg-layer-2);\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 6px;\n appearance: none;\n}\n\n.input_1542936780:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -1px;\n}\n\n.input_1542936780:disabled {\n opacity: 0.6;\n}\n\n/* The directory control and its native-dialog launcher share one row. */\n.inputRow_1542936780 {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.inputRow_1542936780 .input_1542936780 {\n flex: 1;\n min-width: 0;\n}\n\n.browse_1542936780 {\n appearance: none;\n flex: none;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: 6px;\n padding: 4px 10px;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary);\n background: none;\n cursor: pointer;\n white-space: nowrap;\n}\n\n.browse_1542936780:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.browse_1542936780:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.browse_1542936780:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.hint_1542936780 {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.footer_1542936780 {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 0 4px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.failed_1542936780 {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-error);\n}\n\n.discard_1542936780,\n.save_1542936780 {\n appearance: none;\n border: 0.5px solid transparent;\n border-radius: 8px;\n padding: 5px 14px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n}\n\n.discard_1542936780 {\n border-color: var(--dsw-alias-border-l2);\n background: none;\n color: var(--dsw-alias-label-secondary);\n}\n\n.discard_1542936780:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.save_1542936780 {\n background: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n\n.discard_1542936780:disabled,\n.save_1542936780:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.discard_1542936780:focus-visible,\n.save_1542936780:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n/* Sidebar-grouping switch: title + hint + caution beside a checkbox. */\n.toggleRow_1542936780 {\n margin-top: 10px;\n flex-direction: row;\n align-items: flex-start;\n gap: 10px;\n}\n\n.toggleText_1542936780 {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.toggleLabel_1542936780 {\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.toggleMark_1542936780 {\n margin-left: 4px;\n font-weight: 400;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.toggleHint_1542936780 {\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 18px;\n}\n\n.toggleNote_1542936780 {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.toggleControl_1542936780 {\n display: flex;\n align-items: center;\n gap: 6px;\n flex: none;\n margin-top: 2px;\n}\n\n.spinner_1542936780 {\n display: flex;\n color: var(--dsw-alias-label-tertiary);\n animation: spin 0.7s linear infinite;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n\n.toggle_1542936780 {\n width: 16px;\n height: 16px;\n accent-color: var(--dsw-alias-brand-primary);\n cursor: pointer;\n}\n\n.toggle_1542936780:disabled {\n cursor: progress;\n}\n";
2377
2378
  const tagId$2 = "@laoyuehanni/dsh-git-worktree/GitWorktreeCard.module.css";
2378
2379
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$2 + "\"]") === null) {
2379
2380
  const tag = document.createElement("style");
@@ -2383,36 +2384,36 @@ window.__ModuleLoader__.load({
2383
2384
  document.head.appendChild(tag);
2384
2385
  }
2385
2386
  var GitWorktreeCard_module_default = {
2386
- "card": "card_1712176718",
2387
- "cardOpen": "cardOpen_1712176718",
2388
- "header": "header_1712176718",
2389
- "headText": "headText_1712176718",
2390
- "name": "name_1712176718",
2391
- "description": "description_1712176718",
2392
- "pending": "pending_1712176718",
2393
- "chevron": "chevron_1712176718",
2394
- "chevronOpen": "chevronOpen_1712176718",
2395
- "body": "body_1712176718",
2396
- "note": "note_1712176718",
2397
- "field": "field_1712176718",
2398
- "fieldLabel": "fieldLabel_1712176718",
2399
- "input": "input_1712176718",
2400
- "inputRow": "inputRow_1712176718",
2401
- "browse": "browse_1712176718",
2402
- "hint": "hint_1712176718",
2403
- "footer": "footer_1712176718",
2404
- "failed": "failed_1712176718",
2405
- "discard": "discard_1712176718",
2406
- "save": "save_1712176718",
2407
- "toggleRow": "toggleRow_1712176718",
2408
- "toggleText": "toggleText_1712176718",
2409
- "toggleLabel": "toggleLabel_1712176718",
2410
- "toggleMark": "toggleMark_1712176718",
2411
- "toggleHint": "toggleHint_1712176718",
2412
- "toggleNote": "toggleNote_1712176718",
2413
- "toggleControl": "toggleControl_1712176718",
2414
- "spinner": "spinner_1712176718",
2415
- "toggle": "toggle_1712176718"
2387
+ "card": "card_1542936780",
2388
+ "cardOpen": "cardOpen_1542936780",
2389
+ "header": "header_1542936780",
2390
+ "headText": "headText_1542936780",
2391
+ "name": "name_1542936780",
2392
+ "description": "description_1542936780",
2393
+ "pending": "pending_1542936780",
2394
+ "chevron": "chevron_1542936780",
2395
+ "chevronOpen": "chevronOpen_1542936780",
2396
+ "body": "body_1542936780",
2397
+ "note": "note_1542936780",
2398
+ "field": "field_1542936780",
2399
+ "fieldLabel": "fieldLabel_1542936780",
2400
+ "input": "input_1542936780",
2401
+ "inputRow": "inputRow_1542936780",
2402
+ "browse": "browse_1542936780",
2403
+ "hint": "hint_1542936780",
2404
+ "footer": "footer_1542936780",
2405
+ "failed": "failed_1542936780",
2406
+ "discard": "discard_1542936780",
2407
+ "save": "save_1542936780",
2408
+ "toggleRow": "toggleRow_1542936780",
2409
+ "toggleText": "toggleText_1542936780",
2410
+ "toggleLabel": "toggleLabel_1542936780",
2411
+ "toggleMark": "toggleMark_1542936780",
2412
+ "toggleHint": "toggleHint_1542936780",
2413
+ "toggleNote": "toggleNote_1542936780",
2414
+ "toggleControl": "toggleControl_1542936780",
2415
+ "spinner": "spinner_1542936780",
2416
+ "toggle": "toggle_1542936780"
2416
2417
  };
2417
2418
  //#endregion
2418
2419
  //#region src/client/GitWorktreeCard.tsx
@@ -2768,6 +2769,110 @@ window.__ModuleLoader__.load({
2768
2769
  localStorage.setItem(VIEW_STORAGE_KEY, JSON.stringify(prefs));
2769
2770
  } catch {}
2770
2771
  }
2772
+ /** localStorage key of the grouping switch's last-known value (browser-local). */
2773
+ const GROUP_BOOT_STORAGE_KEY = "dsh-git-worktree.sidebar.groupSidebar";
2774
+ /**
2775
+ * Read the grouping switch's last-known value. The seat mounts from this on
2776
+ * startup so the sidebar renders grouped IMMEDIATELY, without waiting for the
2777
+ * settings document to cross from the Host — the settings scope is the
2778
+ * authority and corrects a stale value once it lands. undefined = no record
2779
+ * (first visit; the composition default "on" is used).
2780
+ */
2781
+ function loadGroupSidebarBoot() {
2782
+ if (typeof localStorage === "undefined") return void 0;
2783
+ try {
2784
+ const raw = localStorage.getItem(GROUP_BOOT_STORAGE_KEY);
2785
+ if (raw === "1") return true;
2786
+ if (raw === "0") return false;
2787
+ return;
2788
+ } catch {
2789
+ return;
2790
+ }
2791
+ }
2792
+ /** Persist the grouping switch's last-known value; write failures stay silent. */
2793
+ function saveGroupSidebarBoot(enabled) {
2794
+ if (typeof localStorage === "undefined") return;
2795
+ try {
2796
+ localStorage.setItem(GROUP_BOOT_STORAGE_KEY, enabled ? "1" : "0");
2797
+ } catch {}
2798
+ }
2799
+ /** localStorage key of the last successful /group facts batch (browser-local). */
2800
+ const FACTS_STORAGE_KEY = "dsh-git-worktree.sidebar.facts.v1";
2801
+ /** Parse one WorkspaceGitFacts value; undefined = malformed. */
2802
+ function parseWorkspaceGitFacts(value) {
2803
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
2804
+ const record = value;
2805
+ if (typeof record.repoRoot !== "string" || record.repoRoot === "") return void 0;
2806
+ if (typeof record.repoName !== "string") return void 0;
2807
+ if (record.branch !== null && typeof record.branch !== "string") return void 0;
2808
+ if (typeof record.main !== "boolean") return void 0;
2809
+ return {
2810
+ repoRoot: record.repoRoot,
2811
+ repoName: record.repoName,
2812
+ branch: record.branch,
2813
+ main: record.main
2814
+ };
2815
+ }
2816
+ /** Parse a facts map; any malformed entry discards the whole batch. */
2817
+ function parseFactsRecord(value) {
2818
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return null;
2819
+ const out = {};
2820
+ for (const [key, entry] of Object.entries(value)) {
2821
+ if (entry === null) {
2822
+ out[key] = null;
2823
+ continue;
2824
+ }
2825
+ const parsed = parseWorkspaceGitFacts(entry);
2826
+ if (parsed === void 0) return null;
2827
+ out[key] = parsed;
2828
+ }
2829
+ return out;
2830
+ }
2831
+ /**
2832
+ * Read the last successful /group facts batch. The sidebar consults this
2833
+ * whenever the workspace path signature is known (including the frame the
2834
+ * pending-empty baseline becomes the real list), so a page refresh never
2835
+ * flashes the degraded flat list while git probes run; the fresh probe
2836
+ * overwrites both the view and this cache. A poisoned entry (wrong value
2837
+ * shape) discards the whole batch rather than grouping under `repo:undefined`.
2838
+ */
2839
+ function loadFactsCache() {
2840
+ if (typeof localStorage === "undefined") return null;
2841
+ try {
2842
+ const raw = localStorage.getItem(FACTS_STORAGE_KEY);
2843
+ if (raw === null) return null;
2844
+ const parsed = JSON.parse(raw);
2845
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
2846
+ const record = parsed;
2847
+ if (typeof record.signature !== "string") return null;
2848
+ const facts = parseFactsRecord(record.facts);
2849
+ if (facts === null) return null;
2850
+ return {
2851
+ signature: record.signature,
2852
+ facts
2853
+ };
2854
+ } catch {
2855
+ return null;
2856
+ }
2857
+ }
2858
+ /**
2859
+ * Pick the facts batch that belongs to `signature`. Live (in-memory) hits
2860
+ * win; otherwise a matching cache batch. The grouped tree must paint the
2861
+ * moment the workspace path set is known — not only at `useState` init,
2862
+ * when the list is still the pending empty snapshot (signature `""`).
2863
+ */
2864
+ function factsForSignature(signature, live, cached) {
2865
+ if (live !== null && live.signature === signature) return live;
2866
+ if (cached !== null && cached.signature === signature) return cached;
2867
+ return null;
2868
+ }
2869
+ /** Persist one /group facts batch; write failures (quota, privacy mode) stay silent. */
2870
+ function saveFactsCache(entry) {
2871
+ if (typeof localStorage === "undefined") return;
2872
+ try {
2873
+ localStorage.setItem(FACTS_STORAGE_KEY, JSON.stringify(entry));
2874
+ } catch {}
2875
+ }
2771
2876
  /** Recency comparator: newest first, id as the deterministic tiebreak. */
2772
2877
  function byRecency(a, b) {
2773
2878
  if (b.updatedAt !== a.updatedAt) return b.updatedAt - a.updatedAt;
@@ -3069,8 +3174,33 @@ window.__ModuleLoader__.load({
3069
3174
  };
3070
3175
  }
3071
3176
  //#endregion
3072
- //#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\sidebar-rows.module.css?inline
3073
- const css$1 = "/* Native Rows.module_2050697429.css_2050697429 transplanted 1:1 (DSW tokens, row-in, reduced-motion).\n * Drag marker classes (dropBefore/dropAfter) are kept for P3; unused in P2. */\n\n.projectRow_2050697429,\n.sessionRow_2050697429 {\n cursor: pointer;\n user-select: none;\n color: var(--dsw-alias-label-primary);\n border-radius: 8px;\n align-items: center;\n gap: 6px;\n padding: 0 8px;\n display: flex;\n}\n\n.projectRow_2050697429:hover,\n.sessionRow_2050697429:hover,\n.sessionRow_2050697429.selected_2050697429 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.searchResultRow_2050697429 {\n box-sizing: border-box;\n cursor: pointer;\n text-align: left;\n width: 100%;\n min-height: 48px;\n color: var(--dsw-alias-label-primary);\n background: 0 0;\n border: none;\n border-radius: 8px;\n flex-direction: column;\n align-items: stretch;\n padding: 4px 8px;\n display: flex;\n}\n\n.searchResultRow_2050697429:hover,\n.searchResultRow_2050697429.selected_2050697429 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.searchResultHeading_2050697429 {\n align-items: center;\n min-width: 0;\n display: flex;\n}\n\n.searchResultTitle_2050697429 {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n margin-left: 4px;\n font-size: 14px;\n line-height: 20px;\n overflow: hidden;\n}\n\n.searchResultMeta_2050697429 {\n align-items: center;\n gap: 6px;\n min-width: 0;\n margin-left: 20px;\n display: flex;\n}\n\n.searchResultWorkspace_2050697429,\n.searchResultSnippet_2050697429 {\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 17px;\n overflow: hidden;\n}\n\n.searchResultWorkspace_2050697429 {\n max-width: 40%;\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n}\n\n.searchResultSnippet_2050697429 {\n min-width: 0;\n color: var(--dsw-alias-label-secondary);\n flex: 1;\n}\n\n.projectRow_2050697429 {\n box-sizing: border-box;\n align-items: center;\n height: 34px;\n}\n\n.projectRow_2050697429 .rowActions_2050697429 {\n height: 20px;\n}\n\n.sessionRow_2050697429 {\n height: 32px;\n animation: row-in 0.15s var(--ds-ease-in-out);\n gap: 0;\n}\n\n.sessionRow_2050697429 .title_2050697429 {\n margin: 0 6px 0 4px;\n}\n\n.flatSessionRowWithoutStatus_2050697429 .title_2050697429 {\n margin-left: 0;\n}\n\n@keyframes row-in {\n 0% { opacity: 0; }\n}\n\n.slot_2050697429 {\n width: 16px;\n height: 20px;\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n}\n\n.visuallyHidden_2050697429 {\n clip: rect(0 0 0 0);\n white-space: nowrap;\n width: 1px;\n height: 1px;\n position: absolute;\n overflow: hidden;\n}\n\n.folderActive_2050697429 {\n color: var(--dsw-alias-state-business-primary);\n}\n\n.projectRow_2050697429 .chevron_2050697429 {\n display: none;\n}\n\n.projectRow_2050697429:hover .chevron_2050697429 {\n display: inline-flex;\n}\n\n.projectRow_2050697429:hover .folder_2050697429 {\n display: none;\n}\n\n.arrow_2050697429 {\n transition: transform 0.15s var(--ds-ease-in-out);\n}\n\n.arrowOpen_2050697429 {\n transform: rotate(90deg);\n}\n\n.projectText_2050697429 {\n flex-direction: column;\n flex: 1;\n gap: 2px;\n min-width: 0;\n display: flex;\n}\n\n.title_2050697429 {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n font-size: 14px;\n line-height: 20px;\n overflow: hidden;\n}\n\n/* Virtual (unregistered) directory rows read one weight lighter than real\n * workspace rows — together with the dashed folder glyph, the whole row is\n * distinguishable at a glance. */\n.strayRow_2050697429 .title_2050697429 {\n color: var(--dsw-alias-label-secondary);\n}\n\n.renameInput_2050697429 {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-button-elevated-fill);\n min-width: 0;\n color: inherit;\n border-radius: 4px;\n outline: none;\n padding: 0 2px;\n font-size: 14px;\n line-height: 20px;\n}\n\n.sessionRow_2050697429 .title_2050697429 {\n flex: 1;\n}\n\n.meta_2050697429 {\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 20px;\n overflow: hidden;\n}\n\n.time_2050697429 {\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n font-size: 12px;\n line-height: 20px;\n}\n\n.dot_2050697429 {\n flex: none;\n}\n\n.rowActions_2050697429 {\n flex: none;\n align-items: center;\n gap: 12px;\n display: none;\n}\n\n.projectRow_2050697429:hover .rowActions_2050697429,\n.sessionRow_2050697429:hover .rowActions_2050697429,\n.projectRow_2050697429.menuOpen_2050697429 .rowActions_2050697429,\n.sessionRow_2050697429.menuOpen_2050697429 .rowActions_2050697429 {\n display: inline-flex;\n}\n\n.sessionRow_2050697429:hover .time_2050697429,\n.sessionRow_2050697429.menuOpen_2050697429 .time_2050697429 {\n display: none;\n}\n\n.projectRow_2050697429.menuOpen_2050697429,\n.sessionRow_2050697429.menuOpen_2050697429 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n/* P3: session drag insertion markers (unused in P2). */\n.sessionRow_2050697429.dropBefore_2050697429,\n.sessionRow_2050697429.dropAfter_2050697429 {\n position: relative;\n}\n\n.sessionRow_2050697429.dropBefore_2050697429:before,\n.sessionRow_2050697429.dropAfter_2050697429:after {\n content: \"\";\n z-index: 1;\n background:\n linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat,\n linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat,\n linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;\n pointer-events: none;\n height: 12px;\n position: absolute;\n left: 0;\n right: 4px;\n}\n\n.sessionRow_2050697429.dropBefore_2050697429:before {\n top: -7px;\n}\n\n.sessionRow_2050697429.dropAfter_2050697429:after {\n bottom: -7px;\n}\n\n.hoverContent_2050697429 {\n flex-direction: column;\n gap: 8px;\n display: flex;\n}\n\n.hoverTitle_2050697429 {\n color: #fff;\n overflow-wrap: break-word;\n font-size: 14px;\n line-height: 20px;\n}\n\n.hoverPath_2050697429 {\n color: #cfd3d6;\n word-break: break-all;\n font-size: 12px;\n line-height: 16px;\n}\n\n.hoverTime_2050697429 {\n color: #cfd3d6;\n font-size: 12px;\n line-height: 16px;\n}\n\n.hoverStatus_2050697429 {\n color: #adb2b8;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n line-height: 20px;\n display: flex;\n}\n\n.iconButton_2050697429 {\n cursor: pointer;\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-tertiary);\n background: 0 0;\n border: none;\n border-radius: 4px;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.iconButton_2050697429:hover {\n color: var(--dsw-alias-label-primary);\n}\n\n.chevron_2050697429 {\n color: var(--dsw-alias-label-caption);\n}\n\n.repoCount_2050697429 {\n flex: none;\n margin-left: 8px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 20px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sessionRow_2050697429,\n .arrow_2050697429 {\n transition: none;\n animation: none;\n }\n}\n";
3177
+ //#region node_modules/.pnpm/@deepseek-ai+dsh-util-works_6e61a435a33302346cc90b5c6544222a/node_modules/@deepseek-ai/dsh-util-workspace-path/lib/index.js
3178
+ /**
3179
+ * Browser-safe Workspace path and display helpers.
3180
+ * @module @deepseek-ai/dsh-util-workspace-path
3181
+ */
3182
+ /** Whether a path uses a Windows drive or UNC prefix. */
3183
+ function isWindowsStylePath(value) {
3184
+ return /^[A-Za-z]:[/\\]/.test(value) || value.startsWith("\\\\");
3185
+ }
3186
+ /**
3187
+ * Abbreviate a POSIX home directory for display.
3188
+ * @param path - Absolute or already-short display path.
3189
+ * @param home - Host account home; absent skips abbreviation.
3190
+ * @returns `~` or `~/…` for the POSIX home and its descendants, otherwise `path`.
3191
+ */
3192
+ function abbreviateHomePath(path, home) {
3193
+ if (home === void 0 || home === "") return path;
3194
+ if (isWindowsStylePath(path) || isWindowsStylePath(home)) return path;
3195
+ const root = home.replace(/\/+$/, "");
3196
+ if (root === "" || root === "/") return path;
3197
+ if (path.replace(/\/+$/, "") === root) return "~";
3198
+ if (path.startsWith(`${root}/`)) return `~${path.slice(root.length)}`;
3199
+ return path;
3200
+ }
3201
+ //#endregion
3202
+ //#region \0git-worktree-css:C:\Users\OYW\.dsh\gitworktree\dsh-worktree-feature-0.1.2-alpha.5\src\client\sidebar-rows.module.css?inline
3203
+ const css$1 = "/* Native Rows.module_667592273.css_667592273 transplanted 1:1 (DSW tokens, row-in, reduced-motion).\n * Drag marker classes (dropBefore/dropAfter) are kept for P3; unused in P2. */\n\n.projectRow_667592273,\n.sessionRow_667592273 {\n cursor: pointer;\n user-select: none;\n color: var(--dsw-alias-label-primary);\n border-radius: 8px;\n align-items: center;\n gap: 6px;\n padding: 0 8px;\n display: flex;\n}\n\n.projectRow_667592273:hover,\n.sessionRow_667592273:hover,\n.sessionRow_667592273.selected_667592273 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.searchResultRow_667592273 {\n box-sizing: border-box;\n cursor: pointer;\n text-align: left;\n width: 100%;\n min-height: 48px;\n color: var(--dsw-alias-label-primary);\n background: 0 0;\n border: none;\n border-radius: 8px;\n flex-direction: column;\n align-items: stretch;\n padding: 4px 8px;\n display: flex;\n}\n\n.searchResultRow_667592273:hover,\n.searchResultRow_667592273.selected_667592273 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.searchResultHeading_667592273 {\n align-items: center;\n min-width: 0;\n display: flex;\n}\n\n.searchResultTitle_667592273 {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n margin-left: 4px;\n font-size: 14px;\n line-height: 20px;\n overflow: hidden;\n}\n\n.searchResultMeta_667592273 {\n align-items: center;\n gap: 6px;\n min-width: 0;\n margin-left: 20px;\n display: flex;\n}\n\n.searchResultWorkspace_667592273,\n.searchResultSnippet_667592273 {\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 17px;\n overflow: hidden;\n}\n\n.searchResultWorkspace_667592273 {\n max-width: 40%;\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n}\n\n.searchResultSnippet_667592273 {\n min-width: 0;\n color: var(--dsw-alias-label-secondary);\n flex: 1;\n}\n\n.projectRow_667592273 {\n box-sizing: border-box;\n align-items: center;\n height: 34px;\n}\n\n.projectRow_667592273 .rowActions_667592273 {\n height: 20px;\n}\n\n.sessionRow_667592273 {\n height: 32px;\n animation: row-in 0.15s var(--ds-ease-in-out);\n gap: 0;\n}\n\n.sessionRow_667592273 .title_667592273 {\n margin: 0 6px 0 4px;\n}\n\n.flatSessionRowWithoutStatus_667592273 .title_667592273 {\n margin-left: 0;\n}\n\n@keyframes row-in {\n 0% { opacity: 0; }\n}\n\n.slot_667592273 {\n width: 16px;\n height: 20px;\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n}\n\n.visuallyHidden_667592273 {\n clip: rect(0 0 0 0);\n white-space: nowrap;\n width: 1px;\n height: 1px;\n position: absolute;\n overflow: hidden;\n}\n\n.folderActive_667592273 {\n color: var(--dsw-alias-state-business-primary);\n}\n\n.projectRow_667592273 .chevron_667592273 {\n display: none;\n}\n\n.projectRow_667592273:hover .chevron_667592273 {\n display: inline-flex;\n}\n\n.projectRow_667592273:hover .folder_667592273 {\n display: none;\n}\n\n.arrow_667592273 {\n transition: transform 0.15s var(--ds-ease-in-out);\n}\n\n.arrowOpen_667592273 {\n transform: rotate(90deg);\n}\n\n.projectText_667592273 {\n flex-direction: column;\n flex: 1;\n gap: 2px;\n min-width: 0;\n display: flex;\n}\n\n.title_667592273 {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n font-size: 14px;\n line-height: 20px;\n overflow: hidden;\n}\n\n/* Virtual (unregistered) directory rows read one weight lighter than real\n * workspace rows — together with the dashed folder glyph, the whole row is\n * distinguishable at a glance. */\n.strayRow_667592273 .title_667592273 {\n color: var(--dsw-alias-label-secondary);\n}\n\n.renameInput_667592273 {\n border: 0.5px solid var(--dsw-alias-border-l4);\n background: var(--dsw-alias-button-elevated-fill);\n min-width: 0;\n color: inherit;\n border-radius: 4px;\n outline: none;\n padding: 0 2px;\n font-size: 14px;\n line-height: 20px;\n}\n\n.sessionRow_667592273 .title_667592273 {\n flex: 1;\n}\n\n.meta_667592273 {\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 20px;\n overflow: hidden;\n}\n\n.time_667592273 {\n color: var(--dsw-alias-label-tertiary);\n flex: none;\n font-size: 12px;\n line-height: 20px;\n}\n\n.dot_667592273 {\n flex: none;\n}\n\n.rowActions_667592273 {\n flex: none;\n align-items: center;\n gap: 12px;\n display: none;\n}\n\n.projectRow_667592273:hover .rowActions_667592273,\n.sessionRow_667592273:hover .rowActions_667592273,\n.projectRow_667592273.menuOpen_667592273 .rowActions_667592273,\n.sessionRow_667592273.menuOpen_667592273 .rowActions_667592273 {\n display: inline-flex;\n}\n\n.sessionRow_667592273:hover .time_667592273,\n.sessionRow_667592273.menuOpen_667592273 .time_667592273 {\n display: none;\n}\n\n.projectRow_667592273.menuOpen_667592273,\n.sessionRow_667592273.menuOpen_667592273 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n/* P3: session drag insertion markers (unused in P2). */\n.sessionRow_667592273.dropBefore_667592273,\n.sessionRow_667592273.dropAfter_667592273 {\n position: relative;\n}\n\n.sessionRow_667592273.dropBefore_667592273:before,\n.sessionRow_667592273.dropAfter_667592273:after {\n content: \"\";\n z-index: 1;\n background:\n linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat,\n linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat,\n linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;\n pointer-events: none;\n height: 12px;\n position: absolute;\n left: 0;\n right: 4px;\n}\n\n.sessionRow_667592273.dropBefore_667592273:before {\n top: -7px;\n}\n\n.sessionRow_667592273.dropAfter_667592273:after {\n bottom: -7px;\n}\n\n.hoverContent_667592273 {\n flex-direction: column;\n gap: 8px;\n display: flex;\n}\n\n.hoverTitle_667592273 {\n color: #fff;\n overflow-wrap: break-word;\n font-size: 14px;\n line-height: 20px;\n}\n\n.hoverPath_667592273 {\n color: #cfd3d6;\n word-break: break-all;\n font-size: 12px;\n line-height: 16px;\n}\n\n.hoverTime_667592273 {\n color: #cfd3d6;\n font-size: 12px;\n line-height: 16px;\n}\n\n.hoverStatus_667592273 {\n color: #adb2b8;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n line-height: 20px;\n display: flex;\n}\n\n.iconButton_667592273 {\n cursor: pointer;\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-tertiary);\n background: 0 0;\n border: none;\n border-radius: 4px;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.iconButton_667592273:hover {\n color: var(--dsw-alias-label-primary);\n}\n\n.chevron_667592273 {\n color: var(--dsw-alias-label-caption);\n}\n\n.repoCount_667592273 {\n flex: none;\n margin-left: 8px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 20px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sessionRow_667592273,\n .arrow_667592273 {\n transition: none;\n animation: none;\n }\n}\n";
3074
3204
  const tagId$1 = "@laoyuehanni/dsh-git-worktree/sidebar-rows.module.css";
3075
3205
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$1 + "\"]") === null) {
3076
3206
  const tag = document.createElement("style");
@@ -3080,43 +3210,43 @@ window.__ModuleLoader__.load({
3080
3210
  document.head.appendChild(tag);
3081
3211
  }
3082
3212
  var sidebar_rows_module_default = {
3083
- "module": "module_2050697429",
3084
- "css": "css_2050697429",
3085
- "projectRow": "projectRow_2050697429",
3086
- "sessionRow": "sessionRow_2050697429",
3087
- "selected": "selected_2050697429",
3088
- "searchResultRow": "searchResultRow_2050697429",
3089
- "searchResultHeading": "searchResultHeading_2050697429",
3090
- "searchResultTitle": "searchResultTitle_2050697429",
3091
- "searchResultMeta": "searchResultMeta_2050697429",
3092
- "searchResultWorkspace": "searchResultWorkspace_2050697429",
3093
- "searchResultSnippet": "searchResultSnippet_2050697429",
3094
- "rowActions": "rowActions_2050697429",
3095
- "title": "title_2050697429",
3096
- "flatSessionRowWithoutStatus": "flatSessionRowWithoutStatus_2050697429",
3097
- "slot": "slot_2050697429",
3098
- "visuallyHidden": "visuallyHidden_2050697429",
3099
- "folderActive": "folderActive_2050697429",
3100
- "chevron": "chevron_2050697429",
3101
- "folder": "folder_2050697429",
3102
- "arrow": "arrow_2050697429",
3103
- "arrowOpen": "arrowOpen_2050697429",
3104
- "projectText": "projectText_2050697429",
3105
- "strayRow": "strayRow_2050697429",
3106
- "renameInput": "renameInput_2050697429",
3107
- "meta": "meta_2050697429",
3108
- "time": "time_2050697429",
3109
- "dot": "dot_2050697429",
3110
- "menuOpen": "menuOpen_2050697429",
3111
- "dropBefore": "dropBefore_2050697429",
3112
- "dropAfter": "dropAfter_2050697429",
3113
- "hoverContent": "hoverContent_2050697429",
3114
- "hoverTitle": "hoverTitle_2050697429",
3115
- "hoverPath": "hoverPath_2050697429",
3116
- "hoverTime": "hoverTime_2050697429",
3117
- "hoverStatus": "hoverStatus_2050697429",
3118
- "iconButton": "iconButton_2050697429",
3119
- "repoCount": "repoCount_2050697429"
3213
+ "module": "module_667592273",
3214
+ "css": "css_667592273",
3215
+ "projectRow": "projectRow_667592273",
3216
+ "sessionRow": "sessionRow_667592273",
3217
+ "selected": "selected_667592273",
3218
+ "searchResultRow": "searchResultRow_667592273",
3219
+ "searchResultHeading": "searchResultHeading_667592273",
3220
+ "searchResultTitle": "searchResultTitle_667592273",
3221
+ "searchResultMeta": "searchResultMeta_667592273",
3222
+ "searchResultWorkspace": "searchResultWorkspace_667592273",
3223
+ "searchResultSnippet": "searchResultSnippet_667592273",
3224
+ "rowActions": "rowActions_667592273",
3225
+ "title": "title_667592273",
3226
+ "flatSessionRowWithoutStatus": "flatSessionRowWithoutStatus_667592273",
3227
+ "slot": "slot_667592273",
3228
+ "visuallyHidden": "visuallyHidden_667592273",
3229
+ "folderActive": "folderActive_667592273",
3230
+ "chevron": "chevron_667592273",
3231
+ "folder": "folder_667592273",
3232
+ "arrow": "arrow_667592273",
3233
+ "arrowOpen": "arrowOpen_667592273",
3234
+ "projectText": "projectText_667592273",
3235
+ "strayRow": "strayRow_667592273",
3236
+ "renameInput": "renameInput_667592273",
3237
+ "meta": "meta_667592273",
3238
+ "time": "time_667592273",
3239
+ "dot": "dot_667592273",
3240
+ "menuOpen": "menuOpen_667592273",
3241
+ "dropBefore": "dropBefore_667592273",
3242
+ "dropAfter": "dropAfter_667592273",
3243
+ "hoverContent": "hoverContent_667592273",
3244
+ "hoverTitle": "hoverTitle_667592273",
3245
+ "hoverPath": "hoverPath_667592273",
3246
+ "hoverTime": "hoverTime_667592273",
3247
+ "hoverStatus": "hoverStatus_667592273",
3248
+ "iconButton": "iconButton_667592273",
3249
+ "repoCount": "repoCount_667592273"
3120
3250
  };
3121
3251
  //#endregion
3122
3252
  //#region src/client/sidebar-rows.tsx
@@ -3250,7 +3380,7 @@ window.__ModuleLoader__.load({
3250
3380
  anchor: ownRow,
3251
3381
  content: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorkspaceHoverContent, {
3252
3382
  label: row.label,
3253
- cwd: row.cwd === void 0 ? void 0 : (0, _deepseek_ai_dsh_client_runtime_client.abbreviateHomePath)(row.cwd, home),
3383
+ cwd: row.cwd === void 0 ? void 0 : abbreviateHomePath(row.cwd, home),
3254
3384
  createdAt: row.createdAt,
3255
3385
  t
3256
3386
  }),
@@ -3381,7 +3511,7 @@ window.__ModuleLoader__.load({
3381
3511
  }),
3382
3512
  path !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3383
3513
  className: sidebar_rows_module_default.hoverPath,
3384
- children: (0, _deepseek_ai_dsh_client_runtime_client.abbreviateHomePath)(path, home)
3514
+ children: abbreviateHomePath(path, home)
3385
3515
  }),
3386
3516
  belongsTo !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3387
3517
  className: sidebar_rows_module_default.hoverStatus,
@@ -3672,8 +3802,8 @@ window.__ModuleLoader__.load({
3672
3802
  return reason instanceof Error ? reason.message : String(reason);
3673
3803
  }
3674
3804
  //#endregion
3675
- //#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\GroupedSidebar.module.css?inline
3676
- const css = "/* Native WorkspaceBrowser.module_1808205761.css_1808205761 + WorkspacePicker.module_1808205761.css_1808205761 transplanted\n * 1:1 (DSW tokens, search expand, reduced-motion). Drag classes\n * (workspaceDrop*, listTopDrop*) are kept for P3; unused in P2.\n * Overlay: memberIndent / sessionsIndent for the repo-grouped tree. */\n\n.root_1808205761 {\n --dsh-session-list-edge-inset: var(--dsh-sidebar-inline-padding);\n --dsh-session-list-scrollbar-width: 8px;\n --dsh-session-list-scrollbar-offset: 2px;\n box-sizing: border-box;\n min-height: 0;\n padding-right: var(--dsh-session-list-edge-inset);\n flex-direction: column;\n flex: 1;\n display: flex;\n}\n\n.root_1808205761.rail_1808205761 {\n padding-right: 0;\n}\n\n.iconButton_1808205761 {\n cursor: pointer;\n width: 28px;\n height: 28px;\n color: var(--dsw-alias-label-secondary);\n background: 0 0;\n border: none;\n border-radius: 50%;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.iconButton_1808205761:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.sectionHeader_1808205761 {\n box-sizing: border-box;\n height: 36px;\n color: var(--dsw-alias-label-tertiary);\n border-radius: 12px;\n flex: none;\n justify-content: flex-end;\n align-items: center;\n gap: 4px;\n margin-bottom: 4px;\n padding-left: 4px;\n display: flex;\n overflow: hidden;\n}\n\n.root_1808205761:not(.rail_1808205761) .sectionHeader_1808205761 {\n margin-top: 2px;\n margin-right: -4px;\n}\n\n.sectionLabel_1808205761 {\n white-space: nowrap;\n opacity: 1;\n visibility: visible;\n min-width: 0;\n max-width: 45%;\n transition: max-width 0.18s var(--ds-ease-in-out), margin-right 0.18s var(--ds-ease-in-out), opacity 0.12s var(--ds-ease-in-out), transform 0.18s var(--ds-ease-in-out), visibility 0s linear;\n flex: none;\n line-height: 20px;\n overflow: hidden;\n}\n\n.sectionLabelHidden_1808205761 {\n opacity: 0;\n visibility: hidden;\n max-width: 0;\n margin-right: -4px;\n transition-delay: 0s, 0s, 0s, 0s, 0.18s;\n transform: translate(-4px);\n}\n\n.searchSlot_1808205761 {\n box-sizing: border-box;\n min-width: 0;\n max-width: 28px;\n transition: max-width 0.18s var(--ds-ease-in-out), padding-left 0.18s var(--ds-ease-in-out);\n flex: 1;\n align-items: center;\n margin-left: auto;\n padding-left: 0;\n display: flex;\n}\n\n.searchSlotExpanded_1808205761 {\n max-width: 100%;\n padding-left: 0;\n}\n\n.headerActions_1808205761 {\n opacity: 1;\n visibility: visible;\n max-width: 60px;\n transition: max-width 0.18s var(--ds-ease-in-out), opacity 0.12s var(--ds-ease-in-out), transform 0.18s var(--ds-ease-in-out), visibility 0s linear;\n flex: none;\n align-items: center;\n gap: 4px;\n display: flex;\n overflow: hidden;\n}\n\n.headerActionsHidden_1808205761 {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n max-width: 0;\n transition-delay: 0s, 0s, 0s, 0.18s;\n transform: translate(4px);\n}\n\n.search_1808205761 {\n box-sizing: border-box;\n cursor: text;\n width: 100%;\n height: 28px;\n color: var(--dsw-alias-label-secondary);\n transition: width 0.18s var(--ds-ease-in-out), padding 0.18s var(--ds-ease-in-out), border-color 0.18s var(--ds-ease-in-out), background-color 0.18s var(--ds-ease-in-out);\n background: 0 0;\n border: none;\n border-radius: 50%;\n flex: none;\n align-items: center;\n gap: 0;\n margin: 0;\n padding: 0;\n display: flex;\n overflow: hidden;\n}\n\n.searchExpanded_1808205761 {\n border: 1px solid var(--dsw-alias-border-l2);\n width: calc(100% + 4px);\n height: 30px;\n color: var(--dsw-alias-label-caption);\n background: 0 0;\n border-radius: 10px;\n margin-inline: -2px;\n padding: 0 4px 0 0;\n}\n\n.searchButton_1808205761 {\n cursor: pointer;\n width: 28px;\n height: 28px;\n color: inherit;\n background: 0 0;\n border: none;\n border-radius: 50%;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.searchExpanded_1808205761 .searchButton_1808205761 {\n width: 28px;\n height: 30px;\n}\n\n.searchButton_1808205761:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.searchExpanded_1808205761 .searchButton_1808205761:hover {\n background: 0 0;\n}\n\n.searchInput_1808205761 {\n opacity: 0;\n pointer-events: none;\n width: 0;\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n transition: opacity 0.12s var(--ds-ease-in-out);\n background: 0 0;\n border: none;\n outline: none;\n flex: 1;\n font-size: 13px;\n line-height: 18px;\n}\n\n.searchExpanded_1808205761 .searchInput_1808205761 {\n opacity: 1;\n pointer-events: auto;\n margin-left: -2px;\n}\n\n.searchInput_1808205761::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.clearButton_1808205761 {\n cursor: pointer;\n width: 24px;\n height: 24px;\n color: var(--dsw-alias-label-secondary);\n background: 0 0;\n border: none;\n border-radius: 50%;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.clearButton_1808205761:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.rail_1808205761 .sectionHeader_1808205761 {\n justify-content: flex-start;\n gap: 0;\n margin-bottom: 12px;\n padding-left: 0;\n}\n\n.rail_1808205761 .headerActions_1808205761 {\n max-width: none;\n}\n\n.rail_1808205761 .iconButton_1808205761 {\n width: 36px;\n height: 36px;\n color: var(--dsw-alias-label-primary);\n}\n\n.rail_1808205761 .search_1808205761 {\n background: 0 0;\n border-color: #0000;\n gap: 0;\n width: 36px;\n height: 36px;\n margin: 0 0 12px;\n padding: 0;\n}\n\n.rail_1808205761 .searchButton_1808205761 {\n width: 36px;\n height: 36px;\n color: var(--dsw-alias-label-primary);\n}\n\n.rail_1808205761 .searchButton_1808205761:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.listArea_1808205761 {\n min-height: 0;\n margin-left: -4px;\n margin-right: calc(-1 * var(--dsh-session-list-edge-inset));\n flex-direction: column;\n flex: 1;\n padding-left: 4px;\n display: flex;\n overflow: visible;\n}\n\n.rail_1808205761 .listArea_1808205761 {\n margin-left: 0;\n margin-right: 0;\n padding-left: 0;\n}\n\n.treeBody_1808205761 {\n flex-direction: column;\n flex: 1;\n min-height: 0;\n display: flex;\n position: relative;\n}\n\n.fade_1808205761 {\n left: 0;\n right: var(--dsh-session-list-edge-inset);\n background: linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));\n pointer-events: none;\n height: 24px;\n position: absolute;\n bottom: 0;\n}\n\n.wide_1808205761 {\n animation: wide-in 0.2s var(--ds-ease-in-out);\n}\n\n@keyframes wide-in {\n 0% { opacity: 0; }\n}\n\n.list_1808205761 {\n min-height: 0;\n margin-left: -4px;\n margin-right: var(--dsh-session-list-scrollbar-offset);\n padding-left: 4px;\n padding-right: calc(var(--dsh-session-list-edge-inset) - var(--dsh-session-list-scrollbar-width) - var(--dsh-session-list-scrollbar-offset));\n scrollbar-gutter: stable;\n flex: 1;\n padding-bottom: 16px;\n overflow-y: auto;\n}\n\n.flatList_1808205761 > * + *,\n.searchTree_1808205761 > [role=treeitem] + [role=treeitem],\n.groupSection_1808205761 > * + * {\n margin-top: 2px;\n}\n\n.searchStatus_1808205761,\n.searchWarning_1808205761 {\n color: var(--dsw-alias-label-tertiary);\n padding: 10px 12px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.searchWarning_1808205761 {\n color: var(--dsw-alias-label-secondary);\n}\n\n.groupSection_1808205761 {\n position: relative;\n}\n\n.groupSection_1808205761 + .groupSection_1808205761 {\n margin-top: 4px;\n}\n\n/* P3: workspace drag insertion markers (unused in P2). */\n.listTopDropIndicator_1808205761,\n.workspaceDropBefore_1808205761:before,\n.workspaceDropAfter_1808205761:after {\n content: \"\";\n z-index: 1;\n background:\n linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat,\n linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat,\n linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;\n pointer-events: none;\n height: 12px;\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.listTopDropIndicator_1808205761 {\n top: -8px;\n left: 0;\n right: var(--dsh-session-list-edge-inset);\n}\n\n.listTopDropActive_1808205761 > .workspaceDropBefore_1808205761:first-child:before {\n display: none;\n}\n\n.workspaceDropBefore_1808205761:before {\n top: -8px;\n}\n\n.workspaceDropAfter_1808205761:after {\n bottom: -8px;\n}\n\n.sessionOverflowButton_1808205761 {\n cursor: pointer;\n text-align: left;\n width: 100%;\n height: 28px;\n color: var(--dsw-alias-label-tertiary);\n background: 0 0;\n border: none;\n border-radius: 8px;\n padding: 0 12px 0 28px;\n font-size: 12px;\n}\n\n.groupSection_1808205761 > .sessionOverflowButton_1808205761 {\n margin-top: 0;\n}\n\n.sessionOverflowButton_1808205761:hover {\n color: var(--dsw-alias-label-secondary);\n background: 0 0;\n}\n\n.empty_1808205761 {\n color: var(--dsw-alias-label-tertiary);\n padding: 16px 12px;\n font-size: 13px;\n}\n\n.renameInput_1808205761 {\n box-sizing: border-box;\n border: 1px solid var(--dsw-alias-border-l2);\n width: 100%;\n height: 44px;\n color: var(--dsw-alias-label-primary);\n background: 0 0;\n border-radius: 22px;\n outline: none;\n padding: 7px 14px;\n font-size: 14px;\n font-weight: 400;\n line-height: 22px;\n}\n\n.renameInput_1808205761:disabled {\n color: var(--dsw-alias-label-dimmed);\n}\n\n.renameError_1808205761 {\n color: var(--dsw-alias-state-error-primary);\n margin-top: 8px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.deleteAction_1808205761:not(:disabled) {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.deleteStatus_1808205761 {\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 18px;\n}\n\n/* Pre-delete facts of the worktree-removal dialog: one line per fact, the\n * destructive one (uncommitted files die with the folder) in error tone. */\n.removeFacts_1808205761 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-top: 8px;\n}\n\n.removeFact_1808205761 {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.removeFactWarn_1808205761 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.modalAction_1808205761 {\n min-width: 72px;\n}\n\n.modalError_1808205761,\n.menuStatus_1808205761 {\n margin-top: 8px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.modalError_1808205761 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.menuStatus_1808205761 {\n color: var(--dsw-alias-label-secondary);\n}\n\n/* Aggregation overlay: indent member workspaces and their sessions. */\n.memberIndent_1808205761 {\n margin-left: 16px;\n}\n\n.sessionsIndent_1808205761 {\n margin-left: 8px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wide_1808205761 {\n animation: none;\n }\n\n .search_1808205761,\n .sectionLabel_1808205761,\n .searchSlot_1808205761,\n .searchInput_1808205761,\n .headerActions_1808205761 {\n transition: none;\n }\n}\n";
3805
+ //#region \0git-worktree-css:C:\Users\OYW\.dsh\gitworktree\dsh-worktree-feature-0.1.2-alpha.5\src\client\GroupedSidebar.module.css?inline
3806
+ const css = "/* Native WorkspaceBrowser.module_871918107.css_871918107 + WorkspacePicker.module_871918107.css_871918107 transplanted\n * 1:1 (DSW tokens, search expand, reduced-motion). Drag classes\n * (workspaceDrop*, listTopDrop*) are kept for P3; unused in P2.\n * Overlay: memberIndent / sessionsIndent for the repo-grouped tree. */\n\n.root_871918107 {\n --dsh-session-list-edge-inset: var(--dsh-sidebar-inline-padding);\n --dsh-session-list-scrollbar-width: 8px;\n --dsh-session-list-scrollbar-offset: 2px;\n box-sizing: border-box;\n min-height: 0;\n padding-right: var(--dsh-session-list-edge-inset);\n flex-direction: column;\n flex: 1;\n display: flex;\n}\n\n.root_871918107.rail_871918107 {\n padding-right: 0;\n}\n\n.iconButton_871918107 {\n cursor: pointer;\n width: 28px;\n height: 28px;\n color: var(--dsw-alias-label-secondary);\n background: 0 0;\n border: none;\n border-radius: 50%;\n corner-shape: round;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.iconButton_871918107:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.sectionHeader_871918107 {\n box-sizing: border-box;\n height: 36px;\n color: var(--dsw-alias-label-tertiary);\n border-radius: 12px;\n flex: none;\n justify-content: flex-end;\n align-items: center;\n gap: 4px;\n margin-bottom: 4px;\n padding-left: 4px;\n display: flex;\n overflow: hidden;\n}\n\n.root_871918107:not(.rail_871918107) .sectionHeader_871918107 {\n margin-top: 2px;\n margin-right: -4px;\n}\n\n.sectionLabel_871918107 {\n white-space: nowrap;\n opacity: 1;\n visibility: visible;\n min-width: 0;\n max-width: 45%;\n transition: max-width 0.18s var(--ds-ease-in-out), margin-right 0.18s var(--ds-ease-in-out), opacity 0.12s var(--ds-ease-in-out), transform 0.18s var(--ds-ease-in-out), visibility 0s linear;\n flex: none;\n line-height: 20px;\n overflow: hidden;\n}\n\n.sectionLabelHidden_871918107 {\n opacity: 0;\n visibility: hidden;\n max-width: 0;\n margin-right: -4px;\n transition-delay: 0s, 0s, 0s, 0s, 0.18s;\n transform: translate(-4px);\n}\n\n.searchSlot_871918107 {\n box-sizing: border-box;\n min-width: 0;\n max-width: 28px;\n transition: max-width 0.18s var(--ds-ease-in-out), padding-left 0.18s var(--ds-ease-in-out);\n flex: 1;\n align-items: center;\n margin-left: auto;\n padding-left: 0;\n display: flex;\n}\n\n.searchSlotExpanded_871918107 {\n max-width: 100%;\n padding-left: 0;\n}\n\n.headerActions_871918107 {\n opacity: 1;\n visibility: visible;\n max-width: 60px;\n transition: max-width 0.18s var(--ds-ease-in-out), opacity 0.12s var(--ds-ease-in-out), transform 0.18s var(--ds-ease-in-out), visibility 0s linear;\n flex: none;\n align-items: center;\n gap: 4px;\n display: flex;\n overflow: hidden;\n}\n\n.headerActionsHidden_871918107 {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n max-width: 0;\n transition-delay: 0s, 0s, 0s, 0.18s;\n transform: translate(4px);\n}\n\n.search_871918107 {\n box-sizing: border-box;\n cursor: text;\n width: 100%;\n height: 28px;\n color: var(--dsw-alias-label-secondary);\n transition: width 0.18s var(--ds-ease-in-out), padding 0.18s var(--ds-ease-in-out), border-color 0.18s var(--ds-ease-in-out), background-color 0.18s var(--ds-ease-in-out);\n background: 0 0;\n border: none;\n border-radius: 50%;\n corner-shape: round;\n flex: none;\n align-items: center;\n gap: 0;\n margin: 0;\n padding: 0;\n display: flex;\n overflow: hidden;\n}\n\n.searchExpanded_871918107 {\n border: 0.5px solid var(--dsw-alias-border-l4);\n width: calc(100% + 4px);\n height: 30px;\n color: var(--dsw-alias-label-caption);\n background: 0 0;\n border-radius: 10px;\n margin-inline: -2px;\n padding: 0 4px 0 0;\n}\n\n.searchButton_871918107 {\n cursor: pointer;\n width: 28px;\n height: 28px;\n color: inherit;\n background: 0 0;\n border: none;\n border-radius: 50%;\n corner-shape: round;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.searchExpanded_871918107 .searchButton_871918107 {\n width: 28px;\n height: 30px;\n}\n\n.searchButton_871918107:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.searchExpanded_871918107 .searchButton_871918107:hover {\n background: 0 0;\n}\n\n.searchInput_871918107 {\n opacity: 0;\n pointer-events: none;\n width: 0;\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n transition: opacity 0.12s var(--ds-ease-in-out);\n background: 0 0;\n border: none;\n outline: none;\n flex: 1;\n font-size: 13px;\n line-height: 18px;\n}\n\n.searchExpanded_871918107 .searchInput_871918107 {\n opacity: 1;\n pointer-events: auto;\n margin-left: -2px;\n}\n\n.searchInput_871918107::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.clearButton_871918107 {\n cursor: pointer;\n width: 24px;\n height: 24px;\n color: var(--dsw-alias-label-secondary);\n background: 0 0;\n border: none;\n border-radius: 50%;\n corner-shape: round;\n flex: none;\n justify-content: center;\n align-items: center;\n padding: 0;\n display: inline-flex;\n}\n\n.clearButton_871918107:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.rail_871918107 .sectionHeader_871918107 {\n justify-content: flex-start;\n gap: 0;\n margin-bottom: 12px;\n padding-left: 0;\n}\n\n.rail_871918107 .headerActions_871918107 {\n max-width: none;\n}\n\n.rail_871918107 .iconButton_871918107 {\n width: 36px;\n height: 36px;\n color: var(--dsw-alias-label-primary);\n}\n\n.rail_871918107 .search_871918107 {\n background: 0 0;\n border-color: #0000;\n gap: 0;\n width: 36px;\n height: 36px;\n margin: 0 0 12px;\n padding: 0;\n}\n\n.rail_871918107 .searchButton_871918107 {\n width: 36px;\n height: 36px;\n color: var(--dsw-alias-label-primary);\n}\n\n.rail_871918107 .searchButton_871918107:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.listArea_871918107 {\n min-height: 0;\n margin-left: -4px;\n margin-right: calc(-1 * var(--dsh-session-list-edge-inset));\n flex-direction: column;\n flex: 1;\n padding-left: 4px;\n display: flex;\n overflow: visible;\n}\n\n.rail_871918107 .listArea_871918107 {\n margin-left: 0;\n margin-right: 0;\n padding-left: 0;\n}\n\n.treeBody_871918107 {\n flex-direction: column;\n flex: 1;\n min-height: 0;\n display: flex;\n position: relative;\n}\n\n.fade_871918107 {\n left: 0;\n right: var(--dsh-session-list-edge-inset);\n background: linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));\n pointer-events: none;\n height: 24px;\n position: absolute;\n bottom: 0;\n}\n\n.wide_871918107 {\n animation: wide-in 0.2s var(--ds-ease-in-out);\n}\n\n@keyframes wide-in {\n 0% { opacity: 0; }\n}\n\n.list_871918107 {\n min-height: 0;\n margin-left: -4px;\n margin-right: var(--dsh-session-list-scrollbar-offset);\n padding-left: 4px;\n padding-right: calc(var(--dsh-session-list-edge-inset) - var(--dsh-session-list-scrollbar-width) - var(--dsh-session-list-scrollbar-offset));\n scrollbar-gutter: stable;\n flex: 1;\n padding-bottom: 16px;\n overflow-y: auto;\n}\n\n.flatList_871918107 > * + *,\n.searchTree_871918107 > [role=treeitem] + [role=treeitem],\n.groupSection_871918107 > * + * {\n margin-top: 2px;\n}\n\n.searchStatus_871918107,\n.searchWarning_871918107 {\n color: var(--dsw-alias-label-tertiary);\n padding: 10px 12px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.searchWarning_871918107 {\n color: var(--dsw-alias-label-secondary);\n}\n\n.groupSection_871918107 {\n position: relative;\n}\n\n.groupSection_871918107 + .groupSection_871918107 {\n margin-top: 4px;\n}\n\n/* P3: workspace drag insertion markers (unused in P2). */\n.listTopDropIndicator_871918107,\n.workspaceDropBefore_871918107:before,\n.workspaceDropAfter_871918107:after {\n content: \"\";\n z-index: 1;\n background:\n linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat,\n linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat,\n linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;\n pointer-events: none;\n height: 12px;\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.listTopDropIndicator_871918107 {\n top: -8px;\n left: 0;\n right: var(--dsh-session-list-edge-inset);\n}\n\n.listTopDropActive_871918107 > .workspaceDropBefore_871918107:first-child:before {\n display: none;\n}\n\n.workspaceDropBefore_871918107:before {\n top: -8px;\n}\n\n.workspaceDropAfter_871918107:after {\n bottom: -8px;\n}\n\n.sessionOverflowButton_871918107 {\n cursor: pointer;\n text-align: left;\n width: 100%;\n height: 28px;\n color: var(--dsw-alias-label-tertiary);\n background: 0 0;\n border: none;\n border-radius: 8px;\n padding: 0 12px 0 28px;\n font-size: 12px;\n}\n\n.groupSection_871918107 > .sessionOverflowButton_871918107 {\n margin-top: 0;\n}\n\n.sessionOverflowButton_871918107:hover {\n color: var(--dsw-alias-label-secondary);\n background: 0 0;\n}\n\n.empty_871918107 {\n color: var(--dsw-alias-label-tertiary);\n padding: 16px 12px;\n font-size: 13px;\n}\n\n.renameInput_871918107 {\n box-sizing: border-box;\n border: 0.5px solid var(--dsw-alias-border-l4);\n width: 100%;\n height: 44px;\n color: var(--dsw-alias-label-primary);\n background: 0 0;\n border-radius: 22px;\n outline: none;\n padding: 7px 14px;\n font-size: 14px;\n font-weight: 400;\n line-height: 22px;\n}\n\n.renameInput_871918107:disabled {\n color: var(--dsw-alias-label-dimmed);\n}\n\n.renameError_871918107 {\n color: var(--dsw-alias-state-error-primary);\n margin-top: 8px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.deleteAction_871918107:not(:disabled) {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.deleteStatus_871918107 {\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 18px;\n}\n\n/* Pre-delete facts of the worktree-removal dialog: one line per fact, the\n * destructive one (uncommitted files die with the folder) in error tone. */\n.removeFacts_871918107 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-top: 8px;\n}\n\n.removeFact_871918107 {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.removeFactWarn_871918107 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.modalAction_871918107 {\n min-width: 72px;\n}\n\n.modalError_871918107,\n.menuStatus_871918107 {\n margin-top: 8px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.modalError_871918107 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.menuStatus_871918107 {\n color: var(--dsw-alias-label-secondary);\n}\n\n/* Aggregation overlay: indent member workspaces and their sessions. */\n.memberIndent_871918107 {\n margin-left: 16px;\n}\n\n.sessionsIndent_871918107 {\n margin-left: 8px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wide_871918107 {\n animation: none;\n }\n\n .search_871918107,\n .sectionLabel_871918107,\n .searchSlot_871918107,\n .searchInput_871918107,\n .headerActions_871918107 {\n transition: none;\n }\n}\n";
3677
3807
  const tagId = "@laoyuehanni/dsh-git-worktree/GroupedSidebar.module.css";
3678
3808
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId + "\"]") === null) {
3679
3809
  const tag = document.createElement("style");
@@ -3683,51 +3813,51 @@ window.__ModuleLoader__.load({
3683
3813
  document.head.appendChild(tag);
3684
3814
  }
3685
3815
  var GroupedSidebar_module_default = {
3686
- "module": "module_1808205761",
3687
- "css": "css_1808205761",
3688
- "root": "root_1808205761",
3689
- "rail": "rail_1808205761",
3690
- "iconButton": "iconButton_1808205761",
3691
- "sectionHeader": "sectionHeader_1808205761",
3692
- "sectionLabel": "sectionLabel_1808205761",
3693
- "sectionLabelHidden": "sectionLabelHidden_1808205761",
3694
- "searchSlot": "searchSlot_1808205761",
3695
- "searchSlotExpanded": "searchSlotExpanded_1808205761",
3696
- "headerActions": "headerActions_1808205761",
3697
- "headerActionsHidden": "headerActionsHidden_1808205761",
3698
- "search": "search_1808205761",
3699
- "searchExpanded": "searchExpanded_1808205761",
3700
- "searchButton": "searchButton_1808205761",
3701
- "searchInput": "searchInput_1808205761",
3702
- "clearButton": "clearButton_1808205761",
3703
- "listArea": "listArea_1808205761",
3704
- "treeBody": "treeBody_1808205761",
3705
- "fade": "fade_1808205761",
3706
- "wide": "wide_1808205761",
3707
- "list": "list_1808205761",
3708
- "flatList": "flatList_1808205761",
3709
- "searchTree": "searchTree_1808205761",
3710
- "groupSection": "groupSection_1808205761",
3711
- "searchStatus": "searchStatus_1808205761",
3712
- "searchWarning": "searchWarning_1808205761",
3713
- "listTopDropIndicator": "listTopDropIndicator_1808205761",
3714
- "workspaceDropBefore": "workspaceDropBefore_1808205761",
3715
- "workspaceDropAfter": "workspaceDropAfter_1808205761",
3716
- "listTopDropActive": "listTopDropActive_1808205761",
3717
- "sessionOverflowButton": "sessionOverflowButton_1808205761",
3718
- "empty": "empty_1808205761",
3719
- "renameInput": "renameInput_1808205761",
3720
- "renameError": "renameError_1808205761",
3721
- "deleteAction": "deleteAction_1808205761",
3722
- "deleteStatus": "deleteStatus_1808205761",
3723
- "removeFacts": "removeFacts_1808205761",
3724
- "removeFact": "removeFact_1808205761",
3725
- "removeFactWarn": "removeFactWarn_1808205761",
3726
- "modalAction": "modalAction_1808205761",
3727
- "modalError": "modalError_1808205761",
3728
- "menuStatus": "menuStatus_1808205761",
3729
- "memberIndent": "memberIndent_1808205761",
3730
- "sessionsIndent": "sessionsIndent_1808205761"
3816
+ "module": "module_871918107",
3817
+ "css": "css_871918107",
3818
+ "root": "root_871918107",
3819
+ "rail": "rail_871918107",
3820
+ "iconButton": "iconButton_871918107",
3821
+ "sectionHeader": "sectionHeader_871918107",
3822
+ "sectionLabel": "sectionLabel_871918107",
3823
+ "sectionLabelHidden": "sectionLabelHidden_871918107",
3824
+ "searchSlot": "searchSlot_871918107",
3825
+ "searchSlotExpanded": "searchSlotExpanded_871918107",
3826
+ "headerActions": "headerActions_871918107",
3827
+ "headerActionsHidden": "headerActionsHidden_871918107",
3828
+ "search": "search_871918107",
3829
+ "searchExpanded": "searchExpanded_871918107",
3830
+ "searchButton": "searchButton_871918107",
3831
+ "searchInput": "searchInput_871918107",
3832
+ "clearButton": "clearButton_871918107",
3833
+ "listArea": "listArea_871918107",
3834
+ "treeBody": "treeBody_871918107",
3835
+ "fade": "fade_871918107",
3836
+ "wide": "wide_871918107",
3837
+ "list": "list_871918107",
3838
+ "flatList": "flatList_871918107",
3839
+ "searchTree": "searchTree_871918107",
3840
+ "groupSection": "groupSection_871918107",
3841
+ "searchStatus": "searchStatus_871918107",
3842
+ "searchWarning": "searchWarning_871918107",
3843
+ "listTopDropIndicator": "listTopDropIndicator_871918107",
3844
+ "workspaceDropBefore": "workspaceDropBefore_871918107",
3845
+ "workspaceDropAfter": "workspaceDropAfter_871918107",
3846
+ "listTopDropActive": "listTopDropActive_871918107",
3847
+ "sessionOverflowButton": "sessionOverflowButton_871918107",
3848
+ "empty": "empty_871918107",
3849
+ "renameInput": "renameInput_871918107",
3850
+ "renameError": "renameError_871918107",
3851
+ "deleteAction": "deleteAction_871918107",
3852
+ "deleteStatus": "deleteStatus_871918107",
3853
+ "removeFacts": "removeFacts_871918107",
3854
+ "removeFact": "removeFact_871918107",
3855
+ "removeFactWarn": "removeFactWarn_871918107",
3856
+ "modalAction": "modalAction_871918107",
3857
+ "modalError": "modalError_871918107",
3858
+ "menuStatus": "menuStatus_871918107",
3859
+ "memberIndent": "memberIndent_871918107",
3860
+ "sessionsIndent": "sessionsIndent_871918107"
3731
3861
  };
3732
3862
  //#endregion
3733
3863
  //#region src/client/GroupedSidebar.tsx
@@ -4130,44 +4260,67 @@ window.__ModuleLoader__.load({
4130
4260
  const { t } = props;
4131
4261
  const workspaces = (0, react.useSyncExternalStore)(props.workspacesList.subscribe, props.workspacesList.getSnapshot);
4132
4262
  const sessions = (0, react.useSyncExternalStore)(props.sessionsList.subscribe, props.sessionsList.getSnapshot);
4133
- const host = (0, react.useSyncExternalStore)(props.hostDescription.subscribe, props.hostDescription.getSnapshot);
4263
+ const host = (0, react.useSyncExternalStore)(props.hostInfo.subscribe, props.hostInfo.getSnapshot);
4134
4264
  const directoryFlowAvailable = (0, react.useSyncExternalStore)(props.directoryFlow.subscribe, props.directoryFlow.getSnapshot);
4135
4265
  const items = workspaces.items;
4136
4266
  const home = host?.home;
4137
4267
  const signature = (0, react.useMemo)(() => [...items].map((item) => item.path).sort().join("\n"), [items]);
4268
+ const cachedBatch = (0, react.useMemo)(() => loadFactsCache(), [signature]);
4138
4269
  const [factsState, setFactsState] = (0, react.useState)(null);
4270
+ const factsEntry = factsForSignature(signature, factsState, cachedBatch);
4271
+ const facts = factsEntry?.facts;
4272
+ const hasFactsForSignature = factsEntry !== null;
4139
4273
  const readyOnce = (0, react.useRef)(false);
4140
4274
  const signalReady = () => {
4141
4275
  if (readyOnce.current) return;
4142
4276
  readyOnce.current = true;
4143
4277
  props.onReady?.();
4144
4278
  };
4279
+ /** Signatures this mount already sent a probe for (once per signature). */
4280
+ const probedSignature = (0, react.useRef)(void 0);
4145
4281
  (0, react.useEffect)(() => {
4146
- if (factsState?.signature === signature) {
4282
+ if (probedSignature.current === signature) {
4147
4283
  signalReady();
4148
4284
  return;
4149
4285
  }
4286
+ if (items.length === 0) {
4287
+ if (workspaces.phase === "ready") {
4288
+ probedSignature.current = signature;
4289
+ signalReady();
4290
+ }
4291
+ return;
4292
+ }
4293
+ if (hasFactsForSignature) signalReady();
4150
4294
  let live = true;
4151
4295
  props.loadFacts(items.map((item) => item.path)).then((facts) => {
4152
4296
  if (!live) return;
4153
- if (facts !== void 0) setFactsState({
4154
- signature,
4155
- facts
4156
- });
4297
+ probedSignature.current = signature;
4298
+ if (facts !== void 0) {
4299
+ setFactsState({
4300
+ signature,
4301
+ facts
4302
+ });
4303
+ saveFactsCache({
4304
+ signature,
4305
+ facts
4306
+ });
4307
+ }
4157
4308
  signalReady();
4158
4309
  }, () => {
4159
- if (live) signalReady();
4310
+ if (!live) return;
4311
+ probedSignature.current = signature;
4312
+ signalReady();
4160
4313
  });
4161
4314
  return () => {
4162
4315
  live = false;
4163
4316
  };
4164
4317
  }, [
4165
4318
  signature,
4166
- factsState?.signature,
4319
+ items,
4167
4320
  props.loadFacts,
4168
- items
4321
+ workspaces.phase,
4322
+ hasFactsForSignature
4169
4323
  ]);
4170
- const facts = factsState?.signature === signature ? factsState.facts : void 0;
4171
4324
  const groups = (0, react.useMemo)(() => deriveSidebarGroups(items, facts), [items, facts]);
4172
4325
  const sessionList = sessions;
4173
4326
  const archived = workspaces.archivedSessionIds;
@@ -5284,16 +5437,33 @@ window.__ModuleLoader__.load({
5284
5437
  /** Dictionary namespace owned by this plugin. */
5285
5438
  const NS = "git-worktree";
5286
5439
  /**
5440
+ * The host service stores (ctx.workspaces.list, ctx.sessions.list) expose
5441
+ * getSnapshot/subscribe as PROTOTYPE methods of the controller's model
5442
+ * instance; a detached method reference loses its receiver and crashes inside
5443
+ * React's bare useSyncExternalStore call (the framework's own hooks wrap the
5444
+ * source and always call through the object). Every store crosses the inject
5445
+ * boundary as a closure-bounded literal instead — the same shape the
5446
+ * hand-built hostInfo/directoryFlow sources below already use.
5447
+ */
5448
+ function boundStore(source) {
5449
+ return {
5450
+ getSnapshot: () => source.getSnapshot(),
5451
+ subscribe: (listener) => source.subscribe(listener)
5452
+ };
5453
+ }
5454
+ /**
5287
5455
  * Namespace of the git-worktree settings section. Spelled here rather than
5288
5456
  * imported: a client package must not depend on a Host package.
5289
5457
  */
5290
5458
  const GIT_WORKTREE_NS = "git-worktree";
5291
- /** Required services: the slot ledger, session/workspace runtime, copy, and
5292
- * the settings scope backing the plugin configuration card. */
5459
+ /** Required services: the slot ledger, session/workspace runtimes, the
5460
+ * workspace navigation/directory face, copy, and the settings scope backing
5461
+ * the plugin configuration card. */
5293
5462
  const inject = [
5294
5463
  "slots",
5295
5464
  "sessions",
5296
5465
  "workspaces",
5466
+ "uiWorkspace",
5297
5467
  "locale",
5298
5468
  "connection",
5299
5469
  "remote",
@@ -5304,10 +5474,13 @@ window.__ModuleLoader__.load({
5304
5474
  zh,
5305
5475
  en
5306
5476
  }), "git-worktree: dictionaries");
5307
- const chipInjected = () => ({ adoptWorktree: async (path) => {
5308
- const workspace = await ctx.workspaces.create({ path });
5309
- ctx.workspaces.startSession(workspace.workspaceId);
5310
- } });
5477
+ const chipInjected = () => ({
5478
+ adoptWorktree: async (path) => {
5479
+ const workspace = await ctx.workspaces.create({ path });
5480
+ ctx.uiWorkspace.startSession(workspace.workspaceId);
5481
+ },
5482
+ sessionsList: boundStore(ctx.sessions.list)
5483
+ });
5311
5484
  ctx.slots.inject("conversation.input.left", () => ctx.slots.register({
5312
5485
  name: "conversation.input.left",
5313
5486
  id: "git-worktree",
@@ -5368,34 +5541,21 @@ window.__ModuleLoader__.load({
5368
5541
  }
5369
5542
  });
5370
5543
  };
5371
- const syncGroupingSeat = () => {
5372
- const snapshot = groupingScope.getSnapshot();
5373
- if (snapshot.status !== "ready") return seatReady;
5374
- const enabled = snapshot.value?.groupSidebar ?? true;
5375
- if (enabled === groupingEnabled) return seatReady;
5376
- groupingEnabled = enabled;
5377
- if (groupingDisposer !== void 0) {
5378
- groupingDisposer();
5379
- groupingDisposer = void 0;
5380
- }
5544
+ /** Inject the `sidebar.workspaces` occupant (priority -1 shadows the native
5545
+ * browser at priority 0) and arm its readiness epoch. */
5546
+ const registerGroupingSeat = () => {
5381
5547
  const epoch = ++seatEpoch;
5382
5548
  seatReady = new Promise((resolve) => {
5383
5549
  seatReadyResolve = resolve;
5384
5550
  });
5385
- if (!enabled) {
5386
- afterPaint().then(() => {
5387
- if (epoch === seatEpoch) finishSeat();
5388
- });
5389
- return seatReady;
5390
- }
5391
5551
  const injectFace = () => ({
5392
- workspacesList: ctx.workspaces.list,
5393
- sessionsList: ctx.sessions.list,
5552
+ workspacesList: boundStore(ctx.workspaces.list),
5553
+ sessionsList: boundStore(ctx.sessions.list),
5394
5554
  openSession: (sessionId) => {
5395
5555
  ctx.sessions.open(sessionId);
5396
5556
  },
5397
5557
  startSession: (workspaceId) => {
5398
- ctx.workspaces.startSession(workspaceId);
5558
+ ctx.uiWorkspace.startSession(workspaceId);
5399
5559
  },
5400
5560
  loadFacts: async (paths) => {
5401
5561
  const result = await requestGroupWorktrees(paths);
@@ -5454,8 +5614,14 @@ window.__ModuleLoader__.load({
5454
5614
  if (!result.ok) throw new Error(result.error);
5455
5615
  },
5456
5616
  createWorkspace: (input) => ctx.workspaces.create(input),
5457
- pickDirectory: () => ctx.workspaces.pickDirectory(),
5458
- hostDescription: ctx.get("connection").hostDescription,
5617
+ pickDirectory: () => ctx.uiWorkspace.pickDirectory(),
5618
+ hostInfo: (() => {
5619
+ const generation = ctx.get("connection").generation;
5620
+ return {
5621
+ getSnapshot: () => ctx.remote.$host,
5622
+ subscribe: (listener) => generation.subscribe(listener)
5623
+ };
5624
+ })(),
5459
5625
  directoryFlow: {
5460
5626
  getSnapshot: () => ctx.slots.entries("sidebar.workspaces.directoryFlow").length > 0,
5461
5627
  subscribe: (listener) => ctx.slots.subscribe("sidebar.workspaces.directoryFlow", listener)
@@ -5473,6 +5639,38 @@ window.__ModuleLoader__.load({
5473
5639
  seatTimer = window.setTimeout(() => {
5474
5640
  if (epoch === seatEpoch) finishSeat();
5475
5641
  }, SEAT_READY_TIMEOUT_MS);
5642
+ };
5643
+ const syncGroupingSeat = () => {
5644
+ const snapshot = groupingScope.getSnapshot();
5645
+ if (snapshot.status !== "ready") {
5646
+ if (groupingEnabled === void 0) {
5647
+ groupingEnabled = loadGroupSidebarBoot() ?? true;
5648
+ if (groupingEnabled) registerGroupingSeat();
5649
+ }
5650
+ return seatReady;
5651
+ }
5652
+ const enabled = snapshot.value?.groupSidebar ?? true;
5653
+ if (enabled === groupingEnabled) {
5654
+ saveGroupSidebarBoot(enabled);
5655
+ return seatReady;
5656
+ }
5657
+ groupingEnabled = enabled;
5658
+ saveGroupSidebarBoot(enabled);
5659
+ if (groupingDisposer !== void 0) {
5660
+ groupingDisposer();
5661
+ groupingDisposer = void 0;
5662
+ }
5663
+ const epoch = ++seatEpoch;
5664
+ seatReady = new Promise((resolve) => {
5665
+ seatReadyResolve = resolve;
5666
+ });
5667
+ if (!enabled) {
5668
+ afterPaint().then(() => {
5669
+ if (epoch === seatEpoch) finishSeat();
5670
+ });
5671
+ return seatReady;
5672
+ }
5673
+ registerGroupingSeat();
5476
5674
  return seatReady;
5477
5675
  };
5478
5676
  const waitForGroupingSeat = async (enabled) => {
@@ -5489,7 +5687,7 @@ window.__ModuleLoader__.load({
5489
5687
  inject: () => ({
5490
5688
  hooks: { gitWorktreeCard: store },
5491
5689
  ...form.actions(),
5492
- pickDirectory: () => ctx.workspaces.pickDirectory()
5690
+ pickDirectory: () => ctx.uiWorkspace.pickDirectory()
5493
5691
  })
5494
5692
  }, GitWorktreeCard));
5495
5693
  syncGroupingSeat();