| |
| @use 'app-pages'; |
| @use "attribution-inspector"; |
| @use "chat-input-panel"; |
| @use "generation-status"; |
| @use "lmf-readout" as lmf; |
| @use '../base/narrow-ios-form-font-tail' as ios-form-font; |
|
|
| $gen-attr-option-row-gap: 12px; |
| $gen-attr-cached-demos-panel-width: 21em; |
|
|
| |
| .chat-cached-history-bar.chat-cached-history-bar--dual { |
| position: relative; |
| display: flex; |
| flex-direction: row; |
| flex-wrap: wrap; |
| justify-content: flex-end; |
| align-items: center; |
| gap: 8px 16px; |
| width: 100%; |
| box-sizing: border-box; |
| } |
|
|
| .chat-cached-history-bar--dual .chat-prompt-history-wrapper { |
| width: auto; |
| max-width: none; |
| flex: 0 0 auto; |
| } |
|
|
| |
| .chat-cached-history-bar--dual .gen-attr-cached-demos-wrap { |
| flex-direction: row; |
| align-items: center; |
| gap: 6px; |
| } |
|
|
| .gen-attr-cached-demos-picker { |
| position: relative; |
| width: $gen-attr-cached-demos-panel-width; |
| max-width: min(100vw - 32px, 40rem); |
| font-size: var(--font-size-base); |
| flex-shrink: 0; |
| } |
|
|
| #gen_attr_cached_demos_value_btn.gen-attr-cached-demos-value-btn { |
| display: inline-flex; |
| align-items: center; |
| gap: 6px; |
| width: 100%; |
| max-width: none; |
| padding: 4px 8px; |
| font-size: inherit; |
| line-height: 1; |
| font-family: inherit; |
| border: 1px solid var(--input-border); |
| border-radius: 4px; |
| background: var(--input-bg); |
| color: var(--text-color); |
| cursor: pointer; |
| box-sizing: border-box; |
| text-align: left; |
| } |
|
|
| .gen-attr-cached-demos-value { |
| flex: 1; |
| min-width: 0; |
| height: 1em; |
| line-height: 1; |
| overflow: hidden; |
| text-overflow: ellipsis; |
| white-space: nowrap; |
| text-align: left; |
| } |
|
|
| .gen-attr-cached-demos-chevron { |
| flex-shrink: 0; |
| font-size: inherit; |
| line-height: 1; |
| color: var(--text-muted); |
| } |
|
|
| |
| .chat-cached-history-bar--dual .gen-attr-cached-history-wrap { |
| position: static; |
| flex-direction: row; |
| align-items: center; |
| } |
|
|
| |
| #gen_attr_cached_history_dropdown.semantic-search-history-dropdown, |
| #gen_attr_cached_demos_dropdown.semantic-search-history-dropdown { |
| max-height: min(32vh, 360px); |
| resize: vertical; |
| overflow-y: auto; |
| } |
|
|
| |
| .gen-attr-cached-demos-picker #gen_attr_cached_demos_dropdown.semantic-search-history-dropdown { |
| left: 0; |
| right: 0; |
| width: 100%; |
| min-width: 0; |
| max-width: none; |
| box-sizing: border-box; |
| } |
|
|
| |
| .gen-attribute-page { |
| |
| #results.gen-attr-results-surface.LMF { |
| display: flex; |
| flex-direction: column; |
| flex: 1 1 auto; |
| min-height: 0; |
| width: 100%; |
| box-sizing: border-box; |
| padding: 6px; |
| background: var(--text-area-bg); |
| color: var(--text-color); |
| overflow: visible; |
| } |
|
|
| |
| |
| |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-stack { |
| |
| --gen-attr-dag-display-scale: var(--gen-attr-dag-compactness, 0.5); |
| --gen-attr-dag-node-text-font-scale: 0.9; |
| --gen-attr-dag-link-stroke-width: calc(2px * var(--gen-attr-dag-compactness)); |
| |
| |
| --gen-attr-dag-prompt-node-fill: rgba(0, 255, 225, 0.28); |
| |
| --gen-attr-dag-generated-node-fill: rgba(255, 165, 0, 0.28); |
| position: relative; |
| |
| flex: 1 1 0%; |
| min-height: 280px; |
| overflow: hidden; |
| width: 100%; |
| box-sizing: border-box; |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF > .tooltip.gen-attr-dag-topk-tooltip { |
| box-sizing: border-box; |
| |
| transition-property: background-color, color; |
| max-width: none; |
| width: 14rem; |
| height: 300px; |
| display: flex; |
| flex-direction: column; |
| overflow: hidden; |
|
|
| .currentToken, |
| .myDetail { |
| flex-shrink: 0; |
| } |
|
|
| .gen-attr-dag-topk-tooltip-predictions-scroll { |
| flex: 1 1 auto; |
| min-height: 0; |
| margin-top: 6px; |
| overflow: hidden; |
| } |
| } |
|
|
| |
| |
| #results.gen-attr-results-surface.LMF.gen-attr-dag-hide-inactive-edges .gen-attr-dag-svg .gen-attr-dag-links { |
| display: none; |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg .gen-attr-dag-node-text { |
| font-size: calc( |
| 1em * var(--gen-attr-dag-display-scale, 1) * |
| var(--gen-attr-dag-node-text-font-scale, 0.9) * var(--gen-attr-dag-node-ci-visual-scale, 1) |
| ); |
| font-family: inherit; |
| font-weight: inherit; |
| fill: var(--text-color, #222); |
| |
| white-space: pre; |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg .gen-attr-dag-nodes .gen-attr-dag-node { |
| pointer-events: none; |
| } |
|
|
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg .gen-attr-dag-node-hit-target { |
| fill: transparent; |
| stroke: none; |
| pointer-events: all; |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg .gen-attr-dag-node { |
| .gen-attr-dag-node-stroke { |
| fill: none; |
| stroke: none; |
| stroke-width: 0; |
| pointer-events: none; |
| } |
|
|
| .gen-attr-dag-node-fill { |
| stroke: none; |
| fill: var(--gen-attr-dag-generated-node-fill); |
| } |
|
|
| &--prompt .gen-attr-dag-node-fill { |
| fill: var(--gen-attr-dag-prompt-node-fill); |
| } |
|
|
| |
| &--recursive-chain .gen-attr-dag-node-stroke { |
| stroke: var(--dag-highlight-line-color-in); |
| stroke-width: calc(2 * var(--gen-attr-dag-display-scale, 1)); |
| stroke-opacity: var(--gen-attr-dag-node-recursive-share, 1); |
| } |
|
|
| |
| &--recursive-chain.gen-attr-dag-node--backward-slide .gen-attr-dag-node-stroke { |
| stroke: var(--dag-highlight-line-color-out); |
| } |
|
|
| |
| &--hover .gen-attr-dag-node-stroke, |
| &--selected .gen-attr-dag-node-stroke { |
| stroke: var(--dag-highlight-line-color-in); |
| stroke-width: calc(2 * var(--gen-attr-dag-display-scale, 1)); |
| stroke-opacity: 1; |
| } |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg .gen-attr-dag-node--selected, |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg .gen-attr-dag-node-hit.gen-attr-dag-node--selected { |
| cursor: grab; |
| &:active { |
| cursor: grabbing; |
| } |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF |
| .gen-attr-dag-stack.gen-attr-dag-no-node-drag-layout |
| .gen-attr-dag-svg |
| .gen-attr-dag-node--selected, |
| #results.gen-attr-results-surface.LMF |
| .gen-attr-dag-stack.gen-attr-dag-no-node-drag-layout |
| .gen-attr-dag-svg |
| .gen-attr-dag-node-hit.gen-attr-dag-node--selected { |
| cursor: default; |
| &:active { |
| cursor: default; |
| } |
| } |
|
|
| |
| |
| |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-measure-layer { |
| @include lmf.lmf-readout-text; |
| visibility: hidden; |
| pointer-events: none; |
| width: 100%; |
| box-sizing: border-box; |
| } |
|
|
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg { |
| position: absolute; |
| left: 0; |
| top: 0; |
| width: 100%; |
| height: 100%; |
| min-height: 280px; |
| display: block; |
| touch-action: none; |
| z-index: 1; |
| |
| font-size: inherit; |
| user-select: none; |
| -webkit-user-select: none; |
| } |
|
|
| |
| $_dag-narrow-stack-min: max(300px, min(60dvh, 680px)); |
| $_dag-narrow-stack-max-h: 80dvh; |
| $_results-not-fs: ':not(:fullscreen):not(.css-pseudo-fullscreen-target)'; |
|
|
| @media (max-width: 767px) { |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-stack, |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg { |
| min-height: min($_dag-narrow-stack-min, $_dag-narrow-stack-max-h); |
| } |
|
|
| #results.gen-attr-results-surface.LMF#{$_results-not-fs} .gen-attr-dag-stack { |
| flex-shrink: 0; |
| max-height: $_dag-narrow-stack-max-h; |
| } |
| } |
|
|
| @at-root html[data-force-narrow]:has(.main_frame) body#{&} { |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-stack, |
| #results.gen-attr-results-surface.LMF .gen-attr-dag-svg { |
| min-height: min($_dag-narrow-stack-min, $_dag-narrow-stack-max-h); |
| } |
|
|
| #results.gen-attr-results-surface.LMF#{$_results-not-fs} .gen-attr-dag-stack { |
| flex-shrink: 0; |
| max-height: $_dag-narrow-stack-max-h; |
| } |
| } |
|
|
| |
| |
| #results.gen-attr-results-surface.LMF > button.gen-attr-dag-play, |
| #results.gen-attr-results-surface.LMF > button.gen-attr-dag-refresh, |
| #results.gen-attr-results-surface.LMF > button.gen-attr-dag-fullscreen { |
| position: absolute; |
| top: 12px; |
| z-index: 2; |
| font-family: var(--font-icon); |
| font-size: var(--font-icon-size); |
| line-height: 1; |
| user-select: none; |
| -webkit-user-select: none; |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF > button.gen-attr-dag-fullscreen { |
| right: 12px; |
| } |
|
|
| #results.gen-attr-results-surface.LMF > button.gen-attr-dag-refresh { |
| right: 48px; |
| } |
|
|
| #results.gen-attr-results-surface.LMF > button.gen-attr-dag-play { |
| right: 84px; |
| } |
|
|
| |
| @keyframes gen-attr-dag-propagation-play-hint { |
| 0%, |
| 100% { |
| color: var(--refresh-btn-color); |
| } |
|
|
| 50% { |
| color: var(--accent-color); |
| } |
| } |
|
|
| #results.gen-attr-results-surface.LMF |
| > button.gen-attr-dag-play.gen-attr-dag-play--propagation-hint:not(:disabled) { |
| animation: gen-attr-dag-propagation-play-hint 1.6s ease-in-out infinite; |
| } |
|
|
| @media (prefers-reduced-motion: reduce) { |
| #results.gen-attr-results-surface.LMF |
| > button.gen-attr-dag-play.gen-attr-dag-play--propagation-hint { |
| animation: none; |
| } |
| } |
|
|
| |
| #results.gen-attr-results-surface.LMF:fullscreen, |
| #results.gen-attr-results-surface.LMF.css-pseudo-fullscreen-target { |
| width: 100vw; |
| height: 100vh; |
| padding: 6px; |
| background: var(--text-area-bg); |
| color: var(--text-color); |
| overflow: auto; |
| box-sizing: border-box; |
| } |
|
|
| #results.gen-attr-results-surface.LMF.css-pseudo-fullscreen-target { |
| position: fixed; |
| left: 0; |
| top: 0; |
| right: 0; |
| bottom: 0; |
| z-index: 9000; |
| } |
| } |
|
|
| :root[data-theme="dark"] .gen-attribute-page #results.gen-attr-results-surface.LMF:fullscreen, |
| :root[data-theme="dark"] .gen-attribute-page #results.gen-attr-results-surface.LMF.css-pseudo-fullscreen-target { |
| background: var(--gen-attr-dag-canvas-bg); |
| } |
|
|
| |
| :root[data-theme="dark"] .gen-attribute-page #results.gen-attr-results-surface.LMF { |
| --gen-attr-dag-canvas-bg: #101010; |
| background: var(--gen-attr-dag-canvas-bg); |
| } |
|
|
| :root[data-theme="dark"] .gen-attribute-page #results.gen-attr-results-surface.LMF .gen-attr-dag-stack { |
| background: var(--gen-attr-dag-canvas-bg); |
| |
| } |
|
|
| |
| .text-metrics-chat #gen_attr_metric_usage .text-metrics-api-usage { |
| font-size: inherit; |
| line-height: inherit; |
| opacity: 1; |
| } |
|
|
| |
| .gen-attr-dag-measure-width-input { |
| box-sizing: border-box; |
| flex: 0 0 auto; |
| min-width: 0; |
| block-size: var(--semantic-submode-control-block-size, auto); |
| padding: 3px 6px; |
| line-height: 1.2; |
| font-size: inherit; |
| border: 1px solid var(--input-border); |
| border-radius: 4px; |
| background: var(--input-bg); |
| color: var(--text-color); |
| text-align: right; |
| |
| inline-size: 4rem; |
| max-inline-size: 100%; |
| } |
|
|
| |
|
|
| |
| .input-section .textarea-wrapper textarea#gen_attr_system_text { |
| height: 50px; |
| } |
|
|
| |
| .input-section .textarea-wrapper textarea#gen_attr_raw_text, |
| .input-section .textarea-wrapper textarea#gen_attr_user_text, |
| .input-section .textarea-wrapper textarea#gen_attr_teacher_forcing_text { |
| height: 90px; |
| min-height: 60px; |
| max-height: 250px; |
| } |
|
|
| body.gen-attribute-page .input-section .textarea-wrapper.chat-prompt-actions-row > .chat-completion-options-row.semantic-submode-row { |
| gap: $gen-attr-option-row-gap; |
| } |
|
|
| |
| .attribution-exclude-prompt-patterns-row { |
| margin-top: 10px; |
| display: flex; |
| flex-direction: column; |
| gap: 4px; |
|
|
| |
| &:has(.gen-attr-teacher-forcing-toggle-row) { |
| gap: 0; |
| } |
| } |
|
|
| |
| .gen-attr-teacher-forcing-toggle-row label.semantic-submode-label, |
| #gen_attr_teacher_forcing_block.chat-prompt-panel .gen-attr-stop-after-tf-row label.semantic-submode-label { |
| display: inline-flex; |
| align-items: center; |
| gap: 6px; |
| cursor: pointer; |
| user-select: none; |
| } |
|
|
| |
| #gen_attr_teacher_forcing_block.chat-prompt-panel .gen-attr-stop-after-tf-row { |
| margin-top: 8px; |
| } |
|
|
| .gen-attribute-page .input-section > .textarea-wrapper.chat-prompt-actions-row { |
| margin-top: 10px; |
| } |
|
|
| |
| .gen-attribute-page .input-section > .textarea-wrapper.chat-prompt-actions-row + .gen-attr-reset-ui-options-row { |
| margin-top: 30px; |
| } |
|
|
| .gen-attr-reset-ui-options-row { |
| display: flex; |
| flex-wrap: wrap; |
| align-items: center; |
| justify-content: flex-end; |
| } |
|
|
| .gen-attr-reset-ui-options-row + .gen-attr-dag-measure-width-row { |
| margin-top: 10px; |
| } |
|
|
| .attribution-exclude-prompt-patterns-header { |
| flex-wrap: wrap; |
|
|
| &:not(:has(#gen_attr_exclude_prompt_patterns_enable:checked)) .semantic-submode-label { |
| color: var(--text-muted); |
| } |
|
|
| &:has(#gen_attr_exclude_prompt_patterns_enable:checked) .semantic-submode-label { |
| color: var(--text-primary); |
| } |
| } |
|
|
| .attribution-exclude-generated-patterns-header { |
| flex-wrap: wrap; |
|
|
| &:not(:has(#gen_attr_exclude_generated_patterns_enable:checked)) .semantic-submode-label { |
| color: var(--text-muted); |
| } |
|
|
| &:has(#gen_attr_exclude_generated_patterns_enable:checked) .semantic-submode-label { |
| color: var(--text-primary); |
| } |
| } |
|
|
| |
| .gen-attr-dag-measure-width-row { |
| margin-top: 8px; |
| flex-wrap: wrap; |
|
|
| &.semantic-submode-row { |
| gap: $gen-attr-option-row-gap; |
| } |
| } |
|
|
| |
| .gen-attr-causal-flow-mode-label { |
| display: inline-flex; |
| align-items: center; |
| gap: 4px; |
| } |
|
|
| .gen-attr-causal-flow-mode-icon { |
| font-family: var(--font-icon); |
| font-size: 1.5em; |
| line-height: 1; |
| flex-shrink: 0; |
| } |
|
|
| |
| .gen-attr-dag-measure-width-row.gen-attr-dag-surprisal-toggles-row { |
| flex-wrap: nowrap; |
| } |
|
|
| .gen-attr-dag-replay-speed-row { |
| display: flex; |
| flex-wrap: wrap; |
| align-items: center; |
| gap: 6px 10px; |
| } |
|
|
| |
| .semantic-submode-row select.gen-attr-dag-layout-mode-select, |
| .semantic-submode-row select.gen-attr-dag-replay-mode-select { |
| width: fit-content; |
| min-width: unset; |
| max-width: none; |
| text-align: left; |
| } |
|
|
| .gen-attr-dag-replay-value-wrap { |
| align-items: center; |
| gap: 4px; |
|
|
| |
| &:not([hidden]) { |
| display: inline-flex; |
| } |
| } |
|
|
| .attribution-exclude-prompt-patterns-input { |
| width: 100%; |
| box-sizing: border-box; |
| padding: 6px 8px; |
| border: 1px solid var(--input-border); |
| border-radius: 4px; |
| background: var(--input-bg); |
| color: var(--text-color); |
|
|
| &:disabled { |
| opacity: 0.55; |
| cursor: not-allowed; |
| } |
| } |
|
|
| |
| body.css-pseudo-fullscreen-body-lock { |
| overflow: hidden; |
| } |
|
|
| |
| @include ios-form-font.apply; |
|
|