/* * 双栖模式顶栏胶囊与悬浮面板样式表 (overlay.css). * 严格遵循单层微边框与语义变量规范(零硬编码色值、零 Emoji、硬件加速合成层动画)。 */ /* --- 1. 顶栏胶囊宿主容器 (Titlebar Capsule Host) --- */ :host(.wm-capsule-host) { --ui-font-scale: 1 !important; display: inline-flex; align-items: center; gap: 6px; height: 28px; flex-shrink: 0; vertical-align: middle; -webkit-app-region: no-drag; pointer-events: auto; user-select: none; font-family: "Google Sans Flex", "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 12px; font-weight: 450; font-stretch: 100%; font-variation-settings: normal; line-height: 18px; letter-spacing: 0.015em; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: var(--text-primary); z-index: 2147482900; } :host(.wm-capsule-host[data-dock="flow"]) { position: relative; margin-right: 4px; } :host(.wm-capsule-host[data-dock="composer"]) { position: relative; height: 26px; gap: 4px; margin-right: 4px; align-self: center; } :host(.wm-capsule-host[data-dock="composer"][data-composer-push="1"]) { margin-left: auto; } :host(.wm-capsule-host[data-dock="composer"]) .wm-multi-btn, :host(.wm-capsule-host[data-dock="composer"]) .wm-capsule-btn { height: 26px; border-radius: var(--radius-pill); } :host(.wm-capsule-host[data-dock="composer"]) .wm-multi-btn { padding: 0 7px; } :host(.wm-capsule-host[data-dock="composer"]) .wm-capsule-btn { padding: 0 8px; } :host(.wm-capsule-host[data-dock="ide-titlebar"]) { position: relative; margin-left: auto; margin-right: 8px; z-index: 2501; --text-primary: var( --vscode-titleBar-activeForeground, var(--foreground, var(--vscode-foreground, hsl(215 22% 15%))) ); --text-secondary: color-mix(in srgb, var(--text-primary) 78%, transparent); } :host(.wm-capsule-host[data-dock="fixed"]) { position: fixed; top: 6px; right: 144px; } :host(.wm-capsule-host[data-dock="fixed"][data-os="mac"]) { right: 12px; } @keyframes wm-dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.38; } } /* 左侧多会话实时状态触发器(无边框、与宿主顶栏按钮同高 28px、整数行高防压扁) */ .wm-multi-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; margin: 0; background: transparent; color: var(--text-secondary); border: none; outline: none; box-shadow: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 12px; font-weight: 450; line-height: 18px; letter-spacing: 0.015em; font-variant-numeric: tabular-nums; cursor: pointer; -webkit-app-region: no-drag; white-space: nowrap; contain: layout style; transition: background-color var(--dur-instant) var(--ease-fast), color var(--dur-instant) var(--ease-fast); } .wm-multi-btn[hidden], .wm-update-btn[hidden], .wm-cap-slot[hidden], .wm-sep[hidden] { display: none !important; } .wm-multi-btn:hover { background: color-mix(in srgb, var(--text-primary) 7%, transparent); color: var(--text-primary); } .wm-multi-btn.is-open { background: color-mix(in srgb, var(--text-primary) 11%, transparent); color: var(--text-primary); } .wm-multi-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--text-secondary) 44%, transparent); flex-shrink: 0; } .wm-multi-btn.is-running .wm-multi-dot { background: var(--accent-primary); animation: wm-dot-pulse 1.5s ease-in-out infinite; } .wm-multi-btn.is-waiting .wm-multi-dot { background: var(--metric-warn); animation: wm-dot-pulse 1.5s ease-in-out infinite; } .wm-multi-label { display: inline-block; min-width: 46px; line-height: 18px; text-align: left; white-space: nowrap; flex-shrink: 0; } .wm-multi-btn.is-running .wm-multi-label, .wm-multi-btn.is-waiting .wm-multi-label { color: var(--text-primary); font-weight: 500; } .wm-capsule-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 9px; margin: 0; background: transparent; color: var(--text-secondary); border: none; outline: none; box-shadow: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 12px; font-weight: 450; line-height: 18px; letter-spacing: 0.015em; font-variant-numeric: tabular-nums; cursor: pointer; -webkit-app-region: no-drag; white-space: nowrap; contain: layout style; transition: background-color var(--dur-instant) var(--ease-fast), color var(--dur-instant) var(--ease-fast); } .wm-capsule-btn:hover { background: color-mix(in srgb, var(--text-primary) 7%, transparent); color: var(--text-primary); } .wm-capsule-btn.is-open { background: color-mix(in srgb, var(--text-primary) 11%, transparent); color: var(--text-primary); } /* 右侧胶囊通用槽位容器与按指标预占定宽(严格防止动态数值跳动,保留舒展字间距) */ .wm-cap-slot { display: inline-flex; align-items: center; justify-content: center; height: 18px; line-height: 18px; flex-shrink: 0; color: var(--text-secondary); } .wm-slot-text { display: inline-block; line-height: 18px; letter-spacing: 0.015em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; } /* 环形上下文指示器(固定预占宽度 58px:14px 环 + 5px 间距 + 完整容纳四字符 100%) */ .wm-ctx-seg { justify-content: center; gap: 5px; width: 58px; } .wm-ring-svg { width: 14px; height: 14px; flex-shrink: 0; transform: rotate(-90deg); } .wm-ring-track { fill: none; stroke: color-mix(in srgb, var(--text-secondary) 24%, transparent); stroke-width: 2; } .wm-ring-fill { fill: none; stroke: var(--accent-primary); stroke-width: 2; stroke-linecap: round; transition: stroke-dashoffset var(--dur-normal) var(--ease-fast), stroke var(--dur-fast) var(--ease-fast); } .wm-ring-fill.tone-warn { stroke: var(--metric-warn); } .wm-ring-fill.tone-danger { stroke: var(--metric-danger); } .wm-ctx-pct { min-width: 28px; max-width: none; overflow: visible; text-overflow: clip; text-align: left; font-weight: 500; color: var(--text-primary); } .wm-sep { width: 1px; height: 12px; background: color-mix(in srgb, var(--text-secondary) 26%, transparent); flex-shrink: 0; } /* 速度槽位(固定预占宽度 58px 居中对齐) */ .wm-seg-speed { width: 58px; } .wm-speed-text { width: 58px; text-align: center; } .wm-seg-speed.state-running:not([class*="tone-"]) { color: var(--accent-primary); font-weight: 500; } /* 首字延迟槽位(固定预占宽度 46px 居中对齐,覆盖 0.85s ~ 105s) */ .wm-seg-ttft { width: 46px; } .wm-ttft-text { width: 46px; text-align: center; } /* 本次费用槽位(固定预占宽度 52px 居中对齐,覆盖 <$0.001 ~ $99.99) */ .wm-seg-cost { width: 52px; } .wm-cost-text { width: 52px; text-align: center; color: var(--text-primary); font-weight: 500; } /* 配额槽位(固定预占宽度 52px 居中对齐,完整容纳 余 100% / 余 --% 且在任意槽位对称) */ .wm-seg-quota { width: 52px; } .wm-quota-text { width: 52px; text-align: center; } /* 缓存命中率槽位(固定预占宽度 44px 居中对齐) */ .wm-seg-cache { width: 44px; } .wm-cache-text { width: 44px; text-align: center; } /* 会话总 Token 槽位(固定预占宽度 52px 居中对齐) */ .wm-seg-tokens { width: 52px; } .wm-tokens-text { width: 52px; text-align: center; } .wm-cap-slot.tone-good, .wm-cap-slot.tone-good .wm-slot-text { color: var(--metric-ok); font-weight: 500; } .wm-cap-slot.tone-info, .wm-cap-slot.tone-info .wm-slot-text { color: var(--metric-info); font-weight: 500; } .wm-cap-slot.tone-warn, .wm-cap-slot.tone-warn .wm-slot-text { color: var(--metric-warn); font-weight: 500; } .wm-cap-slot.tone-danger, .wm-cap-slot.tone-danger .wm-slot-text { color: var(--metric-danger); font-weight: 500; } .wm-cap-slot.tone-muted, .wm-cap-slot.tone-muted .wm-slot-text { color: var(--text-muted); } /* 仅在超窄 ring-only 折叠态下使用右上角 5px 提示圆点;常规态由柔和微胶囊 .wm-update-btn 承载 */ .wm-update-dot { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: var(--radius-pill); background: var(--accent-primary); pointer-events: none; } :host(.wm-capsule-host:not([data-layout="ring-only"])) .wm-update-dot { display: none !important; } /* 顶栏右侧柔和半透明新版本胶囊按钮(20px 矮胶囊嵌套于 28px 顶栏,克制不突兀,左键一键升级) */ .wm-update-btn { display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 20px; padding: 0 6px 0 5px; margin: 0; background: color-mix(in srgb, var(--accent-primary) 10%, transparent); color: var(--accent-primary); border: 1px solid color-mix(in srgb, var(--accent-primary) 24%, transparent); border-radius: var(--radius-pill); font-family: inherit; font-size: 11px; font-weight: 500; line-height: 18px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; cursor: pointer; -webkit-app-region: no-drag; transition: background-color var(--dur-instant) var(--ease-fast), border-color var(--dur-instant) var(--ease-fast), transform var(--dur-instant) var(--ease-fast); } .wm-update-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-primary) 18%, transparent); border-color: color-mix(in srgb, var(--accent-primary) 40%, transparent); } .wm-update-btn:active:not(:disabled) { transform: scale(0.96); } .wm-update-btn:disabled { opacity: 0.72; cursor: default; } @keyframes wm-spin-icon { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .wm-update-btn.is-updating .svg-icon { animation: wm-spin-icon 0.9s linear infinite; } :host(.wm-capsule-host[data-layout="minimal"]) .wm-update-label { display: none !important; } :host(.wm-capsule-host[data-layout="minimal"]) .wm-update-btn { width: 20px; padding: 0; } :host(.wm-capsule-host[data-layout="ring-only"]) .wm-update-btn { display: none !important; } /* 四级响应式迟滞折叠(基于可见槽位次序 data-vis-rank 1..5 与分隔线次序 data-sep-for-rank 动态折叠) */ :host(.wm-capsule-host[data-layout="compact"]) .wm-cap-slot[data-vis-rank="3"], :host(.wm-capsule-host[data-layout="compact"]) .wm-cap-slot[data-vis-rank="4"], :host(.wm-capsule-host[data-layout="compact"]) .wm-cap-slot[data-vis-rank="5"], :host(.wm-capsule-host[data-layout="compact"]) .wm-sep[data-sep-for-rank="3"], :host(.wm-capsule-host[data-layout="compact"]) .wm-sep[data-sep-for-rank="4"], :host(.wm-capsule-host[data-layout="compact"]) .wm-sep[data-sep-for-rank="5"] { display: none !important; } :host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="2"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="3"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="4"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-cap-slot[data-vis-rank="5"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="2"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="3"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="4"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-sep[data-sep-for-rank="5"], :host(.wm-capsule-host[data-layout="minimal"]) .wm-multi-label { display: none !important; } :host(.wm-capsule-host[data-layout="minimal"]) .wm-multi-btn, :host(.wm-capsule-host[data-layout="ring-only"]) .wm-multi-btn { padding: 0 7px; } :host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="2"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="3"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="4"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="5"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="2"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="3"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="4"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-sep[data-sep-for-rank="5"], :host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="1"] .wm-ctx-pct, :host(.wm-capsule-host[data-layout="ring-only"]) .wm-multi-label { display: none !important; } :host(.wm-capsule-host[data-layout="ring-only"]) .wm-capsule-btn { padding: 0 6px; } :host(.wm-capsule-host[data-layout="ring-only"]) .wm-cap-slot[data-vis-rank="1"].wm-ctx-seg { width: 14px; } /* --- 2. 顶层浮层传送门宿主 (Body Portal Host: Multi-Session HUD, Tooltip & Full 4-Tab Popover) --- */ :host(.wm-portal-host) { position: fixed; inset: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 2147483000; font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.4; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: var(--text-primary); } @keyframes wm-popover-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } } @keyframes wm-popover-in-up { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } } .wm-popover-panel { --step-model-max-w: 240px; position: fixed; top: 42px; left: 12px; width: min(var(--wm-popover-w, 540px), calc(100vw - 24px)); height: min(588px, calc(100vh - 54px)); max-height: calc(100vh - 54px); display: flex; flex-direction: column; background: var(--surface-bg); color: var(--text-primary); border: 1px solid var(--border-hairline); border-radius: var(--radius-sm); box-shadow: var(--shadow-overlay); pointer-events: auto; overflow: hidden; -webkit-app-region: no-drag; transform-origin: top right; animation: wm-popover-in var(--dur-fast) var(--ease-fast); } .wm-popover-panel .app-shell { height: 100%; max-height: 100%; max-width: none; } /* 顶栏胶囊悬停全景概览浮层(复用实时概览三卡片架构,全槽位预占,仅就地更新节点不跳动) */ .wm-hover-tip { position: fixed; top: 42px; left: 12px; width: min(calc(522px * var(--ui-panel-scale, 1)), calc(100vw - 24px)); max-height: calc(100vh - 54px); padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); background: var(--surface-bg); color: var(--text-primary); border: 1px solid var(--border-hairline); border-radius: var(--radius-sm); box-shadow: var(--shadow-overlay); pointer-events: none; overflow: hidden; contain: layout style; z-index: 2147483001; transform-origin: top right; animation: wm-popover-in var(--dur-instant) var(--ease-fast); } /* 左侧在线多会话实时看板浮层(单层无套娃细线卡片,仅显示在线运行会话,留足呼吸感) */ .wm-multi-panel { position: fixed; top: 42px; left: 12px; width: min(calc(464px * var(--ui-panel-scale, 1)), calc(100vw - 24px)); max-height: calc(100vh - 54px); padding: 14px 16px; display: flex; flex-direction: column; gap: 0; background: var(--surface-bg); color: var(--text-primary); border: 1px solid var(--border-hairline); border-radius: var(--radius-sm); box-shadow: var(--shadow-overlay); pointer-events: auto; overflow-x: hidden; overflow-y: auto; -webkit-app-region: no-drag; contain: layout style; z-index: 2147483002; transform-origin: top left; animation: wm-popover-in var(--dur-instant) var(--ease-fast); } .wm-popover-panel.is-above { transform-origin: bottom right; animation-name: wm-popover-in-up; } .wm-hover-tip.is-above { transform-origin: bottom right; animation-name: wm-popover-in-up; } .wm-multi-panel.is-above { transform-origin: bottom left; animation-name: wm-popover-in-up; } .wm-popover-panel.is-instant, .wm-hover-tip.is-instant, .wm-multi-panel.is-instant { animation: none !important; } .wm-hover-tip .cell-label, .wm-hover-tip .legend-item, .wm-hover-tip .legend-left, .wm-hover-tip .panel-header > span { white-space: nowrap; min-width: 0; } .wm-hover-tip .panel-header > span:first-child:not(.panel-title) { overflow: hidden; text-overflow: ellipsis; } .wm-hover-widgets { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; } .wm-hover-update-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 5px 10px; border-radius: var(--radius-xs); background: var(--accent-primary-soft); border: 1px solid var(--accent-primary-border); font-size: var(--fs-base-sm); line-height: 1.3; } .wm-hover-update-left { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-primary); font-weight: 600; white-space: nowrap; } .wm-hover-update-hint { color: var(--text-secondary); font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .wm-hover-quota-pools { display: flex; flex-direction: column; gap: 0; } .wm-hover-quota-foot { font-size: var(--fs-md); padding-top: 2px; } .wm-pin-badge { display: inline-flex; align-items: center; min-height: calc(16px * var(--ui-font-scale, 1)); padding: 1px 5px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent-primary); background: var(--accent-primary-soft); border-radius: var(--radius-xs); flex-shrink: 0; } .wm-session-tag { display: inline-flex; align-items: center; min-height: calc(16px * var(--ui-font-scale, 1)); padding: 1px 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); background: color-mix(in srgb, var(--text-primary) 7%, transparent); border-radius: var(--radius-xs); white-space: nowrap; flex-shrink: 0; } .wm-session-tag.is-here { color: var(--accent-primary); background: var(--accent-primary-soft); } .wm-task-metrics { font-size: var(--fs-md); color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; } .wm-multi-header { padding-bottom: 10px; border-bottom: 1px solid var(--border-hairline); } /* 多会话单层面板内去除重复边框与底色,留足行距与段落呼吸感,仅靠左侧圆点闪烁表达状态 */ .wm-multi-panel .live-activity-list { gap: 0; } .wm-multi-panel .live-task-card { gap: 8px; padding: 12px 2px; border: none; border-radius: 0; background: transparent; } .wm-multi-panel .live-task-card:first-child { padding-top: 11px; } .wm-multi-panel .live-task-card:last-child { padding-bottom: 2px; } .wm-multi-panel .live-task-card + .live-task-card { border-top: 1px solid var(--border-hairline); } .wm-multi-panel .live-task-title { font-size: var(--fs-body); } .wm-multi-empty { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 36px; padding: 12px 2px 4px; font-size: var(--fs-base); color: var(--text-secondary); } .wm-multi-empty-left { display: inline-flex; align-items: center; gap: 8px; min-width: 0; } .wm-idle-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--text-secondary) 38%, transparent); flex-shrink: 0; }