@laoyuehanni/dsh-git-worktree 0.4.3-dsh-0.1.2-alpha.5 → 0.4.4
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/README.md +24 -41
- package/README.zh.md +24 -41
- package/lib/client.js +241 -216
- package/lib/git.d.ts +15 -2
- package/lib/git.js +66 -6
- package/lib/index.d.ts +11 -2
- package/lib/index.js +39 -83
- package/package.json +27 -26
- package/lib/client.js.map +0 -1
package/lib/client.js
CHANGED
|
@@ -241,8 +241,8 @@ window.__ModuleLoader__.load({
|
|
|
241
241
|
return post(ROUTE_ENSURE_DIRECTORY, { path });
|
|
242
242
|
}
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region \0git-worktree-css:
|
|
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";
|
|
244
|
+
//#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\BranchChip.module.css?inline
|
|
245
|
+
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: r20, elevation-prominent\n * hairline, --dsw-specific-menu — host 0.1.2 Menu card; hosts without\n * the token fall back to the old r12-era shadow-lv3). 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: 0;\n border-radius: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n /* Elevation-prominent carries the hairline stroke; the lv3 fallback\n * 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_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: 0;\n border-radius: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n /* Same elevation card as .popCard_2006230319 (host 0.1.2 Menu); lv3 fallback\n * for hosts without the token. */\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_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: 0.5px 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: 0.5px 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";
|
|
246
246
|
const tagId$3 = "@laoyuehanni/dsh-git-worktree/BranchChip.module.css";
|
|
247
247
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$3 + "\"]") === null) {
|
|
248
248
|
const tag = document.createElement("style");
|
|
@@ -252,48 +252,48 @@ window.__ModuleLoader__.load({
|
|
|
252
252
|
document.head.appendChild(tag);
|
|
253
253
|
}
|
|
254
254
|
var BranchChip_module_default = {
|
|
255
|
-
"input": "
|
|
256
|
-
"left": "
|
|
257
|
-
"trigger": "
|
|
258
|
-
"dock": "
|
|
259
|
-
"divider": "
|
|
260
|
-
"chip": "
|
|
261
|
-
"branch": "
|
|
262
|
-
"check": "
|
|
263
|
-
"checkOn": "
|
|
264
|
-
"box": "
|
|
265
|
-
"checkLabel": "
|
|
266
|
-
"popCard": "
|
|
267
|
-
"popAsk": "
|
|
268
|
-
"popSubject": "
|
|
269
|
-
"popActions": "
|
|
270
|
-
"menuRows": "
|
|
271
|
-
"body": "
|
|
272
|
-
"menuCard": "
|
|
273
|
-
"menuToolbar": "
|
|
274
|
-
"menuToolButton": "
|
|
275
|
-
"menuToolButtonRunning": "
|
|
276
|
-
"menuMain": "
|
|
277
|
-
"menuHeading": "
|
|
278
|
-
"menuRow": "
|
|
279
|
-
"menuRowLocked": "
|
|
280
|
-
"menuRowSelected": "
|
|
281
|
-
"menuRowPicked": "
|
|
282
|
-
"menuRowLabel": "
|
|
283
|
-
"menuRowArrow": "
|
|
284
|
-
"menuSearchMark": "
|
|
285
|
-
"menuGroup": "
|
|
286
|
-
"menuGroupTop": "
|
|
287
|
-
"menuGroupLabel": "
|
|
288
|
-
"menuGroupChevron": "
|
|
289
|
-
"menuGroupChevronOpen": "
|
|
290
|
-
"menuGroupCount": "
|
|
291
|
-
"menuEmpty": "
|
|
292
|
-
"menuSearchWrap": "
|
|
293
|
-
"menuSearch": "
|
|
294
|
-
"menuToolButtonOn": "
|
|
295
|
-
"menuCreate": "
|
|
296
|
-
"menuCreateHintBad": "
|
|
255
|
+
"input": "input_2006230319",
|
|
256
|
+
"left": "left_2006230319",
|
|
257
|
+
"trigger": "trigger_2006230319",
|
|
258
|
+
"dock": "dock_2006230319",
|
|
259
|
+
"divider": "divider_2006230319",
|
|
260
|
+
"chip": "chip_2006230319",
|
|
261
|
+
"branch": "branch_2006230319",
|
|
262
|
+
"check": "check_2006230319",
|
|
263
|
+
"checkOn": "checkOn_2006230319",
|
|
264
|
+
"box": "box_2006230319",
|
|
265
|
+
"checkLabel": "checkLabel_2006230319",
|
|
266
|
+
"popCard": "popCard_2006230319",
|
|
267
|
+
"popAsk": "popAsk_2006230319",
|
|
268
|
+
"popSubject": "popSubject_2006230319",
|
|
269
|
+
"popActions": "popActions_2006230319",
|
|
270
|
+
"menuRows": "menuRows_2006230319",
|
|
271
|
+
"body": "body_2006230319",
|
|
272
|
+
"menuCard": "menuCard_2006230319",
|
|
273
|
+
"menuToolbar": "menuToolbar_2006230319",
|
|
274
|
+
"menuToolButton": "menuToolButton_2006230319",
|
|
275
|
+
"menuToolButtonRunning": "menuToolButtonRunning_2006230319",
|
|
276
|
+
"menuMain": "menuMain_2006230319",
|
|
277
|
+
"menuHeading": "menuHeading_2006230319",
|
|
278
|
+
"menuRow": "menuRow_2006230319",
|
|
279
|
+
"menuRowLocked": "menuRowLocked_2006230319",
|
|
280
|
+
"menuRowSelected": "menuRowSelected_2006230319",
|
|
281
|
+
"menuRowPicked": "menuRowPicked_2006230319",
|
|
282
|
+
"menuRowLabel": "menuRowLabel_2006230319",
|
|
283
|
+
"menuRowArrow": "menuRowArrow_2006230319",
|
|
284
|
+
"menuSearchMark": "menuSearchMark_2006230319",
|
|
285
|
+
"menuGroup": "menuGroup_2006230319",
|
|
286
|
+
"menuGroupTop": "menuGroupTop_2006230319",
|
|
287
|
+
"menuGroupLabel": "menuGroupLabel_2006230319",
|
|
288
|
+
"menuGroupChevron": "menuGroupChevron_2006230319",
|
|
289
|
+
"menuGroupChevronOpen": "menuGroupChevronOpen_2006230319",
|
|
290
|
+
"menuGroupCount": "menuGroupCount_2006230319",
|
|
291
|
+
"menuEmpty": "menuEmpty_2006230319",
|
|
292
|
+
"menuSearchWrap": "menuSearchWrap_2006230319",
|
|
293
|
+
"menuSearch": "menuSearch_2006230319",
|
|
294
|
+
"menuToolButtonOn": "menuToolButtonOn_2006230319",
|
|
295
|
+
"menuCreate": "menuCreate_2006230319",
|
|
296
|
+
"menuCreateHintBad": "menuCreateHintBad_2006230319"
|
|
297
297
|
};
|
|
298
298
|
//#endregion
|
|
299
299
|
//#region src/client/BranchMenu.tsx
|
|
@@ -303,7 +303,7 @@ window.__ModuleLoader__.load({
|
|
|
303
303
|
* so with many branches its portal list fills the viewport — this popup
|
|
304
304
|
* replaces it with an owner-styled card: Menu's card chrome (r20,
|
|
305
305
|
* elevation-prominent hairline, --dsw-specific-menu, see .menuCard;
|
|
306
|
-
*
|
|
306
|
+
* hosts without the token 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,9 +1822,10 @@ window.__ModuleLoader__.load({
|
|
|
1822
1822
|
}), document.body);
|
|
1823
1823
|
}
|
|
1824
1824
|
/** The tool-row entry registered into conversation.input.left. */
|
|
1825
|
-
function BranchChipDock({ sessionId, useSession, adoptWorktree,
|
|
1826
|
-
const
|
|
1827
|
-
const
|
|
1825
|
+
function BranchChipDock({ sessionId, useSessions, useSession, adoptWorktree, t }) {
|
|
1826
|
+
const summary = useSessions((state) => state.byId[sessionId]);
|
|
1827
|
+
const session = useSession((s) => s);
|
|
1828
|
+
const cwd = summary?.cwd;
|
|
1828
1829
|
const [repo, refresh] = useRepoStatus(cwd);
|
|
1829
1830
|
const [menuOpen, setMenuOpen] = (0, react.useState)(false);
|
|
1830
1831
|
const [worktreeMode, setWorktreeMode] = (0, react.useState)(false);
|
|
@@ -1844,11 +1845,11 @@ window.__ModuleLoader__.load({
|
|
|
1844
1845
|
setMenuOpen(false);
|
|
1845
1846
|
}, [cwd]);
|
|
1846
1847
|
(0, react.useEffect)(() => {
|
|
1847
|
-
if (!blank) {
|
|
1848
|
+
if (!session.blank) {
|
|
1848
1849
|
setWorktreeMode(false);
|
|
1849
1850
|
setConfirm((current) => current !== null && current.kind !== "switch" ? null : current);
|
|
1850
1851
|
}
|
|
1851
|
-
}, [blank]);
|
|
1852
|
+
}, [session.blank]);
|
|
1852
1853
|
(0, react.useEffect)(() => {
|
|
1853
1854
|
const refreshIfIdle = () => {
|
|
1854
1855
|
if (busyRef.current) return;
|
|
@@ -2015,7 +2016,7 @@ window.__ModuleLoader__.load({
|
|
|
2015
2016
|
const inLinkedWorktree = facts !== null && facts.worktrees.find((w) => w.main)?.path !== facts.repoRoot;
|
|
2016
2017
|
const rows = (0, react.useMemo)(() => {
|
|
2017
2018
|
if (facts === null) return [];
|
|
2018
|
-
if (inLinkedWorktree && !blank) {
|
|
2019
|
+
if (inLinkedWorktree && !session.blank) {
|
|
2019
2020
|
const current = facts.branches.find((b) => b.kind === "local" && b.name === facts.currentBranch);
|
|
2020
2021
|
return current === void 0 ? [] : [{
|
|
2021
2022
|
name: current.name,
|
|
@@ -2028,7 +2029,7 @@ window.__ModuleLoader__.load({
|
|
|
2028
2029
|
}, [
|
|
2029
2030
|
facts,
|
|
2030
2031
|
inLinkedWorktree,
|
|
2031
|
-
blank
|
|
2032
|
+
session.blank
|
|
2032
2033
|
]);
|
|
2033
2034
|
const localNames = (0, react.useMemo)(() => rows.filter((row) => row.kind !== "remote").map((row) => row.name), [rows]);
|
|
2034
2035
|
if (facts === null) return null;
|
|
@@ -2079,7 +2080,7 @@ window.__ModuleLoader__.load({
|
|
|
2079
2080
|
className: BranchChip_module_default.branch,
|
|
2080
2081
|
children: displayBranch(facts.currentBranch)
|
|
2081
2082
|
})]
|
|
2082
|
-
}), blank && !inLinkedWorktree && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2083
|
+
}), session.blank && !inLinkedWorktree && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2083
2084
|
className: BranchChip_module_default.divider,
|
|
2084
2085
|
"aria-hidden": "true"
|
|
2085
2086
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -2115,7 +2116,7 @@ window.__ModuleLoader__.load({
|
|
|
2115
2116
|
currentBranch: facts.currentBranch,
|
|
2116
2117
|
confirm: confirmBundle,
|
|
2117
2118
|
canCreate: !worktreeMode && !inLinkedWorktree,
|
|
2118
|
-
canAdopt: blank,
|
|
2119
|
+
canAdopt: session.blank,
|
|
2119
2120
|
busy,
|
|
2120
2121
|
onCreate: (name) => {
|
|
2121
2122
|
doCreateBranch(name);
|
|
@@ -2373,8 +2374,8 @@ window.__ModuleLoader__.load({
|
|
|
2373
2374
|
});
|
|
2374
2375
|
}
|
|
2375
2376
|
//#endregion
|
|
2376
|
-
//#region \0git-worktree-css:
|
|
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.
|
|
2377
|
+
//#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\GitWorktreeCard.module.css?inline
|
|
2378
|
+
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: 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_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 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_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: 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_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: 0.5px solid var(--dsw-alias-border-l4);\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: 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_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: 0.5px 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: 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_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";
|
|
2378
2379
|
const tagId$2 = "@laoyuehanni/dsh-git-worktree/GitWorktreeCard.module.css";
|
|
2379
2380
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$2 + "\"]") === null) {
|
|
2380
2381
|
const tag = document.createElement("style");
|
|
@@ -2384,36 +2385,36 @@ window.__ModuleLoader__.load({
|
|
|
2384
2385
|
document.head.appendChild(tag);
|
|
2385
2386
|
}
|
|
2386
2387
|
var GitWorktreeCard_module_default = {
|
|
2387
|
-
"card": "
|
|
2388
|
-
"cardOpen": "
|
|
2389
|
-
"header": "
|
|
2390
|
-
"headText": "
|
|
2391
|
-
"name": "
|
|
2392
|
-
"description": "
|
|
2393
|
-
"pending": "
|
|
2394
|
-
"chevron": "
|
|
2395
|
-
"chevronOpen": "
|
|
2396
|
-
"body": "
|
|
2397
|
-
"note": "
|
|
2398
|
-
"field": "
|
|
2399
|
-
"fieldLabel": "
|
|
2400
|
-
"input": "
|
|
2401
|
-
"inputRow": "
|
|
2402
|
-
"browse": "
|
|
2403
|
-
"hint": "
|
|
2404
|
-
"footer": "
|
|
2405
|
-
"failed": "
|
|
2406
|
-
"discard": "
|
|
2407
|
-
"save": "
|
|
2408
|
-
"toggleRow": "
|
|
2409
|
-
"toggleText": "
|
|
2410
|
-
"toggleLabel": "
|
|
2411
|
-
"toggleMark": "
|
|
2412
|
-
"toggleHint": "
|
|
2413
|
-
"toggleNote": "
|
|
2414
|
-
"toggleControl": "
|
|
2415
|
-
"spinner": "
|
|
2416
|
-
"toggle": "
|
|
2388
|
+
"card": "card_1712176718",
|
|
2389
|
+
"cardOpen": "cardOpen_1712176718",
|
|
2390
|
+
"header": "header_1712176718",
|
|
2391
|
+
"headText": "headText_1712176718",
|
|
2392
|
+
"name": "name_1712176718",
|
|
2393
|
+
"description": "description_1712176718",
|
|
2394
|
+
"pending": "pending_1712176718",
|
|
2395
|
+
"chevron": "chevron_1712176718",
|
|
2396
|
+
"chevronOpen": "chevronOpen_1712176718",
|
|
2397
|
+
"body": "body_1712176718",
|
|
2398
|
+
"note": "note_1712176718",
|
|
2399
|
+
"field": "field_1712176718",
|
|
2400
|
+
"fieldLabel": "fieldLabel_1712176718",
|
|
2401
|
+
"input": "input_1712176718",
|
|
2402
|
+
"inputRow": "inputRow_1712176718",
|
|
2403
|
+
"browse": "browse_1712176718",
|
|
2404
|
+
"hint": "hint_1712176718",
|
|
2405
|
+
"footer": "footer_1712176718",
|
|
2406
|
+
"failed": "failed_1712176718",
|
|
2407
|
+
"discard": "discard_1712176718",
|
|
2408
|
+
"save": "save_1712176718",
|
|
2409
|
+
"toggleRow": "toggleRow_1712176718",
|
|
2410
|
+
"toggleText": "toggleText_1712176718",
|
|
2411
|
+
"toggleLabel": "toggleLabel_1712176718",
|
|
2412
|
+
"toggleMark": "toggleMark_1712176718",
|
|
2413
|
+
"toggleHint": "toggleHint_1712176718",
|
|
2414
|
+
"toggleNote": "toggleNote_1712176718",
|
|
2415
|
+
"toggleControl": "toggleControl_1712176718",
|
|
2416
|
+
"spinner": "spinner_1712176718",
|
|
2417
|
+
"toggle": "toggle_1712176718"
|
|
2417
2418
|
};
|
|
2418
2419
|
//#endregion
|
|
2419
2420
|
//#region src/client/GitWorktreeCard.tsx
|
|
@@ -2658,7 +2659,16 @@ window.__ModuleLoader__.load({
|
|
|
2658
2659
|
if (first === void 0) continue;
|
|
2659
2660
|
const repoName = facts?.[first.workspace.path]?.repoName ?? first.workspace.title;
|
|
2660
2661
|
if (ordered.length === 1) {
|
|
2661
|
-
singles.push({
|
|
2662
|
+
if (first.label.type === "linked") singles.push({
|
|
2663
|
+
index: bucket.index,
|
|
2664
|
+
group: {
|
|
2665
|
+
key: `ws:${first.workspace.workspaceId}`,
|
|
2666
|
+
kind: "single",
|
|
2667
|
+
repoName: void 0,
|
|
2668
|
+
members: [first]
|
|
2669
|
+
}
|
|
2670
|
+
});
|
|
2671
|
+
else singles.push({
|
|
2662
2672
|
index: bucket.index,
|
|
2663
2673
|
group: singleGroup(first.workspace)
|
|
2664
2674
|
});
|
|
@@ -2860,12 +2870,45 @@ window.__ModuleLoader__.load({
|
|
|
2860
2870
|
* win; otherwise a matching cache batch. The grouped tree must paint the
|
|
2861
2871
|
* moment the workspace path set is known — not only at `useState` init,
|
|
2862
2872
|
* when the list is still the pending empty snapshot (signature `""`).
|
|
2873
|
+
*
|
|
2874
|
+
* A newly added workspace changes the signature. Exact-match-only would
|
|
2875
|
+
* drop every cached fact until `/group` returns, flattening the tree and
|
|
2876
|
+
* hiding “删除工作树” on the new linked row. Overlapping batches reuse
|
|
2877
|
+
* facts for paths still present; unknown new paths stay absent (plain)
|
|
2878
|
+
* until the probe lands.
|
|
2863
2879
|
*/
|
|
2864
2880
|
function factsForSignature(signature, live, cached) {
|
|
2865
2881
|
if (live !== null && live.signature === signature) return live;
|
|
2866
2882
|
if (cached !== null && cached.signature === signature) return cached;
|
|
2883
|
+
if (live !== null) {
|
|
2884
|
+
const facts = projectFacts(live.facts, signature);
|
|
2885
|
+
if (facts !== void 0) return {
|
|
2886
|
+
signature,
|
|
2887
|
+
facts
|
|
2888
|
+
};
|
|
2889
|
+
}
|
|
2890
|
+
if (cached !== null) {
|
|
2891
|
+
const facts = projectFacts(cached.facts, signature);
|
|
2892
|
+
if (facts !== void 0) return {
|
|
2893
|
+
signature,
|
|
2894
|
+
facts
|
|
2895
|
+
};
|
|
2896
|
+
}
|
|
2867
2897
|
return null;
|
|
2868
2898
|
}
|
|
2899
|
+
/** Facts for paths that exist in both the batch and the current signature. */
|
|
2900
|
+
function projectFacts(facts, signature) {
|
|
2901
|
+
const paths = signature.split("\n").filter((path) => path !== "");
|
|
2902
|
+
if (paths.length === 0) return void 0;
|
|
2903
|
+
const out = {};
|
|
2904
|
+
let hit = 0;
|
|
2905
|
+
for (const path of paths) {
|
|
2906
|
+
if (!Object.hasOwn(facts, path)) continue;
|
|
2907
|
+
out[path] = facts[path] ?? null;
|
|
2908
|
+
hit += 1;
|
|
2909
|
+
}
|
|
2910
|
+
return hit === 0 ? void 0 : out;
|
|
2911
|
+
}
|
|
2869
2912
|
/** Persist one /group facts batch; write failures (quota, privacy mode) stay silent. */
|
|
2870
2913
|
function saveFactsCache(entry) {
|
|
2871
2914
|
if (typeof localStorage === "undefined") return;
|
|
@@ -3174,7 +3217,7 @@ window.__ModuleLoader__.load({
|
|
|
3174
3217
|
};
|
|
3175
3218
|
}
|
|
3176
3219
|
//#endregion
|
|
3177
|
-
//#region node_modules/.pnpm/@deepseek-ai+dsh-util-
|
|
3220
|
+
//#region node_modules/.pnpm/@deepseek-ai+dsh-util-works_407d2a08572222b71cf59f5f9298b01a/node_modules/@deepseek-ai/dsh-util-workspace-path/lib/index.js
|
|
3178
3221
|
/**
|
|
3179
3222
|
* Browser-safe Workspace path and display helpers.
|
|
3180
3223
|
* @module @deepseek-ai/dsh-util-workspace-path
|
|
@@ -3199,8 +3242,8 @@ window.__ModuleLoader__.load({
|
|
|
3199
3242
|
return path;
|
|
3200
3243
|
}
|
|
3201
3244
|
//#endregion
|
|
3202
|
-
//#region \0git-worktree-css:
|
|
3203
|
-
const css$1 = "/* Native Rows.
|
|
3245
|
+
//#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\sidebar-rows.module.css?inline
|
|
3246
|
+
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: 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_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";
|
|
3204
3247
|
const tagId$1 = "@laoyuehanni/dsh-git-worktree/sidebar-rows.module.css";
|
|
3205
3248
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$1 + "\"]") === null) {
|
|
3206
3249
|
const tag = document.createElement("style");
|
|
@@ -3210,43 +3253,43 @@ window.__ModuleLoader__.load({
|
|
|
3210
3253
|
document.head.appendChild(tag);
|
|
3211
3254
|
}
|
|
3212
3255
|
var sidebar_rows_module_default = {
|
|
3213
|
-
"module": "
|
|
3214
|
-
"css": "
|
|
3215
|
-
"projectRow": "
|
|
3216
|
-
"sessionRow": "
|
|
3217
|
-
"selected": "
|
|
3218
|
-
"searchResultRow": "
|
|
3219
|
-
"searchResultHeading": "
|
|
3220
|
-
"searchResultTitle": "
|
|
3221
|
-
"searchResultMeta": "
|
|
3222
|
-
"searchResultWorkspace": "
|
|
3223
|
-
"searchResultSnippet": "
|
|
3224
|
-
"rowActions": "
|
|
3225
|
-
"title": "
|
|
3226
|
-
"flatSessionRowWithoutStatus": "
|
|
3227
|
-
"slot": "
|
|
3228
|
-
"visuallyHidden": "
|
|
3229
|
-
"folderActive": "
|
|
3230
|
-
"chevron": "
|
|
3231
|
-
"folder": "
|
|
3232
|
-
"arrow": "
|
|
3233
|
-
"arrowOpen": "
|
|
3234
|
-
"projectText": "
|
|
3235
|
-
"strayRow": "
|
|
3236
|
-
"renameInput": "
|
|
3237
|
-
"meta": "
|
|
3238
|
-
"time": "
|
|
3239
|
-
"dot": "
|
|
3240
|
-
"menuOpen": "
|
|
3241
|
-
"dropBefore": "
|
|
3242
|
-
"dropAfter": "
|
|
3243
|
-
"hoverContent": "
|
|
3244
|
-
"hoverTitle": "
|
|
3245
|
-
"hoverPath": "
|
|
3246
|
-
"hoverTime": "
|
|
3247
|
-
"hoverStatus": "
|
|
3248
|
-
"iconButton": "
|
|
3249
|
-
"repoCount": "
|
|
3256
|
+
"module": "module_2050697429",
|
|
3257
|
+
"css": "css_2050697429",
|
|
3258
|
+
"projectRow": "projectRow_2050697429",
|
|
3259
|
+
"sessionRow": "sessionRow_2050697429",
|
|
3260
|
+
"selected": "selected_2050697429",
|
|
3261
|
+
"searchResultRow": "searchResultRow_2050697429",
|
|
3262
|
+
"searchResultHeading": "searchResultHeading_2050697429",
|
|
3263
|
+
"searchResultTitle": "searchResultTitle_2050697429",
|
|
3264
|
+
"searchResultMeta": "searchResultMeta_2050697429",
|
|
3265
|
+
"searchResultWorkspace": "searchResultWorkspace_2050697429",
|
|
3266
|
+
"searchResultSnippet": "searchResultSnippet_2050697429",
|
|
3267
|
+
"rowActions": "rowActions_2050697429",
|
|
3268
|
+
"title": "title_2050697429",
|
|
3269
|
+
"flatSessionRowWithoutStatus": "flatSessionRowWithoutStatus_2050697429",
|
|
3270
|
+
"slot": "slot_2050697429",
|
|
3271
|
+
"visuallyHidden": "visuallyHidden_2050697429",
|
|
3272
|
+
"folderActive": "folderActive_2050697429",
|
|
3273
|
+
"chevron": "chevron_2050697429",
|
|
3274
|
+
"folder": "folder_2050697429",
|
|
3275
|
+
"arrow": "arrow_2050697429",
|
|
3276
|
+
"arrowOpen": "arrowOpen_2050697429",
|
|
3277
|
+
"projectText": "projectText_2050697429",
|
|
3278
|
+
"strayRow": "strayRow_2050697429",
|
|
3279
|
+
"renameInput": "renameInput_2050697429",
|
|
3280
|
+
"meta": "meta_2050697429",
|
|
3281
|
+
"time": "time_2050697429",
|
|
3282
|
+
"dot": "dot_2050697429",
|
|
3283
|
+
"menuOpen": "menuOpen_2050697429",
|
|
3284
|
+
"dropBefore": "dropBefore_2050697429",
|
|
3285
|
+
"dropAfter": "dropAfter_2050697429",
|
|
3286
|
+
"hoverContent": "hoverContent_2050697429",
|
|
3287
|
+
"hoverTitle": "hoverTitle_2050697429",
|
|
3288
|
+
"hoverPath": "hoverPath_2050697429",
|
|
3289
|
+
"hoverTime": "hoverTime_2050697429",
|
|
3290
|
+
"hoverStatus": "hoverStatus_2050697429",
|
|
3291
|
+
"iconButton": "iconButton_2050697429",
|
|
3292
|
+
"repoCount": "repoCount_2050697429"
|
|
3250
3293
|
};
|
|
3251
3294
|
//#endregion
|
|
3252
3295
|
//#region src/client/sidebar-rows.tsx
|
|
@@ -3802,8 +3845,8 @@ window.__ModuleLoader__.load({
|
|
|
3802
3845
|
return reason instanceof Error ? reason.message : String(reason);
|
|
3803
3846
|
}
|
|
3804
3847
|
//#endregion
|
|
3805
|
-
//#region \0git-worktree-css:
|
|
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";
|
|
3848
|
+
//#region \0git-worktree-css:D:\Code\dsh-worktree\src\client\GroupedSidebar.module.css?inline
|
|
3849
|
+
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 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_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 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_1808205761 {\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_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 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_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 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_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: 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_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";
|
|
3807
3850
|
const tagId = "@laoyuehanni/dsh-git-worktree/GroupedSidebar.module.css";
|
|
3808
3851
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId + "\"]") === null) {
|
|
3809
3852
|
const tag = document.createElement("style");
|
|
@@ -3813,51 +3856,51 @@ window.__ModuleLoader__.load({
|
|
|
3813
3856
|
document.head.appendChild(tag);
|
|
3814
3857
|
}
|
|
3815
3858
|
var GroupedSidebar_module_default = {
|
|
3816
|
-
"module": "
|
|
3817
|
-
"css": "
|
|
3818
|
-
"root": "
|
|
3819
|
-
"rail": "
|
|
3820
|
-
"iconButton": "
|
|
3821
|
-
"sectionHeader": "
|
|
3822
|
-
"sectionLabel": "
|
|
3823
|
-
"sectionLabelHidden": "
|
|
3824
|
-
"searchSlot": "
|
|
3825
|
-
"searchSlotExpanded": "
|
|
3826
|
-
"headerActions": "
|
|
3827
|
-
"headerActionsHidden": "
|
|
3828
|
-
"search": "
|
|
3829
|
-
"searchExpanded": "
|
|
3830
|
-
"searchButton": "
|
|
3831
|
-
"searchInput": "
|
|
3832
|
-
"clearButton": "
|
|
3833
|
-
"listArea": "
|
|
3834
|
-
"treeBody": "
|
|
3835
|
-
"fade": "
|
|
3836
|
-
"wide": "
|
|
3837
|
-
"list": "
|
|
3838
|
-
"flatList": "
|
|
3839
|
-
"searchTree": "
|
|
3840
|
-
"groupSection": "
|
|
3841
|
-
"searchStatus": "
|
|
3842
|
-
"searchWarning": "
|
|
3843
|
-
"listTopDropIndicator": "
|
|
3844
|
-
"workspaceDropBefore": "
|
|
3845
|
-
"workspaceDropAfter": "
|
|
3846
|
-
"listTopDropActive": "
|
|
3847
|
-
"sessionOverflowButton": "
|
|
3848
|
-
"empty": "
|
|
3849
|
-
"renameInput": "
|
|
3850
|
-
"renameError": "
|
|
3851
|
-
"deleteAction": "
|
|
3852
|
-
"deleteStatus": "
|
|
3853
|
-
"removeFacts": "
|
|
3854
|
-
"removeFact": "
|
|
3855
|
-
"removeFactWarn": "
|
|
3856
|
-
"modalAction": "
|
|
3857
|
-
"modalError": "
|
|
3858
|
-
"menuStatus": "
|
|
3859
|
-
"memberIndent": "
|
|
3860
|
-
"sessionsIndent": "
|
|
3859
|
+
"module": "module_1808205761",
|
|
3860
|
+
"css": "css_1808205761",
|
|
3861
|
+
"root": "root_1808205761",
|
|
3862
|
+
"rail": "rail_1808205761",
|
|
3863
|
+
"iconButton": "iconButton_1808205761",
|
|
3864
|
+
"sectionHeader": "sectionHeader_1808205761",
|
|
3865
|
+
"sectionLabel": "sectionLabel_1808205761",
|
|
3866
|
+
"sectionLabelHidden": "sectionLabelHidden_1808205761",
|
|
3867
|
+
"searchSlot": "searchSlot_1808205761",
|
|
3868
|
+
"searchSlotExpanded": "searchSlotExpanded_1808205761",
|
|
3869
|
+
"headerActions": "headerActions_1808205761",
|
|
3870
|
+
"headerActionsHidden": "headerActionsHidden_1808205761",
|
|
3871
|
+
"search": "search_1808205761",
|
|
3872
|
+
"searchExpanded": "searchExpanded_1808205761",
|
|
3873
|
+
"searchButton": "searchButton_1808205761",
|
|
3874
|
+
"searchInput": "searchInput_1808205761",
|
|
3875
|
+
"clearButton": "clearButton_1808205761",
|
|
3876
|
+
"listArea": "listArea_1808205761",
|
|
3877
|
+
"treeBody": "treeBody_1808205761",
|
|
3878
|
+
"fade": "fade_1808205761",
|
|
3879
|
+
"wide": "wide_1808205761",
|
|
3880
|
+
"list": "list_1808205761",
|
|
3881
|
+
"flatList": "flatList_1808205761",
|
|
3882
|
+
"searchTree": "searchTree_1808205761",
|
|
3883
|
+
"groupSection": "groupSection_1808205761",
|
|
3884
|
+
"searchStatus": "searchStatus_1808205761",
|
|
3885
|
+
"searchWarning": "searchWarning_1808205761",
|
|
3886
|
+
"listTopDropIndicator": "listTopDropIndicator_1808205761",
|
|
3887
|
+
"workspaceDropBefore": "workspaceDropBefore_1808205761",
|
|
3888
|
+
"workspaceDropAfter": "workspaceDropAfter_1808205761",
|
|
3889
|
+
"listTopDropActive": "listTopDropActive_1808205761",
|
|
3890
|
+
"sessionOverflowButton": "sessionOverflowButton_1808205761",
|
|
3891
|
+
"empty": "empty_1808205761",
|
|
3892
|
+
"renameInput": "renameInput_1808205761",
|
|
3893
|
+
"renameError": "renameError_1808205761",
|
|
3894
|
+
"deleteAction": "deleteAction_1808205761",
|
|
3895
|
+
"deleteStatus": "deleteStatus_1808205761",
|
|
3896
|
+
"removeFacts": "removeFacts_1808205761",
|
|
3897
|
+
"removeFact": "removeFact_1808205761",
|
|
3898
|
+
"removeFactWarn": "removeFactWarn_1808205761",
|
|
3899
|
+
"modalAction": "modalAction_1808205761",
|
|
3900
|
+
"modalError": "modalError_1808205761",
|
|
3901
|
+
"menuStatus": "menuStatus_1808205761",
|
|
3902
|
+
"memberIndent": "memberIndent_1808205761",
|
|
3903
|
+
"sessionsIndent": "sessionsIndent_1808205761"
|
|
3861
3904
|
};
|
|
3862
3905
|
//#endregion
|
|
3863
3906
|
//#region src/client/GroupedSidebar.tsx
|
|
@@ -3868,7 +3911,7 @@ window.__ModuleLoader__.load({
|
|
|
3868
3911
|
* relative time, view options, rail, and dialogs.
|
|
3869
3912
|
*
|
|
3870
3913
|
* Drag-reorder and the native `dsh.workspace.view.v5` store are P3. Adding a
|
|
3871
|
-
* workspace uses `
|
|
3914
|
+
* workspace uses `uiWorkspace.pickDirectory` rather than re-declaring the
|
|
3872
3915
|
* `sidebar.workspaces.directoryFlow` child hole (native already declared it;
|
|
3873
3916
|
* a second declarer throws).
|
|
3874
3917
|
*
|
|
@@ -4199,8 +4242,7 @@ window.__ModuleLoader__.load({
|
|
|
4199
4242
|
}
|
|
4200
4243
|
const created = createdAtMs(member.workspace.createdAt);
|
|
4201
4244
|
const hasRunning = member.workspace.sessionIds.some((id) => sessions.byId[id]?.running === true);
|
|
4202
|
-
const
|
|
4203
|
-
const canRemoveWorktree = member.label.type === "linked" && !occupied;
|
|
4245
|
+
const canRemoveWorktree = member.label.type === "linked" && !hasRunning;
|
|
4204
4246
|
const body = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProjectRowItem, {
|
|
4205
4247
|
row: {
|
|
4206
4248
|
key,
|
|
@@ -4257,11 +4299,11 @@ window.__ModuleLoader__.load({
|
|
|
4257
4299
|
}) : body;
|
|
4258
4300
|
}
|
|
4259
4301
|
function GroupedSidebar(props) {
|
|
4260
|
-
const { t } = props;
|
|
4261
|
-
const workspaces = (
|
|
4262
|
-
const sessions = (
|
|
4263
|
-
const host = (
|
|
4264
|
-
const directoryFlowAvailable = (
|
|
4302
|
+
const { t, useWorkspaces, useSessions, useHostInfo, useDirectoryFlow } = props;
|
|
4303
|
+
const workspaces = useWorkspaces((state) => state);
|
|
4304
|
+
const sessions = useSessions((state) => state);
|
|
4305
|
+
const host = useHostInfo((state) => state);
|
|
4306
|
+
const directoryFlowAvailable = useDirectoryFlow((occupied) => occupied);
|
|
4265
4307
|
const items = workspaces.items;
|
|
4266
4308
|
const home = host?.home;
|
|
4267
4309
|
const signature = (0, react.useMemo)(() => [...items].map((item) => item.path).sort().join("\n"), [items]);
|
|
@@ -4579,7 +4621,11 @@ window.__ModuleLoader__.load({
|
|
|
4579
4621
|
setWtRemoveError(null);
|
|
4580
4622
|
(async () => {
|
|
4581
4623
|
try {
|
|
4582
|
-
|
|
4624
|
+
try {
|
|
4625
|
+
await props.removeWorktree(target.workspace.path, wtInspect.dirty > 0);
|
|
4626
|
+
} catch (reason) {
|
|
4627
|
+
if ((await props.probeDirectories([target.workspace.path]).catch(() => void 0))?.exists[target.workspace.path] !== false) throw reason;
|
|
4628
|
+
}
|
|
4583
4629
|
for (const sessionId of wtArchiveIds) await props.archiveSession(sessionId).catch((reason) => {
|
|
4584
4630
|
console.warn("session archive rejected during worktree removal:", reason);
|
|
4585
4631
|
});
|
|
@@ -5437,21 +5483,6 @@ window.__ModuleLoader__.load({
|
|
|
5437
5483
|
/** Dictionary namespace owned by this plugin. */
|
|
5438
5484
|
const NS = "git-worktree";
|
|
5439
5485
|
/**
|
|
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
|
-
/**
|
|
5455
5486
|
* Namespace of the git-worktree settings section. Spelled here rather than
|
|
5456
5487
|
* imported: a client package must not depend on a Host package.
|
|
5457
5488
|
*/
|
|
@@ -5474,13 +5505,10 @@ window.__ModuleLoader__.load({
|
|
|
5474
5505
|
zh,
|
|
5475
5506
|
en
|
|
5476
5507
|
}), "git-worktree: dictionaries");
|
|
5477
|
-
const chipInjected = () => ({
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
},
|
|
5482
|
-
sessionsList: boundStore(ctx.sessions.list)
|
|
5483
|
-
});
|
|
5508
|
+
const chipInjected = () => ({ adoptWorktree: async (path) => {
|
|
5509
|
+
const workspace = await ctx.workspaces.create({ path });
|
|
5510
|
+
ctx.uiWorkspace.startSession(workspace.workspaceId);
|
|
5511
|
+
} });
|
|
5484
5512
|
ctx.slots.inject("conversation.input.left", () => ctx.slots.register({
|
|
5485
5513
|
name: "conversation.input.left",
|
|
5486
5514
|
id: "git-worktree",
|
|
@@ -5549,8 +5577,6 @@ window.__ModuleLoader__.load({
|
|
|
5549
5577
|
seatReadyResolve = resolve;
|
|
5550
5578
|
});
|
|
5551
5579
|
const injectFace = () => ({
|
|
5552
|
-
workspacesList: boundStore(ctx.workspaces.list),
|
|
5553
|
-
sessionsList: boundStore(ctx.sessions.list),
|
|
5554
5580
|
openSession: (sessionId) => {
|
|
5555
5581
|
ctx.sessions.open(sessionId);
|
|
5556
5582
|
},
|
|
@@ -5615,16 +5641,15 @@ window.__ModuleLoader__.load({
|
|
|
5615
5641
|
},
|
|
5616
5642
|
createWorkspace: (input) => ctx.workspaces.create(input),
|
|
5617
5643
|
pickDirectory: () => ctx.uiWorkspace.pickDirectory(),
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
return {
|
|
5644
|
+
hooks: {
|
|
5645
|
+
hostInfo: {
|
|
5621
5646
|
getSnapshot: () => ctx.remote.$host,
|
|
5622
|
-
subscribe: (listener) =>
|
|
5623
|
-
}
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5647
|
+
subscribe: (listener) => ctx.on("connection/reset", listener)
|
|
5648
|
+
},
|
|
5649
|
+
directoryFlow: {
|
|
5650
|
+
getSnapshot: () => ctx.slots.entries("sidebar.workspaces.directoryFlow").length > 0,
|
|
5651
|
+
subscribe: (listener) => ctx.slots.subscribe("sidebar.workspaces.directoryFlow", listener)
|
|
5652
|
+
}
|
|
5628
5653
|
},
|
|
5629
5654
|
onReady: () => {
|
|
5630
5655
|
if (epoch === seatEpoch) finishSeat();
|