Spaces:
Sleeping
Sleeping
cccmmd
feat: add Integrated Lab page, app-header component, activation explainer, and UI improvements
0b040f5 | // Attribution:共用左栏见 _chat-input-panel.scss | |
| @use 'app-pages'; | |
| @use "attribution-inspector"; | |
| @use "chat-input-panel"; | |
| @use "breakpoints" as *; | |
| @use '../base/narrow-ios-form-font-tail' as ios-form-font; | |
| // 桌面端:覆盖全局 min-height:100%,使 #results 按内容收缩(debug 面板紧跟其后) | |
| @media (min-width: $breakpoint-tablet) { | |
| html:not([data-force-narrow]) .right_panel > #results.attribution-inspector-surface { | |
| flex: 0 0 auto; | |
| min-height: 350px; // 覆盖 _responsive.scss 的 min-height:100%,保留兜底高度 | |
| } | |
| html:not([data-force-narrow]) .right_panel > #attribution_debug_container { | |
| flex: 0 0 auto; | |
| } | |
| } | |
| // Both 模式并排面板 | |
| .attribution-method-panels { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| } | |
| .attribution-panel-label { | |
| font-size: 14px; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| margin-bottom: 4px; | |
| padding: 2px 8px; | |
| background: var(--bg-elevated); | |
| border-radius: 4px; | |
| display: inline-block; | |
| } | |
| // Both 模式图例 | |
| .attribution-both-legend { | |
| display: flex; | |
| gap: 16px; | |
| padding: 8px 12px; | |
| margin-top: 8px; | |
| background: var(--bg-elevated); | |
| border-radius: 6px; | |
| font-size: 13px; | |
| flex-wrap: wrap; | |
| } | |
| .attribution-legend-item { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 6px; | |
| } | |
| .attribution-legend-swatch { | |
| display: inline-block; | |
| width: 16px; | |
| height: 16px; | |
| border-radius: 3px; | |
| border: 1px solid var(--border-color); | |
| } | |
| .attribution-legend-positive { | |
| background: rgba(66, 133, 244, 0.7); | |
| } | |
| .attribution-legend-negative { | |
| background: rgba(226, 74, 74, 0.7); | |
| } | |
| .attribution-legend-neutral { | |
| background: transparent; | |
| border: 1px dashed var(--text-muted); | |
| } | |
| .attribution-consistency-readout { | |
| padding: 6px 12px; | |
| margin-top: 6px; | |
| font-size: 13px; | |
| color: var(--text-secondary); | |
| text-align: center; | |
| } | |
| .attribution-ablation-disclaimer { | |
| font-size: 12px; | |
| color: var(--text-muted); | |
| padding: 6px 8px; | |
| margin-top: 4px; | |
| border-left: 3px solid var(--border-color); | |
| background: var(--bg-elevated); | |
| border-radius: 0 4px 4px 0; | |
| } | |
| // Cached history 下拉:覆盖 mixin 的 max-height:200px;高度随条目、封顶 min(32vh,360px),并可竖向 resize | |
| #attribution_cached_history_dropdown.semantic-search-history-dropdown { | |
| max-height: min(32vh, 360px); | |
| resize: vertical; | |
| overflow-y: auto; | |
| } | |
| #attribution_result_info { | |
| white-space: pre-line; | |
| text-align: center; | |
| } | |
| // Target prediction 面板与上方 Context 面板之间的间距 | |
| .attribution-target-panel { | |
| margin-top: 12px; | |
| } | |
| // Target prediction 输入框较矮(_chat-input-panel 中 .input-section textarea 默认 250px,此处覆盖 target) | |
| .attribution-target-panel .textarea-wrapper textarea { | |
| height: 60px; | |
| } | |
| // Analyze 行下方:与 semantic_submode_row 同系样式(见 _semantic-analysis.scss) | |
| .attribution-max-score-row { | |
| margin-top: 10px; | |
| flex-wrap: wrap; | |
| } | |
| .attribution-use-mapping-label { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 6px; | |
| font-size: inherit; | |
| cursor: pointer; | |
| user-select: none; | |
| } | |
| .attribution-max-score-slider-group { | |
| flex: 1 1 180px; | |
| min-width: 0; | |
| } | |
| .attribution-max-score-range { | |
| flex: 1 1 auto; | |
| min-width: 80px; | |
| max-width: 220px; | |
| vertical-align: middle; | |
| } | |
| // 「Max score」标签与数值:继承字体;未勾选映射时为灰色,勾选后主色 | |
| .attribution-max-score-row.semantic-submode-row { | |
| .semantic-submode-label { | |
| font-size: inherit; | |
| } | |
| .attribution-max-score-value { | |
| font-size: inherit; | |
| font-variant-numeric: tabular-nums; | |
| min-width: 2.5em; | |
| text-align: right; | |
| } | |
| &:not(:has(#attribution_use_mapping:checked)) { | |
| .attribution-max-score-slider-group .semantic-submode-label, | |
| .attribution-max-score-value { | |
| color: var(--text-muted); | |
| } | |
| } | |
| &:has(#attribution_use_mapping:checked) { | |
| .attribution-max-score-slider-group .semantic-submode-label, | |
| .attribution-max-score-value { | |
| color: var(--text-primary); | |
| } | |
| } | |
| } | |
| .attribution-exclude-prompt-patterns-row { | |
| margin-top: 10px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| // 「Exclude prompt patterns」标签:与 Max score 行共用 semantic-submode-row(gap 等);未勾选使能时为灰色,勾选后主色 | |
| .attribution-exclude-prompt-patterns-header { | |
| flex-wrap: wrap; | |
| &:not(:has(#attribution_exclude_prompt_patterns_enable:checked)) .semantic-submode-label { | |
| color: var(--text-muted); | |
| } | |
| &:has(#attribution_exclude_prompt_patterns_enable:checked) .semantic-submode-label { | |
| color: var(--text-primary); | |
| } | |
| } | |
| // ---- Activation Explainer panel ---- | |
| .attr-ae-panel { | |
| margin-top: 12px; | |
| border: 1px solid var(--border-color); | |
| border-radius: 0; | |
| background: transparent; | |
| padding: 1rem 1.25rem; | |
| .attribution-panel-label { | |
| font-family: var(--font-icon), 'JetBrains Mono', monospace; | |
| font-size: 0.6875rem; | |
| letter-spacing: 0.08em; | |
| text-transform: uppercase; | |
| color: var(--text-muted); | |
| border-bottom: 1px solid var(--border-color); | |
| padding-bottom: 0.5rem; | |
| margin-bottom: 0.75rem; | |
| } | |
| } | |
| .ae-trigger-row { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| flex-wrap: wrap; | |
| margin-bottom: 0.5rem; | |
| } | |
| .ae-trigger-hint { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| } | |
| .ae-loading { | |
| font-family: var(--font-icon), 'JetBrains Mono', monospace; | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| padding: 1rem 0; | |
| text-align: center; | |
| animation: ae-pulse 1.5s ease-in-out infinite; | |
| } | |
| @keyframes ae-pulse { | |
| 0%, 100% { opacity: 0.6; } | |
| 50% { opacity: 1; } | |
| } | |
| .ae-result { | |
| margin-top: 0.5rem; | |
| } | |
| .ae-field { | |
| margin-bottom: 0.75rem; | |
| display: flex; | |
| align-items: flex-start; | |
| gap: 0.75rem; | |
| } | |
| .ae-label { | |
| font-family: var(--font-icon), 'JetBrains Mono', monospace; | |
| font-size: 0.6875rem; | |
| font-weight: 600; | |
| text-transform: uppercase; | |
| letter-spacing: 0.05em; | |
| color: var(--text-muted); | |
| min-width: 60px; | |
| flex-shrink: 0; | |
| padding-top: 2px; | |
| } | |
| .ae-value { | |
| font-size: 0.875rem; | |
| color: var(--text-color); | |
| line-height: 1.6; | |
| } | |
| .ae-cosine { | |
| font-weight: 700; | |
| font-size: 11pt; | |
| &.cosine-excellent { color: #16a34a; } | |
| &.cosine-good { color: #2563eb; } | |
| &.cosine-fair { color: #d97706; } | |
| &.cosine-low { color: #dc2626; } | |
| } | |
| .ae-error { | |
| font-size: 0.75rem; | |
| color: #dc2626; | |
| padding: 0.5rem 0; | |
| } | |
| // 保持在本文件末尾;说明见 responsive.narrow-ios-form-font | |
| @include ios-form-font.apply; | |