dsh-remote-vs 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +11 -1
- package/README.md +9 -1
- package/lib/client.js +1075 -9
- package/lib/index.js +381 -4
- package/lib/types/client/MonitorView.d.ts +33 -0
- package/lib/types/client/api.d.ts +8 -0
- package/lib/types/client/metrics-model.d.ts +84 -0
- package/lib/types/client/store.d.ts +1 -1
- package/lib/types/metrics.d.ts +116 -0
- package/lib/types/monitor.d.ts +57 -0
- package/lib/types/protocol.d.ts +54 -0
- package/package.json +1 -1
- package/src/client/MonitorView.tsx +636 -0
- package/src/client/RemoteRoot.tsx +9 -2
- package/src/client/api.ts +16 -0
- package/src/client/i18n.ts +84 -0
- package/src/client/metrics-model.ts +242 -0
- package/src/client/store.tsx +2 -2
- package/src/client/vsc/vsc.css +464 -0
- package/src/metrics.ts +300 -0
- package/src/monitor.ts +203 -0
- package/src/protocol.ts +58 -1
- package/src/routes.ts +47 -0
package/lib/client.js
CHANGED
|
@@ -11,7 +11,7 @@ window.__ModuleLoader__.load({
|
|
|
11
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
12
|
let react_dom = require("react-dom");
|
|
13
13
|
//#region \0dsh-css:src/client/vsc/vsc.css.mjs
|
|
14
|
-
const css$3 = "/**\n * VS Code-style design system for the remote explorer. Every surface below\n * is scoped under `.rvs-root` so the sheet can never leak into the host GUI,\n * and every host token carries a literal fallback: the plugin also renders in\n * the native right-Sidebar fallback and on hosts whose alias tokens differ.\n *\n * Palette and metrics are aligned with the reference implementation\n * (dsh-solution-explorer): 13px/20px panel type, 5px/10px tree rows with a\n * 10px radius, a 30px activity button with the badge tucked into the icon's\n * bottom-right corner, GitHub-Dark token colors, and the\n * `--e2b714 / #4ec9b0 / #f14c4c` modified/added/deleted triple.\n */\n\n.rvs-root {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-layer3: var(--dsw-alias-bg-layer-3, rgba(127, 127, 127, .16));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-accent: var(--dsw-alias-button-info-fill, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-git-d: #f14c4c;\n --rvs-git-r: #4ec9b0;\n --rvs-git-c: #58a6ff;\n --rvs-git-u: #f14c4c;\n --rvs-git-x: #6e6e6e;\n --rvs-add-bg: rgba(78, 201, 176, .15);\n --rvs-del-bg: rgba(241, 76, 76, .15);\n /* Opaque equivalents, for elements that must not show what scrolls under\n them (the pinned diff line numbers). */\n --rvs-add-solid: #e4f6f1;\n --rvs-del-solid: #fdeaea;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n /* Opaque code surfaces (Light+ default; the dark block below flips them). */\n --rvs-code-bg: #ffffff;\n --rvs-code-fg: #1f1f1f;\n --rvs-code-gutter-fg: #237893;\n\n display: flex;\n flex-direction: row;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n color: var(--rvs-fg);\n font-size: 13px;\n line-height: 20px;\n}\n\n/**\n * Code surfaces are OPAQUE, in the editor's own palette rather than the DSH\n * skin: syntax colors need a definite background to stay readable, and the\n * app shell marks its resolved scheme on <body> (same signal theme.ts reads).\n */\nbody[data-ds-dark-theme] .rvs-root {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n --rvs-code-gutter-fg: #858585;\n --rvs-add-solid: #16332e;\n --rvs-del-solid: #3b2325;\n}\n\n.rvs-edge {\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-root *,\n.rvs-portal * {\n box-sizing: border-box;\n}\n\n/* ------------------------------------------------------------ activity rail */\n\n.rvs-rail {\n flex: none;\n width: 38px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n padding: 8px 0;\n border-right: 1px solid var(--rvs-border);\n background: var(--dsw-specific-sidebar-fill, transparent);\n}\n\n.rvs-rail-btn {\n position: relative;\n flex: none;\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-rail-btn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-rail-btn.active {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n box-shadow: inset 2px 0 0 var(--rvs-brand);\n}\n\n.rvs-rail-btn.danger:hover {\n color: var(--rvs-danger);\n}\n\n.rvs-rail-badge {\n position: absolute;\n bottom: 1px;\n right: 1px;\n min-width: 14px;\n height: 14px;\n padding: 0 3px;\n border-radius: 7px;\n background: var(--rvs-accent);\n color: #fff;\n font-size: 9px;\n font-weight: 700;\n line-height: 14px;\n text-align: center;\n pointer-events: none;\n}\n\n.rvs-rail-sep {\n flex: none;\n width: 20px;\n height: 1px;\n margin: 4px 0;\n background: var(--rvs-border);\n}\n\n/* -------------------------------------------------------- panel + editor */\n\n.rvs-column {\n flex: 1;\n min-width: 0;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/**\n * One lazily-mounted panel slot: a visited panel stays mounted and is merely\n * hidden, so returning to the explorer (or the terminal) neither refetches nor\n * flashes a reload.\n */\n.rvs-viewslot {\n flex: 1;\n min-height: 0;\n min-width: 0;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n}\n\n/**\n * Padding for the legacy views (workspaces / terminal) that draw no chrome.\n *\n * It MUST be a flex column: the workspaces view scroller is its child and gets\n * its bounded height only from a flex parent (`flex:1; min-height:0`). As a\n * plain block it grew with its content instead, so the panel clipped at the\n * viewslot's `overflow:hidden` and the binding list could not scroll at all —\n * a seventh workspace (and the wizard under it) was simply unreachable.\n */\n.rvs-viewpad {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 10px 12px 14px;\n box-sizing: border-box;\n}\n\n.rvs-pane.grow {\n flex: 1;\n}\n\n.rvs-header {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n height: 34px;\n padding: 0 8px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-header .rvs-title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg3);\n}\n\n.rvs-hbtn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-hbtn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-hbtn.danger:hover {\n color: #fff;\n background: var(--rvs-danger);\n}\n\n.rvs-hbtn:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.rvs-scroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n scrollbar-width: thin;\n}\n\n.rvs-globalbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n}\n\n/*\n * Connection chip: the Host's SSH link health for the workspace on screen.\n * Lives in the top bar and, compact, in the editor info bar. Only the errored\n * state is interactive (retry); the others are a status read-out.\n */\n.rvs-conn {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 1px 6px 1px 5px;\n border: 1px solid transparent;\n border-radius: 9px;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n line-height: 16px;\n cursor: default;\n}\n\n.rvs-conn.compact {\n padding: 0 2px;\n border: none;\n background: none;\n}\n\n.rvs-conn.clickable {\n cursor: pointer;\n}\n\n.rvs-conn.clickable:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-conn-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-conn-ok .rvs-conn-dot {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-conn-error {\n color: var(--rvs-danger);\n}\n\n.rvs-conn-error .rvs-conn-dot {\n background: var(--rvs-danger);\n}\n\n.rvs-conn-label {\n max-width: 9em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.rvs-scroll::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(127, 127, 127, .6));\n}\n\n.rvs-scroll::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-vsplit-handle {\n flex: none;\n position: relative;\n height: 7px;\n cursor: row-resize;\n touch-action: none;\n}\n\n.rvs-vsplit-handle::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 3px;\n height: 1px;\n background: var(--rvs-border);\n}\n\n.rvs-vsplit-handle:hover::after,\n.rvs-vsplit-handle[data-dragging='true']::after {\n top: 2px;\n height: 3px;\n border-radius: 2px;\n background: var(--rvs-brand);\n}\n\n/* ------------------------------------------------------------------ tree */\n\n.rvs-tree {\n padding: 4px 6px 12px;\n min-width: 0;\n}\n\n.rvs-node {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n width: 100%;\n padding: 4px 8px;\n border: none;\n background: transparent;\n border-radius: 8px;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-node:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-node.selected {\n background: var(--rvs-active);\n}\n\n.rvs-node.cut {\n opacity: .5;\n}\n\n.rvs-node.drop-target {\n background: var(--rvs-active);\n outline: 1px solid var(--rvs-brand);\n outline-offset: -1px;\n}\n\n/* Where a file drag will land: a slip must not silently drop a tree into the\n wrong directory. */\n.rvs-drop-hint {\n margin: 2px 8px 4px;\n padding: 3px 8px;\n border: 1px dashed var(--rvs-brand);\n border-radius: 3px;\n font-size: 11px;\n color: var(--rvs-brand);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n/* Upload progress: one line under the header. A multi-minute transfer with no\n feedback is indistinguishable from a hung explorer, so the row names the\n count and the file on the wire. */\n.rvs-upload-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px 4px;\n font-size: 11px;\n color: var(--dsw-alias-text-secondary, rgba(127, 127, 127, .95));\n}\n\n.rvs-upload-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n\n.rvs-node-icon {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-node-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-node-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-node:hover .rvs-node-actions {\n display: flex;\n}\n\n.rvs-git-letter {\n flex: none;\n width: 14px;\n margin-left: 2px;\n font-size: 11px;\n font-weight: 700;\n text-align: center;\n}\n\n.rvs-git-M, .rvs-letter-M { color: var(--rvs-git-m); }\n.rvs-git-A, .rvs-letter-A { color: var(--rvs-git-a); }\n.rvs-git-D, .rvs-letter-D { color: var(--rvs-git-d); }\n.rvs-git-R, .rvs-letter-R { color: var(--rvs-git-r); }\n.rvs-git-C, .rvs-letter-C { color: var(--rvs-git-c); }\n.rvs-git-U, .rvs-letter-U { color: var(--rvs-git-u); }\n.rvs-git-q, .rvs-letter-q, .rvs-git-\\\\? { color: var(--rvs-git-a); }\n.rvs-git-x, .rvs-letter-x { color: var(--rvs-git-x); }\n.rvs-git-T, .rvs-letter-T { color: var(--rvs-git-m); }\n\n.rvs-rename-input {\n flex: 1;\n min-width: 0;\n padding: 0 4px;\n border: 1px solid var(--rvs-brand);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n outline: none;\n}\n\n.rvs-empty {\n padding: 18px 14px;\n color: var(--rvs-fg3);\n font-size: 12px;\n text-align: center;\n line-height: 1.7;\n}\n\n.rvs-banner {\n margin: 6px 8px;\n padding: 6px 9px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-banner.info {\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n}\n\n.rvs-banner.error {\n background: rgba(200, 60, 60, .16);\n color: var(--rvs-danger);\n}\n\n.rvs-banner.warn {\n background: rgba(226, 183, 20, .14);\n color: var(--rvs-git-m);\n}\n\n/* ------------------------------------------------- save conflict (refused) */\n\n/* The banner is a decision, not a message: it stacks its text over the actions\n so a narrow sidebar cannot squeeze the buttons into one unreadable row. */\n.rvs-conflict {\n display: flex;\n flex-direction: column;\n gap: 6px;\n white-space: normal;\n}\n\n.rvs-conflict-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-conflict-diff {\n margin: 6px 8px;\n max-height: 40vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-conflict-diff-head {\n position: sticky;\n top: 0;\n padding: 4px 8px;\n background: var(--rvs-panel, var(--rvs-hover));\n border-bottom: 1px solid var(--rvs-border);\n font-family: inherit;\n}\n\n.rvs-conflict-hunk-head {\n padding: 2px 8px;\n color: var(--rvs-fg3);\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-conflict-row {\n padding: 0 8px;\n white-space: pre;\n}\n\n.rvs-conflict-row.add {\n background: rgba(78, 201, 176, .14);\n color: var(--rvs-git-a);\n}\n\n.rvs-conflict-row.del {\n background: rgba(241, 76, 76, .12);\n color: var(--rvs-git-d);\n}\n\n.rvs-conflict-more {\n padding: 4px 8px;\n color: var(--rvs-fg3);\n}\n\n/* --------------------------------------------------------- source control */\n\n.rvs-scm-section {\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-scm-head {\n display: flex;\n align-items: center;\n gap: 4px;\n height: 28px;\n padding: 0 6px 0 4px;\n cursor: pointer;\n user-select: none;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg2);\n}\n\n.rvs-scm-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-head .rvs-count {\n margin-left: 6px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-head-actions {\n margin-left: auto;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-scm-section.collapsed > *:not(.rvs-scm-head) {\n display: none !important;\n}\n\n.rvs-chevron {\n flex: none;\n transition: transform .12s ease;\n}\n\n.rvs-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-scm-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 8px 3px 22px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 19px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-scm-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-scm-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-scm-dir {\n flex: none;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 1px;\n}\n\n.rvs-scm-item:hover .rvs-scm-actions {\n display: flex;\n}\n\n.rvs-commit-box {\n flex: none;\n padding: 8px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-commit-input {\n width: 100%;\n min-height: 58px;\n max-height: 180px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n resize: vertical;\n outline: none;\n}\n\n.rvs-commit-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-commit-row {\n display: flex;\n gap: 6px;\n margin-top: 6px;\n}\n\n.rvs-commit-btn {\n flex: 1;\n padding: 5px 8px;\n border: none;\n border-radius: 6px;\n background: var(--rvs-accent);\n color: #fff;\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n cursor: pointer;\n}\n\n.rvs-commit-btn:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-repo-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px 5px 12px;\n cursor: pointer;\n font-size: 12.5px;\n}\n\n.rvs-repo-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-repo-item.active {\n background: var(--rvs-active);\n}\n\n.rvs-repo-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repo-branch {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 1px 8px;\n border-radius: 999px;\n background: var(--rvs-hover);\n font-size: 11px;\n font-weight: 600;\n color: var(--rvs-fg);\n}\n\n/* \"cached · refreshing\" badge: quieter than a pill that carries information the\n user asked for (a branch), because it is a qualifier on the list beside it. */\n.rvs-pill-cached {\n flex: none;\n font-weight: 500;\n color: var(--rvs-fg3);\n border: 1px solid var(--rvs-border2);\n background: transparent;\n}\n\n.rvs-subpanel {\n margin: 6px 8px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n font-size: 12px;\n}\n\n.rvs-subpanel-head {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 6px;\n color: var(--rvs-fg2);\n font-weight: 600;\n}\n\n.rvs-chip {\n flex: none;\n padding: 2px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 11.5px;\n cursor: pointer;\n}\n\n.rvs-chip:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-chip.primary {\n background: var(--rvs-accent);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-chip.danger:hover {\n background: var(--rvs-danger);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-input {\n flex: 1;\n min-width: 0;\n padding: 4px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-select {\n flex: 1;\n min-width: 0;\n padding: 3px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n color-scheme: light dark;\n}\n\n.rvs-select option {\n background: Canvas;\n color: CanvasText;\n}\n\n/* ------------------------------------------------- conversation-view mount */\n\n/**\n * Bound the center surface to the height the host gave the slot.\n *\n * `flex: 1 1 0` is the load-bearing declaration, and BOTH halves of it matter.\n * The host's own slot rules are:\n *\n * .wSkVaW_viewArea { flex: 1; min-height: 0; overflow: hidden }\n * [data-phase=active] .viewArea { flex: 1 0 auto; min-height: auto }\n * .wSkVaW_root { height: 100%; position: relative }\n *\n * While a conversation is active the slot's flex-basis is `auto`, so the slot's\n * height is driven by its child's INTRINSIC size. A full-height editor then\n * pushed it to 5510px for a 300-line file, the outer scroller took over, and\n * the tab strip and file info bar scrolled off the top with the code.\n *\n * `flex-basis: 0` breaks that cycle: the item stops contributing its content\n * height, so the slot stays the size the host intended and `.cm-scroller`\n * becomes the only scroller. Measured in the fixture (.spike/layout-fixture.html,\n * which mirrors the slot rules above) — only the bottom row fits:\n *\n * flex: 1 1 0 + min-height: 0 -> 736px OK\n * flex: 1 1 auto (i.e. `flex: 1`) -> 5510px broken\n * height: 0 + min-height: 100% -> 5510px broken\n * max-height: 100% -> 5510px broken\n * height: 100vh -> 5510px broken\n *\n * `height: 100%` is deliberately NOT set here any more. It resolves to `auto`\n * against a slot whose height is not definite — it reads like the fix but\n * measures as a no-op, which is how this regressed once already.\n *\n * NOT `position: absolute` either — that was another failed attempt: `.viewArea`\n * is not itself positioned, so `inset: 0` escaped to the host's `.wSkVaW_root`\n * (which is `position: relative`) and the plugin's global bar floated on top of\n * the host's 对话 / 轨迹 / 远程编辑器 tab row.\n *\n * The sidebar's `.rvs-viewslot` is deliberately not covered: it has a bounding\n * parent and this bug is specific to the conversation slot's `min-height: auto`\n * phase.\n */\n.rvs-center {\n flex: 1 1 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/* ---------------------------------------------------------------- editor */\n\n.rvs-etabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-etabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-etab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 5px;\n max-width: 190px;\n margin: 4px 0;\n padding: 0 4px 0 8px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.rvs-etab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-etab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-etab-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-etab-dot {\n flex: none;\n font-size: 9px;\n color: var(--rvs-git-m);\n}\n\n.rvs-etab-close {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: .65;\n}\n\n.rvs-etab-close:hover {\n background: var(--rvs-hover);\n opacity: 1;\n}\n\n.rvs-einfo {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 8px 2px 10px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n line-height: 18px;\n color: var(--rvs-fg3);\n}\n\n.rvs-einfo-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Truncate from the LEFT (keep the tail) without reordering the text:\n `plaintext` gives the content its own LTR base direction, which is what\n stops a leading \"/\" from rendering as a trailing one. */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-einfo-spacer {\n margin-left: auto;\n}\n\n.rvs-status.dirty { color: var(--rvs-git-m); }\n.rvs-status.saved { color: var(--rvs-git-a); }\n.rvs-status.saving { color: var(--rvs-fg2); }\n\n.rvs-body {\n flex: 1;\n min-height: 0;\n min-width: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n /* Anchors portalled overlays (the find widget) outside every scroller. */\n position: relative;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-editor-host {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep a panel mounted but out of layout (and out of the a11y tree). Used by\n the editor host in preview mode: unmounting it destroyed the buffer and the\n undo stack, hiding it preserves both. */\n.rvs-hidden {\n display: none !important;\n}\n\n/* Find-match marks. Painted by our own StateField (`findMatchHighlight`), and\n deliberately the SAME colours as the `.cm-searchMatch` rules below so the\n two paths cannot drift apart. */\n.rvs-find-match {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n border-radius: 2px;\n}\n\n.rvs-find-match.current {\n background-color: rgba(226, 183, 20, .48);\n}\n\n/* ------------------------------------------------------- preview surfaces */\n\n.rvs-preview-img {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n background-color: var(--rvs-code-bg);\n background-image:\n linear-gradient(45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(-45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgba(127, 127, 127, .08) 75%),\n linear-gradient(-45deg, transparent 75%, rgba(127, 127, 127, .08) 75%);\n background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px;\n background-position: 0 0, 0 10px, 10px -10px, -10px 0;\n}\n\n.rvs-preview-img img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n image-rendering: auto;\n}\n\n.rvs-markdown {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 12px 14px 24px;\n font-size: 13px;\n line-height: 1.7;\n color: var(--rvs-code-fg);\n background: var(--rvs-code-bg);\n user-select: text;\n}\n\n.rvs-markdown h1, .rvs-markdown h2, .rvs-markdown h3, .rvs-markdown h4 {\n margin: 14px 0 6px;\n line-height: 1.35;\n}\n\n.rvs-markdown h1 { font-size: 19px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 5px; }\n.rvs-markdown h2 { font-size: 16px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 4px; }\n.rvs-markdown h3 { font-size: 14px; }\n.rvs-markdown p { margin: 6px 0; }\n.rvs-markdown ul, .rvs-markdown ol { margin: 6px 0; padding-left: 22px; }\n.rvs-markdown li { margin: 2px 0; }\n.rvs-markdown code {\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--rvs-hover);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n.rvs-markdown pre {\n margin: 8px 0;\n padding: 9px 11px;\n border-radius: 8px;\n background: var(--rvs-input);\n overflow-x: auto;\n}\n.rvs-markdown pre code { padding: 0; background: transparent; }\n.rvs-markdown blockquote {\n margin: 8px 0;\n padding: 2px 12px;\n border-left: 3px solid var(--rvs-border2);\n color: var(--rvs-fg2);\n}\n.rvs-markdown a { color: var(--dsw-alias-label-link, #58a6ff); text-decoration: none; }\n.rvs-markdown a:hover { text-decoration: underline; }\n.rvs-markdown table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }\n.rvs-markdown th, .rvs-markdown td { border: 1px solid var(--rvs-border2); padding: 4px 8px; }\n.rvs-markdown hr { border: none; border-top: 1px solid var(--rvs-border); margin: 12px 0; }\n\n.rvs-html-frame {\n flex: 1;\n min-height: 0;\n width: 100%;\n border: none;\n background: #fff;\n}\n\n/* ------------------------------------------------------------------ diff */\n\n.rvs-diff {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.rvs-diff-toolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Prev/next change, in the toolbar's free space.\n *\n * Two chevrons around a tabular counter: the pair then reads as \"jump to change\n * n of N\" instead of two anonymous arrows, and the counter doubles as the \"where\n * am I\" cue while scrolling by hand.\n */\n.rvs-hunknav {\n display: inline-flex;\n align-items: center;\n gap: 1px;\n margin-right: 2px;\n}\n\n.rvs-hunknav-pos {\n min-width: 30px;\n text-align: center;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-seg {\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-seg button {\n padding: 2px 9px;\n border: none;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-seg button.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n}\n\n.rvs-seg button:hover:not(.active) {\n background: var(--rvs-hover);\n}\n\n.rvs-diff-grid {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 18px;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/**\n * Top horizontal scrollbar.\n *\n * The two panes scroll horizontally on their own — so a long line can never\n * widen the layout — and this proxy bar drives both of them from the TOP of\n * the view, instead of forcing a scroll to the bottom of the file to reach a\n * horizontal bar. Its inner spacer is sized to the widest line, and the\n * component only renders it when a line really is wider than the grid.\n *\n * Sized and coloured to be SEEN: as a 13 px band with `scrollbar-width: thin`\n * and a faint thumb, it read as \"there is no horizontal scrollbar at all\".\n */\n.rvs-hbar {\n flex: none;\n height: 15px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-hover);\n}\n\n.rvs-hbar-inner {\n height: 1px;\n}\n\n.rvs-hbar::-webkit-scrollbar {\n height: 11px;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .75));\n border-radius: 6px;\n border: 2px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .95));\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-diff-cols {\n display: flex;\n align-items: stretch;\n min-width: 0;\n}\n\n/**\n * One diff pane. `flex: 1 1 0` keeps the panes EXACTLY equal however long a\n * line is (the previous row markup let a long line widen its own pane, which\n * is what broke the symmetry). Each pane keeps its own horizontal scroll, and\n * its scrollbar is now VISIBLE: the top proxy remains the convenient control,\n * but the pane's own bar is what a user reaches for first, and it sits right\n * under the content when the file is shorter than the view.\n */\n.rvs-diff-col {\n flex: 1 1 0;\n min-width: 0;\n overflow-x: auto;\n overflow-y: hidden;\n}\n\n.rvs-diff-col::-webkit-scrollbar {\n height: 9px;\n width: 0;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .6));\n border-radius: 5px;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .85));\n}\n\n.rvs-diff-col::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-dline {\n display: flex;\n align-items: flex-start;\n height: 18px;\n line-height: 18px;\n white-space: pre;\n}\n\n.rvs-dline-num {\n /* Pinned while the line scrolls sideways, so a long line never takes the\n line numbers away with it. */\n position: sticky;\n left: 0;\n z-index: 1;\n flex: none;\n width: 3.4em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .85;\n user-select: none;\n background: var(--rvs-code-bg);\n}\n\n.rvs-row-del .rvs-dline-num {\n background: var(--rvs-del-solid);\n}\n\n.rvs-row-add .rvs-dline-num {\n background: var(--rvs-add-solid);\n}\n\n.rvs-dline-text {\n flex: 1;\n padding-right: 10px;\n user-select: text;\n}\n\n.rvs-gutter-col {\n flex: none;\n width: 30px;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-line {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.rvs-diff-grid::-webkit-scrollbar {\n width: 9px;\n height: 0;\n}\n\n.rvs-diff-grid::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-num {\n flex: none;\n display: inline-block;\n width: 3.2em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .6;\n user-select: none;\n}\n\n.rvs-row-del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-row-del .rvs-dline-text,\n.rvs-row-del .rvs-dline-num,\n.rvs-row-del .rvs-num {\n color: #f14c4c;\n}\n\n.rvs-row-add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-row-add .rvs-dline-text,\n.rvs-row-add .rvs-dline-num,\n.rvs-row-add .rvs-num {\n color: #4ec9b0;\n}\n\n.rvs-row-empty {\n color: var(--rvs-fg3);\n opacity: .35;\n}\n\n.rvs-gutter {\n flex: none;\n width: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n opacity: .7;\n}\n\n.rvs-hunk-btns {\n display: flex;\n gap: 2px;\n}\n\n.rvs-hunk-btn {\n width: 13px;\n height: 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: transparent;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-hunk-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-hunk-btn.stage:hover {\n color: var(--rvs-git-a);\n}\n\n.rvs-hunk-btn.revert:hover {\n color: var(--rvs-git-d);\n}\n\n/**\n * Token colors: VS Code Dark+ / Light+, matching the CodeMirror theme in\n * `vsc/editor-theme.ts`. Keeping ONE palette for both surfaces means a file\n * does not change colors when the diff is switched to its editable side.\n */\n.rvs-t-comment { color: #6a9955; }\n.rvs-t-string { color: #ce9178; }\n.rvs-t-keyword { color: #569cd6; }\n.rvs-t-number { color: #b5cea8; }\n.rvs-t-func { color: #dcdcaa; }\n.rvs-t-type { color: #4ec9b0; }\n.rvs-t-attr { color: #9cdcfe; }\n.rvs-t-variable { color: #9cdcfe; }\n.rvs-t-operator { color: #d4d4d4; }\n.rvs-t-punct { color: #d4d4d4; }\n.rvs-t-tag { color: #569cd6; }\n.rvs-t-meta { color: #c586c0; }\n.rvs-t-insert { color: #4ec9b0; }\n.rvs-t-delete { color: #f14c4c; }\n\nbody:not([data-ds-dark-theme]) .rvs-t-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-t-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-t-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-t-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-t-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-t-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-t-attr,\nbody:not([data-ds-dark-theme]) .rvs-t-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-t-operator,\nbody:not([data-ds-dark-theme]) .rvs-t-punct { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-t-meta { color: #af00db; }\n\n/**\n * CodeMirror token colors, applied through FIXED class names emitted by the\n * highlight style (`vsc/editor-palette.ts`). Fixed names mean the colors come\n * from this stylesheet — the same one that paints the rest of the UI — so a\n * code file can never go monochrome because a generated class name changed or\n * an injected style failed. Same Dark+ / Light+ palette as the diff panes\n * above, so a file keeps its colors when switching between the two views.\n */\n.rvs-ck-comment { color: #6a9955; }\n.rvs-ck-keyword { color: #569cd6; }\n.rvs-ck-control { color: #c586c0; }\n.rvs-ck-string { color: #ce9178; }\n.rvs-ck-regexp { color: #d16969; }\n.rvs-ck-number { color: #b5cea8; }\n.rvs-ck-constant { color: #569cd6; }\n.rvs-ck-func { color: #dcdcaa; }\n.rvs-ck-type { color: #4ec9b0; }\n.rvs-ck-variable { color: #9cdcfe; }\n.rvs-ck-attr { color: #9cdcfe; }\n.rvs-ck-meta { color: #c586c0; }\n.rvs-ck-punct { color: #d4d4d4; }\n.rvs-ck-op { color: #d4d4d4; }\n.rvs-ck-heading { color: #569cd6; font-weight: 700; }\n.rvs-ck-em { font-style: italic; }\n.rvs-ck-link { color: #9cdcfe; text-decoration: underline; }\n.rvs-ck-strike { text-decoration: line-through; }\n.rvs-ck-invalid { color: #f44747; }\n\nbody:not([data-ds-dark-theme]) .rvs-ck-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-control { color: #af00db; }\nbody:not([data-ds-dark-theme]) .rvs-ck-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-ck-regexp { color: #811f3f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-ck-constant { color: #0070c1; }\nbody:not([data-ds-dark-theme]) .rvs-ck-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-ck-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-ck-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-attr { color: #e50000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-meta { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-punct,\nbody:not([data-ds-dark-theme]) .rvs-ck-op { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-heading { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-link { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-invalid { color: #cd3131; }\n\n/**\n * Opaque editor surface, also as plain CSS: the CodeMirror theme paints it too\n * (following the scheme through a Compartment), but a transparent editor is\n * the one failure a user notices immediately, so the container states it as\n * well.\n */\n.rvs-edge .cm-editor,\n.rvs-edge .cm-scroller,\n.rvs-edge .cm-gutters {\n background-color: var(--rvs-code-bg);\n}\n\n.rvs-edge .cm-editor {\n color: var(--rvs-code-fg);\n}\n\n.rvs-edge .cm-gutters {\n color: var(--rvs-code-gutter-fg, var(--rvs-fg3));\n border-right: 1px solid var(--rvs-border);\n}\n\n.rvs-edge .cm-activeLine {\n background-color: rgba(127, 127, 127, .08);\n}\n\n.rvs-edge .cm-activeLineGutter {\n background-color: rgba(127, 127, 127, .12);\n}\n\n/**\n * The code editor's own scrollbars.\n *\n * These had NO rule at all: CodeMirror's scroller is `.cm-scroller`, which is\n * none of `.rvs-scroll` / `.rvs-diff-grid` / `.rvs-hbar`, so the editor fell\n * back to the browser default — too thin to hit with a mouse.\n *\n * Both notations are needed and must stay in step: Chromium honours\n * `scrollbar-width` over `::-webkit-scrollbar` when both apply, so setting\n * only the webkit half would silently have no effect. Keep the numbers equal.\n */\n.rvs-edge .cm-scroller {\n scrollbar-width: auto;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar {\n width: 14px;\n height: 14px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb {\n /* Opaque, not a translucent token: a thin wash over code is exactly the\n low-contrast target that is hard to grab. */\n background: rgba(121, 121, 121, .8);\n border: 3px solid transparent;\n border-radius: 7px;\n background-clip: padding-box;\n min-height: 36px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb:hover {\n background: rgba(150, 150, 150, .95);\n border: 3px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n/* ------------------------------------------------------------ find widget */\n\n/**\n * \"You landed here\": the transient highlight on the line a jump landed on\n * (search hit, @-reference).\n *\n * Deliberately NOT a warm/amber wash: over the dark editor that muddies into a\n * brown-black band that reads as a shadow and swallows annotation colors. This\n * is the accent blue instead — a tinted band with a bright edge on the left and\n * hairlines top/bottom, so it reads as a marked region while every token keeps\n * its own colour and contrast.\n */\n.rvs-reveal-line {\n background-color: rgba(88, 166, 255, .22);\n box-shadow:\n inset 3px 0 0 0 #58a6ff,\n inset 0 1px 0 0 rgba(88, 166, 255, .38),\n inset 0 -1px 0 0 rgba(88, 166, 255, .38);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-reveal-line {\n background-color: rgba(77, 107, 254, .14);\n box-shadow:\n inset 3px 0 0 0 #4d6bfe,\n inset 0 1px 0 0 rgba(77, 107, 254, .35),\n inset 0 -1px 0 0 rgba(77, 107, 254, .35);\n}\n\n/* --------------------------------------------------------- session changes */\n\n/**\n * 「本会话改了什么」:代码行背景 + 左侧改动栏(Cursor 风格)。\n *\n * 三种形态必须**一眼分得开**,光靠绿/红两个色相不够(色弱用户看新增行和删除行\n * 会糊成同一片),所以每种的左侧色条宽度/花样的语义也不同:\n * - 新增:实心绿条;\n * - 修改:实心蓝条(不是绿:修改块里既有留下的行也有新写的行,用\"中性的已变更\"\n * 色不会误导读者以为整块都是新内容);\n * - 删除:**斜纹**红底 + 更粗的红条 —— 这一行其实已经不存在了,只在中止位置上\n * 留个锚点,斜纹是这一层\"虚\"的信息里最不容易被当成真内容的花样。\n *\n * 选择器带上 `.cm-line`:`.cm-activeLine` 由 CodeMirror 的主题注入(运行时\n * `<style>`,通常排在本文档之后),只写 `.rvs-change-*` 两者同权重时会输给它,\n * 光标所在的那一行改动就会消失。\n */\n.rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(46, 160, 67, .17);\n box-shadow:\n inset 3px 0 0 0 #2ea043,\n inset 0 -1px 0 0 rgba(46, 160, 67, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(56, 139, 253, .15);\n box-shadow:\n inset 3px 0 0 0 #388bfd,\n inset 0 -1px 0 0 rgba(56, 139, 253, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(248, 81, 73, .09);\n background-image: repeating-linear-gradient(135deg, rgba(248, 81, 73, .17) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #f85149;\n}\n\n/* 改动栏本身:符号 + 一列与行背景同色的窄条,读起来才是一条\"改动边\"。 */\n.rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #2ea043;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #388bfd;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #f85149;\n}\n\n.rvs-edge .rvs-change-mark {\n display: inline-block;\n width: 12px;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 1;\n text-align: center;\n user-select: none;\n}\n\n.rvs-edge .rvs-change-mark-add { color: #2ea043; }\n.rvs-edge .rvs-change-mark-mod { color: #388bfd; }\n.rvs-edge .rvs-change-mark-del { color: #f85149; }\n\n/**\n * 行内(字符级)差异:上面那三种底色回答\"哪几行变了\",这两条回答\"那一行的哪几个\n * 字变了\"。只改一个词的编辑,整行同色时完全看不出改了什么。\n *\n * `rvs-change-word-add` 刻意**只给背景、不给 `color`**:代码有自己的语法着色,\n * 覆盖前景色会把关键字/字符串/注释染成同一种颜色,比不标还难读。透明度压在行\n * 底色之上一点点,叠起来仍读得出\"整块改动\"的边界,又能看出块内哪几个字是新的。\n */\n.rvs-edge .rvs-change-word-add {\n background-color: rgba(46, 160, 67, .22);\n border-radius: 2px;\n}\n\n/**\n * 被删掉、在新文件里已经不存在的内容:零宽 widget,红底 + 删除线。\n *\n * 删除线画在 chip 自己身上(chip 是独立元素,不会波及周围代码);`white-space:\n * pre` 保留被删文本自己的缩进 —— 截断/去空白都会让 chip 谎报\"删了什么\"。\n * 字号略小 + 降一点不透明度,是让它读起来像\"残留物\"而不是一行真代码。\n */\n.rvs-edge .rvs-change-word-del {\n padding: 0 3px;\n margin: 0 1px;\n border-radius: 3px;\n background-color: rgba(248, 81, 73, .18);\n font-size: .92em;\n text-decoration: line-through;\n opacity: .85;\n white-space: pre;\n}\n\n/**\n * 撑宽度的隐形符号:只用它占位,绝不显示(见 `change-marks.ts` 的 SpacerMarker,\n * CodeMirror 会给这个 spacer 元素加 `visibility: hidden`,这里不重复声明)。\n */\n.rvs-edge .rvs-change-spacer {\n opacity: 0;\n}\n\n/* 浅色主题:同样的色相,压暗 + 提高不透明度,在近白底上才看得清。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(31, 136, 61, .13);\n box-shadow:\n inset 3px 0 0 0 #1f883d,\n inset 0 -1px 0 0 rgba(31, 136, 61, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(9, 105, 218, .12);\n box-shadow:\n inset 3px 0 0 0 #0969da,\n inset 0 -1px 0 0 rgba(9, 105, 218, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(207, 34, 46, .07);\n background-image: repeating-linear-gradient(135deg, rgba(207, 34, 46, .14) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #1f883d;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #0969da;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-add { color: #1f883d; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-mod { color: #0969da; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-del { color: #cf222e; }\n\n/* 浅色主题的行内差异:同样的色相压暗,在近白底上才看得清(暗色那套会糊成一片)。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-add {\n background-color: rgba(26, 127, 55, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-del {\n background-color: rgba(207, 34, 46, .14);\n}\n\n/**\n * 改动跳转按钮:浮在编辑器右上角。\n *\n * 放在编辑器上而不是面板里 —— 文件打开后光标就在这里,而面板可能被收起、被滚走。\n * 容器 `.rvs-body` 已经是 `position: relative`(它本来用于挂 find 浮层),所以这里\n * 只做绝对定位,不引入新的定位上下文。`pointer-events` 只开在按钮上:这块区域压在\n * 编辑器文字上方,整块可点会把右上角那几行变成死区。\n */\n.rvs-change-nav {\n position: absolute;\n top: 8px;\n right: 14px;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 3px 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: Canvas;\n box-shadow: 0 2px 8px rgba(0, 0, 0, .28);\n pointer-events: none;\n}\n\n/* The counter is what makes this read as \"3 of 7 changes\" rather than two\n anonymous arrows — and it keeps the buttons from looking like decoration. */\n.rvs-change-nav-count {\n padding: 0 6px 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.rvs-change-nav-btn {\n width: 26px;\n height: 22px;\n padding: 0;\n border: 1px solid transparent;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg);\n font-size: 13px;\n font-weight: 600;\n line-height: 20px;\n text-align: center;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.rvs-change-nav-btn:hover {\n border-color: var(--rvs-border2);\n background: var(--rvs-hover);\n color: var(--rvs-brand);\n}\n\n.rvs-change-nav-btn:active { background: var(--rvs-active); }\n\n/**\n * 悬浮在改动行上出现的「撤销这处改动」按钮。\n *\n * 它**不在编辑器的 DOM 里**:`undo-affordance.ts` 把它当 `position: fixed` 的元素挂到\n * `document.body`(和「添加到对话」那个浮层同一套做法),所以这里的选择器不带\n * `.rvs-edge` —— 带上了就一条都不生效。固定定位 + 高 z-index 是刻意的:宿主容器有\n * `overflow: hidden`,挂在里面会被 CodeMirror 的滚动层裁掉。\n *\n * 颜色按\"危险动作\"给:默认红边红字、悬停实心红。底色不透明(不用半透明的 overlay\n * token),否则后面的代码文字会透出来。\n */\n.rvs-undo-affordance {\n position: fixed;\n z-index: 2100;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 220px;\n padding: 3px 9px;\n border: 1px solid #f85149;\n border-radius: 6px;\n background-color: #1e2229;\n color: #ffb4ae;\n /* 按钮挂在 body 上,没有 .rvs-edge 的字体上下文:跟随宿主页面字体。 */\n font-family: inherit;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n cursor: pointer;\n box-shadow: 0 6px 18px rgba(0, 0, 0, .45);\n /* 纵向以悬停行的中线对齐(横向坐标由 JS 按行尾算好)。 */\n transform: translateY(-50%);\n}\n\n.rvs-undo-affordance:hover {\n background-color: #f85149;\n border-color: #f85149;\n color: #fff;\n}\n\n.rvs-undo-affordance:active {\n transform: translateY(-50%) scale(.97);\n}\n\n.rvs-undo-affordance:focus-visible {\n outline: 2px solid #58a6ff;\n outline-offset: 1px;\n}\n\n/* 删除锚点:这一行其实已经不在了,虚线边框把它和\"真实存在的行\"分开。 */\n.rvs-undo-affordance[data-kind=\"del\"] {\n border-style: dashed;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance {\n border-color: #cf222e;\n background-color: #ffffff;\n color: #a40e26;\n box-shadow: 0 6px 18px rgba(31, 35, 40, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:hover {\n background-color: #cf222e;\n border-color: #cf222e;\n color: #fff;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:focus-visible {\n outline-color: #4d6bfe;\n}\n\n/**\n * CodeMirror's own search decorations, also stated here: the editor's theme is\n * injected by the library, and these must stay readable even when only this\n * stylesheet is in play.\n */\n.rvs-edge .cm-searchMatch {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n}\n\n.rvs-edge .cm-searchMatch-selected {\n background-color: rgba(226, 183, 20, .48);\n}\n\n.rvs-edge .cm-selectionBackground,\n.rvs-edge .cm-content ::selection {\n background-color: rgba(58, 110, 165, .55) !important;\n}\n\n/** Build stamp in the editor info bar: identifies the loaded client bundle. */\n.rvs-build {\n flex: none;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n color: var(--rvs-fg3);\n font-size: 10px;\n font-family: var(--rvs-mono);\n opacity: .85;\n user-select: text;\n}\n\n.rvs-find {\n position: absolute;\n top: 6px;\n right: 18px;\n z-index: 30;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 3px 4px 3px 7px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 4px 14px rgba(0, 0, 0, .28);\n font-size: 12px;\n}\n\n.rvs-find-input {\n width: 170px;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 5px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-find-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-find-count {\n flex: none;\n min-width: 54px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-find-count.none {\n color: var(--rvs-git-d);\n}\n\n.rvs-code {\n flex: 1;\n min-height: 0;\n overflow: auto;\n margin: 0;\n padding: 6px 0 16px;\n font-family: var(--rvs-mono);\n font-size: 12.5px;\n line-height: 18px;\n white-space: pre;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-code-line {\n display: flex;\n align-items: flex-start;\n min-width: max-content;\n}\n\n.rvs-code-line:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-code-text {\n flex: 1;\n padding-right: 10px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n/* ---------------------------------------------------------- history list */\n\n.rvs-commit-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 4px 8px 4px 4px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-commit-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-commit-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-graph-svg {\n flex: none;\n display: block;\n}\n\n.rvs-commit-hash {\n flex: none;\n font-family: var(--rvs-mono);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-commit-msg {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-commit-date {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-ref-badge {\n flex: none;\n padding: 0 5px;\n border-radius: 8px;\n border: 1px solid var(--rvs-border2);\n font-size: 10px;\n line-height: 15px;\n color: var(--rvs-fg2);\n}\n\n.rvs-ref-badge.head {\n border-color: var(--rvs-brand);\n background: rgba(77, 107, 254, .2);\n color: var(--rvs-fg);\n}\n\n.rvs-ref-badge.tag {\n border-color: rgba(226, 183, 20, .55);\n background: rgba(226, 183, 20, .16);\n color: var(--rvs-git-m);\n}\n\n.rvs-detail {\n margin: 0 6px 8px;\n padding: 8px 10px;\n border: 1px solid var(--rvs-border2);\n border-left: 3px solid var(--rvs-accent);\n border-radius: 8px;\n background: var(--rvs-layer3);\n font-size: 12px;\n}\n\n.rvs-detail-meta {\n color: var(--rvs-fg3);\n font-size: 11px;\n margin-bottom: 6px;\n white-space: pre-wrap;\n}\n\n.rvs-file-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 4px;\n border-radius: 5px;\n cursor: pointer;\n}\n\n.rvs-file-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-file-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Same tail-first truncation as the info bar; `plaintext` keeps the path's\n own LTR order (see .rvs-einfo-path). */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-file-status {\n flex: none;\n width: 16px;\n text-align: center;\n font-weight: 700;\n font-size: 11px;\n}\n\n/* ------------------------------------------------------- commit pane */\n\n/**\n * The history panel's bottom half: the graph keeps the top, the selected\n * commit takes this pane below the drag handle (same gesture and styling as\n * the editor split, so `.rvs-vsplit-handle` is reused rather than copied).\n */\n.rvs-history-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-hpane {\n flex: none;\n min-height: 140px;\n max-height: 82%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-top: 1px solid var(--rvs-border);\n /* Same glass as the graph above (the sidebar's own backdrop shows through):\n an opaque `.rvs-code-bg` here read as a separate dark slab glued under the\n list. Patch rows already carry their own translucent add/del washes, so the\n diff stays legible without a filled background. */\n background: transparent;\n}\n\n/* Full-height mode: the graph is hidden by the panel, so the pane takes the\n remaining column instead of its persisted pixel height. */\n.rvs-hpane.expanded {\n flex: 1;\n max-height: none;\n}\n\n/* A toolbar toggle that is currently ON (wrap, for example). */\n.rvs-hbtn.active {\n color: var(--rvs-brand);\n}\n\n.rvs-hpane-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* Tab strip: same underline idiom as the editor's diff/worktree switch, but\n scoped so the pane's three views cannot be confused with editor tabs. */\n.rvs-htabs {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* The tabs themselves live in their own role=tablist element: the strip also\n carries the hash, expand and close buttons, and those must NOT inherit the\n tablist's arrow-key handling (ArrowRight on \"close\" used to switch tabs). */\n.rvs-hpane-tablist {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-htab {\n appearance: none;\n border: none;\n border-bottom: 2px solid transparent;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n padding: 5px 8px 4px;\n cursor: pointer;\n}\n\n.rvs-htab:hover {\n color: var(--rvs-fg);\n}\n\n.rvs-htab.active {\n color: var(--rvs-fg);\n border-bottom-color: var(--rvs-brand);\n}\n\n.rvs-htabs-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hhash-mini {\n flex: none;\n margin-right: 2px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Every tab body stays mounted (the patch's scroll position and parse survive\n * a look at 提交详情) and is hidden with the `hidden` attribute. The class\n * declares `flex`, which outranks the UA `[hidden]` rule, so hiding needs an\n * explicit rule of its own.\n */\n.rvs-hbody {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-hbody[hidden] {\n display: none;\n}\n\n/* -- 提交详情 -- */\n\n.rvs-hsubject {\n font-size: 13px;\n font-weight: 600;\n line-height: 1.45;\n margin-bottom: 8px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hmeta {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 21px;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-icon {\n flex: none;\n display: flex;\n width: 13px;\n align-items: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-hmeta-label {\n flex: none;\n}\n\n.rvs-hhash {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg2);\n user-select: all;\n}\n\n.rvs-hparent {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hdash {\n color: var(--rvs-fg3);\n}\n\n.rvs-hrefs {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-top: 6px;\n}\n\n.rvs-hmsg {\n margin-top: 10px;\n padding-top: 8px;\n border-top: 1px dashed var(--rvs-border);\n font-size: 12px;\n line-height: 1.55;\n color: var(--rvs-fg2);\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hfooter {\n display: flex;\n gap: 6px;\n margin-top: 14px;\n}\n\n/* -- 内容 -- */\n\n.rvs-hhint {\n margin-bottom: 6px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* One line: how many files, and the path filter that makes a 60-file commit\n narrowable without scrolling. */\n.rvs-hcontent-head {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.rvs-hcount {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hfilter {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hfiles {\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n\n/* Directory row of the 内容 tree: chevron + folder glyph + path + count. */\n.rvs-hfolder {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 4px;\n border-radius: 4px;\n color: var(--rvs-fg2);\n font-size: 12px;\n cursor: pointer;\n user-select: none;\n}\n\n.rvs-hfolder:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hfolder-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n}\n\n.rvs-hfolder-count {\n flex: none;\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/* Files under a folder keep the editor tree's indent idiom. */\n.rvs-file-row.indent {\n padding-left: 18px;\n}\n\n.rvs-file-row.active {\n background: var(--rvs-active);\n}\n\n/* The row's quick \"open in editor\" affordance: invisible until the row is\n hovered/focused, so the path keeps the whole width at rest. */\n.rvs-file-open {\n opacity: 0;\n}\n\n.rvs-file-row:hover .rvs-file-open,\n.rvs-file-row:focus-within .rvs-file-open,\n.rvs-file-row:focus .rvs-file-open {\n opacity: 1;\n}\n\n/* Keyboard focus must be visible on the pane's role=button rows (a bare\n browser default is nearly invisible on this dark chrome). */\n.rvs-file-row:focus-visible,\n.rvs-hfolder:focus-visible,\n.rvs-commit-item:focus-visible,\n.rvs-patch-chevron:focus-visible,\n.rvs-vsplit-handle:focus-visible {\n outline: 2px solid var(--rvs-brand);\n outline-offset: -2px;\n}\n\n/* -- 差异 -- */\n\n/**\n * The diff tab is a column: a PINNED tool row, then the one scroller. The\n * reference pane made the whole tab a scroll area, so the file you were in and\n * the controls both disappeared on a long patch.\n */\n.rvs-hdiff {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n\n.rvs-hdiff[hidden] {\n display: none;\n}\n\n.rvs-ptoolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 3px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n}\n\n.rvs-pfile-index {\n flex: none;\n min-width: 32px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pfile-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg2);\n}\n\n.rvs-pscroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-patch-file {\n margin-bottom: 10px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n}\n\n.rvs-patch-file.folded .rvs-patch-head {\n border-bottom: none;\n border-radius: 6px;\n}\n\n.rvs-patch-file.active {\n border-color: var(--rvs-brand);\n}\n\n/* Sticky per-file header: scrolling a 3000-line hunk keeps saying which file\n it belongs to. `position: sticky` needs the nearest scrollport, which is\n `.rvs-pscroll` — no `overflow` on the section itself. */\n.rvs-patch-head {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 6px;\n border-bottom: 1px solid var(--rvs-border);\n border-radius: 6px 6px 0 0;\n background: var(--rvs-layer3);\n cursor: pointer;\n}\n\n.rvs-patch-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-patch-chevron {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg3);\n cursor: pointer;\n transform: rotate(0deg);\n}\n\n.rvs-patch-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-patch-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n}\n\n.rvs-patch-letter {\n flex: none;\n font-size: 11px;\n font-weight: 700;\n}\n\n.rvs-patch-counts {\n flex: none;\n display: flex;\n gap: 5px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n}\n\n.rvs-patch-add-count {\n color: var(--rvs-git-a);\n}\n\n.rvs-patch-del-count {\n color: var(--rvs-git-d);\n}\n\n.rvs-patch-rows {\n padding: 2px 0 6px;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 17px;\n}\n\n.rvs-patch-row {\n display: flex;\n align-items: stretch;\n min-width: max-content;\n white-space: pre;\n}\n\n/* Wrap mode: the row gives up its horizontal runway and the text wraps under\n the gutter instead (the whole point on a narrow sidebar). */\n.rvs-patch-rows.wrap .rvs-patch-row {\n min-width: 0;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.rvs-patch-rows.wrap .rvs-patch-text {\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* A block whose raw patch text could not be paired with the parsed model\n (defensive: block count and model count disagreed) is dimmed instead of\n silently looking complete. */\n.rvs-patch-rows.partial {\n opacity: .62;\n}\n\n/* Truncation marker in the pinned toolbar: the cut point can be thousands of\n rows away, so the bottom note is not where a reader learns about it. */\n.rvs-ptruncated {\n flex: none;\n font-size: 12px;\n color: var(--rvs-git-m);\n}\n\n.rvs-patch-row.add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-patch-row.del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-patch-num {\n flex: none;\n width: 42px;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-sign {\n flex: none;\n width: 14px;\n text-align: center;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-text {\n flex: 1;\n padding-right: 12px;\n user-select: text;\n}\n\n/* One \"the hunk jumped ahead\" marker, so a patch never pretends its line\n numbers are contiguous. */\n.rvs-patch-skip {\n margin: 2px 0;\n border-top: 1px dashed var(--rvs-border);\n border-bottom: 1px dashed var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n text-align: center;\n user-select: none;\n}\n\n.rvs-patch-note {\n padding: 6px 8px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* ---------------------------------------------------- floating editor window */\n\n/**\n * The floating editor lives in the host's frame-wide overlay layer\n * (`position: absolute; inset: 0; z-index: 20`, click-through, children opt\n * back into pointer events). It is placed with viewport coordinates, so it\n * floats above every column without joining any of their stacking contexts.\n *\n * `.rvs-root` carries the whole design-system token set and is row-flex by\n * default; this frame overrides the direction to a column and takes its size\n * from the inline rect the component keeps.\n */\n.rvs-float-window {\n position: fixed;\n flex-direction: column;\n /* The rect maths (clamp/persist) is in border-box terms; without this the\n painted border would sit one pixel outside the computed rectangle. */\n box-sizing: border-box;\n min-width: 360px;\n min-height: 220px;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n z-index: 30;\n /* The overlay layer itself is click-through; the window opts back in even if\n the host wraps each overlay entry in its own element. */\n pointer-events: auto;\n}\n\n/* Minimized: the frame IS the ball (see `.rvs-float-mini`); the body stays\n mounted but hidden, and it must not impose a minimum height. */\n.rvs-float-window[data-rvs-float=\"collapsed\"] {\n min-height: 0;\n}\n\n/**\n * Minimized window = floating ball.\n *\n * A full-width 34px bar was too long: it read as a broken window and covered a\n * whole strip. The ball is a small circle at the window's own corner, draggable\n * anywhere, restored by a click (or Enter/Space). It keeps the dirty dot, so\n * \"the editor is out and has unsaved edits\" is still one glance away.\n */\n.rvs-float-window.rvs-float-mini {\n min-width: 0;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n cursor: move;\n touch-action: none;\n}\n\n.rvs-float-ball {\n flex: 1;\n /* Stretch to the circle: the frame is a COLUMN flex box with centred items,\n so without this the hit area (and the absolutely positioned dot) would be\n sized by the 16px glyph instead of the 44px ball. */\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n border-radius: 50%;\n color: var(--rvs-brand);\n font-size: 16px;\n line-height: 1;\n cursor: move;\n outline: none;\n}\n\n.rvs-float-ball:hover,\n.rvs-float-ball:focus-visible {\n background: var(--rvs-hover);\n}\n\n.rvs-float-ball-glyph {\n pointer-events: none;\n}\n\n/* Unsaved edits stay visible while minimized. */\n.rvs-float-ball-dot {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--rvs-git-m);\n box-shadow: 0 0 0 2px var(--rvs-code-bg);\n pointer-events: none;\n}\n\n/* While a drag/resize gesture runs the pointer must not select editor text. */\n.rvs-float-window.dragging {\n user-select: none;\n}\n\n.rvs-float-titlebar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 7px;\n height: 34px;\n padding: 0 6px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n cursor: move;\n user-select: none;\n touch-action: none;\n}\n\n.rvs-float-glyph {\n color: var(--rvs-brand);\n font-size: 11px;\n}\n\n.rvs-float-title {\n flex: none;\n font-size: 12px;\n font-weight: 600;\n color: var(--rvs-fg2);\n}\n\n.rvs-float-file {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-float-spacer {\n flex: 1;\n}\n\n.rvs-float-btn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-float-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-float-close:hover {\n background: rgba(241, 76, 76, .18);\n color: var(--rvs-danger);\n}\n\n.rvs-float-body {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n display: flex;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep the height chain pinned: the editor pane grows inside this box. */\n.rvs-float-body > .rvs-pane {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n}\n\n/* Eight grips, placed INSIDE the border box: the window clips overflow (rounded\n corners), so grips hanging outside would lose half their hit area. Corners\n are larger so they can actually be hit. */\n.rvs-float-resize {\n position: absolute;\n z-index: 3;\n}\n\n.rvs-float-resize-n { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-s { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-e { top: 10px; bottom: 10px; right: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-w { top: 10px; bottom: 10px; left: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-ne { top: 0; right: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n.rvs-float-resize-nw { top: 0; left: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-se { bottom: 0; right: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-sw { bottom: 0; left: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n\n/* Shown by whichever surface the single editor left behind (centre tab or the\n sidebar's editor panel). */\n.rvs-float-placeholder {\n flex: 1;\n min-height: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 24px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 12.5px;\n}\n\n.rvs-float-placeholder-title {\n color: var(--rvs-fg2);\n font-size: 13px;\n font-weight: 600;\n}\n\n.rvs-float-placeholder-text {\n max-width: 360px;\n line-height: 1.6;\n}\n\n/* --------------------------------------------------------- context menu */\n\n.rvs-portal {\n font-family: inherit;\n}\n\n/**\n * Floating surfaces (menu / modal / toast) paint an OPAQUE base first and then\n * lay the skin's overlay token on top. The token is frequently translucent, so\n * using it alone let the panel's own text bleed through the menu and overlap\n * the entries; `Canvas` follows the resolved light/dark scheme, so the base is\n * correct in either theme.\n */\n.rvs-menu,\n.rvs-modal-box,\n.rvs-toast {\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n}\n\n.rvs-menu {\n position: fixed;\n z-index: 1000;\n min-width: 172px;\n max-height: calc(100vh - 16px);\n overflow-y: auto;\n padding: 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 18px;\n}\n\n.rvs-menu-sep {\n height: 1px;\n margin: 4px 6px;\n background: var(--rvs-border);\n}\n\n.rvs-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 5px 10px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-menu-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-menu-item.danger {\n color: var(--vsc-danger, #f14c4c);\n}\n\n.rvs-menu-item.danger:hover {\n background: rgba(241, 76, 76, .16);\n}\n\n.rvs-menu-item:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-menu-item:disabled:hover {\n background: transparent;\n}\n\n.rvs-menu-hint {\n margin-left: auto;\n font-size: 11px;\n opacity: .6;\n}\n\n/* ------------------------------------------------------- modal + toast */\n\n.rvs-modal-mask {\n position: fixed;\n inset: 0;\n z-index: 100000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n.rvs-modal-box {\n width: min(420px, calc(100vw - 40px));\n padding: 16px 18px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n color: var(--rvs-fg);\n box-shadow: 0 12px 40px rgba(0, 0, 0, .38);\n font-size: 13px;\n animation: rvsPop .14s ease;\n}\n\n.rvs-modal-title {\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 600;\n}\n\n.rvs-modal-text {\n margin-bottom: 12px;\n color: var(--rvs-fg2);\n font-size: 12.5px;\n line-height: 1.6;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-modal-row {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 14px;\n}\n\n.rvs-modal-btn {\n padding: 5px 14px;\n border: 1px solid var(--rvs-border2);\n border-radius: 7px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n cursor: pointer;\n}\n\n.rvs-modal-btn:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-modal-btn.primary {\n border-color: transparent;\n background: var(--rvs-accent);\n color: #fff;\n}\n\n.rvs-modal-btn.danger {\n border-color: transparent;\n background: var(--rvs-danger);\n color: #fff;\n}\n\n.rvs-toasts {\n position: fixed;\n right: 16px;\n bottom: 18px;\n z-index: 100001;\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: flex-end;\n pointer-events: none;\n}\n\n.rvs-toast {\n max-width: 340px;\n padding: 7px 12px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n color: var(--rvs-fg);\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n animation: rvsPop .14s ease;\n}\n\n.rvs-toast.error {\n border-color: rgba(241, 76, 76, .6);\n background-image: linear-gradient(rgba(58, 31, 34, .92), rgba(58, 31, 34, .92));\n}\n\n/* ------------------------------------------------------------- terminal */\n\n.rvs-term-tabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-term-tabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-term-tab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n max-width: 180px;\n margin: 4px 0;\n padding: 0 6px 0 9px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n/* Wrapper that pairs a tab with its close button. The two are siblings so the\n ✕ can be a real focusable <button> (a nested one is invalid HTML and left\n keyboard users no way to close a tab). */\n.rvs-term-tabwrap {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n}\n\n.rvs-term-tabwrap .rvs-term-tab {\n padding-right: 22px;\n}\n\n.rvs-term-tabwrap .rvs-etab-close {\n position: absolute;\n right: 3px;\n opacity: 0;\n}\n\n.rvs-term-tabwrap:hover .rvs-etab-close,\n.rvs-term-tabwrap:focus-within .rvs-etab-close {\n opacity: .8;\n}\n\n.rvs-term-tab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.dead {\n color: var(--rvs-git-d);\n}\n\n.rvs-term-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-term-body {\n flex: 1;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n.rvs-term-slot {\n position: absolute;\n inset: 0;\n}\n\n.rvs-term-dead {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/* `.rvs-toast.error` is styled with the overlay form further up, so the popup\n opacity convention (an opaque Canvas base plus a token layer) still governs\n it. A flat `background: #3a1f22` shorthand sat here and overrode that chain —\n same opaque result, but outside the convention. */\n\n@keyframes rvsFade {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes rvsPop {\n from { opacity: 0; transform: scale(.97) translateY(3px); }\n to { opacity: 1; transform: none; }\n}\n\n.rvs-search-row {\n display: flex;\n gap: 6px;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* --------------------------------------------------------- search options */\n\n.rvs-toggles {\n flex: none;\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-toggle {\n min-width: 26px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: none;\n border-right: 1px solid var(--rvs-border);\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-toggle:last-child {\n border-right: none;\n}\n\n.rvs-toggle:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-toggle.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n box-shadow: inset 0 0 0 1px var(--rvs-brand);\n}\n\n.rvs-glyph {\n font-family: var(--rvs-mono);\n font-weight: 600;\n line-height: 1;\n letter-spacing: -0.02em;\n}\n\n.rvs-glyph-underline {\n text-decoration: underline;\n}\n\n.rvs-scope-label {\n flex: none;\n align-self: center;\n font-size: 11px;\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n/* --------------------------------------------------------- search results */\n\n.rvs-hit {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 10px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-hit:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hit-file {\n font-weight: 600;\n}\n\n.rvs-hit-line {\n padding-left: 30px;\n align-items: flex-start;\n font-family: var(--rvs-mono);\n font-size: 12px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hit-count {\n flex: none;\n min-width: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: var(--rvs-hover);\n font-size: 10.5px;\n line-height: 15px;\n text-align: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hit-lineno {\n flex: none;\n width: 3.2em;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .8;\n font-size: 11px;\n}\n\n.rvs-hit-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre;\n direction: ltr;\n}\n\n.rvs-mark {\n padding: 0 1px;\n border-radius: 2px;\n background: rgba(226, 183, 20, .3);\n color: inherit;\n}\n\n.rvs-hit-dir {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-hit-name {\n flex: none;\n font-weight: 600;\n}\n\n.rvs-kbd {\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n font-size: 10px;\n color: var(--rvs-fg3);\n}\n\n/* --- SCM: repository directory row (git runs in THIS directory) ------------- */\n\n.rvs-repo-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 8px 4px 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-bg2, var(--dsw-alias-bg-layer-1, #1b1b1b));\n font-size: 11px;\n flex: none;\n}\n\n.rvs-repo-bar-label {\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n.rvs-repo-bar-path {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg);\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-repo-bar-path:hover {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repo-bar-fix {\n margin-top: 10px;\n display: flex;\n justify-content: center;\n}\n\n/* --- SCM: repository directory picker -------------------------------------- */\n\n.rvs-repopick {\n width: min(560px, calc(100vw - 40px));\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.rvs-repopick .rvs-modal-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.rvs-repopick-bar {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-height: 22px;\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 12px;\n}\n\n.rvs-crumb-wrap {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n color: var(--rvs-fg3);\n}\n\n.rvs-crumb {\n border: none;\n background: none;\n padding: 1px 3px;\n border-radius: 3px;\n color: var(--rvs-brand-fg, var(--rvs-fg));\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-crumb:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-probe {\n padding: 5px 8px;\n border-radius: 4px;\n font-size: 11.5px;\n border: 1px solid var(--rvs-border2);\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg2);\n}\n\n.rvs-repopick-probe.root {\n border-color: var(--rvs-ok, #2ea043);\n color: var(--rvs-ok, #2ea043);\n}\n\n.rvs-repopick-probe.inside {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repopick-found {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n padding-bottom: 2px;\n}\n\n.rvs-repopick-found-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-repopick-list {\n flex: 1 1 auto;\n min-height: 150px;\n max-height: 42vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 5px;\n background: var(--rvs-bg-layer, rgba(0, 0, 0, .18));\n padding: 2px;\n}\n\n.rvs-repopick-row {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 6px;\n border: none;\n border-radius: 3px;\n background: none;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-repopick-row:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-row span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repopick-dim {\n color: var(--rvs-fg3);\n font-size: 11.5px;\n padding: 6px;\n}\n\n.rvs-repopick-type {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.rvs-repopick-type .rvs-input {\n flex: 1 1 auto;\n}\n\n.rvs-repopick-error {\n color: var(--rvs-error, #f85149);\n font-size: 11.5px;\n}\n\n/* --------------------------------------------------- streaming exec panel */\n\n/**\n * Live log for the network verbs (fetch / pull / push / sync).\n *\n * Fixed to the viewport's bottom-right instead of joining the panel's own\n * column: the pane can be collapsed or scrolled away while the push runs, and a\n * dialog that vanishes with its parent would hide the cancel button exactly\n * when it matters.\n */\n.rvs-execpanel {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing and the\n panel renders transparent and borderless over the page content. Keep this\n subset in sync with `.rvs-root`; the dark code surfaces get their own\n `body[data-ds-dark-theme]` override right after this rule. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n position: fixed;\n right: 16px;\n bottom: 16px;\n z-index: 45;\n width: min(620px, calc(100vw - 32px));\n max-height: min(60vh, 520px);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\nbody[data-ds-dark-theme] .rvs-execpanel {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n}\n\n\n.rvs-execpanel-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 6px 5px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-execpanel-title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-execpanel-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-execpanel-status.done { color: var(--rvs-git-a); }\n.rvs-execpanel-status.error { color: var(--rvs-danger); }\n.rvs-execpanel-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-execpanel-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-execpanel-body {\n flex: 1;\n min-height: 60px;\n margin: 0;\n padding: 8px 10px;\n overflow: auto;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-execpanel-foot {\n flex: none;\n padding: 4px 10px 6px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* --------------------------------------------------------- download dock */\n/* PORTALed to <body>, i.e. OUTSIDE `.rvs-root` where the tokens are declared:\n declare the subset this panel uses (same rule as `.rvs-execpanel`). */\n.rvs-downloads {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n position: fixed;\n /* Bottom-RIGHT, not over the sidebar's own footer (first screenshot: the\n dock sat on the usage/account block). `bottom: 64px` keeps it above the\n transient toast stack (right 16 / bottom 18 / z 100001) and above the\n network exec panel (right 16 / bottom 16 / z 45), so neither covers it. */\n right: 16px;\n bottom: 64px;\n z-index: 100000;\n animation: rvsFade .12s ease;\n width: min(380px, calc(100vw - 32px));\n max-height: min(45vh, 420px);\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\n.rvs-download {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: rgba(127, 127, 127, .06);\n}\n\n.rvs-download-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-download-icon {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg2);\n}\n\n.rvs-download-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-download-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-download-status.done { color: var(--rvs-git-a); }\n.rvs-download-status.failed { color: var(--rvs-danger); }\n.rvs-download-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-download-bar {\n height: 4px;\n overflow: hidden;\n border-radius: 2px;\n background: rgba(127, 127, 127, .22);\n}\n\n.rvs-download-fill {\n height: 100%;\n width: 0;\n border-radius: 2px;\n background: var(--rvs-brand);\n transition: width .12s linear;\n}\n\n.rvs-download-fill.indeterminate {\n width: 35%;\n animation: rvs-download-slide 1.2s ease-in-out infinite;\n}\n\n@keyframes rvs-download-slide {\n from { transform: translateX(-120%); }\n to { transform: translateX(320%); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rvs-download-fill.indeterminate { animation-duration: 2.4s; }\n .rvs-download-fill { transition: none; }\n}\n\n.rvs-download-meta {\n overflow: hidden;\n color: var(--rvs-fg3);\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-download-meta.failed { color: var(--rvs-danger); white-space: normal; word-break: break-word; }\n.rvs-download-meta.done { color: var(--rvs-fg2); }\n.rvs-download-meta.cancelled { color: var(--rvs-git-m); }\n\n/* ----------------------------------------------------------- doctor panel */\n\n/*\n * Remote-environment report, opened from the host list (which lives in the DSH\n * Settings dialog, i.e. OUTSIDE `.rvs-root`). Fixed overlay like the input\n * dialog so the host list behind it does not move, and its own token subset for\n * the same reason as `.rvs-execpanel`: `var(--rvs-*)` resolves to nothing out\n * there without it. Three state colors, and `unknown` deliberately looks\n * neutral (not red, not green): it is ignorance, not a verdict.\n */\n.rvs-doctor {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n color: var(--rvs-fg);\n font-size: 13px;\n}\n\n.rvs-doctor-card {\n display: flex;\n flex-direction: column;\n width: min(860px, 92vw);\n max-height: min(80vh, 720px);\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: var(--rvs-overlay);\n box-shadow: 0 8px 32px rgba(0, 0, 0, .35);\n}\n\n.rvs-doctor-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-doctor-title {\n font-weight: 600;\n}\n\n.rvs-doctor-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 4px 12px 10px;\n}\n\n.rvs-doctor-loading {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 0;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n}\n\n.rvs-doctor-table th {\n position: sticky;\n top: 0;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-overlay);\n color: var(--rvs-fg2);\n font-weight: 600;\n text-align: left;\n}\n\n.rvs-doctor-table td {\n padding: 5px 8px;\n border-top: 1px solid var(--rvs-border);\n vertical-align: top;\n}\n\n.rvs-doctor-item {\n white-space: nowrap;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-badge {\n display: inline-block;\n padding: 0 6px;\n border: 1px solid currentColor;\n border-radius: 8px;\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-doctor-badge.ok { color: var(--rvs-ok, #2ea043); }\n.rvs-doctor-badge.missing { color: var(--rvs-git-m, #e2b714); }\n.rvs-doctor-badge.unknown { color: var(--rvs-fg3); }\n\n.rvs-doctor-detail {\n color: var(--rvs-fg3);\n font-family: var(--rvs-mono);\n font-size: 11px;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-doctor-hint {\n flex: none;\n padding: 8px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n\n\n\n/* ------------------------------------------------------------ port forwards */\n\n/**\n * The port panel: one form above two lists, all inside the sidebar column.\n *\n * The column can be dragged very narrow, so nothing here may assume a width: an\n * address/URL is ONE unbreakable token (`overflow-wrap: anywhere`), the action\n * row wraps instead of overflowing, and the form stacks vertically — a\n * three-input row is unusable at the panel's default width.\n */\n.rvs-ports-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 8px 8px 14px;\n}\n\n/**\n * The restore-failure banner: one sentence plus the \"forget these rules\"\n * action, side by side when there is room and stacked when the column is very\n * narrow (the action must never squeeze the explanation into a sliver).\n */\n.rvs-ports-restore {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-ports-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n}\n\n.rvs-ports-field {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n\n.rvs-ports-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* `.rvs-input` carries `flex: 1`; in a COLUMN flex parent that would stretch\n the field's HEIGHT, so the input fills the width and keeps its own height. */\n.rvs-ports-input {\n flex: none;\n width: 100%;\n box-sizing: border-box;\n}\n\n.rvs-ports-form-actions {\n display: flex;\n justify-content: flex-end;\n}\n\n.rvs-ports-section {\n margin-top: 12px;\n border-top: 1px solid var(--rvs-border);\n}\n\n.rvs-ports-sec-head {\n display: flex;\n align-items: center;\n gap: 6px;\n height: 26px;\n padding: 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n user-select: none;\n}\n\n.rvs-ports-count {\n padding: 0 6px;\n border-radius: 999px;\n background: var(--rvs-hover);\n color: var(--rvs-fg3);\n font-size: 10.5px;\n letter-spacing: 0;\n}\n\n.rvs-ports-row {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n padding: 6px 6px 7px;\n border-radius: 6px;\n}\n\n.rvs-ports-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-ports-line {\n display: flex;\n align-items: baseline;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-ports-addr {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-ports-proc {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* State is never colour-only: the dot carries the state word as its label. */\n.rvs-ports-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-ports-dot.listening {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-ports-dot.error {\n background: var(--rvs-danger);\n}\n\n.rvs-ports-conn {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-ports-err {\n color: var(--rvs-danger);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n.rvs-ports-actions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-width: 0;\n}\n\n/* The \"open\" affordance is a real link styled as a header button. */\n.rvs-ports-open {\n text-decoration: none;\n}\n\n.rvs-ports-hint {\n margin-top: 4px;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n/* ------------------------------------------------------ Ctrl+P quick open */\n\n.rvs-qo-mask {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing: the\n active row paints transparent (keyboard selection invisible), the directory\n column stops dimming, and error/warning copy comes out the same colour as\n ordinary text (so \"index failed\" looks like \"no match\"). Keep this subset in\n sync with `.rvs-root`; it lists exactly the tokens the `.rvs-qo*` rules use. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n /* The modal layer (100000), so toasts (100001) still paint above it. */\n z-index: 100000;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 12vh;\n background: rgba(0, 0, 0, .38);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n/**\n * Opaque base first, skin overlay on top: the overlay token is frequently\n * translucent, and using it alone let the panel's text bleed through the sheet\n * (the same fix the menu/modal layer needed).\n */\n.rvs-qo {\n width: min(680px, calc(100vw - 40px));\n max-height: min(62vh, 560px);\n display: flex;\n flex-direction: column;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 16px 48px rgba(0, 0, 0, .42);\n font-size: 12.5px;\n overflow: hidden;\n animation: rvsPop .12s ease;\n}\n\n.rvs-qo-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-qo-input {\n flex: 1;\n min-width: 0;\n height: 28px;\n padding: 0 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n outline: none;\n}\n\n.rvs-qo-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-qo-hint {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-qo-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 4px;\n}\n\n.rvs-qo-row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 4px 8px;\n border-radius: 5px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n\n.rvs-qo-row:hover {\n background: var(--rvs-hover);\n}\n\n/* Declared AFTER :hover so a hovered active row keeps the active colour. */\n.rvs-qo-row.active {\n background: var(--rvs-active);\n}\n\n.rvs-qo-dir {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--rvs-fg3);\n font-size: 11.5px;\n}\n\n.rvs-qo-name {\n flex: none;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n\n.rvs-qo-hit {\n padding: 0;\n border-radius: 2px;\n background: rgba(77, 107, 254, .32);\n color: inherit;\n font-weight: 600;\n}\n\n.rvs-qo-foot {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 72px;\n overflow-y: auto;\n padding: 6px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-qo-note {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.rvs-qo-note.error {\n color: var(--rvs-danger);\n}\n\n.rvs-qo-note.warn {\n color: var(--rvs-git-m);\n}\n\n";
|
|
14
|
+
const css$3 = "/**\n * VS Code-style design system for the remote explorer. Every surface below\n * is scoped under `.rvs-root` so the sheet can never leak into the host GUI,\n * and every host token carries a literal fallback: the plugin also renders in\n * the native right-Sidebar fallback and on hosts whose alias tokens differ.\n *\n * Palette and metrics are aligned with the reference implementation\n * (dsh-solution-explorer): 13px/20px panel type, 5px/10px tree rows with a\n * 10px radius, a 30px activity button with the badge tucked into the icon's\n * bottom-right corner, GitHub-Dark token colors, and the\n * `--e2b714 / #4ec9b0 / #f14c4c` modified/added/deleted triple.\n */\n\n.rvs-root {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-layer3: var(--dsw-alias-bg-layer-3, rgba(127, 127, 127, .16));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-accent: var(--dsw-alias-button-info-fill, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-ok: #2ea043;\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-git-d: #f14c4c;\n --rvs-git-r: #4ec9b0;\n --rvs-git-c: #58a6ff;\n --rvs-git-u: #f14c4c;\n --rvs-git-x: #6e6e6e;\n --rvs-add-bg: rgba(78, 201, 176, .15);\n --rvs-del-bg: rgba(241, 76, 76, .15);\n /* Opaque equivalents, for elements that must not show what scrolls under\n them (the pinned diff line numbers). */\n --rvs-add-solid: #e4f6f1;\n --rvs-del-solid: #fdeaea;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n /* Opaque code surfaces (Light+ default; the dark block below flips them). */\n --rvs-code-bg: #ffffff;\n --rvs-code-fg: #1f1f1f;\n --rvs-code-gutter-fg: #237893;\n\n display: flex;\n flex-direction: row;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n color: var(--rvs-fg);\n font-size: 13px;\n line-height: 20px;\n}\n\n/**\n * Code surfaces are OPAQUE, in the editor's own palette rather than the DSH\n * skin: syntax colors need a definite background to stay readable, and the\n * app shell marks its resolved scheme on <body> (same signal theme.ts reads).\n */\nbody[data-ds-dark-theme] .rvs-root {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n --rvs-code-gutter-fg: #858585;\n --rvs-add-solid: #16332e;\n --rvs-del-solid: #3b2325;\n}\n\n.rvs-edge {\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-root *,\n.rvs-portal * {\n box-sizing: border-box;\n}\n\n/* ------------------------------------------------------------ activity rail */\n\n.rvs-rail {\n flex: none;\n width: 38px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n padding: 8px 0;\n border-right: 1px solid var(--rvs-border);\n background: var(--dsw-specific-sidebar-fill, transparent);\n}\n\n.rvs-rail-btn {\n position: relative;\n flex: none;\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-rail-btn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-rail-btn.active {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n box-shadow: inset 2px 0 0 var(--rvs-brand);\n}\n\n.rvs-rail-btn.danger:hover {\n color: var(--rvs-danger);\n}\n\n.rvs-rail-badge {\n position: absolute;\n bottom: 1px;\n right: 1px;\n min-width: 14px;\n height: 14px;\n padding: 0 3px;\n border-radius: 7px;\n background: var(--rvs-accent);\n color: #fff;\n font-size: 9px;\n font-weight: 700;\n line-height: 14px;\n text-align: center;\n pointer-events: none;\n}\n\n.rvs-rail-sep {\n flex: none;\n width: 20px;\n height: 1px;\n margin: 4px 0;\n background: var(--rvs-border);\n}\n\n/* -------------------------------------------------------- panel + editor */\n\n.rvs-column {\n flex: 1;\n min-width: 0;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/**\n * One lazily-mounted panel slot: a visited panel stays mounted and is merely\n * hidden, so returning to the explorer (or the terminal) neither refetches nor\n * flashes a reload.\n */\n.rvs-viewslot {\n flex: 1;\n min-height: 0;\n min-width: 0;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n}\n\n/**\n * Padding for the legacy views (workspaces / terminal) that draw no chrome.\n *\n * It MUST be a flex column: the workspaces view scroller is its child and gets\n * its bounded height only from a flex parent (`flex:1; min-height:0`). As a\n * plain block it grew with its content instead, so the panel clipped at the\n * viewslot's `overflow:hidden` and the binding list could not scroll at all —\n * a seventh workspace (and the wizard under it) was simply unreachable.\n */\n.rvs-viewpad {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 10px 12px 14px;\n box-sizing: border-box;\n}\n\n.rvs-pane.grow {\n flex: 1;\n}\n\n.rvs-header {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n height: 34px;\n padding: 0 8px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-header .rvs-title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg3);\n}\n\n.rvs-hbtn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n cursor: pointer;\n}\n\n.rvs-hbtn:hover {\n color: var(--rvs-fg);\n background: var(--rvs-hover);\n}\n\n.rvs-hbtn.danger:hover {\n color: #fff;\n background: var(--rvs-danger);\n}\n\n.rvs-hbtn:disabled {\n opacity: .4;\n cursor: default;\n}\n\n.rvs-scroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n scrollbar-width: thin;\n}\n\n.rvs-globalbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n}\n\n/*\n * Connection chip: the Host's SSH link health for the workspace on screen.\n * Lives in the top bar and, compact, in the editor info bar. Only the errored\n * state is interactive (retry); the others are a status read-out.\n */\n.rvs-conn {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 1px 6px 1px 5px;\n border: 1px solid transparent;\n border-radius: 9px;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n line-height: 16px;\n cursor: default;\n}\n\n.rvs-conn.compact {\n padding: 0 2px;\n border: none;\n background: none;\n}\n\n.rvs-conn.clickable {\n cursor: pointer;\n}\n\n.rvs-conn.clickable:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-conn-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-conn-ok .rvs-conn-dot {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-conn-error {\n color: var(--rvs-danger);\n}\n\n.rvs-conn-error .rvs-conn-dot {\n background: var(--rvs-danger);\n}\n\n.rvs-conn-label {\n max-width: 9em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.rvs-scroll::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-scroll::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(127, 127, 127, .6));\n}\n\n.rvs-scroll::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-vsplit-handle {\n flex: none;\n position: relative;\n height: 7px;\n cursor: row-resize;\n touch-action: none;\n}\n\n.rvs-vsplit-handle::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 3px;\n height: 1px;\n background: var(--rvs-border);\n}\n\n.rvs-vsplit-handle:hover::after,\n.rvs-vsplit-handle[data-dragging='true']::after {\n top: 2px;\n height: 3px;\n border-radius: 2px;\n background: var(--rvs-brand);\n}\n\n/* ------------------------------------------------------------------ tree */\n\n.rvs-tree {\n padding: 4px 6px 12px;\n min-width: 0;\n}\n\n.rvs-node {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n width: 100%;\n padding: 4px 8px;\n border: none;\n background: transparent;\n border-radius: 8px;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-node:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-node.selected {\n background: var(--rvs-active);\n}\n\n.rvs-node.cut {\n opacity: .5;\n}\n\n.rvs-node.drop-target {\n background: var(--rvs-active);\n outline: 1px solid var(--rvs-brand);\n outline-offset: -1px;\n}\n\n/* Where a file drag will land: a slip must not silently drop a tree into the\n wrong directory. */\n.rvs-drop-hint {\n margin: 2px 8px 4px;\n padding: 3px 8px;\n border: 1px dashed var(--rvs-brand);\n border-radius: 3px;\n font-size: 11px;\n color: var(--rvs-brand);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n/* Upload progress: one line under the header. A multi-minute transfer with no\n feedback is indistinguishable from a hung explorer, so the row names the\n count and the file on the wire. */\n.rvs-upload-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px 4px;\n font-size: 11px;\n color: var(--dsw-alias-text-secondary, rgba(127, 127, 127, .95));\n}\n\n.rvs-upload-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n}\n\n.rvs-node-icon {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-node-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-node-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-node:hover .rvs-node-actions {\n display: flex;\n}\n\n.rvs-git-letter {\n flex: none;\n width: 14px;\n margin-left: 2px;\n font-size: 11px;\n font-weight: 700;\n text-align: center;\n}\n\n.rvs-git-M, .rvs-letter-M { color: var(--rvs-git-m); }\n.rvs-git-A, .rvs-letter-A { color: var(--rvs-git-a); }\n.rvs-git-D, .rvs-letter-D { color: var(--rvs-git-d); }\n.rvs-git-R, .rvs-letter-R { color: var(--rvs-git-r); }\n.rvs-git-C, .rvs-letter-C { color: var(--rvs-git-c); }\n.rvs-git-U, .rvs-letter-U { color: var(--rvs-git-u); }\n.rvs-git-q, .rvs-letter-q, .rvs-git-\\\\? { color: var(--rvs-git-a); }\n.rvs-git-x, .rvs-letter-x { color: var(--rvs-git-x); }\n.rvs-git-T, .rvs-letter-T { color: var(--rvs-git-m); }\n\n.rvs-rename-input {\n flex: 1;\n min-width: 0;\n padding: 0 4px;\n border: 1px solid var(--rvs-brand);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n outline: none;\n}\n\n.rvs-empty {\n padding: 18px 14px;\n color: var(--rvs-fg3);\n font-size: 12px;\n text-align: center;\n line-height: 1.7;\n}\n\n.rvs-banner {\n margin: 6px 8px;\n padding: 6px 9px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-banner.info {\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n}\n\n.rvs-banner.error {\n background: rgba(200, 60, 60, .16);\n color: var(--rvs-danger);\n}\n\n.rvs-banner.warn {\n background: rgba(226, 183, 20, .14);\n color: var(--rvs-git-m);\n}\n\n/* ------------------------------------------------- save conflict (refused) */\n\n/* The banner is a decision, not a message: it stacks its text over the actions\n so a narrow sidebar cannot squeeze the buttons into one unreadable row. */\n.rvs-conflict {\n display: flex;\n flex-direction: column;\n gap: 6px;\n white-space: normal;\n}\n\n.rvs-conflict-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-conflict-diff {\n margin: 6px 8px;\n max-height: 40vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-hover);\n color: var(--rvs-fg2);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-conflict-diff-head {\n position: sticky;\n top: 0;\n padding: 4px 8px;\n background: var(--rvs-panel, var(--rvs-hover));\n border-bottom: 1px solid var(--rvs-border);\n font-family: inherit;\n}\n\n.rvs-conflict-hunk-head {\n padding: 2px 8px;\n color: var(--rvs-fg3);\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-conflict-row {\n padding: 0 8px;\n white-space: pre;\n}\n\n.rvs-conflict-row.add {\n background: rgba(78, 201, 176, .14);\n color: var(--rvs-git-a);\n}\n\n.rvs-conflict-row.del {\n background: rgba(241, 76, 76, .12);\n color: var(--rvs-git-d);\n}\n\n.rvs-conflict-more {\n padding: 4px 8px;\n color: var(--rvs-fg3);\n}\n\n/* --------------------------------------------------------- source control */\n\n.rvs-scm-section {\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-scm-head {\n display: flex;\n align-items: center;\n gap: 4px;\n height: 28px;\n padding: 0 6px 0 4px;\n cursor: pointer;\n user-select: none;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n color: var(--rvs-fg2);\n}\n\n.rvs-scm-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-head .rvs-count {\n margin-left: 6px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-head-actions {\n margin-left: auto;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-scm-section.collapsed > *:not(.rvs-scm-head) {\n display: none !important;\n}\n\n.rvs-chevron {\n flex: none;\n transition: transform .12s ease;\n}\n\n.rvs-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-scm-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 8px 3px 22px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 19px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-scm-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-scm-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-scm-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-scm-dir {\n flex: none;\n color: var(--rvs-fg3);\n}\n\n.rvs-scm-actions {\n flex: none;\n display: none;\n align-items: center;\n gap: 1px;\n}\n\n.rvs-scm-item:hover .rvs-scm-actions {\n display: flex;\n}\n\n.rvs-commit-box {\n flex: none;\n padding: 8px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-commit-input {\n width: 100%;\n min-height: 58px;\n max-height: 180px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n resize: vertical;\n outline: none;\n}\n\n.rvs-commit-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-commit-row {\n display: flex;\n gap: 6px;\n margin-top: 6px;\n}\n\n.rvs-commit-btn {\n flex: 1;\n padding: 5px 8px;\n border: none;\n border-radius: 6px;\n background: var(--rvs-accent);\n color: #fff;\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n cursor: pointer;\n}\n\n.rvs-commit-btn:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-repo-item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px 5px 12px;\n cursor: pointer;\n font-size: 12.5px;\n}\n\n.rvs-repo-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-repo-item.active {\n background: var(--rvs-active);\n}\n\n.rvs-repo-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repo-branch {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 1px 8px;\n border-radius: 999px;\n background: var(--rvs-hover);\n font-size: 11px;\n font-weight: 600;\n color: var(--rvs-fg);\n}\n\n/* \"cached · refreshing\" badge: quieter than a pill that carries information the\n user asked for (a branch), because it is a qualifier on the list beside it. */\n.rvs-pill-cached {\n flex: none;\n font-weight: 500;\n color: var(--rvs-fg3);\n border: 1px solid var(--rvs-border2);\n background: transparent;\n}\n\n.rvs-subpanel {\n margin: 6px 8px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n font-size: 12px;\n}\n\n.rvs-subpanel-head {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 6px;\n color: var(--rvs-fg2);\n font-weight: 600;\n}\n\n.rvs-chip {\n flex: none;\n padding: 2px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 11.5px;\n cursor: pointer;\n}\n\n.rvs-chip:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-chip.primary {\n background: var(--rvs-accent);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-chip.danger:hover {\n background: var(--rvs-danger);\n border-color: transparent;\n color: #fff;\n}\n\n.rvs-input {\n flex: 1;\n min-width: 0;\n padding: 4px 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-select {\n flex: 1;\n min-width: 0;\n padding: 3px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n color-scheme: light dark;\n}\n\n.rvs-select option {\n background: Canvas;\n color: CanvasText;\n}\n\n/* ------------------------------------------------- conversation-view mount */\n\n/**\n * Bound the center surface to the height the host gave the slot.\n *\n * `flex: 1 1 0` is the load-bearing declaration, and BOTH halves of it matter.\n * The host's own slot rules are:\n *\n * .wSkVaW_viewArea { flex: 1; min-height: 0; overflow: hidden }\n * [data-phase=active] .viewArea { flex: 1 0 auto; min-height: auto }\n * .wSkVaW_root { height: 100%; position: relative }\n *\n * While a conversation is active the slot's flex-basis is `auto`, so the slot's\n * height is driven by its child's INTRINSIC size. A full-height editor then\n * pushed it to 5510px for a 300-line file, the outer scroller took over, and\n * the tab strip and file info bar scrolled off the top with the code.\n *\n * `flex-basis: 0` breaks that cycle: the item stops contributing its content\n * height, so the slot stays the size the host intended and `.cm-scroller`\n * becomes the only scroller. Measured in the fixture (.spike/layout-fixture.html,\n * which mirrors the slot rules above) — only the bottom row fits:\n *\n * flex: 1 1 0 + min-height: 0 -> 736px OK\n * flex: 1 1 auto (i.e. `flex: 1`) -> 5510px broken\n * height: 0 + min-height: 100% -> 5510px broken\n * max-height: 100% -> 5510px broken\n * height: 100vh -> 5510px broken\n *\n * `height: 100%` is deliberately NOT set here any more. It resolves to `auto`\n * against a slot whose height is not definite — it reads like the fix but\n * measures as a no-op, which is how this regressed once already.\n *\n * NOT `position: absolute` either — that was another failed attempt: `.viewArea`\n * is not itself positioned, so `inset: 0` escaped to the host's `.wSkVaW_root`\n * (which is `position: relative`) and the plugin's global bar floated on top of\n * the host's 对话 / 轨迹 / 远程编辑器 tab row.\n *\n * The sidebar's `.rvs-viewslot` is deliberately not covered: it has a bounding\n * parent and this bug is specific to the conversation slot's `min-height: auto`\n * phase.\n */\n.rvs-center {\n flex: 1 1 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n/* ---------------------------------------------------------------- editor */\n\n.rvs-etabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-etabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-etab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 5px;\n max-width: 190px;\n margin: 4px 0;\n padding: 0 4px 0 8px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.rvs-etab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-etab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-etab-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-etab-dot {\n flex: none;\n font-size: 9px;\n color: var(--rvs-git-m);\n}\n\n.rvs-etab-close {\n flex: none;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n opacity: .65;\n}\n\n.rvs-etab-close:hover {\n background: var(--rvs-hover);\n opacity: 1;\n}\n\n.rvs-einfo {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 8px 2px 10px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n line-height: 18px;\n color: var(--rvs-fg3);\n}\n\n.rvs-einfo-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Truncate from the LEFT (keep the tail) without reordering the text:\n `plaintext` gives the content its own LTR base direction, which is what\n stops a leading \"/\" from rendering as a trailing one. */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-einfo-spacer {\n margin-left: auto;\n}\n\n.rvs-status.dirty { color: var(--rvs-git-m); }\n.rvs-status.saved { color: var(--rvs-git-a); }\n.rvs-status.saving { color: var(--rvs-fg2); }\n\n.rvs-body {\n flex: 1;\n min-height: 0;\n min-width: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n /* Anchors portalled overlays (the find widget) outside every scroller. */\n position: relative;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-editor-host {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep a panel mounted but out of layout (and out of the a11y tree). Used by\n the editor host in preview mode: unmounting it destroyed the buffer and the\n undo stack, hiding it preserves both. */\n.rvs-hidden {\n display: none !important;\n}\n\n/* Find-match marks. Painted by our own StateField (`findMatchHighlight`), and\n deliberately the SAME colours as the `.cm-searchMatch` rules below so the\n two paths cannot drift apart. */\n.rvs-find-match {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n border-radius: 2px;\n}\n\n.rvs-find-match.current {\n background-color: rgba(226, 183, 20, .48);\n}\n\n/* ------------------------------------------------------- preview surfaces */\n\n.rvs-preview-img {\n flex: 1;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n background-color: var(--rvs-code-bg);\n background-image:\n linear-gradient(45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(-45deg, rgba(127, 127, 127, .08) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgba(127, 127, 127, .08) 75%),\n linear-gradient(-45deg, transparent 75%, rgba(127, 127, 127, .08) 75%);\n background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px;\n background-position: 0 0, 0 10px, 10px -10px, -10px 0;\n}\n\n.rvs-preview-img img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n image-rendering: auto;\n}\n\n.rvs-markdown {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 12px 14px 24px;\n font-size: 13px;\n line-height: 1.7;\n color: var(--rvs-code-fg);\n background: var(--rvs-code-bg);\n user-select: text;\n}\n\n.rvs-markdown h1, .rvs-markdown h2, .rvs-markdown h3, .rvs-markdown h4 {\n margin: 14px 0 6px;\n line-height: 1.35;\n}\n\n.rvs-markdown h1 { font-size: 19px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 5px; }\n.rvs-markdown h2 { font-size: 16px; border-bottom: 1px solid var(--rvs-border); padding-bottom: 4px; }\n.rvs-markdown h3 { font-size: 14px; }\n.rvs-markdown p { margin: 6px 0; }\n.rvs-markdown ul, .rvs-markdown ol { margin: 6px 0; padding-left: 22px; }\n.rvs-markdown li { margin: 2px 0; }\n.rvs-markdown code {\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--rvs-hover);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n.rvs-markdown pre {\n margin: 8px 0;\n padding: 9px 11px;\n border-radius: 8px;\n background: var(--rvs-input);\n overflow-x: auto;\n}\n.rvs-markdown pre code { padding: 0; background: transparent; }\n.rvs-markdown blockquote {\n margin: 8px 0;\n padding: 2px 12px;\n border-left: 3px solid var(--rvs-border2);\n color: var(--rvs-fg2);\n}\n.rvs-markdown a { color: var(--dsw-alias-label-link, #58a6ff); text-decoration: none; }\n.rvs-markdown a:hover { text-decoration: underline; }\n.rvs-markdown table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }\n.rvs-markdown th, .rvs-markdown td { border: 1px solid var(--rvs-border2); padding: 4px 8px; }\n.rvs-markdown hr { border: none; border-top: 1px solid var(--rvs-border); margin: 12px 0; }\n\n.rvs-html-frame {\n flex: 1;\n min-height: 0;\n width: 100%;\n border: none;\n background: #fff;\n}\n\n/* ------------------------------------------------------------------ diff */\n\n.rvs-diff {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.rvs-diff-toolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 8px;\n border-bottom: 1px solid var(--rvs-border);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Prev/next change, in the toolbar's free space.\n *\n * Two chevrons around a tabular counter: the pair then reads as \"jump to change\n * n of N\" instead of two anonymous arrows, and the counter doubles as the \"where\n * am I\" cue while scrolling by hand.\n */\n.rvs-hunknav {\n display: inline-flex;\n align-items: center;\n gap: 1px;\n margin-right: 2px;\n}\n\n.rvs-hunknav-pos {\n min-width: 30px;\n text-align: center;\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-seg {\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-seg button {\n padding: 2px 9px;\n border: none;\n background: transparent;\n color: var(--rvs-fg2);\n font: inherit;\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-seg button.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n}\n\n.rvs-seg button:hover:not(.active) {\n background: var(--rvs-hover);\n}\n\n.rvs-diff-grid {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 18px;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/**\n * Top horizontal scrollbar.\n *\n * The two panes scroll horizontally on their own — so a long line can never\n * widen the layout — and this proxy bar drives both of them from the TOP of\n * the view, instead of forcing a scroll to the bottom of the file to reach a\n * horizontal bar. Its inner spacer is sized to the widest line, and the\n * component only renders it when a line really is wider than the grid.\n *\n * Sized and coloured to be SEEN: as a 13 px band with `scrollbar-width: thin`\n * and a faint thumb, it read as \"there is no horizontal scrollbar at all\".\n */\n.rvs-hbar {\n flex: none;\n height: 15px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-hover);\n}\n\n.rvs-hbar-inner {\n height: 1px;\n}\n\n.rvs-hbar::-webkit-scrollbar {\n height: 11px;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .75));\n border-radius: 6px;\n border: 2px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .95));\n background-clip: padding-box;\n}\n\n.rvs-hbar::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-diff-cols {\n display: flex;\n align-items: stretch;\n min-width: 0;\n}\n\n/**\n * One diff pane. `flex: 1 1 0` keeps the panes EXACTLY equal however long a\n * line is (the previous row markup let a long line widen its own pane, which\n * is what broke the symmetry). Each pane keeps its own horizontal scroll, and\n * its scrollbar is now VISIBLE: the top proxy remains the convenient control,\n * but the pane's own bar is what a user reaches for first, and it sits right\n * under the content when the file is shorter than the view.\n */\n.rvs-diff-col {\n flex: 1 1 0;\n min-width: 0;\n overflow-x: auto;\n overflow-y: hidden;\n}\n\n.rvs-diff-col::-webkit-scrollbar {\n height: 9px;\n width: 0;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(150, 160, 180, .6));\n border-radius: 5px;\n}\n\n.rvs-diff-col::-webkit-scrollbar-thumb:hover {\n background: var(--dsw-alias-scrollbar-hover-l2, rgba(170, 180, 200, .85));\n}\n\n.rvs-diff-col::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-dline {\n display: flex;\n align-items: flex-start;\n height: 18px;\n line-height: 18px;\n white-space: pre;\n}\n\n.rvs-dline-num {\n /* Pinned while the line scrolls sideways, so a long line never takes the\n line numbers away with it. */\n position: sticky;\n left: 0;\n z-index: 1;\n flex: none;\n width: 3.4em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .85;\n user-select: none;\n background: var(--rvs-code-bg);\n}\n\n.rvs-row-del .rvs-dline-num {\n background: var(--rvs-del-solid);\n}\n\n.rvs-row-add .rvs-dline-num {\n background: var(--rvs-add-solid);\n}\n\n.rvs-dline-text {\n flex: 1;\n padding-right: 10px;\n user-select: text;\n}\n\n.rvs-gutter-col {\n flex: none;\n width: 30px;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-line {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.rvs-diff-grid::-webkit-scrollbar {\n width: 9px;\n height: 0;\n}\n\n.rvs-diff-grid::-webkit-scrollbar-thumb {\n background: var(--dsw-alias-scrollbar-bg-l2, rgba(127, 127, 127, .4));\n border-radius: 4px;\n}\n\n.rvs-num {\n flex: none;\n display: inline-block;\n width: 3.2em;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .6;\n user-select: none;\n}\n\n.rvs-row-del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-row-del .rvs-dline-text,\n.rvs-row-del .rvs-dline-num,\n.rvs-row-del .rvs-num {\n color: #f14c4c;\n}\n\n.rvs-row-add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-row-add .rvs-dline-text,\n.rvs-row-add .rvs-dline-num,\n.rvs-row-add .rvs-num {\n color: #4ec9b0;\n}\n\n.rvs-row-empty {\n color: var(--rvs-fg3);\n opacity: .35;\n}\n\n.rvs-gutter {\n flex: none;\n width: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-left: 1px solid var(--rvs-border);\n border-right: 1px solid var(--rvs-border);\n user-select: none;\n}\n\n.rvs-gutter-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n opacity: .7;\n}\n\n.rvs-hunk-btns {\n display: flex;\n gap: 2px;\n}\n\n.rvs-hunk-btn {\n width: 13px;\n height: 15px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: transparent;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-hunk-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-hunk-btn.stage:hover {\n color: var(--rvs-git-a);\n}\n\n.rvs-hunk-btn.revert:hover {\n color: var(--rvs-git-d);\n}\n\n/**\n * Token colors: VS Code Dark+ / Light+, matching the CodeMirror theme in\n * `vsc/editor-theme.ts`. Keeping ONE palette for both surfaces means a file\n * does not change colors when the diff is switched to its editable side.\n */\n.rvs-t-comment { color: #6a9955; }\n.rvs-t-string { color: #ce9178; }\n.rvs-t-keyword { color: #569cd6; }\n.rvs-t-number { color: #b5cea8; }\n.rvs-t-func { color: #dcdcaa; }\n.rvs-t-type { color: #4ec9b0; }\n.rvs-t-attr { color: #9cdcfe; }\n.rvs-t-variable { color: #9cdcfe; }\n.rvs-t-operator { color: #d4d4d4; }\n.rvs-t-punct { color: #d4d4d4; }\n.rvs-t-tag { color: #569cd6; }\n.rvs-t-meta { color: #c586c0; }\n.rvs-t-insert { color: #4ec9b0; }\n.rvs-t-delete { color: #f14c4c; }\n\nbody:not([data-ds-dark-theme]) .rvs-t-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-t-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-t-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-t-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-t-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-t-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-t-attr,\nbody:not([data-ds-dark-theme]) .rvs-t-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-t-operator,\nbody:not([data-ds-dark-theme]) .rvs-t-punct { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-t-meta { color: #af00db; }\n\n/**\n * CodeMirror token colors, applied through FIXED class names emitted by the\n * highlight style (`vsc/editor-palette.ts`). Fixed names mean the colors come\n * from this stylesheet — the same one that paints the rest of the UI — so a\n * code file can never go monochrome because a generated class name changed or\n * an injected style failed. Same Dark+ / Light+ palette as the diff panes\n * above, so a file keeps its colors when switching between the two views.\n */\n.rvs-ck-comment { color: #6a9955; }\n.rvs-ck-keyword { color: #569cd6; }\n.rvs-ck-control { color: #c586c0; }\n.rvs-ck-string { color: #ce9178; }\n.rvs-ck-regexp { color: #d16969; }\n.rvs-ck-number { color: #b5cea8; }\n.rvs-ck-constant { color: #569cd6; }\n.rvs-ck-func { color: #dcdcaa; }\n.rvs-ck-type { color: #4ec9b0; }\n.rvs-ck-variable { color: #9cdcfe; }\n.rvs-ck-attr { color: #9cdcfe; }\n.rvs-ck-meta { color: #c586c0; }\n.rvs-ck-punct { color: #d4d4d4; }\n.rvs-ck-op { color: #d4d4d4; }\n.rvs-ck-heading { color: #569cd6; font-weight: 700; }\n.rvs-ck-em { font-style: italic; }\n.rvs-ck-link { color: #9cdcfe; text-decoration: underline; }\n.rvs-ck-strike { text-decoration: line-through; }\n.rvs-ck-invalid { color: #f44747; }\n\nbody:not([data-ds-dark-theme]) .rvs-ck-comment { color: #008000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-keyword { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-control { color: #af00db; }\nbody:not([data-ds-dark-theme]) .rvs-ck-string { color: #a31515; }\nbody:not([data-ds-dark-theme]) .rvs-ck-regexp { color: #811f3f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-number { color: #098658; }\nbody:not([data-ds-dark-theme]) .rvs-ck-constant { color: #0070c1; }\nbody:not([data-ds-dark-theme]) .rvs-ck-func { color: #795e26; }\nbody:not([data-ds-dark-theme]) .rvs-ck-type { color: #267f99; }\nbody:not([data-ds-dark-theme]) .rvs-ck-variable { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-attr { color: #e50000; }\nbody:not([data-ds-dark-theme]) .rvs-ck-meta { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-punct,\nbody:not([data-ds-dark-theme]) .rvs-ck-op { color: #1f1f1f; }\nbody:not([data-ds-dark-theme]) .rvs-ck-heading { color: #0000ff; }\nbody:not([data-ds-dark-theme]) .rvs-ck-link { color: #001080; }\nbody:not([data-ds-dark-theme]) .rvs-ck-invalid { color: #cd3131; }\n\n/**\n * Opaque editor surface, also as plain CSS: the CodeMirror theme paints it too\n * (following the scheme through a Compartment), but a transparent editor is\n * the one failure a user notices immediately, so the container states it as\n * well.\n */\n.rvs-edge .cm-editor,\n.rvs-edge .cm-scroller,\n.rvs-edge .cm-gutters {\n background-color: var(--rvs-code-bg);\n}\n\n.rvs-edge .cm-editor {\n color: var(--rvs-code-fg);\n}\n\n.rvs-edge .cm-gutters {\n color: var(--rvs-code-gutter-fg, var(--rvs-fg3));\n border-right: 1px solid var(--rvs-border);\n}\n\n.rvs-edge .cm-activeLine {\n background-color: rgba(127, 127, 127, .08);\n}\n\n.rvs-edge .cm-activeLineGutter {\n background-color: rgba(127, 127, 127, .12);\n}\n\n/**\n * The code editor's own scrollbars.\n *\n * These had NO rule at all: CodeMirror's scroller is `.cm-scroller`, which is\n * none of `.rvs-scroll` / `.rvs-diff-grid` / `.rvs-hbar`, so the editor fell\n * back to the browser default — too thin to hit with a mouse.\n *\n * Both notations are needed and must stay in step: Chromium honours\n * `scrollbar-width` over `::-webkit-scrollbar` when both apply, so setting\n * only the webkit half would silently have no effect. Keep the numbers equal.\n */\n.rvs-edge .cm-scroller {\n scrollbar-width: auto;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar {\n width: 14px;\n height: 14px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb {\n /* Opaque, not a translucent token: a thin wash over code is exactly the\n low-contrast target that is hard to grab. */\n background: rgba(121, 121, 121, .8);\n border: 3px solid transparent;\n border-radius: 7px;\n background-clip: padding-box;\n min-height: 36px;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-thumb:hover {\n background: rgba(150, 150, 150, .95);\n border: 3px solid transparent;\n background-clip: padding-box;\n}\n\n.rvs-edge .cm-scroller::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n/* ------------------------------------------------------------ find widget */\n\n/**\n * \"You landed here\": the transient highlight on the line a jump landed on\n * (search hit, @-reference).\n *\n * Deliberately NOT a warm/amber wash: over the dark editor that muddies into a\n * brown-black band that reads as a shadow and swallows annotation colors. This\n * is the accent blue instead — a tinted band with a bright edge on the left and\n * hairlines top/bottom, so it reads as a marked region while every token keeps\n * its own colour and contrast.\n */\n.rvs-reveal-line {\n background-color: rgba(88, 166, 255, .22);\n box-shadow:\n inset 3px 0 0 0 #58a6ff,\n inset 0 1px 0 0 rgba(88, 166, 255, .38),\n inset 0 -1px 0 0 rgba(88, 166, 255, .38);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-reveal-line {\n background-color: rgba(77, 107, 254, .14);\n box-shadow:\n inset 3px 0 0 0 #4d6bfe,\n inset 0 1px 0 0 rgba(77, 107, 254, .35),\n inset 0 -1px 0 0 rgba(77, 107, 254, .35);\n}\n\n/* --------------------------------------------------------- session changes */\n\n/**\n * 「本会话改了什么」:代码行背景 + 左侧改动栏(Cursor 风格)。\n *\n * 三种形态必须**一眼分得开**,光靠绿/红两个色相不够(色弱用户看新增行和删除行\n * 会糊成同一片),所以每种的左侧色条宽度/花样的语义也不同:\n * - 新增:实心绿条;\n * - 修改:实心蓝条(不是绿:修改块里既有留下的行也有新写的行,用\"中性的已变更\"\n * 色不会误导读者以为整块都是新内容);\n * - 删除:**斜纹**红底 + 更粗的红条 —— 这一行其实已经不存在了,只在中止位置上\n * 留个锚点,斜纹是这一层\"虚\"的信息里最不容易被当成真内容的花样。\n *\n * 选择器带上 `.cm-line`:`.cm-activeLine` 由 CodeMirror 的主题注入(运行时\n * `<style>`,通常排在本文档之后),只写 `.rvs-change-*` 两者同权重时会输给它,\n * 光标所在的那一行改动就会消失。\n */\n.rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(46, 160, 67, .17);\n box-shadow:\n inset 3px 0 0 0 #2ea043,\n inset 0 -1px 0 0 rgba(46, 160, 67, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(56, 139, 253, .15);\n box-shadow:\n inset 3px 0 0 0 #388bfd,\n inset 0 -1px 0 0 rgba(56, 139, 253, .28);\n}\n\n.rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(248, 81, 73, .09);\n background-image: repeating-linear-gradient(135deg, rgba(248, 81, 73, .17) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #f85149;\n}\n\n/* 改动栏本身:符号 + 一列与行背景同色的窄条,读起来才是一条\"改动边\"。 */\n.rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #2ea043;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #388bfd;\n}\n\n.rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #f85149;\n}\n\n.rvs-edge .rvs-change-mark {\n display: inline-block;\n width: 12px;\n font-family: var(--rvs-mono);\n font-size: 12px;\n line-height: 1;\n text-align: center;\n user-select: none;\n}\n\n.rvs-edge .rvs-change-mark-add { color: #2ea043; }\n.rvs-edge .rvs-change-mark-mod { color: #388bfd; }\n.rvs-edge .rvs-change-mark-del { color: #f85149; }\n\n/**\n * 行内(字符级)差异:上面那三种底色回答\"哪几行变了\",这两条回答\"那一行的哪几个\n * 字变了\"。只改一个词的编辑,整行同色时完全看不出改了什么。\n *\n * `rvs-change-word-add` 刻意**只给背景、不给 `color`**:代码有自己的语法着色,\n * 覆盖前景色会把关键字/字符串/注释染成同一种颜色,比不标还难读。透明度压在行\n * 底色之上一点点,叠起来仍读得出\"整块改动\"的边界,又能看出块内哪几个字是新的。\n */\n.rvs-edge .rvs-change-word-add {\n background-color: rgba(46, 160, 67, .22);\n border-radius: 2px;\n}\n\n/**\n * 被删掉、在新文件里已经不存在的内容:零宽 widget,红底 + 删除线。\n *\n * 删除线画在 chip 自己身上(chip 是独立元素,不会波及周围代码);`white-space:\n * pre` 保留被删文本自己的缩进 —— 截断/去空白都会让 chip 谎报\"删了什么\"。\n * 字号略小 + 降一点不透明度,是让它读起来像\"残留物\"而不是一行真代码。\n */\n.rvs-edge .rvs-change-word-del {\n padding: 0 3px;\n margin: 0 1px;\n border-radius: 3px;\n background-color: rgba(248, 81, 73, .18);\n font-size: .92em;\n text-decoration: line-through;\n opacity: .85;\n white-space: pre;\n}\n\n/**\n * 撑宽度的隐形符号:只用它占位,绝不显示(见 `change-marks.ts` 的 SpacerMarker,\n * CodeMirror 会给这个 spacer 元素加 `visibility: hidden`,这里不重复声明)。\n */\n.rvs-edge .rvs-change-spacer {\n opacity: 0;\n}\n\n/* 浅色主题:同样的色相,压暗 + 提高不透明度,在近白底上才看得清。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-add {\n background-color: rgba(31, 136, 61, .13);\n box-shadow:\n inset 3px 0 0 0 #1f883d,\n inset 0 -1px 0 0 rgba(31, 136, 61, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-mod {\n background-color: rgba(9, 105, 218, .12);\n box-shadow:\n inset 3px 0 0 0 #0969da,\n inset 0 -1px 0 0 rgba(9, 105, 218, .22);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-line.rvs-change-del {\n background-color: rgba(207, 34, 46, .07);\n background-image: repeating-linear-gradient(135deg, rgba(207, 34, 46, .14) 0 6px, transparent 6px 12px);\n box-shadow: inset 4px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-add {\n box-shadow: inset 2px 0 0 0 #1f883d;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-mod {\n box-shadow: inset 2px 0 0 0 #0969da;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .cm-gutterElement.rvs-change-gutter-del {\n box-shadow: inset 2px 0 0 0 #cf222e;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-add { color: #1f883d; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-mod { color: #0969da; }\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-mark-del { color: #cf222e; }\n\n/* 浅色主题的行内差异:同样的色相压暗,在近白底上才看得清(暗色那套会糊成一片)。 */\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-add {\n background-color: rgba(26, 127, 55, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-edge .rvs-change-word-del {\n background-color: rgba(207, 34, 46, .14);\n}\n\n/**\n * 改动跳转按钮:浮在编辑器右上角。\n *\n * 放在编辑器上而不是面板里 —— 文件打开后光标就在这里,而面板可能被收起、被滚走。\n * 容器 `.rvs-body` 已经是 `position: relative`(它本来用于挂 find 浮层),所以这里\n * 只做绝对定位,不引入新的定位上下文。`pointer-events` 只开在按钮上:这块区域压在\n * 编辑器文字上方,整块可点会把右上角那几行变成死区。\n */\n.rvs-change-nav {\n position: absolute;\n top: 8px;\n right: 14px;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 3px 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background: Canvas;\n box-shadow: 0 2px 8px rgba(0, 0, 0, .28);\n pointer-events: none;\n}\n\n/* The counter is what makes this read as \"3 of 7 changes\" rather than two\n anonymous arrows — and it keeps the buttons from looking like decoration. */\n.rvs-change-nav-count {\n padding: 0 6px 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.rvs-change-nav-btn {\n width: 26px;\n height: 22px;\n padding: 0;\n border: 1px solid transparent;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg);\n font-size: 13px;\n font-weight: 600;\n line-height: 20px;\n text-align: center;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.rvs-change-nav-btn:hover {\n border-color: var(--rvs-border2);\n background: var(--rvs-hover);\n color: var(--rvs-brand);\n}\n\n.rvs-change-nav-btn:active { background: var(--rvs-active); }\n\n/**\n * 悬浮在改动行上出现的「撤销这处改动」按钮。\n *\n * 它**不在编辑器的 DOM 里**:`undo-affordance.ts` 把它当 `position: fixed` 的元素挂到\n * `document.body`(和「添加到对话」那个浮层同一套做法),所以这里的选择器不带\n * `.rvs-edge` —— 带上了就一条都不生效。固定定位 + 高 z-index 是刻意的:宿主容器有\n * `overflow: hidden`,挂在里面会被 CodeMirror 的滚动层裁掉。\n *\n * 颜色按\"危险动作\"给:默认红边红字、悬停实心红。底色不透明(不用半透明的 overlay\n * token),否则后面的代码文字会透出来。\n */\n.rvs-undo-affordance {\n position: fixed;\n z-index: 2100;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 220px;\n padding: 3px 9px;\n border: 1px solid #f85149;\n border-radius: 6px;\n background-color: #1e2229;\n color: #ffb4ae;\n /* 按钮挂在 body 上,没有 .rvs-edge 的字体上下文:跟随宿主页面字体。 */\n font-family: inherit;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n cursor: pointer;\n box-shadow: 0 6px 18px rgba(0, 0, 0, .45);\n /* 纵向以悬停行的中线对齐(横向坐标由 JS 按行尾算好)。 */\n transform: translateY(-50%);\n}\n\n.rvs-undo-affordance:hover {\n background-color: #f85149;\n border-color: #f85149;\n color: #fff;\n}\n\n.rvs-undo-affordance:active {\n transform: translateY(-50%) scale(.97);\n}\n\n.rvs-undo-affordance:focus-visible {\n outline: 2px solid #58a6ff;\n outline-offset: 1px;\n}\n\n/* 删除锚点:这一行其实已经不在了,虚线边框把它和\"真实存在的行\"分开。 */\n.rvs-undo-affordance[data-kind=\"del\"] {\n border-style: dashed;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance {\n border-color: #cf222e;\n background-color: #ffffff;\n color: #a40e26;\n box-shadow: 0 6px 18px rgba(31, 35, 40, .18);\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:hover {\n background-color: #cf222e;\n border-color: #cf222e;\n color: #fff;\n}\n\nbody:not([data-ds-dark-theme]) .rvs-undo-affordance:focus-visible {\n outline-color: #4d6bfe;\n}\n\n/**\n * CodeMirror's own search decorations, also stated here: the editor's theme is\n * injected by the library, and these must stay readable even when only this\n * stylesheet is in play.\n */\n.rvs-edge .cm-searchMatch {\n background-color: rgba(226, 183, 20, .30);\n outline: 1px solid rgba(226, 183, 20, .55);\n}\n\n.rvs-edge .cm-searchMatch-selected {\n background-color: rgba(226, 183, 20, .48);\n}\n\n.rvs-edge .cm-selectionBackground,\n.rvs-edge .cm-content ::selection {\n background-color: rgba(58, 110, 165, .55) !important;\n}\n\n/** Build stamp in the editor info bar: identifies the loaded client bundle. */\n.rvs-build {\n flex: none;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n color: var(--rvs-fg3);\n font-size: 10px;\n font-family: var(--rvs-mono);\n opacity: .85;\n user-select: text;\n}\n\n.rvs-find {\n position: absolute;\n top: 6px;\n right: 18px;\n z-index: 30;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 3px 4px 3px 7px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 4px 14px rgba(0, 0, 0, .28);\n font-size: 12px;\n}\n\n.rvs-find-input {\n width: 170px;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 5px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.rvs-find-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-find-count {\n flex: none;\n min-width: 54px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-find-count.none {\n color: var(--rvs-git-d);\n}\n\n.rvs-code {\n flex: 1;\n min-height: 0;\n overflow: auto;\n margin: 0;\n padding: 6px 0 16px;\n font-family: var(--rvs-mono);\n font-size: 12.5px;\n line-height: 18px;\n white-space: pre;\n scrollbar-width: thin;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n.rvs-code-line {\n display: flex;\n align-items: flex-start;\n min-width: max-content;\n}\n\n.rvs-code-line:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-code-text {\n flex: 1;\n padding-right: 10px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n/* ---------------------------------------------------------- history list */\n\n.rvs-commit-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 4px 8px 4px 4px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n line-height: 18px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-commit-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-commit-item.selected {\n background: var(--rvs-active);\n}\n\n.rvs-graph-svg {\n flex: none;\n display: block;\n}\n\n.rvs-commit-hash {\n flex: none;\n font-family: var(--rvs-mono);\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-commit-msg {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-commit-date {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-ref-badge {\n flex: none;\n padding: 0 5px;\n border-radius: 8px;\n border: 1px solid var(--rvs-border2);\n font-size: 10px;\n line-height: 15px;\n color: var(--rvs-fg2);\n}\n\n.rvs-ref-badge.head {\n border-color: var(--rvs-brand);\n background: rgba(77, 107, 254, .2);\n color: var(--rvs-fg);\n}\n\n.rvs-ref-badge.tag {\n border-color: rgba(226, 183, 20, .55);\n background: rgba(226, 183, 20, .16);\n color: var(--rvs-git-m);\n}\n\n.rvs-detail {\n margin: 0 6px 8px;\n padding: 8px 10px;\n border: 1px solid var(--rvs-border2);\n border-left: 3px solid var(--rvs-accent);\n border-radius: 8px;\n background: var(--rvs-layer3);\n font-size: 12px;\n}\n\n.rvs-detail-meta {\n color: var(--rvs-fg3);\n font-size: 11px;\n margin-bottom: 6px;\n white-space: pre-wrap;\n}\n\n.rvs-file-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 4px;\n border-radius: 5px;\n cursor: pointer;\n}\n\n.rvs-file-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-file-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n /* Same tail-first truncation as the info bar; `plaintext` keeps the path's\n own LTR order (see .rvs-einfo-path). */\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-file-status {\n flex: none;\n width: 16px;\n text-align: center;\n font-weight: 700;\n font-size: 11px;\n}\n\n/* ------------------------------------------------------- commit pane */\n\n/**\n * The history panel's bottom half: the graph keeps the top, the selected\n * commit takes this pane below the drag handle (same gesture and styling as\n * the editor split, so `.rvs-vsplit-handle` is reused rather than copied).\n */\n.rvs-history-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.rvs-hpane {\n flex: none;\n min-height: 140px;\n max-height: 82%;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-top: 1px solid var(--rvs-border);\n /* Same glass as the graph above (the sidebar's own backdrop shows through):\n an opaque `.rvs-code-bg` here read as a separate dark slab glued under the\n list. Patch rows already carry their own translucent add/del washes, so the\n diff stays legible without a filled background. */\n background: transparent;\n}\n\n/* Full-height mode: the graph is hidden by the panel, so the pane takes the\n remaining column instead of its persisted pixel height. */\n.rvs-hpane.expanded {\n flex: 1;\n max-height: none;\n}\n\n/* A toolbar toggle that is currently ON (wrap, for example). */\n.rvs-hbtn.active {\n color: var(--rvs-brand);\n}\n\n.rvs-hpane-body {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* Tab strip: same underline idiom as the editor's diff/worktree switch, but\n scoped so the pane's three views cannot be confused with editor tabs. */\n.rvs-htabs {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* The tabs themselves live in their own role=tablist element: the strip also\n carries the hash, expand and close buttons, and those must NOT inherit the\n tablist's arrow-key handling (ArrowRight on \"close\" used to switch tabs). */\n.rvs-hpane-tablist {\n flex: none;\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.rvs-htab {\n appearance: none;\n border: none;\n border-bottom: 2px solid transparent;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n padding: 5px 8px 4px;\n cursor: pointer;\n}\n\n.rvs-htab:hover {\n color: var(--rvs-fg);\n}\n\n.rvs-htab.active {\n color: var(--rvs-fg);\n border-bottom-color: var(--rvs-brand);\n}\n\n.rvs-htabs-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hhash-mini {\n flex: none;\n margin-right: 2px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/**\n * Every tab body stays mounted (the patch's scroll position and parse survive\n * a look at 提交详情) and is hidden with the `hidden` attribute. The class\n * declares `flex`, which outranks the UA `[hidden]` rule, so hiding needs an\n * explicit rule of its own.\n */\n.rvs-hbody {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-hbody[hidden] {\n display: none;\n}\n\n/* -- 提交详情 -- */\n\n.rvs-hsubject {\n font-size: 13px;\n font-weight: 600;\n line-height: 1.45;\n margin-bottom: 8px;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hmeta {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 21px;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-icon {\n flex: none;\n display: flex;\n width: 13px;\n align-items: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hmeta-value {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-hmeta-label {\n flex: none;\n}\n\n.rvs-hhash {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 5px;\n border: 1px solid var(--rvs-border);\n border-radius: 4px;\n background: var(--rvs-input);\n color: var(--rvs-fg2);\n user-select: all;\n}\n\n.rvs-hparent {\n font-family: var(--rvs-mono);\n font-size: 11px;\n line-height: 16px;\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hdash {\n color: var(--rvs-fg3);\n}\n\n.rvs-hrefs {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-top: 6px;\n}\n\n.rvs-hmsg {\n margin-top: 10px;\n padding-top: 8px;\n border-top: 1px dashed var(--rvs-border);\n font-size: 12px;\n line-height: 1.55;\n color: var(--rvs-fg2);\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-hfooter {\n display: flex;\n gap: 6px;\n margin-top: 14px;\n}\n\n/* -- 内容 -- */\n\n.rvs-hhint {\n margin-bottom: 6px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* One line: how many files, and the path filter that makes a 60-file commit\n narrowable without scrolling. */\n.rvs-hcontent-head {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.rvs-hcount {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-hfilter {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-hfiles {\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n\n/* Directory row of the 内容 tree: chevron + folder glyph + path + count. */\n.rvs-hfolder {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 2px 4px;\n border-radius: 4px;\n color: var(--rvs-fg2);\n font-size: 12px;\n cursor: pointer;\n user-select: none;\n}\n\n.rvs-hfolder:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hfolder-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n}\n\n.rvs-hfolder-count {\n flex: none;\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n/* Files under a folder keep the editor tree's indent idiom. */\n.rvs-file-row.indent {\n padding-left: 18px;\n}\n\n.rvs-file-row.active {\n background: var(--rvs-active);\n}\n\n/* The row's quick \"open in editor\" affordance: invisible until the row is\n hovered/focused, so the path keeps the whole width at rest. */\n.rvs-file-open {\n opacity: 0;\n}\n\n.rvs-file-row:hover .rvs-file-open,\n.rvs-file-row:focus-within .rvs-file-open,\n.rvs-file-row:focus .rvs-file-open {\n opacity: 1;\n}\n\n/* Keyboard focus must be visible on the pane's role=button rows (a bare\n browser default is nearly invisible on this dark chrome). */\n.rvs-file-row:focus-visible,\n.rvs-hfolder:focus-visible,\n.rvs-commit-item:focus-visible,\n.rvs-patch-chevron:focus-visible,\n.rvs-vsplit-handle:focus-visible {\n outline: 2px solid var(--rvs-brand);\n outline-offset: -2px;\n}\n\n/* -- 差异 -- */\n\n/**\n * The diff tab is a column: a PINNED tool row, then the one scroller. The\n * reference pane made the whole tab a scroll area, so the file you were in and\n * the controls both disappeared on a long patch.\n */\n.rvs-hdiff {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n\n.rvs-hdiff[hidden] {\n display: none;\n}\n\n.rvs-ptoolbar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 3px;\n height: 30px;\n padding: 0 6px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n}\n\n.rvs-pfile-index {\n flex: none;\n min-width: 32px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n color: var(--rvs-fg3);\n}\n\n.rvs-pfile-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg2);\n}\n\n.rvs-pscroll {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 10px 12px 14px;\n}\n\n.rvs-patch-file {\n margin-bottom: 10px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n}\n\n.rvs-patch-file.folded .rvs-patch-head {\n border-bottom: none;\n border-radius: 6px;\n}\n\n.rvs-patch-file.active {\n border-color: var(--rvs-brand);\n}\n\n/* Sticky per-file header: scrolling a 3000-line hunk keeps saying which file\n it belongs to. `position: sticky` needs the nearest scrollport, which is\n `.rvs-pscroll` — no `overflow` on the section itself. */\n.rvs-patch-head {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 6px;\n border-bottom: 1px solid var(--rvs-border);\n border-radius: 6px 6px 0 0;\n background: var(--rvs-layer3);\n cursor: pointer;\n}\n\n.rvs-patch-head:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-patch-chevron {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg3);\n cursor: pointer;\n transform: rotate(0deg);\n}\n\n.rvs-patch-chevron.open {\n transform: rotate(90deg);\n}\n\n.rvs-patch-path {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n}\n\n.rvs-patch-letter {\n flex: none;\n font-size: 11px;\n font-weight: 700;\n}\n\n.rvs-patch-counts {\n flex: none;\n display: flex;\n gap: 5px;\n font-family: var(--rvs-mono);\n font-size: 10.5px;\n}\n\n.rvs-patch-add-count {\n color: var(--rvs-git-a);\n}\n\n.rvs-patch-del-count {\n color: var(--rvs-git-d);\n}\n\n.rvs-patch-rows {\n padding: 2px 0 6px;\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 17px;\n}\n\n.rvs-patch-row {\n display: flex;\n align-items: stretch;\n min-width: max-content;\n white-space: pre;\n}\n\n/* Wrap mode: the row gives up its horizontal runway and the text wraps under\n the gutter instead (the whole point on a narrow sidebar). */\n.rvs-patch-rows.wrap .rvs-patch-row {\n min-width: 0;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.rvs-patch-rows.wrap .rvs-patch-text {\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* A block whose raw patch text could not be paired with the parsed model\n (defensive: block count and model count disagreed) is dimmed instead of\n silently looking complete. */\n.rvs-patch-rows.partial {\n opacity: .62;\n}\n\n/* Truncation marker in the pinned toolbar: the cut point can be thousands of\n rows away, so the bottom note is not where a reader learns about it. */\n.rvs-ptruncated {\n flex: none;\n font-size: 12px;\n color: var(--rvs-git-m);\n}\n\n.rvs-patch-row.add {\n background: var(--rvs-add-bg);\n}\n\n.rvs-patch-row.del {\n background: var(--rvs-del-bg);\n}\n\n.rvs-patch-num {\n flex: none;\n width: 42px;\n padding-right: 6px;\n text-align: right;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-sign {\n flex: none;\n width: 14px;\n text-align: center;\n color: var(--rvs-fg3);\n user-select: none;\n}\n\n.rvs-patch-text {\n flex: 1;\n padding-right: 12px;\n user-select: text;\n}\n\n/* One \"the hunk jumped ahead\" marker, so a patch never pretends its line\n numbers are contiguous. */\n.rvs-patch-skip {\n margin: 2px 0;\n border-top: 1px dashed var(--rvs-border);\n border-bottom: 1px dashed var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n text-align: center;\n user-select: none;\n}\n\n.rvs-patch-note {\n padding: 6px 8px;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n/* ---------------------------------------------------- floating editor window */\n\n/**\n * The floating editor lives in the host's frame-wide overlay layer\n * (`position: absolute; inset: 0; z-index: 20`, click-through, children opt\n * back into pointer events). It is placed with viewport coordinates, so it\n * floats above every column without joining any of their stacking contexts.\n *\n * `.rvs-root` carries the whole design-system token set and is row-flex by\n * default; this frame overrides the direction to a column and takes its size\n * from the inline rect the component keeps.\n */\n.rvs-float-window {\n position: fixed;\n flex-direction: column;\n /* The rect maths (clamp/persist) is in border-box terms; without this the\n painted border would sit one pixel outside the computed rectangle. */\n box-sizing: border-box;\n min-width: 360px;\n min-height: 220px;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n z-index: 30;\n /* The overlay layer itself is click-through; the window opts back in even if\n the host wraps each overlay entry in its own element. */\n pointer-events: auto;\n}\n\n/* Minimized: the frame IS the ball (see `.rvs-float-mini`); the body stays\n mounted but hidden, and it must not impose a minimum height. */\n.rvs-float-window[data-rvs-float=\"collapsed\"] {\n min-height: 0;\n}\n\n/**\n * Minimized window = floating ball.\n *\n * A full-width 34px bar was too long: it read as a broken window and covered a\n * whole strip. The ball is a small circle at the window's own corner, draggable\n * anywhere, restored by a click (or Enter/Space). It keeps the dirty dot, so\n * \"the editor is out and has unsaved edits\" is still one glance away.\n */\n.rvs-float-window.rvs-float-mini {\n min-width: 0;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n cursor: move;\n touch-action: none;\n}\n\n.rvs-float-ball {\n flex: 1;\n /* Stretch to the circle: the frame is a COLUMN flex box with centred items,\n so without this the hit area (and the absolutely positioned dot) would be\n sized by the 16px glyph instead of the 44px ball. */\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n border-radius: 50%;\n color: var(--rvs-brand);\n font-size: 16px;\n line-height: 1;\n cursor: move;\n outline: none;\n}\n\n.rvs-float-ball:hover,\n.rvs-float-ball:focus-visible {\n background: var(--rvs-hover);\n}\n\n.rvs-float-ball-glyph {\n pointer-events: none;\n}\n\n/* Unsaved edits stay visible while minimized. */\n.rvs-float-ball-dot {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--rvs-git-m);\n box-shadow: 0 0 0 2px var(--rvs-code-bg);\n pointer-events: none;\n}\n\n/* While a drag/resize gesture runs the pointer must not select editor text. */\n.rvs-float-window.dragging {\n user-select: none;\n}\n\n.rvs-float-titlebar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 7px;\n height: 34px;\n padding: 0 6px 0 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n cursor: move;\n user-select: none;\n touch-action: none;\n}\n\n.rvs-float-glyph {\n color: var(--rvs-brand);\n font-size: 11px;\n}\n\n.rvs-float-title {\n flex: none;\n font-size: 12px;\n font-weight: 600;\n color: var(--rvs-fg2);\n}\n\n.rvs-float-file {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 11.5px;\n color: var(--rvs-fg3);\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n}\n\n.rvs-float-spacer {\n flex: 1;\n}\n\n.rvs-float-btn {\n flex: none;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 5px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n line-height: 1;\n cursor: pointer;\n}\n\n.rvs-float-btn:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-float-close:hover {\n background: rgba(241, 76, 76, .18);\n color: var(--rvs-danger);\n}\n\n.rvs-float-body {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n display: flex;\n overflow: hidden;\n background: var(--rvs-code-bg);\n}\n\n/* Keep the height chain pinned: the editor pane grows inside this box. */\n.rvs-float-body > .rvs-pane {\n flex: 1 1 0;\n min-height: 0;\n min-width: 0;\n}\n\n/* Eight grips, placed INSIDE the border box: the window clips overflow (rounded\n corners), so grips hanging outside would lose half their hit area. Corners\n are larger so they can actually be hit. */\n.rvs-float-resize {\n position: absolute;\n z-index: 3;\n}\n\n.rvs-float-resize-n { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-s { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }\n.rvs-float-resize-e { top: 10px; bottom: 10px; right: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-w { top: 10px; bottom: 10px; left: 0; width: 6px; cursor: ew-resize; }\n.rvs-float-resize-ne { top: 0; right: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n.rvs-float-resize-nw { top: 0; left: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-se { bottom: 0; right: 0; width: 12px; height: 12px; cursor: nwse-resize; }\n.rvs-float-resize-sw { bottom: 0; left: 0; width: 12px; height: 12px; cursor: nesw-resize; }\n\n/* Shown by whichever surface the single editor left behind (centre tab or the\n sidebar's editor panel). */\n.rvs-float-placeholder {\n flex: 1;\n min-height: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 24px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 12.5px;\n}\n\n.rvs-float-placeholder-title {\n color: var(--rvs-fg2);\n font-size: 13px;\n font-weight: 600;\n}\n\n.rvs-float-placeholder-text {\n max-width: 360px;\n line-height: 1.6;\n}\n\n/* --------------------------------------------------------- context menu */\n\n.rvs-portal {\n font-family: inherit;\n}\n\n/**\n * Floating surfaces (menu / modal / toast) paint an OPAQUE base first and then\n * lay the skin's overlay token on top. The token is frequently translucent, so\n * using it alone let the panel's own text bleed through the menu and overlap\n * the entries; `Canvas` follows the resolved light/dark scheme, so the base is\n * correct in either theme.\n */\n.rvs-menu,\n.rvs-modal-box,\n.rvs-toast {\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n}\n\n.rvs-menu {\n position: fixed;\n z-index: 1000;\n min-width: 172px;\n max-height: calc(100vh - 16px);\n overflow-y: auto;\n padding: 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 18px;\n}\n\n.rvs-menu-sep {\n height: 1px;\n margin: 4px 6px;\n background: var(--rvs-border);\n}\n\n.rvs-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 5px 10px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-menu-item:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-menu-item.danger {\n color: var(--vsc-danger, #f14c4c);\n}\n\n.rvs-menu-item.danger:hover {\n background: rgba(241, 76, 76, .16);\n}\n\n.rvs-menu-item:disabled {\n opacity: .45;\n cursor: default;\n}\n\n.rvs-menu-item:disabled:hover {\n background: transparent;\n}\n\n.rvs-menu-hint {\n margin-left: auto;\n font-size: 11px;\n opacity: .6;\n}\n\n/* ------------------------------------------------------- modal + toast */\n\n.rvs-modal-mask {\n position: fixed;\n inset: 0;\n z-index: 100000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n.rvs-modal-box {\n width: min(420px, calc(100vw - 40px));\n padding: 16px 18px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n color: var(--rvs-fg);\n box-shadow: 0 12px 40px rgba(0, 0, 0, .38);\n font-size: 13px;\n animation: rvsPop .14s ease;\n}\n\n.rvs-modal-title {\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 600;\n}\n\n.rvs-modal-text {\n margin-bottom: 12px;\n color: var(--rvs-fg2);\n font-size: 12.5px;\n line-height: 1.6;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.rvs-modal-row {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 14px;\n}\n\n.rvs-modal-btn {\n padding: 5px 14px;\n border: 1px solid var(--rvs-border2);\n border-radius: 7px;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n cursor: pointer;\n}\n\n.rvs-modal-btn:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-modal-btn.primary {\n border-color: transparent;\n background: var(--rvs-accent);\n color: #fff;\n}\n\n.rvs-modal-btn.danger {\n border-color: transparent;\n background: var(--rvs-danger);\n color: #fff;\n}\n\n.rvs-toasts {\n position: fixed;\n right: 16px;\n bottom: 18px;\n z-index: 100001;\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: flex-end;\n pointer-events: none;\n}\n\n.rvs-toast {\n max-width: 340px;\n padding: 7px 12px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n color: var(--rvs-fg);\n box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\n font-size: 12.5px;\n line-height: 1.5;\n word-break: break-word;\n white-space: pre-wrap;\n animation: rvsPop .14s ease;\n}\n\n.rvs-toast.error {\n border-color: rgba(241, 76, 76, .6);\n background-image: linear-gradient(rgba(58, 31, 34, .92), rgba(58, 31, 34, .92));\n}\n\n/* ------------------------------------------------------------- terminal */\n\n.rvs-term-tabs {\n flex: none;\n display: flex;\n align-items: stretch;\n gap: 2px;\n height: 32px;\n padding: 0 4px;\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid var(--rvs-border);\n scrollbar-width: none;\n}\n\n.rvs-term-tabs::-webkit-scrollbar {\n height: 0;\n}\n\n.rvs-term-tab {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n max-width: 180px;\n margin: 4px 0;\n padding: 0 6px 0 9px;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n/* Wrapper that pairs a tab with its close button. The two are siblings so the\n ✕ can be a real focusable <button> (a nested one is invalid HTML and left\n keyboard users no way to close a tab). */\n.rvs-term-tabwrap {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n}\n\n.rvs-term-tabwrap .rvs-term-tab {\n padding-right: 22px;\n}\n\n.rvs-term-tabwrap .rvs-etab-close {\n position: absolute;\n right: 3px;\n opacity: 0;\n}\n\n.rvs-term-tabwrap:hover .rvs-etab-close,\n.rvs-term-tabwrap:focus-within .rvs-etab-close {\n opacity: .8;\n}\n\n.rvs-term-tab:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.active {\n background: var(--rvs-layer3);\n color: var(--rvs-fg);\n}\n\n.rvs-term-tab.dead {\n color: var(--rvs-git-d);\n}\n\n.rvs-term-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-term-body {\n flex: 1;\n min-height: 0;\n position: relative;\n overflow: hidden;\n}\n\n.rvs-term-slot {\n position: absolute;\n inset: 0;\n}\n\n.rvs-term-dead {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n}\n\n/* `.rvs-toast.error` is styled with the overlay form further up, so the popup\n opacity convention (an opaque Canvas base plus a token layer) still governs\n it. A flat `background: #3a1f22` shorthand sat here and overrode that chain —\n same opaque result, but outside the convention. */\n\n@keyframes rvsFade {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes rvsPop {\n from { opacity: 0; transform: scale(.97) translateY(3px); }\n to { opacity: 1; transform: none; }\n}\n\n.rvs-search-row {\n display: flex;\n gap: 6px;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n/* --------------------------------------------------------- search options */\n\n.rvs-toggles {\n flex: none;\n display: inline-flex;\n border: 1px solid var(--rvs-border2);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.rvs-toggle {\n min-width: 26px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: none;\n border-right: 1px solid var(--rvs-border);\n background: transparent;\n color: var(--rvs-fg3);\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-toggle:last-child {\n border-right: none;\n}\n\n.rvs-toggle:hover {\n background: var(--rvs-hover);\n color: var(--rvs-fg);\n}\n\n.rvs-toggle.active {\n background: var(--rvs-active);\n color: var(--rvs-fg);\n box-shadow: inset 0 0 0 1px var(--rvs-brand);\n}\n\n.rvs-glyph {\n font-family: var(--rvs-mono);\n font-weight: 600;\n line-height: 1;\n letter-spacing: -0.02em;\n}\n\n.rvs-glyph-underline {\n text-decoration: underline;\n}\n\n.rvs-scope-label {\n flex: none;\n align-self: center;\n font-size: 11px;\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n/* --------------------------------------------------------- search results */\n\n.rvs-hit {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 10px;\n border: none;\n background: transparent;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12.5px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-hit:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-hit-file {\n font-weight: 600;\n}\n\n.rvs-hit-line {\n padding-left: 30px;\n align-items: flex-start;\n font-family: var(--rvs-mono);\n font-size: 12px;\n color: var(--rvs-fg2);\n}\n\n.rvs-hit-count {\n flex: none;\n min-width: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: var(--rvs-hover);\n font-size: 10.5px;\n line-height: 15px;\n text-align: center;\n color: var(--rvs-fg3);\n}\n\n.rvs-hit-lineno {\n flex: none;\n width: 3.2em;\n text-align: right;\n color: var(--rvs-fg3);\n opacity: .8;\n font-size: 11px;\n}\n\n.rvs-hit-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre;\n direction: ltr;\n}\n\n.rvs-mark {\n padding: 0 1px;\n border-radius: 2px;\n background: rgba(226, 183, 20, .3);\n color: inherit;\n}\n\n.rvs-hit-dir {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-hit-name {\n flex: none;\n font-weight: 600;\n}\n\n.rvs-kbd {\n padding: 0 4px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n font-size: 10px;\n color: var(--rvs-fg3);\n}\n\n/* --- SCM: repository directory row (git runs in THIS directory) ------------- */\n\n.rvs-repo-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 8px 4px 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-bg2, var(--dsw-alias-bg-layer-1, #1b1b1b));\n font-size: 11px;\n flex: none;\n}\n\n.rvs-repo-bar-label {\n color: var(--rvs-fg3);\n white-space: nowrap;\n}\n\n.rvs-repo-bar-path {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n unicode-bidi: plaintext;\n text-align: left;\n padding: 2px 6px;\n border: 1px solid var(--rvs-border2);\n border-radius: 4px;\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg);\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 11px;\n cursor: pointer;\n}\n\n.rvs-repo-bar-path:hover {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repo-bar-fix {\n margin-top: 10px;\n display: flex;\n justify-content: center;\n}\n\n/* --- SCM: repository directory picker -------------------------------------- */\n\n.rvs-repopick {\n width: min(560px, calc(100vw - 40px));\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.rvs-repopick .rvs-modal-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.rvs-repopick-bar {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-height: 22px;\n font-family: var(--rvs-mono, ui-monospace, Consolas, monospace);\n font-size: 12px;\n}\n\n.rvs-crumb-wrap {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n color: var(--rvs-fg3);\n}\n\n.rvs-crumb {\n border: none;\n background: none;\n padding: 1px 3px;\n border-radius: 3px;\n color: var(--rvs-brand-fg, var(--rvs-fg));\n font: inherit;\n cursor: pointer;\n}\n\n.rvs-crumb:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-probe {\n padding: 5px 8px;\n border-radius: 4px;\n font-size: 11.5px;\n border: 1px solid var(--rvs-border2);\n background: var(--rvs-bg3, rgba(255, 255, 255, .04));\n color: var(--rvs-fg2);\n}\n\n.rvs-repopick-probe.root {\n border-color: var(--rvs-ok, #2ea043);\n color: var(--rvs-ok, #2ea043);\n}\n\n.rvs-repopick-probe.inside {\n border-color: var(--rvs-brand);\n color: var(--rvs-brand-fg, var(--rvs-fg));\n}\n\n.rvs-repopick-found {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n padding-bottom: 2px;\n}\n\n.rvs-repopick-found-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-repopick-list {\n flex: 1 1 auto;\n min-height: 150px;\n max-height: 42vh;\n overflow: auto;\n border: 1px solid var(--rvs-border);\n border-radius: 5px;\n background: var(--rvs-bg-layer, rgba(0, 0, 0, .18));\n padding: 2px;\n}\n\n.rvs-repopick-row {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 3px 6px;\n border: none;\n border-radius: 3px;\n background: none;\n color: var(--rvs-fg);\n font: inherit;\n font-size: 12px;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-repopick-row:hover {\n background: var(--rvs-row-hover, rgba(255, 255, 255, .07));\n}\n\n.rvs-repopick-row span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-repopick-dim {\n color: var(--rvs-fg3);\n font-size: 11.5px;\n padding: 6px;\n}\n\n.rvs-repopick-type {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.rvs-repopick-type .rvs-input {\n flex: 1 1 auto;\n}\n\n.rvs-repopick-error {\n color: var(--rvs-error, #f85149);\n font-size: 11.5px;\n}\n\n/* --------------------------------------------------- streaming exec panel */\n\n/**\n * Live log for the network verbs (fetch / pull / push / sync).\n *\n * Fixed to the viewport's bottom-right instead of joining the panel's own\n * column: the pane can be collapsed or scrolled away while the push runs, and a\n * dialog that vanishes with its parent would hide the cancel button exactly\n * when it matters.\n */\n.rvs-execpanel {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing and the\n panel renders transparent and borderless over the page content. Keep this\n subset in sync with `.rvs-root`; the dark code surfaces get their own\n `body[data-ds-dark-theme]` override right after this rule. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n position: fixed;\n right: 16px;\n bottom: 16px;\n z-index: 45;\n width: min(620px, calc(100vw - 32px));\n max-height: min(60vh, 520px);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\nbody[data-ds-dark-theme] .rvs-execpanel {\n --rvs-code-bg: #1e1e1e;\n --rvs-code-fg: #d4d4d4;\n}\n\n\n.rvs-execpanel-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 5px 6px 5px 10px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-execpanel-title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-execpanel-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-execpanel-status.done { color: var(--rvs-git-a); }\n.rvs-execpanel-status.error { color: var(--rvs-danger); }\n.rvs-execpanel-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-execpanel-spacer {\n flex: 1;\n min-width: 0;\n}\n\n.rvs-execpanel-body {\n flex: 1;\n min-height: 60px;\n margin: 0;\n padding: 8px 10px;\n overflow: auto;\n background: var(--rvs-code-bg);\n color: var(--rvs-code-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-execpanel-foot {\n flex: none;\n padding: 4px 10px 6px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* --------------------------------------------------------- download dock */\n/* PORTALed to <body>, i.e. OUTSIDE `.rvs-root` where the tokens are declared:\n declare the subset this panel uses (same rule as `.rvs-execpanel`). */\n.rvs-downloads {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-git-a: #4ec9b0;\n position: fixed;\n /* Bottom-RIGHT, not over the sidebar's own footer (first screenshot: the\n dock sat on the usage/account block). `bottom: 64px` keeps it above the\n transient toast stack (right 16 / bottom 18 / z 100001) and above the\n network exec panel (right 16 / bottom 16 / z 45), so neither covers it. */\n right: 16px;\n bottom: 64px;\n z-index: 100000;\n animation: rvsFade .12s ease;\n width: min(380px, calc(100vw - 32px));\n max-height: min(45vh, 420px);\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background: var(--rvs-overlay);\n color: var(--rvs-fg);\n box-shadow: 0 18px 60px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .28);\n}\n\n.rvs-download {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: rgba(127, 127, 127, .06);\n}\n\n.rvs-download-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-download-icon {\n flex: none;\n display: flex;\n align-items: center;\n color: var(--rvs-fg2);\n}\n\n.rvs-download-name {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 600;\n}\n\n.rvs-download-status {\n flex: none;\n font-size: 11px;\n color: var(--rvs-fg3);\n}\n\n.rvs-download-status.done { color: var(--rvs-git-a); }\n.rvs-download-status.failed { color: var(--rvs-danger); }\n.rvs-download-status.cancelled { color: var(--rvs-git-m); }\n\n.rvs-download-bar {\n height: 4px;\n overflow: hidden;\n border-radius: 2px;\n background: rgba(127, 127, 127, .22);\n}\n\n.rvs-download-fill {\n height: 100%;\n width: 0;\n border-radius: 2px;\n background: var(--rvs-brand);\n transition: width .12s linear;\n}\n\n.rvs-download-fill.indeterminate {\n width: 35%;\n animation: rvs-download-slide 1.2s ease-in-out infinite;\n}\n\n@keyframes rvs-download-slide {\n from { transform: translateX(-120%); }\n to { transform: translateX(320%); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rvs-download-fill.indeterminate { animation-duration: 2.4s; }\n .rvs-download-fill { transition: none; }\n}\n\n.rvs-download-meta {\n overflow: hidden;\n color: var(--rvs-fg3);\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rvs-download-meta.failed { color: var(--rvs-danger); white-space: normal; word-break: break-word; }\n.rvs-download-meta.done { color: var(--rvs-fg2); }\n.rvs-download-meta.cancelled { color: var(--rvs-git-m); }\n\n/* ----------------------------------------------------------- doctor panel */\n\n/*\n * Remote-environment report, opened from the host list (which lives in the DSH\n * Settings dialog, i.e. OUTSIDE `.rvs-root`). Fixed overlay like the input\n * dialog so the host list behind it does not move, and its own token subset for\n * the same reason as `.rvs-execpanel`: `var(--rvs-*)` resolves to nothing out\n * there without it. Three state colors, and `unknown` deliberately looks\n * neutral (not red, not green): it is ignorance, not a verdict.\n */\n.rvs-doctor {\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-overlay: var(--dsw-alias-bg-overlay, #24262e);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, .45);\n color: var(--rvs-fg);\n font-size: 13px;\n}\n\n.rvs-doctor-card {\n display: flex;\n flex-direction: column;\n width: min(860px, 92vw);\n max-height: min(80vh, 720px);\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: var(--rvs-overlay);\n box-shadow: 0 8px 32px rgba(0, 0, 0, .35);\n}\n\n.rvs-doctor-head {\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-doctor-title {\n font-weight: 600;\n}\n\n.rvs-doctor-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 4px 12px 10px;\n}\n\n.rvs-doctor-loading {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 0;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n}\n\n.rvs-doctor-table th {\n position: sticky;\n top: 0;\n padding: 6px 8px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-overlay);\n color: var(--rvs-fg2);\n font-weight: 600;\n text-align: left;\n}\n\n.rvs-doctor-table td {\n padding: 5px 8px;\n border-top: 1px solid var(--rvs-border);\n vertical-align: top;\n}\n\n.rvs-doctor-item {\n white-space: nowrap;\n color: var(--rvs-fg2);\n}\n\n.rvs-doctor-badge {\n display: inline-block;\n padding: 0 6px;\n border: 1px solid currentColor;\n border-radius: 8px;\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-doctor-badge.ok { color: var(--rvs-ok, #2ea043); }\n.rvs-doctor-badge.missing { color: var(--rvs-git-m, #e2b714); }\n.rvs-doctor-badge.unknown { color: var(--rvs-fg3); }\n\n.rvs-doctor-detail {\n color: var(--rvs-fg3);\n font-family: var(--rvs-mono);\n font-size: 11px;\n word-break: break-word;\n user-select: text;\n}\n\n.rvs-doctor-hint {\n flex: none;\n padding: 8px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n\n\n\n/* ------------------------------------------------------------ port forwards */\n\n/**\n * The port panel: one form above two lists, all inside the sidebar column.\n *\n * The column can be dragged very narrow, so nothing here may assume a width: an\n * address/URL is ONE unbreakable token (`overflow-wrap: anywhere`), the action\n * row wraps instead of overflowing, and the form stacks vertically — a\n * three-input row is unusable at the panel's default width.\n */\n.rvs-ports-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 8px 8px 14px;\n}\n\n/**\n * The restore-failure banner: one sentence plus the \"forget these rules\"\n * action, side by side when there is room and stacked when the column is very\n * narrow (the action must never squeeze the explanation into a sliver).\n */\n.rvs-ports-restore {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-ports-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border: 1px solid var(--rvs-border2);\n border-radius: 8px;\n}\n\n.rvs-ports-field {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n\n.rvs-ports-label {\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* `.rvs-input` carries `flex: 1`; in a COLUMN flex parent that would stretch\n the field's HEIGHT, so the input fills the width and keeps its own height. */\n.rvs-ports-input {\n flex: none;\n width: 100%;\n box-sizing: border-box;\n}\n\n.rvs-ports-form-actions {\n display: flex;\n justify-content: flex-end;\n}\n\n.rvs-ports-section {\n margin-top: 12px;\n border-top: 1px solid var(--rvs-border);\n}\n\n.rvs-ports-sec-head {\n display: flex;\n align-items: center;\n gap: 6px;\n height: 26px;\n padding: 0 4px;\n color: var(--rvs-fg2);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: .04em;\n text-transform: uppercase;\n user-select: none;\n}\n\n.rvs-ports-count {\n padding: 0 6px;\n border-radius: 999px;\n background: var(--rvs-hover);\n color: var(--rvs-fg3);\n font-size: 10.5px;\n letter-spacing: 0;\n}\n\n.rvs-ports-row {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n padding: 6px 6px 7px;\n border-radius: 6px;\n}\n\n.rvs-ports-row:hover {\n background: var(--rvs-hover);\n}\n\n.rvs-ports-line {\n display: flex;\n align-items: baseline;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-ports-addr {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 11.5px;\n line-height: 1.45;\n}\n\n.rvs-ports-proc {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n/* State is never colour-only: the dot carries the state word as its label. */\n.rvs-ports-dot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-ports-dot.listening {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-ports-dot.error {\n background: var(--rvs-danger);\n}\n\n.rvs-ports-conn {\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-ports-err {\n color: var(--rvs-danger);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n.rvs-ports-actions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 2px;\n min-width: 0;\n}\n\n/* The \"open\" affordance is a real link styled as a header button. */\n.rvs-ports-open {\n text-decoration: none;\n}\n\n.rvs-ports-hint {\n margin-top: 4px;\n color: var(--rvs-fg3);\n font-size: 11px;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n/* --------------------------------------------------------- host monitor */\n\n/**\n * The monitor panel is cross-host (not bound to the workspace): one card for a\n * single subject, a compact clickable list for \"all hosts\". Values are\n * tabular-nums so a 5 s refresh does not make the text dance.\n */\n.rvs-monitor-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 8px 8px 14px;\n /* Container for the narrow-sidebar layout rules at the end of this section. */\n container-type: inline-size;\n}\n\n/* The rail title and the scope picker both wanted flex:1; the title yields so\n the picker keeps enough width for its own label at 230px. */\n.rvs-monitor-header .rvs-title {\n flex: none;\n}\n\n/* The panel's own settings (refresh interval). Shown under the header only\n while the gear is active; it is chrome, not a modal, so the live values stay\n visible above it. */\n.rvs-monitor-settings {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--rvs-border);\n background: var(--rvs-layer3);\n}\n\n.rvs-monitor-settings-head {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.rvs-monitor-settings-label {\n color: var(--rvs-fg2);\n font-size: 11px;\n font-weight: 600;\n}\n\n.rvs-monitor-settings-hint {\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-settings .rvs-seg {\n align-self: flex-start;\n}\n\n.rvs-monitor-card {\n margin: 2px 0 8px;\n padding: 10px;\n border: 1px solid var(--rvs-border2);\n border-radius: 9px;\n background: var(--rvs-layer3);\n}\n\n.rvs-monitor-card.error {\n border-color: rgba(224, 85, 85, .45);\n}\n\n.rvs-monitor-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-dot {\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--rvs-fg3);\n}\n\n.rvs-monitor-dot.ok {\n background: var(--rvs-ok, #2ea043);\n}\n\n.rvs-monitor-dot.error {\n background: var(--rvs-danger);\n}\n\n.rvs-monitor-title {\n flex: none;\n max-width: 55%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n font-weight: 650;\n color: var(--rvs-fg);\n}\n\n.rvs-monitor-conn {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: right;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-sub {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 3px;\n font-size: 11px;\n}\n\n.rvs-monitor-state {\n flex: none;\n font-weight: 600;\n}\n\n.rvs-monitor-state.ok {\n color: var(--rvs-ok, #2ea043);\n}\n\n.rvs-monitor-state.error {\n color: var(--rvs-danger);\n}\n\n.rvs-monitor-state.unknown {\n color: var(--rvs-fg3);\n}\n\n.rvs-monitor-age {\n color: var(--rvs-fg3);\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-reason {\n flex-basis: 100%;\n min-width: 0;\n overflow-wrap: anywhere;\n color: var(--rvs-fg2);\n line-height: 1.45;\n}\n\n.rvs-monitor-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));\n gap: 8px;\n margin-top: 10px;\n}\n\n.rvs-monitor-tile {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n padding: 8px;\n border-radius: 7px;\n background: var(--rvs-hover);\n}\n\n.rvs-monitor-tile-label {\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-tile-value {\n color: var(--rvs-fg);\n font-size: 18px;\n font-weight: 650;\n line-height: 1.1;\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-tile-sub {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg2);\n font-size: 10.5px;\n}\n\n.rvs-monitor-bar {\n height: 4px;\n border-radius: 2px;\n background: var(--rvs-border);\n overflow: hidden;\n}\n\n.rvs-monitor-bar-fill {\n display: block;\n height: 100%;\n border-radius: inherit;\n background: var(--rvs-brand);\n transition: width .35s ease;\n}\n\n.rvs-monitor-bar-fill.warn {\n background: var(--rvs-git-m);\n}\n\n.rvs-monitor-bar-fill.hot {\n background: var(--rvs-danger);\n}\n\n/* Four facts: a 2×2 block reads calmer than three-then-one with auto-fit. */\n.rvs-monitor-facts {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 6px;\n margin-top: 8px;\n}\n\n.rvs-monitor-fact {\n min-width: 0;\n padding: 6px 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 7px;\n}\n\n.rvs-monitor-fact-label {\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-fact-value {\n color: var(--rvs-fg);\n font-size: 11.5px;\n line-height: 1.35;\n font-variant-numeric: tabular-nums;\n overflow-wrap: anywhere;\n}\n\n.rvs-monitor-sparks {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));\n gap: 8px;\n margin-top: 10px;\n}\n\n.rvs-monitor-spark {\n min-width: 0;\n padding: 6px 8px 4px;\n border: 1px solid var(--rvs-border);\n border-radius: 7px;\n}\n\n.rvs-monitor-spark-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-spark-legend {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n flex: none;\n color: var(--rvs-fg3);\n font-size: 10px;\n}\n\n.rvs-monitor-spark-key {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n}\n\n.rvs-monitor-spark-line {\n display: inline-block;\n width: 10px;\n height: 0;\n border-top: 2px solid currentColor;\n}\n\n.rvs-monitor-spark-line.tx {\n border-top-style: dashed;\n opacity: .7;\n}\n\n.rvs-monitor-spark-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg2);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: .06em;\n text-transform: uppercase;\n}\n\n.rvs-monitor-spark svg {\n display: block;\n width: 100%;\n height: 34px;\n margin-top: 2px;\n}\n\n.rvs-monitor-spark.cpu {\n color: var(--rvs-brand);\n}\n\n.rvs-monitor-spark.mem {\n color: var(--rvs-git-a);\n}\n\n.rvs-monitor-spark.net {\n color: var(--rvs-git-c);\n}\n\n.rvs-monitor-spark.temp {\n color: var(--rvs-git-m);\n}\n\n.rvs-monitor-spark-empty {\n padding: 8px 0 4px;\n text-align: center;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-hint {\n margin-top: 8px;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n.rvs-monitor-list {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.rvs-monitor-summary {\n padding: 0 2px 4px;\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-monitor-row {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n padding: 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 8px;\n background: var(--rvs-layer3);\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.rvs-monitor-row:hover {\n border-color: var(--rvs-border2);\n background: var(--rvs-hover);\n}\n\n.rvs-monitor-row.error {\n border-color: rgba(224, 85, 85, .45);\n}\n\n.rvs-monitor-row-top {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.rvs-monitor-row-name {\n flex: none;\n max-width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12.5px;\n font-weight: 600;\n}\n\n.rvs-monitor-row-host {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n}\n\n.rvs-monitor-row-cpu {\n flex: none;\n font-size: 12px;\n font-weight: 650;\n font-variant-numeric: tabular-nums;\n}\n\n.rvs-monitor-row-bars {\n display: flex;\n gap: 4px;\n}\n\n.rvs-monitor-row-bar {\n flex: 1;\n height: 3px;\n border-radius: 2px;\n background: var(--rvs-border);\n overflow: hidden;\n}\n\n.rvs-monitor-row-facts {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n color: var(--rvs-fg3);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n}\n\n/* ------------------------------------------------- narrow sidebar (<=260px)\n Container queries, not media queries: the rail is narrow while the WINDOW is\n wide. Reactions: the three gauges stack (an orphan grid cell with ~90px of\n empty space next to it looked broken), the four curves go 2×2 instead of a\n single tall column, and the all-hosts facts become a 2×2 grid so row heights\n stay uniform. */\n@container (max-width: 260px) {\n .rvs-monitor-grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .rvs-monitor-sparks {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n .rvs-monitor-row-facts {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n /* A 2-column spark is ~80px wide; the label must win over the legend there. */\n .rvs-monitor-spark-legend {\n display: none;\n }\n}\n\n/* ------------------------------------------------------ Ctrl+P quick open */\n\n.rvs-qo-mask {\n /* PORTALED to <body>, i.e. OUTSIDE `.rvs-root` where these tokens are\n declared — without this block every var() below resolves to nothing: the\n active row paints transparent (keyboard selection invisible), the directory\n column stops dimming, and error/warning copy comes out the same colour as\n ordinary text (so \"index failed\" looks like \"no match\"). Keep this subset in\n sync with `.rvs-root`; it lists exactly the tokens the `.rvs-qo*` rules use. */\n --rvs-fg: var(--dsw-alias-label-primary, #e6e6e6);\n --rvs-fg2: var(--dsw-alias-label-secondary, #b9b9b9);\n --rvs-fg3: var(--dsw-alias-label-tertiary, #8b8b8b);\n --rvs-hover: var(--dsw-alias-interactive-bg-hover, rgba(127, 127, 127, .14));\n --rvs-active: var(--dsw-alias-interactive-bg-active, rgba(77, 107, 254, .22));\n --rvs-border: var(--dsw-alias-border-l1, rgba(127, 127, 127, .25));\n --rvs-border2: var(--dsw-alias-border-l2, rgba(127, 127, 127, .38));\n --rvs-input: var(--dsw-alias-bg-input, rgba(127, 127, 127, .12));\n --rvs-brand: var(--dsw-alias-brand-primary, #4d6bfe);\n --rvs-danger: var(--dsw-alias-state-error-primary, #e05555);\n --rvs-git-m: #e2b714;\n --rvs-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;\n position: fixed;\n inset: 0;\n /* The modal layer (100000), so toasts (100001) still paint above it. */\n z-index: 100000;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 12vh;\n background: rgba(0, 0, 0, .38);\n backdrop-filter: blur(2px);\n animation: rvsFade .12s ease;\n}\n\n/**\n * Opaque base first, skin overlay on top: the overlay token is frequently\n * translucent, and using it alone let the panel's text bleed through the sheet\n * (the same fix the menu/modal layer needed).\n */\n.rvs-qo {\n width: min(680px, calc(100vw - 40px));\n max-height: min(62vh, 560px);\n display: flex;\n flex-direction: column;\n border: 1px solid var(--rvs-border2);\n border-radius: 10px;\n background-color: Canvas;\n background-image: linear-gradient(var(--dsw-alias-bg-overlay, transparent), var(--dsw-alias-bg-overlay, transparent));\n color: var(--rvs-fg);\n box-shadow: 0 16px 48px rgba(0, 0, 0, .42);\n font-size: 12.5px;\n overflow: hidden;\n animation: rvsPop .12s ease;\n}\n\n.rvs-qo-bar {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--rvs-border);\n}\n\n.rvs-qo-input {\n flex: 1;\n min-width: 0;\n height: 28px;\n padding: 0 8px;\n border: 1px solid var(--rvs-border);\n border-radius: 6px;\n background: var(--rvs-input);\n color: var(--rvs-fg);\n font: inherit;\n outline: none;\n}\n\n.rvs-qo-input:focus {\n border-color: var(--rvs-brand);\n}\n\n.rvs-qo-hint {\n flex: none;\n color: var(--rvs-fg3);\n font-size: 11px;\n white-space: nowrap;\n}\n\n.rvs-qo-list {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 4px;\n}\n\n.rvs-qo-row {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 4px 8px;\n border-radius: 5px;\n white-space: nowrap;\n overflow: hidden;\n cursor: pointer;\n}\n\n.rvs-qo-row:hover {\n background: var(--rvs-hover);\n}\n\n/* Declared AFTER :hover so a hovered active row keeps the active colour. */\n.rvs-qo-row.active {\n background: var(--rvs-active);\n}\n\n.rvs-qo-dir {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--rvs-fg3);\n font-size: 11.5px;\n}\n\n.rvs-qo-name {\n flex: none;\n color: var(--rvs-fg);\n font-family: var(--rvs-mono);\n font-size: 12px;\n}\n\n.rvs-qo-hit {\n padding: 0;\n border-radius: 2px;\n background: rgba(77, 107, 254, .32);\n color: inherit;\n font-weight: 600;\n}\n\n.rvs-qo-foot {\n flex: none;\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 72px;\n overflow-y: auto;\n padding: 6px 12px;\n border-top: 1px solid var(--rvs-border);\n color: var(--rvs-fg3);\n font-size: 11px;\n}\n\n.rvs-qo-note {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.rvs-qo-note.error {\n color: var(--rvs-danger);\n}\n\n.rvs-qo-note.warn {\n color: var(--rvs-git-m);\n}\n\n";
|
|
15
15
|
const key$2 = "src/client/vsc/vsc.css";
|
|
16
16
|
const injected$2 = typeof document === "undefined" ? void 0 : Array.prototype.find.call(document.querySelectorAll("style[data-rvs-css]"), (tag) => tag.dataset.rvsCss === key$2);
|
|
17
17
|
if (typeof document !== "undefined" && injected$2 === void 0) {
|
|
@@ -60,7 +60,9 @@ window.__ModuleLoader__.load({
|
|
|
60
60
|
/** Local TCP forwards (`ssh -L` semantics) for the port panel. */
|
|
61
61
|
forwards: "/api/dsh-remote/forwards",
|
|
62
62
|
/** Remote listening TCP sockets for the port panel (one bounded probe). */
|
|
63
|
-
listenPorts: "/api/dsh-remote/listen-ports"
|
|
63
|
+
listenPorts: "/api/dsh-remote/listen-ports",
|
|
64
|
+
/** Live system metrics for the monitor panel (one bounded probe per host). */
|
|
65
|
+
metrics: "/api/dsh-remote/metrics"
|
|
64
66
|
};
|
|
65
67
|
/** Suggested/attachment file name for one multi-selection archive. */
|
|
66
68
|
function selectionDownloadName(count) {
|
|
@@ -357,6 +359,7 @@ window.__ModuleLoader__.load({
|
|
|
357
359
|
"tab.files": "文件",
|
|
358
360
|
"tab.terminal": "终端",
|
|
359
361
|
"tab.ports": "端口",
|
|
362
|
+
"tab.monitor": "监控",
|
|
360
363
|
"tab.remote": "远程",
|
|
361
364
|
"tab.remoteDesc": "远端文件、终端与 Git",
|
|
362
365
|
"hosts.title": "远程主机",
|
|
@@ -911,13 +914,54 @@ window.__ModuleLoader__.load({
|
|
|
911
914
|
"ports.badPort": "端口必须是 1–65535 的整数;本地端口留空表示自动分配。",
|
|
912
915
|
"ports.restoreFailed": "{count} 条已保存的转发规则未能恢复:本地端口可能被占用,或已超过每台主机的规则上限。",
|
|
913
916
|
"ports.forgetFailed": "移除这些规则",
|
|
914
|
-
"ports.remoteHostHint": "目标地址由远端主机拨号,可访问远端内网;本地监听只绑定 127.0.0.1。"
|
|
917
|
+
"ports.remoteHostHint": "目标地址由远端主机拨号,可访问远端内网;本地监听只绑定 127.0.0.1。",
|
|
918
|
+
"monitor.selectScope": "选择监控范围",
|
|
919
|
+
"monitor.scopeCurrent": "当前主机",
|
|
920
|
+
"monitor.scopeAll": "全部主机",
|
|
921
|
+
"monitor.refresh": "立即刷新",
|
|
922
|
+
"monitor.pause": "暂停自动刷新",
|
|
923
|
+
"monitor.resume": "继续自动刷新",
|
|
924
|
+
"monitor.paused": "自动刷新已暂停,仍可手动刷新。",
|
|
925
|
+
"monitor.loading": "正在采样…",
|
|
926
|
+
"monitor.noHosts": "还没有主机,请先去「设置 → 远程主机」配置。",
|
|
927
|
+
"monitor.noHost": "没有可监控的主机。",
|
|
928
|
+
"monitor.noData": "还没有采样数据",
|
|
929
|
+
"monitor.warming": "首次采样中",
|
|
930
|
+
"monitor.unknown": "—",
|
|
931
|
+
"monitor.justNow": "刚刚更新",
|
|
932
|
+
"monitor.updatedAgo": "{age}前更新",
|
|
933
|
+
"monitor.stateOk": "正常",
|
|
934
|
+
"monitor.stateUnknown": "未知",
|
|
935
|
+
"monitor.stateError": "采样失败",
|
|
936
|
+
"monitor.reason": "原因:{reason}",
|
|
937
|
+
"monitor.cpu": "CPU",
|
|
938
|
+
"monitor.ram": "内存",
|
|
939
|
+
"monitor.disk": "磁盘",
|
|
940
|
+
"monitor.temp": "温度",
|
|
941
|
+
"monitor.uptime": "运行时长",
|
|
942
|
+
"monitor.load": "负载 1/5/15",
|
|
943
|
+
"monitor.net": "网络",
|
|
944
|
+
"monitor.cores": "{count} 核",
|
|
945
|
+
"monitor.cpuHistory": "CPU 历史",
|
|
946
|
+
"monitor.memHistory": "内存历史",
|
|
947
|
+
"monitor.netHistory": "网络历史",
|
|
948
|
+
"monitor.tempHistory": "温度历史",
|
|
949
|
+
"monitor.allSummary": "{ok}/{total} 台主机采样正常",
|
|
950
|
+
"monitor.inspect": "查看这台主机",
|
|
951
|
+
"monitor.settings": "刷新设置",
|
|
952
|
+
"monitor.interval": "刷新间隔",
|
|
953
|
+
"monitor.intervalHint": "仅在面板可见时按此间隔采样;默认 5 秒。",
|
|
954
|
+
"monitor.interval5": "5 秒",
|
|
955
|
+
"monitor.interval10": "10 秒",
|
|
956
|
+
"monitor.interval30": "30 秒",
|
|
957
|
+
"monitor.linuxOnly": "完整指标来自 Linux /proc;其他平台显示为未知。"
|
|
915
958
|
};
|
|
916
959
|
const en = {
|
|
917
960
|
"tab.workspaces": "Workspaces",
|
|
918
961
|
"tab.files": "Files",
|
|
919
962
|
"tab.terminal": "Terminal",
|
|
920
963
|
"tab.ports": "Ports",
|
|
964
|
+
"tab.monitor": "Monitor",
|
|
921
965
|
"tab.remote": "Remote",
|
|
922
966
|
"tab.remoteDesc": "Remote files, terminal and Git",
|
|
923
967
|
"hosts.title": "Remote hosts",
|
|
@@ -1472,7 +1516,47 @@ window.__ModuleLoader__.load({
|
|
|
1472
1516
|
"ports.badPort": "Port must be an integer between 1 and 65535; leave the local port empty to auto-assign.",
|
|
1473
1517
|
"ports.restoreFailed": "{count} saved forward(s) could not be restored — the local port may be taken, or the per-host rule limit reached.",
|
|
1474
1518
|
"ports.forgetFailed": "Forget these rules",
|
|
1475
|
-
"ports.remoteHostHint": "The target is dialed from the remote host, so it can reach that host’s private network; the local listener binds 127.0.0.1 only."
|
|
1519
|
+
"ports.remoteHostHint": "The target is dialed from the remote host, so it can reach that host’s private network; the local listener binds 127.0.0.1 only.",
|
|
1520
|
+
"monitor.selectScope": "Select the hosts to monitor",
|
|
1521
|
+
"monitor.scopeCurrent": "Current host",
|
|
1522
|
+
"monitor.scopeAll": "All hosts",
|
|
1523
|
+
"monitor.refresh": "Refresh now",
|
|
1524
|
+
"monitor.pause": "Pause auto refresh",
|
|
1525
|
+
"monitor.resume": "Resume auto refresh",
|
|
1526
|
+
"monitor.paused": "Auto refresh is paused; manual refresh still works.",
|
|
1527
|
+
"monitor.loading": "Sampling…",
|
|
1528
|
+
"monitor.noHosts": "No hosts yet. Configure one under Settings → Remote hosts first.",
|
|
1529
|
+
"monitor.noHost": "No host to monitor.",
|
|
1530
|
+
"monitor.noData": "No sample yet",
|
|
1531
|
+
"monitor.warming": "First sample in progress",
|
|
1532
|
+
"monitor.unknown": "—",
|
|
1533
|
+
"monitor.justNow": "Updated just now",
|
|
1534
|
+
"monitor.updatedAgo": "Updated {age} ago",
|
|
1535
|
+
"monitor.stateOk": "Healthy",
|
|
1536
|
+
"monitor.stateUnknown": "Unknown",
|
|
1537
|
+
"monitor.stateError": "Sample failed",
|
|
1538
|
+
"monitor.reason": "Reason: {reason}",
|
|
1539
|
+
"monitor.cpu": "CPU",
|
|
1540
|
+
"monitor.ram": "Memory",
|
|
1541
|
+
"monitor.disk": "Disk",
|
|
1542
|
+
"monitor.temp": "Temp",
|
|
1543
|
+
"monitor.uptime": "Uptime",
|
|
1544
|
+
"monitor.load": "Load 1/5/15",
|
|
1545
|
+
"monitor.net": "Network",
|
|
1546
|
+
"monitor.cores": "{count} cores",
|
|
1547
|
+
"monitor.cpuHistory": "CPU history",
|
|
1548
|
+
"monitor.memHistory": "Memory history",
|
|
1549
|
+
"monitor.netHistory": "Network history",
|
|
1550
|
+
"monitor.tempHistory": "Temperature history",
|
|
1551
|
+
"monitor.allSummary": "{ok}/{total} hosts sampling normally",
|
|
1552
|
+
"monitor.inspect": "Inspect this host",
|
|
1553
|
+
"monitor.settings": "Refresh settings",
|
|
1554
|
+
"monitor.interval": "Refresh interval",
|
|
1555
|
+
"monitor.intervalHint": "Sampling runs only while the panel is visible; 5 s by default.",
|
|
1556
|
+
"monitor.interval5": "5 s",
|
|
1557
|
+
"monitor.interval10": "10 s",
|
|
1558
|
+
"monitor.interval30": "30 s",
|
|
1559
|
+
"monitor.linuxOnly": "Full metrics come from Linux /proc; other platforms show unknown."
|
|
1476
1560
|
};
|
|
1477
1561
|
function detectLang() {
|
|
1478
1562
|
try {
|
|
@@ -3175,6 +3259,18 @@ window.__ModuleLoader__.load({
|
|
|
3175
3259
|
* found" (see `RemoteListenPortsResult`).
|
|
3176
3260
|
*/
|
|
3177
3261
|
listenPorts: (alias) => call(`${REMOTE_API.listenPorts}?alias=${encodeURIComponent(alias)}`),
|
|
3262
|
+
/**
|
|
3263
|
+
* One host's live metrics sample.
|
|
3264
|
+
*
|
|
3265
|
+
* `refresh` bypasses the Host's few-second reuse window (manual refresh).
|
|
3266
|
+
* The route always answers one entry for `alias`; a host that disappeared
|
|
3267
|
+
* between the panel's host list and this call is a normal 404.
|
|
3268
|
+
*/
|
|
3269
|
+
hostMetrics: (alias, refresh = false) => call(`${REMOTE_API.metrics}?alias=${encodeURIComponent(alias)}${refresh ? "&refresh=1" : ""}`).then((result) => {
|
|
3270
|
+
const metrics = result.hosts.find((host) => host.alias === alias) ?? result.hosts[0];
|
|
3271
|
+
if (metrics === void 0) throw new RemoteApiError(502, `no metrics for ${alias}`);
|
|
3272
|
+
return metrics;
|
|
3273
|
+
}),
|
|
3178
3274
|
git: {
|
|
3179
3275
|
async status(alias, path) {
|
|
3180
3276
|
const timeoutMs = gitTimeoutMs();
|
|
@@ -40807,7 +40903,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
|
|
|
40807
40903
|
const primary = host.querySelectorAll("[class*=\"rvs-ck-\"]").length;
|
|
40808
40904
|
const fallback = host.querySelectorAll("span[class^=\"rvs-t-\"]").length;
|
|
40809
40905
|
const count = primary > 0 ? primary : fallback;
|
|
40810
|
-
console.info(`[dsh-remote-vs] build
|
|
40906
|
+
console.info(`[dsh-remote-vs] build 1104-1102 · ${source} · colored tokens: ${count} (${propsRef.current.path})`);
|
|
40811
40907
|
propsRef.current.onTokens?.(count);
|
|
40812
40908
|
};
|
|
40813
40909
|
const armFallback = () => {
|
|
@@ -43882,7 +43978,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
|
|
|
43882
43978
|
function readStoredView() {
|
|
43883
43979
|
try {
|
|
43884
43980
|
const saved = localStorage.getItem(VIEW_KEY);
|
|
43885
|
-
if (saved === "explorer" || saved === "search" || saved === "scm" || saved === "history" || saved === "editor" || saved === "terminal" || saved === "ports" || saved === "workspaces") return saved;
|
|
43981
|
+
if (saved === "explorer" || saved === "search" || saved === "scm" || saved === "history" || saved === "editor" || saved === "terminal" || saved === "ports" || saved === "monitor" || saved === "workspaces") return saved;
|
|
43886
43982
|
} catch {}
|
|
43887
43983
|
return "explorer";
|
|
43888
43984
|
}
|
|
@@ -48031,8 +48127,8 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
|
|
|
48031
48127
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConnectionStatusChip, { compact: true }),
|
|
48032
48128
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
48033
48129
|
className: "rvs-build",
|
|
48034
|
-
title: `dsh-remote-vs build
|
|
48035
|
-
children: "
|
|
48130
|
+
title: `dsh-remote-vs build 1104-1102`,
|
|
48131
|
+
children: "1104-1102"
|
|
48036
48132
|
}),
|
|
48037
48133
|
tokenCount !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
48038
48134
|
className: "rvs-build",
|
|
@@ -50142,6 +50238,970 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
|
|
|
50142
50238
|
]
|
|
50143
50239
|
});
|
|
50144
50240
|
}
|
|
50241
|
+
/** A fresh, empty window (a new array each call: the panel owns its history). */
|
|
50242
|
+
function emptyHistory() {
|
|
50243
|
+
return {
|
|
50244
|
+
cpu: [],
|
|
50245
|
+
mem: [],
|
|
50246
|
+
netRx: [],
|
|
50247
|
+
netTx: [],
|
|
50248
|
+
temp: []
|
|
50249
|
+
};
|
|
50250
|
+
}
|
|
50251
|
+
/**
|
|
50252
|
+
* The snapshot the panel shows when a request failed before the Host answered.
|
|
50253
|
+
*
|
|
50254
|
+
* Every value is null on purpose: an HTTP failure is not "0% CPU", and the
|
|
50255
|
+
* reason line says what actually happened.
|
|
50256
|
+
*/
|
|
50257
|
+
function placeholderMetrics(alias, state, reason, sampledAt = Date.now()) {
|
|
50258
|
+
return {
|
|
50259
|
+
alias,
|
|
50260
|
+
state,
|
|
50261
|
+
reason,
|
|
50262
|
+
sampledAt,
|
|
50263
|
+
kernel: null,
|
|
50264
|
+
cpuCores: null,
|
|
50265
|
+
cpuModel: null,
|
|
50266
|
+
ip: null,
|
|
50267
|
+
uptimeSeconds: null,
|
|
50268
|
+
load1: null,
|
|
50269
|
+
load5: null,
|
|
50270
|
+
load15: null,
|
|
50271
|
+
cpuPercent: null,
|
|
50272
|
+
memUsedBytes: null,
|
|
50273
|
+
memTotalBytes: null,
|
|
50274
|
+
memPercent: null,
|
|
50275
|
+
diskUsedBytes: null,
|
|
50276
|
+
diskTotalBytes: null,
|
|
50277
|
+
diskPercent: null,
|
|
50278
|
+
temperatureC: null,
|
|
50279
|
+
netRxBps: null,
|
|
50280
|
+
netTxBps: null
|
|
50281
|
+
};
|
|
50282
|
+
}
|
|
50283
|
+
/** Append one sample, dropping the oldest past `HISTORY_POINTS` (identity when unchanged). */
|
|
50284
|
+
function pushPoint(points, value) {
|
|
50285
|
+
if (value === null || !Number.isFinite(value)) return points;
|
|
50286
|
+
const next = [...points, value];
|
|
50287
|
+
if (next.length > 60) next.splice(0, next.length - 60);
|
|
50288
|
+
return next;
|
|
50289
|
+
}
|
|
50290
|
+
/** One metrics answer → the next history (same object when nothing changed). */
|
|
50291
|
+
function appendMetrics(history, metrics) {
|
|
50292
|
+
const cpu = pushPoint(history.cpu, metrics.cpuPercent);
|
|
50293
|
+
const mem = pushPoint(history.mem, metrics.memPercent);
|
|
50294
|
+
const netRx = pushPoint(history.netRx, metrics.netRxBps);
|
|
50295
|
+
const netTx = pushPoint(history.netTx, metrics.netTxBps);
|
|
50296
|
+
const temp = pushPoint(history.temp, metrics.temperatureC);
|
|
50297
|
+
if (cpu === history.cpu && mem === history.mem && netRx === history.netRx && netTx === history.netTx && temp === history.temp) return history;
|
|
50298
|
+
return {
|
|
50299
|
+
cpu,
|
|
50300
|
+
mem,
|
|
50301
|
+
netRx,
|
|
50302
|
+
netTx,
|
|
50303
|
+
temp
|
|
50304
|
+
};
|
|
50305
|
+
}
|
|
50306
|
+
function round2(value) {
|
|
50307
|
+
return Math.round(value * 100) / 100;
|
|
50308
|
+
}
|
|
50309
|
+
/**
|
|
50310
|
+
* The y-domain covering BOTH series.
|
|
50311
|
+
*
|
|
50312
|
+
* Two series drawn on independent auto-scales look identical even when one is
|
|
50313
|
+
* 100× the other (the RX/TX bug this exists to prevent). Null when neither
|
|
50314
|
+
* series has a finite value.
|
|
50315
|
+
*/
|
|
50316
|
+
function combineDomain(first, second = []) {
|
|
50317
|
+
const all = [...first, ...second].filter((value) => Number.isFinite(value));
|
|
50318
|
+
if (all.length === 0) return void 0;
|
|
50319
|
+
let min = Math.min(...all);
|
|
50320
|
+
let max = Math.max(...all);
|
|
50321
|
+
if (min === max) {
|
|
50322
|
+
min -= 1;
|
|
50323
|
+
max += 1;
|
|
50324
|
+
}
|
|
50325
|
+
return {
|
|
50326
|
+
min,
|
|
50327
|
+
max
|
|
50328
|
+
};
|
|
50329
|
+
}
|
|
50330
|
+
/**
|
|
50331
|
+
* SVG path for a sparkline inside a `width × height` viewBox.
|
|
50332
|
+
*
|
|
50333
|
+
* The y axis is auto-scaled to the window's own min/max unless `domain` is
|
|
50334
|
+
* supplied; a flat window draws a line through the middle instead of dividing
|
|
50335
|
+
* by zero. A one-point window draws a dot-sized path on the right edge (the
|
|
50336
|
+
* line grows as samples arrive). Returns '' only when there is no finite value
|
|
50337
|
+
* at all.
|
|
50338
|
+
*/
|
|
50339
|
+
function sparklinePath(values, width, height, domain) {
|
|
50340
|
+
const points = values.filter((value) => Number.isFinite(value));
|
|
50341
|
+
if (points.length === 0 || width <= 0 || height <= 0) return "";
|
|
50342
|
+
let min = domain === void 0 ? Math.min(...points) : domain.min;
|
|
50343
|
+
let max = domain === void 0 ? Math.max(...points) : domain.max;
|
|
50344
|
+
if (max === min) {
|
|
50345
|
+
min -= 1;
|
|
50346
|
+
max += 1;
|
|
50347
|
+
}
|
|
50348
|
+
const step = points.length === 1 ? 0 : width / (points.length - 1);
|
|
50349
|
+
return `M${points.map((value, index) => {
|
|
50350
|
+
const x = points.length === 1 ? width : index * step;
|
|
50351
|
+
const ratio = 1 - (value - min) / (max - min);
|
|
50352
|
+
const y = Math.max(0, Math.min(height, ratio * height));
|
|
50353
|
+
return `${round2(x)},${round2(y)}`;
|
|
50354
|
+
}).join("L")}`;
|
|
50355
|
+
}
|
|
50356
|
+
const BYTE_UNITS = [
|
|
50357
|
+
"B",
|
|
50358
|
+
"KB",
|
|
50359
|
+
"MB",
|
|
50360
|
+
"GB",
|
|
50361
|
+
"TB"
|
|
50362
|
+
];
|
|
50363
|
+
/** `1536` → `1.5 KB`; `0` stays `0 B` (bytes are integers, not fractions). */
|
|
50364
|
+
function formatBytes(bytes) {
|
|
50365
|
+
if (!Number.isFinite(bytes) || bytes <= 0) return "0 B";
|
|
50366
|
+
let value = bytes;
|
|
50367
|
+
let unit = 0;
|
|
50368
|
+
while (value >= 1024 && unit < BYTE_UNITS.length - 1) {
|
|
50369
|
+
value /= 1024;
|
|
50370
|
+
unit += 1;
|
|
50371
|
+
}
|
|
50372
|
+
if (unit === 0) return `${Math.round(value)} ${BYTE_UNITS[unit]}`;
|
|
50373
|
+
return `${value >= 100 ? Math.round(value) : Math.round(value * 10) / 10} ${BYTE_UNITS[unit]}`;
|
|
50374
|
+
}
|
|
50375
|
+
/** Trim a scaled capacity to one decimal below 100 (the sub line must stay short). */
|
|
50376
|
+
function scaledCapacity(bytes) {
|
|
50377
|
+
let value = bytes;
|
|
50378
|
+
let unit = 0;
|
|
50379
|
+
while (value >= 1024 && unit < BYTE_UNITS.length - 1) {
|
|
50380
|
+
value /= 1024;
|
|
50381
|
+
unit += 1;
|
|
50382
|
+
}
|
|
50383
|
+
return {
|
|
50384
|
+
value,
|
|
50385
|
+
unit: BYTE_UNITS[unit]
|
|
50386
|
+
};
|
|
50387
|
+
}
|
|
50388
|
+
/**
|
|
50389
|
+
* `used / total` in ONE unit, for a tile's sub line.
|
|
50390
|
+
*
|
|
50391
|
+
* `formatBytes` on each side doubles the unit ("5.1 GB / 16 GB"), which is
|
|
50392
|
+
* longer than the narrow tile can show and gets ellipsised exactly where the
|
|
50393
|
+
* capacity matters. This picks the total's unit for both numbers.
|
|
50394
|
+
*/
|
|
50395
|
+
function formatCapacity(usedBytes, totalBytes) {
|
|
50396
|
+
if (!Number.isFinite(usedBytes) || !Number.isFinite(totalBytes) || totalBytes <= 0) return "";
|
|
50397
|
+
const total = scaledCapacity(totalBytes);
|
|
50398
|
+
const usedValue = usedBytes / 1024 ** BYTE_UNITS.indexOf(total.unit);
|
|
50399
|
+
const trim = (value) => value >= 100 ? String(Math.round(value)) : String(Math.round(value * 10) / 10);
|
|
50400
|
+
return `${trim(usedValue)} / ${trim(total.value)} ${total.unit}`;
|
|
50401
|
+
}
|
|
50402
|
+
/** `42.4` → `42%`. Percentages are whole numbers in this panel. */
|
|
50403
|
+
function formatPercent(value) {
|
|
50404
|
+
return `${Math.round(value)}%`;
|
|
50405
|
+
}
|
|
50406
|
+
/** `1536` B/s → `1.5 KB/s`. */
|
|
50407
|
+
function formatRate(bytesPerSecond) {
|
|
50408
|
+
return `${formatBytes(bytesPerSecond)}/s`;
|
|
50409
|
+
}
|
|
50410
|
+
/** `3600 * 26 + 120` → `1d 2h`; short so it fits a narrow tile. */
|
|
50411
|
+
function formatUptime(seconds) {
|
|
50412
|
+
const total = Math.floor(seconds);
|
|
50413
|
+
if (!Number.isFinite(total) || total <= 0) return "—";
|
|
50414
|
+
const days = Math.floor(total / 86400);
|
|
50415
|
+
const hours = Math.floor(total % 86400 / 3600);
|
|
50416
|
+
const minutes = Math.floor(total % 3600 / 60);
|
|
50417
|
+
if (days > 0) return `${days}d ${hours}h`;
|
|
50418
|
+
if (hours > 0) return `${hours}h ${minutes}m`;
|
|
50419
|
+
return `${minutes}m`;
|
|
50420
|
+
}
|
|
50421
|
+
/** `42.1` → `42.1 °C`. */
|
|
50422
|
+
function formatTemperature(celsius) {
|
|
50423
|
+
return `${Math.round(celsius * 10) / 10} °C`;
|
|
50424
|
+
}
|
|
50425
|
+
/** Age of a sample, short form for "updated … ago" (`12s`, `3m`, `2h`). */
|
|
50426
|
+
function formatAgeShort(ms) {
|
|
50427
|
+
const seconds = Math.max(0, Math.floor(ms / 1e3));
|
|
50428
|
+
if (seconds < 60) return `${seconds}s`;
|
|
50429
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m`;
|
|
50430
|
+
return `${Math.floor(seconds / 3600)}h`;
|
|
50431
|
+
}
|
|
50432
|
+
/** Bar tone: quiet below 75%, amber 75–89%, red from 90%. */
|
|
50433
|
+
function metricTone(percent) {
|
|
50434
|
+
if (percent === null || !Number.isFinite(percent) || percent < 75) return "ok";
|
|
50435
|
+
if (percent < 90) return "warn";
|
|
50436
|
+
return "hot";
|
|
50437
|
+
}
|
|
50438
|
+
//#endregion
|
|
50439
|
+
//#region src/client/MonitorView.tsx
|
|
50440
|
+
/**
|
|
50441
|
+
* Sidebar monitor: live CPU / memory / disk / network / temperature for one
|
|
50442
|
+
* host (or every host at once).
|
|
50443
|
+
*
|
|
50444
|
+
* Costs are shaped by the plugin's channel budget: the panel polls only while
|
|
50445
|
+
* it is the visible view AND the page is visible (5 s), the Host reuses a
|
|
50446
|
+
* sample for a few seconds, and a per-alias in-flight set means a manual
|
|
50447
|
+
* refresh cannot open a second channel for a host that is already sampling.
|
|
50448
|
+
* The first sample is honest about deltas: CPU% and the network rate read
|
|
50449
|
+
* "unknown" until a second sample exists.
|
|
50450
|
+
*/
|
|
50451
|
+
/** Visible-panel poll cadence. The Host's own reuse window is shorter (3 s). */
|
|
50452
|
+
const MONITOR_POLL_MS = 5e3;
|
|
50453
|
+
const SCOPE_KEY = "dsh-remote-vs.monitor.scope";
|
|
50454
|
+
const INTERVAL_KEY = "dsh-remote-vs.monitor.interval";
|
|
50455
|
+
/**
|
|
50456
|
+
* The refresh-interval setting.
|
|
50457
|
+
*
|
|
50458
|
+
* `MONITOR_POLL_MS` stays the default and the documented cadence; the other
|
|
50459
|
+
* choices exist for slow links / many hosts. The value is validated against
|
|
50460
|
+
* this list on read, so a hand-edited localStorage value cannot turn the poll
|
|
50461
|
+
* into a 1 ms loop.
|
|
50462
|
+
*/
|
|
50463
|
+
const INTERVAL_CHOICES = [
|
|
50464
|
+
5e3,
|
|
50465
|
+
1e4,
|
|
50466
|
+
3e4
|
|
50467
|
+
];
|
|
50468
|
+
function readIntervalMs() {
|
|
50469
|
+
try {
|
|
50470
|
+
const saved = Number(localStorage.getItem(INTERVAL_KEY));
|
|
50471
|
+
if (INTERVAL_CHOICES.includes(saved)) return saved;
|
|
50472
|
+
} catch {}
|
|
50473
|
+
return MONITOR_POLL_MS;
|
|
50474
|
+
}
|
|
50475
|
+
function saveIntervalMs(value) {
|
|
50476
|
+
try {
|
|
50477
|
+
localStorage.setItem(INTERVAL_KEY, String(value));
|
|
50478
|
+
} catch {}
|
|
50479
|
+
}
|
|
50480
|
+
function readScope() {
|
|
50481
|
+
try {
|
|
50482
|
+
const saved = localStorage.getItem(SCOPE_KEY);
|
|
50483
|
+
if (saved === "current" || saved === "all") return saved;
|
|
50484
|
+
if (saved !== null && saved.startsWith("host:") && saved.length > 5) return saved;
|
|
50485
|
+
} catch {}
|
|
50486
|
+
return "current";
|
|
50487
|
+
}
|
|
50488
|
+
function saveScope(scope) {
|
|
50489
|
+
try {
|
|
50490
|
+
localStorage.setItem(SCOPE_KEY, scope);
|
|
50491
|
+
} catch {}
|
|
50492
|
+
}
|
|
50493
|
+
function currentHostAlias(hosts, workspaceAlias) {
|
|
50494
|
+
if (workspaceAlias !== "" && hosts.some((host) => host.alias === workspaceAlias)) return workspaceAlias;
|
|
50495
|
+
return hosts[0]?.alias ?? "";
|
|
50496
|
+
}
|
|
50497
|
+
/** The aliases one scope samples; an unknown stored host falls back to current. */
|
|
50498
|
+
function resolveAliases(scope, hosts, workspaceAlias) {
|
|
50499
|
+
if (scope === "all") return hosts.map((host) => host.alias);
|
|
50500
|
+
if (scope.startsWith("host:")) {
|
|
50501
|
+
const alias = scope.slice(5);
|
|
50502
|
+
if (hosts.some((host) => host.alias === alias)) return [alias];
|
|
50503
|
+
}
|
|
50504
|
+
const current = currentHostAlias(hosts, workspaceAlias);
|
|
50505
|
+
return current === "" ? [] : [current];
|
|
50506
|
+
}
|
|
50507
|
+
/** One rail icon: a screen with a pulse line. */
|
|
50508
|
+
function IconMonitor(props) {
|
|
50509
|
+
const size = props.size ?? 16;
|
|
50510
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
50511
|
+
width: size,
|
|
50512
|
+
height: size,
|
|
50513
|
+
viewBox: "0 0 16 16",
|
|
50514
|
+
fill: "none",
|
|
50515
|
+
stroke: "currentColor",
|
|
50516
|
+
strokeWidth: "1.4",
|
|
50517
|
+
strokeLinecap: "round",
|
|
50518
|
+
strokeLinejoin: "round",
|
|
50519
|
+
"aria-hidden": "true",
|
|
50520
|
+
children: [
|
|
50521
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
50522
|
+
x: "1.6",
|
|
50523
|
+
y: "2.6",
|
|
50524
|
+
width: "12.8",
|
|
50525
|
+
height: "9",
|
|
50526
|
+
rx: "1.4"
|
|
50527
|
+
}),
|
|
50528
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5.2 7.6h1.6l1.1-2.2 1.4 4 1-1.8h1.5" }),
|
|
50529
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5.6 14.2h4.8" })
|
|
50530
|
+
]
|
|
50531
|
+
});
|
|
50532
|
+
}
|
|
50533
|
+
function IconPause(props) {
|
|
50534
|
+
const size = props.size ?? 14;
|
|
50535
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
50536
|
+
width: size,
|
|
50537
|
+
height: size,
|
|
50538
|
+
viewBox: "0 0 16 16",
|
|
50539
|
+
fill: "currentColor",
|
|
50540
|
+
"aria-hidden": "true",
|
|
50541
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
50542
|
+
x: "4.2",
|
|
50543
|
+
y: "3",
|
|
50544
|
+
width: "2.4",
|
|
50545
|
+
height: "10",
|
|
50546
|
+
rx: "0.8"
|
|
50547
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
50548
|
+
x: "9.4",
|
|
50549
|
+
y: "3",
|
|
50550
|
+
width: "2.4",
|
|
50551
|
+
height: "10",
|
|
50552
|
+
rx: "0.8"
|
|
50553
|
+
})]
|
|
50554
|
+
});
|
|
50555
|
+
}
|
|
50556
|
+
function IconPlay(props) {
|
|
50557
|
+
const size = props.size ?? 14;
|
|
50558
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
50559
|
+
width: size,
|
|
50560
|
+
height: size,
|
|
50561
|
+
viewBox: "0 0 16 16",
|
|
50562
|
+
fill: "currentColor",
|
|
50563
|
+
"aria-hidden": "true",
|
|
50564
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5 3.2v9.6c0 .5.6.8 1 .5l7-4.6a.6.6 0 0 0 0-1l-7-4.6c-.4-.3-1 0-1 .5Z" })
|
|
50565
|
+
});
|
|
50566
|
+
}
|
|
50567
|
+
/** Sliders: the panel's own settings (refresh interval). */
|
|
50568
|
+
function IconSettings(props) {
|
|
50569
|
+
const size = props.size ?? 14;
|
|
50570
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
50571
|
+
width: size,
|
|
50572
|
+
height: size,
|
|
50573
|
+
viewBox: "0 0 16 16",
|
|
50574
|
+
fill: "none",
|
|
50575
|
+
stroke: "currentColor",
|
|
50576
|
+
strokeWidth: "1.4",
|
|
50577
|
+
strokeLinecap: "round",
|
|
50578
|
+
"aria-hidden": "true",
|
|
50579
|
+
children: [
|
|
50580
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M2.4 4.6h4.2M9.4 4.6h4.2" }),
|
|
50581
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M2.4 8h2.2M7.4 8h6.2" }),
|
|
50582
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M2.4 11.4h4.2M9.4 11.4h4.2" }),
|
|
50583
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
50584
|
+
cx: "8",
|
|
50585
|
+
cy: "4.6",
|
|
50586
|
+
r: "1.3"
|
|
50587
|
+
}),
|
|
50588
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
50589
|
+
cx: "6",
|
|
50590
|
+
cy: "8",
|
|
50591
|
+
r: "1.3"
|
|
50592
|
+
}),
|
|
50593
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
50594
|
+
cx: "8",
|
|
50595
|
+
cy: "11.4",
|
|
50596
|
+
r: "1.3"
|
|
50597
|
+
})
|
|
50598
|
+
]
|
|
50599
|
+
});
|
|
50600
|
+
}
|
|
50601
|
+
/** One gauge tile: value + bar (the bar is absent when the value is unknown). */
|
|
50602
|
+
function Gauge(props) {
|
|
50603
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50604
|
+
className: "rvs-monitor-tile",
|
|
50605
|
+
children: [
|
|
50606
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50607
|
+
className: "rvs-monitor-tile-label",
|
|
50608
|
+
children: props.label
|
|
50609
|
+
}),
|
|
50610
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50611
|
+
className: "rvs-monitor-tile-value",
|
|
50612
|
+
children: props.value
|
|
50613
|
+
}),
|
|
50614
|
+
props.percent !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50615
|
+
className: "rvs-monitor-bar",
|
|
50616
|
+
"aria-hidden": "true",
|
|
50617
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50618
|
+
className: `rvs-monitor-bar-fill ${metricTone(props.percent)}`,
|
|
50619
|
+
style: { width: `${Math.max(0, Math.min(100, props.percent))}%` }
|
|
50620
|
+
})
|
|
50621
|
+
}),
|
|
50622
|
+
props.sub !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50623
|
+
className: "rvs-monitor-tile-sub",
|
|
50624
|
+
children: props.sub
|
|
50625
|
+
})
|
|
50626
|
+
]
|
|
50627
|
+
});
|
|
50628
|
+
}
|
|
50629
|
+
/** One small static fact (temperature, uptime, load, network). */
|
|
50630
|
+
function Fact(props) {
|
|
50631
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50632
|
+
className: "rvs-monitor-fact",
|
|
50633
|
+
title: props.title,
|
|
50634
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50635
|
+
className: "rvs-monitor-fact-label",
|
|
50636
|
+
children: props.label
|
|
50637
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50638
|
+
className: "rvs-monitor-fact-value",
|
|
50639
|
+
children: props.value
|
|
50640
|
+
})]
|
|
50641
|
+
});
|
|
50642
|
+
}
|
|
50643
|
+
/**
|
|
50644
|
+
* One sparkline card.
|
|
50645
|
+
*
|
|
50646
|
+
* The area under the line is a gradient of `currentColor`, so the same markup
|
|
50647
|
+
* follows the theme and the `.rvs-monitor-spark.cpu/.mem/...` class colours the
|
|
50648
|
+
* line without any inline palette.
|
|
50649
|
+
*/
|
|
50650
|
+
function Spark(props) {
|
|
50651
|
+
const gradientId = `rvs-grad-${(0, react.useId)().replace(/[^A-Za-z0-9_-]/g, "")}`;
|
|
50652
|
+
const altValues = props.valuesAlt ?? [];
|
|
50653
|
+
const domain = altValues.length === 0 ? void 0 : combineDomain(props.values, altValues);
|
|
50654
|
+
const path = sparklinePath(props.values, 100, 28, domain);
|
|
50655
|
+
const altPath = altValues.length === 0 ? "" : sparklinePath(altValues, 100, 28, domain);
|
|
50656
|
+
/**
|
|
50657
|
+
* A single sample is drawn as a DOT. Filling the area from a one-point path
|
|
50658
|
+
* (`M100,14L100,28L0,28Z`) used to paint a full-width wedge and imply a trend
|
|
50659
|
+
* that does not exist yet.
|
|
50660
|
+
*/
|
|
50661
|
+
const singleSample = props.values.length < 2;
|
|
50662
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50663
|
+
className: `rvs-monitor-spark ${props.tone}`,
|
|
50664
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50665
|
+
className: "rvs-monitor-spark-head",
|
|
50666
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50667
|
+
className: "rvs-monitor-spark-label",
|
|
50668
|
+
children: props.label
|
|
50669
|
+
}), altValues.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
50670
|
+
className: "rvs-monitor-spark-legend",
|
|
50671
|
+
"aria-hidden": "true",
|
|
50672
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
50673
|
+
className: "rvs-monitor-spark-key",
|
|
50674
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "rvs-monitor-spark-line rx" }), "↓"]
|
|
50675
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
50676
|
+
className: "rvs-monitor-spark-key",
|
|
50677
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "rvs-monitor-spark-line tx" }), "↑"]
|
|
50678
|
+
})]
|
|
50679
|
+
})]
|
|
50680
|
+
}), path === "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50681
|
+
className: "rvs-monitor-spark-empty",
|
|
50682
|
+
children: props.empty
|
|
50683
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
50684
|
+
viewBox: "0 0 100 28",
|
|
50685
|
+
preserveAspectRatio: "none",
|
|
50686
|
+
"aria-hidden": "true",
|
|
50687
|
+
children: singleSample ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
50688
|
+
cx: "98",
|
|
50689
|
+
cy: "14",
|
|
50690
|
+
r: "2",
|
|
50691
|
+
fill: "currentColor"
|
|
50692
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
50693
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("linearGradient", {
|
|
50694
|
+
id: gradientId,
|
|
50695
|
+
x1: "0",
|
|
50696
|
+
y1: "0",
|
|
50697
|
+
x2: "0",
|
|
50698
|
+
y2: "1",
|
|
50699
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("stop", {
|
|
50700
|
+
offset: "0%",
|
|
50701
|
+
stopColor: "currentColor",
|
|
50702
|
+
stopOpacity: "0.22"
|
|
50703
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("stop", {
|
|
50704
|
+
offset: "100%",
|
|
50705
|
+
stopColor: "currentColor",
|
|
50706
|
+
stopOpacity: "0"
|
|
50707
|
+
})]
|
|
50708
|
+
}) }),
|
|
50709
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
50710
|
+
d: `${path}L100,28L0,28Z`,
|
|
50711
|
+
fill: `url(#${gradientId})`
|
|
50712
|
+
}),
|
|
50713
|
+
altPath !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
50714
|
+
d: altPath,
|
|
50715
|
+
fill: "none",
|
|
50716
|
+
stroke: "currentColor",
|
|
50717
|
+
strokeWidth: "1.3",
|
|
50718
|
+
strokeDasharray: "3 3",
|
|
50719
|
+
opacity: "0.6",
|
|
50720
|
+
vectorEffect: "non-scaling-stroke"
|
|
50721
|
+
}),
|
|
50722
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
50723
|
+
d: path,
|
|
50724
|
+
fill: "none",
|
|
50725
|
+
stroke: "currentColor",
|
|
50726
|
+
strokeWidth: "1.5",
|
|
50727
|
+
vectorEffect: "non-scaling-stroke"
|
|
50728
|
+
})
|
|
50729
|
+
] })
|
|
50730
|
+
})]
|
|
50731
|
+
});
|
|
50732
|
+
}
|
|
50733
|
+
function stateLabelOf(state, t) {
|
|
50734
|
+
if (state === "ok") return t("monitor.stateOk");
|
|
50735
|
+
if (state === "error") return t("monitor.stateError");
|
|
50736
|
+
return t("monitor.stateUnknown");
|
|
50737
|
+
}
|
|
50738
|
+
function hostLabelOf(alias, hosts) {
|
|
50739
|
+
const host = hosts.find((item) => item.alias === alias);
|
|
50740
|
+
return host === void 0 ? alias : `${host.user}@${host.host}:${host.port}`;
|
|
50741
|
+
}
|
|
50742
|
+
function MonitorView(props) {
|
|
50743
|
+
const t = props.t;
|
|
50744
|
+
const workspaceAlias = useExplorer().workspace?.alias ?? "";
|
|
50745
|
+
const [scope, setScope] = (0, react.useState)(readScope);
|
|
50746
|
+
const [intervalMs, setIntervalMs] = (0, react.useState)(readIntervalMs);
|
|
50747
|
+
const [settingsOpen, setSettingsOpen] = (0, react.useState)(false);
|
|
50748
|
+
const [samples, setSamples] = (0, react.useState)({});
|
|
50749
|
+
const [histories, setHistories] = (0, react.useState)({});
|
|
50750
|
+
const [paused, setPaused] = (0, react.useState)(false);
|
|
50751
|
+
const [refreshing, setRefreshing] = (0, react.useState)(false);
|
|
50752
|
+
/** Aliases with a sample request in flight (a second interval tick is a no-op). */
|
|
50753
|
+
const inFlight = (0, react.useRef)(/* @__PURE__ */ new Set());
|
|
50754
|
+
const alive = (0, react.useRef)(true);
|
|
50755
|
+
(0, react.useEffect)(() => {
|
|
50756
|
+
alive.current = true;
|
|
50757
|
+
return () => {
|
|
50758
|
+
alive.current = false;
|
|
50759
|
+
};
|
|
50760
|
+
}, []);
|
|
50761
|
+
const aliases = (0, react.useMemo)(() => resolveAliases(scope, props.hosts, workspaceAlias), [
|
|
50762
|
+
scope,
|
|
50763
|
+
props.hosts,
|
|
50764
|
+
workspaceAlias
|
|
50765
|
+
]);
|
|
50766
|
+
/** Stable identity for the effect: a store publish must not restart the timer. */
|
|
50767
|
+
const aliasesKey = aliases.join("|");
|
|
50768
|
+
const aliasesRef = (0, react.useRef)(aliases);
|
|
50769
|
+
aliasesRef.current = aliases;
|
|
50770
|
+
const currentAlias = currentHostAlias(props.hosts, workspaceAlias);
|
|
50771
|
+
const selectValue = (0, react.useMemo)(() => {
|
|
50772
|
+
if (scope === "all") return "all";
|
|
50773
|
+
if (scope.startsWith("host:")) {
|
|
50774
|
+
const alias = scope.slice(5);
|
|
50775
|
+
if (props.hosts.some((host) => host.alias === alias)) return scope;
|
|
50776
|
+
}
|
|
50777
|
+
return "current";
|
|
50778
|
+
}, [scope, props.hosts]);
|
|
50779
|
+
const load = (0, react.useCallback)(async (targets, force) => {
|
|
50780
|
+
await Promise.all(targets.map(async (alias) => {
|
|
50781
|
+
if (inFlight.current.has(alias)) return;
|
|
50782
|
+
inFlight.current.add(alias);
|
|
50783
|
+
try {
|
|
50784
|
+
const metrics = await api.hostMetrics(alias, force);
|
|
50785
|
+
if (!alive.current) return;
|
|
50786
|
+
setSamples((previous) => ({
|
|
50787
|
+
...previous,
|
|
50788
|
+
[alias]: metrics
|
|
50789
|
+
}));
|
|
50790
|
+
setHistories((previous) => ({
|
|
50791
|
+
...previous,
|
|
50792
|
+
[alias]: appendMetrics(previous[alias] ?? emptyHistory(), metrics)
|
|
50793
|
+
}));
|
|
50794
|
+
} catch (error) {
|
|
50795
|
+
if (!alive.current) return;
|
|
50796
|
+
const reason = error instanceof RemoteApiError ? error.message : String(error);
|
|
50797
|
+
setSamples((previous) => ({
|
|
50798
|
+
...previous,
|
|
50799
|
+
[alias]: placeholderMetrics(alias, "error", reason)
|
|
50800
|
+
}));
|
|
50801
|
+
} finally {
|
|
50802
|
+
inFlight.current.delete(alias);
|
|
50803
|
+
}
|
|
50804
|
+
}));
|
|
50805
|
+
}, []);
|
|
50806
|
+
(0, react.useEffect)(() => {
|
|
50807
|
+
if (!props.visible || paused) return;
|
|
50808
|
+
if (aliasesRef.current.length === 0) return;
|
|
50809
|
+
const tick = () => {
|
|
50810
|
+
if (document.hidden) return;
|
|
50811
|
+
load(aliasesRef.current, false);
|
|
50812
|
+
};
|
|
50813
|
+
tick();
|
|
50814
|
+
const timer = window.setInterval(tick, intervalMs);
|
|
50815
|
+
const onVisibilityChange = () => {
|
|
50816
|
+
if (!document.hidden) tick();
|
|
50817
|
+
};
|
|
50818
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
50819
|
+
return () => {
|
|
50820
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
50821
|
+
window.clearInterval(timer);
|
|
50822
|
+
};
|
|
50823
|
+
}, [
|
|
50824
|
+
props.visible,
|
|
50825
|
+
paused,
|
|
50826
|
+
aliasesKey,
|
|
50827
|
+
intervalMs,
|
|
50828
|
+
load
|
|
50829
|
+
]);
|
|
50830
|
+
const refresh = (0, react.useCallback)(() => {
|
|
50831
|
+
const targets = aliasesRef.current;
|
|
50832
|
+
if (targets.length === 0) return;
|
|
50833
|
+
setRefreshing(true);
|
|
50834
|
+
load(targets, true).finally(() => {
|
|
50835
|
+
if (alive.current) setRefreshing(false);
|
|
50836
|
+
});
|
|
50837
|
+
}, [load]);
|
|
50838
|
+
const choose = (0, react.useCallback)((next) => {
|
|
50839
|
+
const value = next;
|
|
50840
|
+
setScope(value);
|
|
50841
|
+
saveScope(value);
|
|
50842
|
+
}, []);
|
|
50843
|
+
const chooseInterval = (0, react.useCallback)((next) => {
|
|
50844
|
+
const value = Number(next);
|
|
50845
|
+
if (!INTERVAL_CHOICES.includes(value)) return;
|
|
50846
|
+
setIntervalMs(value);
|
|
50847
|
+
saveIntervalMs(value);
|
|
50848
|
+
}, []);
|
|
50849
|
+
const unknown = t("monitor.unknown");
|
|
50850
|
+
const stateLabel = (state) => stateLabelOf(state, t);
|
|
50851
|
+
const ageLabel = (metrics) => {
|
|
50852
|
+
const age = Date.now() - metrics.sampledAt;
|
|
50853
|
+
if (age < 1500) return t("monitor.justNow");
|
|
50854
|
+
return t("monitor.updatedAgo").replace("{age}", formatAgeShort(age));
|
|
50855
|
+
};
|
|
50856
|
+
const renderDetail = (alias) => {
|
|
50857
|
+
const metrics = samples[alias];
|
|
50858
|
+
if (metrics === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50859
|
+
className: "rvs-empty",
|
|
50860
|
+
children: props.visible ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
50861
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MiniSpinner, {}),
|
|
50862
|
+
" ",
|
|
50863
|
+
t("monitor.loading")
|
|
50864
|
+
] }) : t("monitor.noData")
|
|
50865
|
+
});
|
|
50866
|
+
const state = metrics.state;
|
|
50867
|
+
const label = stateLabel(state);
|
|
50868
|
+
const history = histories[alias] ?? emptyHistory();
|
|
50869
|
+
const memPercent = metrics.memPercent;
|
|
50870
|
+
const diskPercent = metrics.diskPercent;
|
|
50871
|
+
const loadText = metrics.load1 === null || metrics.load5 === null || metrics.load15 === null ? unknown : [
|
|
50872
|
+
metrics.load1,
|
|
50873
|
+
metrics.load5,
|
|
50874
|
+
metrics.load15
|
|
50875
|
+
].map((value) => value.toFixed(2)).join(" / ");
|
|
50876
|
+
const netText = metrics.netRxBps === null && metrics.netTxBps === null ? unknown : `${metrics.netRxBps === null ? unknown : formatRate(metrics.netRxBps)} ↓ / ${metrics.netTxBps === null ? unknown : formatRate(metrics.netTxBps)} ↑`;
|
|
50877
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50878
|
+
className: `rvs-monitor-card ${state}`,
|
|
50879
|
+
children: [
|
|
50880
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50881
|
+
className: "rvs-monitor-head",
|
|
50882
|
+
children: [
|
|
50883
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50884
|
+
className: `rvs-monitor-dot ${state}`,
|
|
50885
|
+
"aria-hidden": "true"
|
|
50886
|
+
}),
|
|
50887
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50888
|
+
className: "rvs-monitor-title",
|
|
50889
|
+
title: alias,
|
|
50890
|
+
children: alias
|
|
50891
|
+
}),
|
|
50892
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50893
|
+
className: "rvs-monitor-conn",
|
|
50894
|
+
title: hostLabelOf(alias, props.hosts),
|
|
50895
|
+
children: hostLabelOf(alias, props.hosts)
|
|
50896
|
+
})
|
|
50897
|
+
]
|
|
50898
|
+
}),
|
|
50899
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50900
|
+
className: "rvs-monitor-sub",
|
|
50901
|
+
children: [
|
|
50902
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50903
|
+
className: `rvs-monitor-state ${state}`,
|
|
50904
|
+
children: label
|
|
50905
|
+
}),
|
|
50906
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50907
|
+
className: "rvs-monitor-age",
|
|
50908
|
+
children: ageLabel(metrics)
|
|
50909
|
+
}),
|
|
50910
|
+
metrics.reason !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50911
|
+
className: "rvs-monitor-reason",
|
|
50912
|
+
title: metrics.reason,
|
|
50913
|
+
children: t("monitor.reason").replace("{reason}", metrics.reason)
|
|
50914
|
+
})
|
|
50915
|
+
]
|
|
50916
|
+
}),
|
|
50917
|
+
state === "ok" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
50918
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50919
|
+
className: "rvs-monitor-grid",
|
|
50920
|
+
children: [
|
|
50921
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Gauge, {
|
|
50922
|
+
label: t("monitor.cpu"),
|
|
50923
|
+
value: metrics.cpuPercent === null ? unknown : formatPercent(metrics.cpuPercent),
|
|
50924
|
+
percent: metrics.cpuPercent,
|
|
50925
|
+
sub: metrics.cpuCores === null ? metrics.cpuPercent === null ? t("monitor.warming") : void 0 : t("monitor.cores").replace("{count}", String(metrics.cpuCores))
|
|
50926
|
+
}),
|
|
50927
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Gauge, {
|
|
50928
|
+
label: t("monitor.ram"),
|
|
50929
|
+
value: memPercent === null ? unknown : formatPercent(memPercent),
|
|
50930
|
+
percent: memPercent,
|
|
50931
|
+
sub: metrics.memUsedBytes === null || metrics.memTotalBytes === null ? void 0 : formatCapacity(metrics.memUsedBytes, metrics.memTotalBytes)
|
|
50932
|
+
}),
|
|
50933
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Gauge, {
|
|
50934
|
+
label: t("monitor.disk"),
|
|
50935
|
+
value: diskPercent === null ? unknown : formatPercent(diskPercent),
|
|
50936
|
+
percent: diskPercent,
|
|
50937
|
+
sub: metrics.diskUsedBytes === null || metrics.diskTotalBytes === null ? void 0 : formatCapacity(metrics.diskUsedBytes, metrics.diskTotalBytes)
|
|
50938
|
+
})
|
|
50939
|
+
]
|
|
50940
|
+
}),
|
|
50941
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50942
|
+
className: "rvs-monitor-facts",
|
|
50943
|
+
children: [
|
|
50944
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fact, {
|
|
50945
|
+
label: t("monitor.temp"),
|
|
50946
|
+
value: metrics.temperatureC === null ? unknown : formatTemperature(metrics.temperatureC)
|
|
50947
|
+
}),
|
|
50948
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fact, {
|
|
50949
|
+
label: t("monitor.uptime"),
|
|
50950
|
+
value: metrics.uptimeSeconds === null ? unknown : formatUptime(metrics.uptimeSeconds)
|
|
50951
|
+
}),
|
|
50952
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fact, {
|
|
50953
|
+
label: t("monitor.load"),
|
|
50954
|
+
value: loadText
|
|
50955
|
+
}),
|
|
50956
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fact, {
|
|
50957
|
+
label: t("monitor.net"),
|
|
50958
|
+
value: netText,
|
|
50959
|
+
title: metrics.netRxBps === null && metrics.netTxBps === null ? t("monitor.warming") : void 0
|
|
50960
|
+
})
|
|
50961
|
+
]
|
|
50962
|
+
}),
|
|
50963
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50964
|
+
className: "rvs-monitor-sparks",
|
|
50965
|
+
children: [
|
|
50966
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spark, {
|
|
50967
|
+
label: t("monitor.cpuHistory"),
|
|
50968
|
+
values: history.cpu,
|
|
50969
|
+
tone: "cpu",
|
|
50970
|
+
empty: t("monitor.warming")
|
|
50971
|
+
}),
|
|
50972
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spark, {
|
|
50973
|
+
label: t("monitor.memHistory"),
|
|
50974
|
+
values: history.mem,
|
|
50975
|
+
tone: "mem",
|
|
50976
|
+
empty: t("monitor.warming")
|
|
50977
|
+
}),
|
|
50978
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spark, {
|
|
50979
|
+
label: t("monitor.netHistory"),
|
|
50980
|
+
values: history.netRx,
|
|
50981
|
+
valuesAlt: history.netTx,
|
|
50982
|
+
tone: "net",
|
|
50983
|
+
empty: t("monitor.warming")
|
|
50984
|
+
}),
|
|
50985
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spark, {
|
|
50986
|
+
label: t("monitor.tempHistory"),
|
|
50987
|
+
values: history.temp,
|
|
50988
|
+
tone: "temp",
|
|
50989
|
+
empty: t("monitor.unknown")
|
|
50990
|
+
})
|
|
50991
|
+
]
|
|
50992
|
+
}),
|
|
50993
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50994
|
+
className: "rvs-monitor-hint",
|
|
50995
|
+
children: metrics.kernel === null ? t("monitor.linuxOnly") : `${metrics.kernel}${metrics.cpuModel === null ? "" : ` · ${metrics.cpuModel}`}${metrics.ip === null ? "" : ` · ${metrics.ip}`}`
|
|
50996
|
+
})
|
|
50997
|
+
] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
50998
|
+
className: "rvs-monitor-hint",
|
|
50999
|
+
children: metrics.reason ?? t("monitor.noData")
|
|
51000
|
+
})
|
|
51001
|
+
]
|
|
51002
|
+
});
|
|
51003
|
+
};
|
|
51004
|
+
const renderAll = (targets) => {
|
|
51005
|
+
const okCount = targets.filter((alias) => samples[alias]?.state === "ok").length;
|
|
51006
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
51007
|
+
className: "rvs-monitor-list",
|
|
51008
|
+
children: [
|
|
51009
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51010
|
+
className: "rvs-monitor-summary",
|
|
51011
|
+
children: t("monitor.allSummary").replace("{ok}", String(okCount)).replace("{total}", String(targets.length))
|
|
51012
|
+
}),
|
|
51013
|
+
targets.map((alias) => {
|
|
51014
|
+
const metrics = samples[alias];
|
|
51015
|
+
const state = metrics?.state ?? "unknown";
|
|
51016
|
+
const label = stateLabel(state);
|
|
51017
|
+
const cpuPercent = metrics?.cpuPercent ?? null;
|
|
51018
|
+
const memPercent = metrics?.memPercent ?? null;
|
|
51019
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
51020
|
+
type: "button",
|
|
51021
|
+
className: `rvs-monitor-row ${state}`,
|
|
51022
|
+
onClick: () => choose(`host:${alias}`),
|
|
51023
|
+
title: t("monitor.inspect"),
|
|
51024
|
+
children: [
|
|
51025
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
51026
|
+
className: "rvs-monitor-row-top",
|
|
51027
|
+
children: [
|
|
51028
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51029
|
+
className: `rvs-monitor-dot ${state}`,
|
|
51030
|
+
role: "img",
|
|
51031
|
+
"aria-label": label
|
|
51032
|
+
}),
|
|
51033
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51034
|
+
className: "rvs-monitor-row-name",
|
|
51035
|
+
children: alias
|
|
51036
|
+
}),
|
|
51037
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51038
|
+
className: "rvs-monitor-row-host",
|
|
51039
|
+
children: hostLabelOf(alias, props.hosts)
|
|
51040
|
+
}),
|
|
51041
|
+
metrics === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MiniSpinner, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51042
|
+
className: "rvs-monitor-row-cpu",
|
|
51043
|
+
children: cpuPercent === null ? unknown : formatPercent(cpuPercent)
|
|
51044
|
+
})
|
|
51045
|
+
]
|
|
51046
|
+
}),
|
|
51047
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
51048
|
+
className: "rvs-monitor-row-bars",
|
|
51049
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51050
|
+
className: "rvs-monitor-row-bar",
|
|
51051
|
+
title: `${t("monitor.cpu")} ${cpuPercent === null ? unknown : formatPercent(cpuPercent)}`,
|
|
51052
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51053
|
+
className: `rvs-monitor-bar-fill ${metricTone(cpuPercent)}`,
|
|
51054
|
+
style: { width: `${cpuPercent === null ? 0 : Math.max(0, Math.min(100, cpuPercent))}%` }
|
|
51055
|
+
})
|
|
51056
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51057
|
+
className: "rvs-monitor-row-bar",
|
|
51058
|
+
title: `${t("monitor.ram")} ${memPercent === null ? unknown : formatPercent(memPercent)}`,
|
|
51059
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51060
|
+
className: `rvs-monitor-bar-fill ${metricTone(memPercent)}`,
|
|
51061
|
+
style: { width: `${memPercent === null ? 0 : Math.max(0, Math.min(100, memPercent))}%` }
|
|
51062
|
+
})
|
|
51063
|
+
})]
|
|
51064
|
+
}),
|
|
51065
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
51066
|
+
className: "rvs-monitor-row-facts",
|
|
51067
|
+
children: [
|
|
51068
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
51069
|
+
t("monitor.ram"),
|
|
51070
|
+
" ",
|
|
51071
|
+
memPercent === null ? unknown : formatPercent(memPercent)
|
|
51072
|
+
] }),
|
|
51073
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
51074
|
+
t("monitor.temp"),
|
|
51075
|
+
" ",
|
|
51076
|
+
metrics?.temperatureC === null || metrics?.temperatureC === void 0 ? unknown : formatTemperature(metrics.temperatureC)
|
|
51077
|
+
] }),
|
|
51078
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
51079
|
+
t("monitor.uptime"),
|
|
51080
|
+
" ",
|
|
51081
|
+
metrics?.uptimeSeconds === null || metrics?.uptimeSeconds === void 0 ? unknown : formatUptime(metrics.uptimeSeconds)
|
|
51082
|
+
] })
|
|
51083
|
+
]
|
|
51084
|
+
})
|
|
51085
|
+
]
|
|
51086
|
+
}, alias);
|
|
51087
|
+
}),
|
|
51088
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51089
|
+
className: "rvs-monitor-hint",
|
|
51090
|
+
children: t("monitor.linuxOnly")
|
|
51091
|
+
})
|
|
51092
|
+
]
|
|
51093
|
+
});
|
|
51094
|
+
};
|
|
51095
|
+
const single = aliases.length === 1 ? aliases[0] : void 0;
|
|
51096
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
51097
|
+
className: "rvs-pane grow",
|
|
51098
|
+
children: [
|
|
51099
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
51100
|
+
className: "rvs-header rvs-monitor-header",
|
|
51101
|
+
children: [
|
|
51102
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51103
|
+
className: "rvs-title",
|
|
51104
|
+
children: t("tab.monitor")
|
|
51105
|
+
}),
|
|
51106
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
51107
|
+
className: "rvs-select",
|
|
51108
|
+
value: selectValue,
|
|
51109
|
+
onChange: (event) => choose(event.target.value),
|
|
51110
|
+
disabled: props.hosts.length === 0,
|
|
51111
|
+
title: `${t("monitor.selectScope")}${currentAlias === "" ? "" : ` · ${currentAlias}`}`,
|
|
51112
|
+
style: {
|
|
51113
|
+
flex: 1,
|
|
51114
|
+
minWidth: 90
|
|
51115
|
+
},
|
|
51116
|
+
children: [
|
|
51117
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
51118
|
+
value: "current",
|
|
51119
|
+
style: optionStyle,
|
|
51120
|
+
children: t("monitor.scopeCurrent")
|
|
51121
|
+
}),
|
|
51122
|
+
props.hosts.map((host) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
51123
|
+
value: `host:${host.alias}`,
|
|
51124
|
+
style: optionStyle,
|
|
51125
|
+
children: host.alias
|
|
51126
|
+
}, host.alias)),
|
|
51127
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
51128
|
+
value: "all",
|
|
51129
|
+
style: optionStyle,
|
|
51130
|
+
children: t("monitor.scopeAll")
|
|
51131
|
+
})
|
|
51132
|
+
]
|
|
51133
|
+
}),
|
|
51134
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
51135
|
+
title: t("monitor.settings"),
|
|
51136
|
+
onClick: () => setSettingsOpen((open) => !open),
|
|
51137
|
+
className: settingsOpen ? "active" : void 0,
|
|
51138
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSettings, {})
|
|
51139
|
+
}),
|
|
51140
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
51141
|
+
title: paused ? t("monitor.resume") : t("monitor.pause"),
|
|
51142
|
+
onClick: () => setPaused((value) => !value),
|
|
51143
|
+
children: paused ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPlay, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPause, {})
|
|
51144
|
+
}),
|
|
51145
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
|
|
51146
|
+
title: t("monitor.refresh"),
|
|
51147
|
+
onClick: refresh,
|
|
51148
|
+
disabled: aliases.length === 0 || refreshing,
|
|
51149
|
+
children: refreshing ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MiniSpinner, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconRefresh, { size: 14 })
|
|
51150
|
+
})
|
|
51151
|
+
]
|
|
51152
|
+
}),
|
|
51153
|
+
settingsOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
51154
|
+
className: "rvs-monitor-settings",
|
|
51155
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
51156
|
+
className: "rvs-monitor-settings-head",
|
|
51157
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51158
|
+
className: "rvs-monitor-settings-label",
|
|
51159
|
+
children: t("monitor.interval")
|
|
51160
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
51161
|
+
className: "rvs-monitor-settings-hint",
|
|
51162
|
+
children: t("monitor.intervalHint")
|
|
51163
|
+
})]
|
|
51164
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Segmented, {
|
|
51165
|
+
value: String(intervalMs),
|
|
51166
|
+
onChange: chooseInterval,
|
|
51167
|
+
options: [
|
|
51168
|
+
{
|
|
51169
|
+
id: "5000",
|
|
51170
|
+
label: t("monitor.interval5")
|
|
51171
|
+
},
|
|
51172
|
+
{
|
|
51173
|
+
id: "10000",
|
|
51174
|
+
label: t("monitor.interval10")
|
|
51175
|
+
},
|
|
51176
|
+
{
|
|
51177
|
+
id: "30000",
|
|
51178
|
+
label: t("monitor.interval30")
|
|
51179
|
+
}
|
|
51180
|
+
]
|
|
51181
|
+
})]
|
|
51182
|
+
}),
|
|
51183
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
51184
|
+
className: "rvs-monitor-body",
|
|
51185
|
+
children: [
|
|
51186
|
+
props.hosts.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51187
|
+
className: "rvs-banner warn",
|
|
51188
|
+
children: t("monitor.noHosts")
|
|
51189
|
+
}),
|
|
51190
|
+
props.hosts.length > 0 && aliases.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51191
|
+
className: "rvs-empty",
|
|
51192
|
+
children: t("monitor.noHost")
|
|
51193
|
+
}),
|
|
51194
|
+
paused && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51195
|
+
className: "rvs-banner info",
|
|
51196
|
+
children: t("monitor.paused")
|
|
51197
|
+
}),
|
|
51198
|
+
single !== void 0 && renderDetail(single),
|
|
51199
|
+
single === void 0 && aliases.length > 1 && renderAll(aliases)
|
|
51200
|
+
]
|
|
51201
|
+
})
|
|
51202
|
+
]
|
|
51203
|
+
});
|
|
51204
|
+
}
|
|
50145
51205
|
/** localStorage key: `{ [alias]: string[] }`. Prefix kept for the panel's own data. */
|
|
50146
51206
|
const QUICKOPEN_RECENT_KEY = "dsh-remote-vs.recentFiles";
|
|
50147
51207
|
/**
|
|
@@ -72336,7 +73396,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
|
|
|
72336
73396
|
setMounted((prev) => prev.has(view) ? prev : new Set(prev).add(view));
|
|
72337
73397
|
}, [view]);
|
|
72338
73398
|
(0, react.useEffect)(() => {
|
|
72339
|
-
if (store.workspaces.length === 0 && view !== "workspaces") go("workspaces");
|
|
73399
|
+
if (store.workspaces.length === 0 && view !== "workspaces" && view !== "monitor") go("workspaces");
|
|
72340
73400
|
}, [
|
|
72341
73401
|
store.workspaces.length,
|
|
72342
73402
|
view,
|
|
@@ -72482,6 +73542,11 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
|
|
|
72482
73542
|
hosts: store.hosts,
|
|
72483
73543
|
visible: panelLive("ports")
|
|
72484
73544
|
});
|
|
73545
|
+
case "monitor": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MonitorView, {
|
|
73546
|
+
t,
|
|
73547
|
+
hosts: store.hosts,
|
|
73548
|
+
visible: panelLive("monitor")
|
|
73549
|
+
});
|
|
72485
73550
|
case "workspaces": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
72486
73551
|
className: "rvs-viewpad",
|
|
72487
73552
|
style: { height: "100%" },
|
|
@@ -72544,6 +73609,7 @@ Integer Float Double Long Int32 Int64 Uint8 uint32_t int32_t uint64_t int64_t si
|
|
|
72544
73609
|
editorInStack && store.tabs.length > 0 && railButton("editor", store.activeTab?.rel.split("/").pop() ?? t("tab.editor"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconDiff, { size: 17 }), store.tabs.length),
|
|
72545
73610
|
railButton("terminal", t("tab.terminal"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconTerminal, { size: 17 })),
|
|
72546
73611
|
railButton("ports", t("tab.ports"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPlug, { size: 17 })),
|
|
73612
|
+
railButton("monitor", t("tab.monitor"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconMonitor, { size: 17 })),
|
|
72547
73613
|
railButton("workspaces", t("tab.workspaces"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconServer, { size: 17 }), store.workspaces.length)
|
|
72548
73614
|
]
|
|
72549
73615
|
}),
|