| 1 | /* Chat History */ |
| 2 | #chat-history { |
| 3 | background-color: transparent; |
| 4 | position: relative; |
| 5 | display: -webkit-flex; |
| 6 | display: flex; |
| 7 | flex-direction: column; |
| 8 | flex-grow: 1; |
| 9 | width: 100%; |
| 10 | overflow-y: scroll; |
| 11 | overflow-x: hidden; |
| 12 | overflow-anchor: none; |
| 13 | scroll-behavior: auto !important; /* avoid infinite scrolling! */ |
| 14 | padding-left: var(--spacing-sm) !important; |
| 15 | padding-right: var(--spacing-md) !important; |
| 16 | padding-top: 4rem !important; |
| 17 | padding-bottom: 4rem !important; |
| 18 | -webkit-transition: all 0.3s ease; |
| 19 | transition: all 0.3s ease; |
| 20 | } |
| 21 | |
| 22 | #chat-history.message-window-staging, |
| 23 | #chat-history.message-window-staging * { |
| 24 | animation: none !important; |
| 25 | transition: none !important; |
| 26 | } |
| 27 | |
| 28 | .message-window-loader { |
| 29 | align-self: center; |
| 30 | flex: 0 0 auto; |
| 31 | display: flex; |
| 32 | justify-content: center; |
| 33 | margin: var(--spacing-sm) auto; |
| 34 | min-height: 2rem; |
| 35 | pointer-events: none; |
| 36 | } |
| 37 | |
| 38 | .chat-loading-splash { |
| 39 | position: absolute; |
| 40 | inset: 0; |
| 41 | z-index: 110; |
| 42 | align-items: center; |
| 43 | margin: 0; |
| 44 | min-height: 0; |
| 45 | background: var(--color-chat-background); |
| 46 | } |
| 47 | |
| 48 | .chat-loading-splash[hidden] { |
| 49 | display: none; |
| 50 | } |
| 51 | |
| 52 | .chat-loading-splash:not([hidden]) { |
| 53 | animation: chat-loading-splash-fade-in 180ms ease-out both; |
| 54 | } |
| 55 | |
| 56 | @keyframes chat-loading-splash-fade-in { |
| 57 | from { |
| 58 | opacity: 0; |
| 59 | } |
| 60 | to { |
| 61 | opacity: 1; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | @media (prefers-reduced-motion: reduce) { |
| 66 | .chat-loading-splash:not([hidden]) { |
| 67 | animation: none; |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | /* Message Styles */ |
| 72 | |
| 73 | .user-container { |
| 74 | display: flex; |
| 75 | justify-content: flex-end; |
| 76 | position: relative; |
| 77 | width: 100%; |
| 78 | padding-left: 20%; |
| 79 | } |
| 80 | |
| 81 | .ai-container { |
| 82 | align-self: flex-start; |
| 83 | } |
| 84 | |
| 85 | .center-container { |
| 86 | align-self: center; |
| 87 | max-width: 80%; |
| 88 | margin: 0; |
| 89 | } |
| 90 | |
| 91 | .message.message-user { |
| 92 | text-align: end; |
| 93 | /* margin-bottom: var(--spacing-md); */ |
| 94 | width: 100%; |
| 95 | margin-bottom: -2.5rem; /* compensate for action buttons */ |
| 96 | } |
| 97 | |
| 98 | .message-user .message-user-heading { |
| 99 | margin-top: var(--spacing-sm); |
| 100 | font-size: var(--font-size-smaller); |
| 101 | color: var(--color-text-muted); |
| 102 | } |
| 103 | |
| 104 | .message-user .message-text { |
| 105 | display: inline-block; |
| 106 | padding: var(--spacing-sm); |
| 107 | border: 1px solid var(--color-border); |
| 108 | border-radius: var(--border-radius); |
| 109 | max-width: 80%; |
| 110 | width: auto; |
| 111 | } |
| 112 | |
| 113 | .message-user > div { |
| 114 | /* padding-top: var(--spacing-xs); */ |
| 115 | /* font-family: "Roboto Mono", monospace; */ |
| 116 | font-optical-sizing: auto; |
| 117 | -webkit-font-optical-sizing: auto; |
| 118 | font-size: var(--font-size-smaller); |
| 119 | } |
| 120 | |
| 121 | .message-user .message-text { |
| 122 | text-align: start; |
| 123 | font-family: var(--font-family-main); |
| 124 | } |
| 125 | |
| 126 | .message-user .message-text pre { |
| 127 | font-family: var(--font-family-main); |
| 128 | font-weight: 200; |
| 129 | font-size: larger; |
| 130 | /* color: azure; */ |
| 131 | color: var(--color-text); |
| 132 | } |
| 133 | |
| 134 | /* .light-mode .message-user .message-text pre { |
| 135 | color: #2e2e2e; |
| 136 | } */ |
| 137 | |
| 138 | .message-center { |
| 139 | align-self: center; |
| 140 | /* border-bottom-left-radius: unset; */ |
| 141 | } |
| 142 | |
| 143 | .message-followup .message { |
| 144 | border-radius: 0; |
| 145 | /* border-top-left-radius: var(--spacing-xxs); */ |
| 146 | } |
| 147 | |
| 148 | .message-followup + .message-followup { |
| 149 | margin-bottom: 0; |
| 150 | } |
| 151 | |
| 152 | /* Update message types for dark mode */ |
| 153 | .message-default, |
| 154 | .message-agent, |
| 155 | .message-agent-response, |
| 156 | .message-agent-delegation, |
| 157 | .message-tool, |
| 158 | .message-code-exe, |
| 159 | .message-browser, |
| 160 | .message-info, |
| 161 | .message-util, |
| 162 | .message-warning { |
| 163 | color: #e0e0e0; |
| 164 | background-color: transparent; |
| 165 | border-radius: 0; |
| 166 | box-shadow: none; |
| 167 | } |
| 168 | |
| 169 | .message-default { |
| 170 | background-color: transparent; |
| 171 | } |
| 172 | |
| 173 | .message-agent { |
| 174 | background-color: transparent; |
| 175 | } |
| 176 | |
| 177 | .message-agent-response { |
| 178 | min-width: 255px; |
| 179 | background-color: transparent; |
| 180 | opacity: 0.85; |
| 181 | } |
| 182 | |
| 183 | .message-agent-delegation { |
| 184 | background-color: transparent; |
| 185 | } |
| 186 | |
| 187 | .message-tool { |
| 188 | background-color: transparent; |
| 189 | } |
| 190 | |
| 191 | .message-code-exe { |
| 192 | background-color: transparent; |
| 193 | } |
| 194 | |
| 195 | /* Terminal-style code execution block */ |
| 196 | .message-code-exe .message-body { |
| 197 | background: #0d1117; |
| 198 | border: 1px solid rgba(48, 54, 61, 0.8); |
| 199 | border-radius: 6px; |
| 200 | padding: 0; |
| 201 | margin-top: 0.5em; |
| 202 | overflow: hidden; |
| 203 | } |
| 204 | |
| 205 | .message-code-exe .msg-heading { |
| 206 | background: linear-gradient(180deg, #21262d 0%, #161b22 100%); |
| 207 | padding: 6px 12px; |
| 208 | border-bottom: 1px solid rgba(48, 54, 61, 0.8); |
| 209 | display: flex; |
| 210 | align-items: center; |
| 211 | gap: 8px; |
| 212 | } |
| 213 | |
| 214 | .message-code-exe .msg-heading h4 { |
| 215 | font-family: var(--font-family-code); |
| 216 | font-size: 0.75rem; |
| 217 | color: #8b949e; |
| 218 | margin: 0; |
| 219 | display: flex; |
| 220 | align-items: center; |
| 221 | gap: 6px; |
| 222 | } |
| 223 | |
| 224 | .message-code-exe .msg-heading h4::before { |
| 225 | content: "$"; |
| 226 | color: #7ee787; |
| 227 | font-weight: 600; |
| 228 | } |
| 229 | |
| 230 | .message-code-exe .msg-content { |
| 231 | padding: 12px; |
| 232 | font-family: var(--font-family-code); |
| 233 | font-size: 0.72rem; |
| 234 | color: #c9d1d9; |
| 235 | line-height: 1.5; |
| 236 | max-height: 300px; |
| 237 | overflow-y: auto; |
| 238 | } |
| 239 | |
| 240 | .message-code-exe .msg-content pre { |
| 241 | margin: 0; |
| 242 | white-space: pre-wrap; |
| 243 | word-break: break-word; |
| 244 | } |
| 245 | |
| 246 | /* Light mode terminal */ |
| 247 | .light-mode .message-code-exe .message-body { |
| 248 | background: #f6f8fa; |
| 249 | border-color: #d0d7de; |
| 250 | } |
| 251 | |
| 252 | .light-mode .message-code-exe .msg-heading { |
| 253 | background: linear-gradient(180deg, #f6f8fa 0%, #eaeef2 100%); |
| 254 | border-bottom-color: #d0d7de; |
| 255 | } |
| 256 | |
| 257 | .light-mode .message-code-exe .msg-heading h4 { |
| 258 | color: #57606a; |
| 259 | } |
| 260 | |
| 261 | .light-mode .message-code-exe .msg-heading h4::before { |
| 262 | color: #1a7f37; |
| 263 | } |
| 264 | |
| 265 | .light-mode .message-code-exe .msg-content { |
| 266 | color: #24292f; |
| 267 | } |
| 268 | |
| 269 | .message-body .markdown-block-wrap { |
| 270 | margin: 1em 0; |
| 271 | } |
| 272 | |
| 273 | .message-body .message-markdown-table-wrap { |
| 274 | display: block; |
| 275 | width: 100%; |
| 276 | overflow-x: auto; |
| 277 | /* padding-bottom: 1em; */ |
| 278 | } |
| 279 | |
| 280 | .message-body .message-markdown-table-wrap table { |
| 281 | width: auto; |
| 282 | table-layout: auto; |
| 283 | white-space: nowrap; |
| 284 | } |
| 285 | |
| 286 | .message-body .code-block-wrapper{ |
| 287 | max-width: 100%; |
| 288 | overflow-x: auto; |
| 289 | padding: 0.5em; |
| 290 | border: 1px solid var(--color-border); |
| 291 | border-radius: var(--border-radius-sm); |
| 292 | } |
| 293 | |
| 294 | .message-body .code-block-wrapper pre{ |
| 295 | max-width: 100%; |
| 296 | } |
| 297 | |
| 298 | /* .message-body code { |
| 299 | white-space: break-spaces; |
| 300 | } */ |
| 301 | |
| 302 | /* Light mode code-exe styling moved to main terminal block above */ |
| 303 | |
| 304 | .message-browser { |
| 305 | background-color: transparent; |
| 306 | } |
| 307 | |
| 308 | .message-info { |
| 309 | background-color: transparent; |
| 310 | } |
| 311 | |
| 312 | .message-util { |
| 313 | background-color: transparent; |
| 314 | } |
| 315 | |
| 316 | .message-warning { |
| 317 | background-color: transparent; |
| 318 | } |
| 319 | |
| 320 | /* Error messages styled like process groups */ |
| 321 | .message-error .msg-heading { |
| 322 | display: flex; |
| 323 | align-items: center; |
| 324 | gap: 6px; |
| 325 | margin-bottom: var(--spacing-xs); |
| 326 | } |
| 327 | |
| 328 | .message-error .msg-heading h4 { |
| 329 | display: flex; |
| 330 | align-items: center; |
| 331 | font-size: var(--font-size-medium); |
| 332 | font-weight: 500; |
| 333 | color: var(--color-error-text); |
| 334 | opacity: 0.9; |
| 335 | margin-bottom: var(--spacing-sm); |
| 336 | } |
| 337 | |
| 338 | /* Warning messages styled like process groups */ |
| 339 | .message-warning .msg-heading { |
| 340 | display: flex; |
| 341 | align-items: center; |
| 342 | gap: 6px; |
| 343 | margin-bottom: var(--spacing-xs); |
| 344 | } |
| 345 | |
| 346 | .message-warning .msg-heading h4 { |
| 347 | display: flex; |
| 348 | align-items: center; |
| 349 | font-size: var(--font-size-medium); |
| 350 | font-weight: 500; |
| 351 | color: var(--color-warning-text); |
| 352 | opacity: 0.9; |
| 353 | margin-bottom: var(--spacing-sm); |
| 354 | } |
| 355 | |
| 356 | /* Terminal styling moved to new terminal block above */ |
| 357 | |
| 358 | /* Agent and AI Info */ |
| 359 | .agent-start { |
| 360 | color: var(--color-text); |
| 361 | font-size: var(--font-size-small); |
| 362 | margin-bottom: var(--spacing-xs); |
| 363 | opacity: 0.7; |
| 364 | } |
| 365 | |
| 366 | .msg-kvps { |
| 367 | font-size: 0.9em; |
| 368 | margin: 0.5rem 0 0.55rem 0; |
| 369 | border-collapse: collapse; |
| 370 | width: 100%; |
| 371 | } |
| 372 | |
| 373 | .kvps-val { |
| 374 | font-size: 0.75rem; |
| 375 | } |
| 376 | |
| 377 | .kvps-val p { |
| 378 | margin: 0; |
| 379 | } |
| 380 | |
| 381 | .kvps-val pre { |
| 382 | white-space: pre-wrap; /* keep \n, collapse no spaces, allow wrapping */ |
| 383 | word-break: break-word; /* optional – forces really long “words” to break */ |
| 384 | font-family: var(--font-family-code); |
| 385 | font-optical-sizing: auto; |
| 386 | -webkit-font-optical-sizing: auto; |
| 387 | } |
| 388 | |
| 389 | .msg-kvps th, |
| 390 | .msg-kvps td { |
| 391 | align-content: start; |
| 392 | padding: 0.25rem; |
| 393 | padding-left: 0; |
| 394 | /* text-align: left; */ |
| 395 | } |
| 396 | |
| 397 | .msg-kvps th { |
| 398 | color: var(--color-primary); |
| 399 | width: 40%; |
| 400 | } |
| 401 | |
| 402 | .msg-kvps tr { |
| 403 | border-bottom: none; |
| 404 | } |
| 405 | |
| 406 | .msg-heading { |
| 407 | margin: 0; |
| 408 | position: relative; |
| 409 | display: block; |
| 410 | white-space: nowrap; |
| 411 | } |
| 412 | |
| 413 | .msg-heading h4 { |
| 414 | margin: 0; |
| 415 | /* width: calc(100% - 4em); */ |
| 416 | margin-right: 4em; |
| 417 | overflow: hidden; |
| 418 | text-overflow: ellipsis; |
| 419 | } |
| 420 | |
| 421 | /* Message Actions */ |
| 422 | .message-actions { |
| 423 | color: var(--color-text); |
| 424 | font-size: var(--font-size-small); |
| 425 | margin-top: var(--spacing-xs); |
| 426 | } |
| 427 | |
| 428 | .message-action { |
| 429 | cursor: pointer; |
| 430 | opacity: 0.7; |
| 431 | -webkit-transition: opacity var(--transition-speed) ease-in-out; |
| 432 | transition: opacity var(--transition-speed) ease-in-out; |
| 433 | } |
| 434 | |
| 435 | .message-action:hover { |
| 436 | opacity: 1; |
| 437 | } |
| 438 | |
| 439 | /* Make message containers relative for absolute positioning of copy buttons */ |
| 440 | .msg-content, |
| 441 | .kvps-row, |
| 442 | .message-text { |
| 443 | position: relative; |
| 444 | } |
| 445 | |
| 446 | .message-text pre { |
| 447 | margin: 0; |
| 448 | white-space: pre-wrap; |
| 449 | word-break: break-word; |
| 450 | overflow-wrap: anywhere; |
| 451 | } |
| 452 | |
| 453 | /* Utility Classes */ |
| 454 | .kvps-key { |
| 455 | font-weight: 500; |
| 456 | font-size: var(--font-size-xs); |
| 457 | /* min-width: 7em; */ |
| 458 | width: 5em; |
| 459 | text-align: right; |
| 460 | } |
| 461 | |
| 462 | .kvps-key .material-symbols-outlined { |
| 463 | font-size: var(--font-size-smaller); |
| 464 | } |
| 465 | |
| 466 | .kvps-val { |
| 467 | /* margin: 0.65rem 0 0.65rem 0.4rem; */ |
| 468 | white-space: pre-wrap; |
| 469 | font-size: var(--font-size-xs); |
| 470 | } |
| 471 | |
| 472 | .kvps-img { |
| 473 | width: 8em; |
| 474 | height: 8em; |
| 475 | object-fit: cover; |
| 476 | object-position: top left; |
| 477 | border-radius: 10%; |
| 478 | border: 1px solid rgba(255, 255, 255, 0.15); |
| 479 | } |
| 480 | |
| 481 | .image-viewer-img { |
| 482 | width: 100%; |
| 483 | } |
| 484 | |
| 485 | .msg-content { |
| 486 | width: 100%; |
| 487 | margin-bottom: 0; |
| 488 | padding: 0; |
| 489 | overflow: hidden; |
| 490 | } |
| 491 | |
| 492 | .document-response-file-cards { |
| 493 | display: flex; |
| 494 | flex-direction: column; |
| 495 | gap: var(--spacing-xs); |
| 496 | margin: var(--spacing-sm) 0 0; |
| 497 | width: min(100%, 34rem); |
| 498 | } |
| 499 | |
| 500 | .document-file-card { |
| 501 | display: grid; |
| 502 | grid-template-columns: auto minmax(0, 1fr) auto; |
| 503 | align-items: center; |
| 504 | gap: var(--spacing-sm); |
| 505 | width: min(100%, 34rem); |
| 506 | min-height: 3.25rem; |
| 507 | padding: var(--spacing-sm); |
| 508 | box-sizing: border-box; |
| 509 | border: 1px solid var(--color-border); |
| 510 | border-radius: 8px; |
| 511 | background: rgba(255, 255, 255, 0.035); |
| 512 | color: var(--color-text); |
| 513 | cursor: pointer; |
| 514 | text-align: left; |
| 515 | transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease; |
| 516 | } |
| 517 | |
| 518 | .document-file-card:hover, |
| 519 | .document-file-card:focus-visible { |
| 520 | border-color: var(--color-primary); |
| 521 | background: rgba(255, 255, 255, 0.06); |
| 522 | outline: none; |
| 523 | } |
| 524 | |
| 525 | .document-file-card:active { |
| 526 | transform: translateY(1px); |
| 527 | } |
| 528 | |
| 529 | .document-file-card[aria-disabled="true"] { |
| 530 | cursor: default; |
| 531 | opacity: 0.72; |
| 532 | } |
| 533 | |
| 534 | .document-file-card-icon { |
| 535 | display: inline-flex; |
| 536 | align-items: center; |
| 537 | justify-content: center; |
| 538 | width: 2rem; |
| 539 | height: 2rem; |
| 540 | border-radius: 8px; |
| 541 | background: rgba(255, 255, 255, 0.075); |
| 542 | color: var(--color-primary); |
| 543 | font-size: 1.2rem; |
| 544 | flex-shrink: 0; |
| 545 | } |
| 546 | |
| 547 | .document-file-card-meta { |
| 548 | display: flex; |
| 549 | min-width: 0; |
| 550 | flex-direction: column; |
| 551 | gap: 0.1rem; |
| 552 | } |
| 553 | |
| 554 | .document-file-card-name { |
| 555 | min-width: 0; |
| 556 | overflow: hidden; |
| 557 | color: var(--color-text); |
| 558 | font-size: var(--font-size-small); |
| 559 | font-weight: 600; |
| 560 | line-height: 1.25; |
| 561 | text-overflow: ellipsis; |
| 562 | white-space: nowrap; |
| 563 | } |
| 564 | |
| 565 | .document-file-card-path { |
| 566 | min-width: 0; |
| 567 | overflow: hidden; |
| 568 | color: var(--color-text-muted); |
| 569 | font-family: var(--font-family-code); |
| 570 | font-size: var(--font-size-xs); |
| 571 | line-height: 1.35; |
| 572 | text-overflow: ellipsis; |
| 573 | white-space: nowrap; |
| 574 | } |
| 575 | |
| 576 | .document-file-card-badge { |
| 577 | align-self: start; |
| 578 | padding: 0.15rem 0.35rem; |
| 579 | border: 1px solid var(--color-border); |
| 580 | border-radius: 6px; |
| 581 | color: var(--color-text-muted); |
| 582 | font-size: 0.62rem; |
| 583 | font-weight: 700; |
| 584 | letter-spacing: 0; |
| 585 | line-height: 1; |
| 586 | } |
| 587 | |
| 588 | .step-action-buttons .document-file-action { |
| 589 | padding: 2px; |
| 590 | border: 0; |
| 591 | border-radius: 4px; |
| 592 | color: var(--color-message-text); |
| 593 | line-height: 1; |
| 594 | } |
| 595 | |
| 596 | .step-action-buttons .document-file-action:hover, |
| 597 | .step-action-buttons .document-file-action:focus-visible { |
| 598 | background: transparent; |
| 599 | color: var(--color-text); |
| 600 | outline: none; |
| 601 | } |
| 602 | |
| 603 | .step-action-buttons .document-file-action .material-symbols-outlined { |
| 604 | font-size: 0.9rem; |
| 605 | } |
| 606 | |
| 607 | .light-mode .document-file-card { |
| 608 | background: rgba(0, 0, 0, 0.025); |
| 609 | } |
| 610 | |
| 611 | .light-mode .document-file-card:hover, |
| 612 | .light-mode .document-file-card:focus-visible { |
| 613 | background: rgba(0, 0, 0, 0.045); |
| 614 | } |
| 615 | |
| 616 | .light-mode .document-file-card-icon { |
| 617 | background: rgba(0, 0, 0, 0.055); |
| 618 | } |
| 619 | |
| 620 | /* Math (KaTeX) */ |
| 621 | .katex { |
| 622 | line-height: 1.2 !important; |
| 623 | font-size: 1.1em; |
| 624 | } |
| 625 | |
| 626 | /* Media Queries */ |
| 627 | /* Chat width controlled by --chat-max-width CSS variable (set via preferences, default 55em) */ |
| 628 | @media (min-width: 1025px) { |
| 629 | #chat-history { |
| 630 | padding-left: max( |
| 631 | var(--spacing-sm), |
| 632 | calc((100% - var(--chat-max-width, 55em)) / 2) |
| 633 | ) !important; |
| 634 | padding-right: max( |
| 635 | var(--spacing-sm), |
| 636 | calc((100% - var(--chat-max-width, 55em)) / 2) |
| 637 | ) !important; |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | @media (max-width: 1024px) { |
| 642 | #chat-history { |
| 643 | padding-left: var(--spacing-sm) !important; |
| 644 | padding-right: var(--spacing-md) !important; |
| 645 | padding-top: 4rem !important; |
| 646 | padding-bottom: 3rem !important; |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | @media (max-width: 640px) { |
| 651 | /* New styles for mobile messages */ |
| 652 | |
| 653 | .message-followup { |
| 654 | /* margin-left: var(--spacing-md); */ |
| 655 | margin-bottom: var(--spacing-md); |
| 656 | } |
| 657 | |
| 658 | .msg-kvps { |
| 659 | display: flex; |
| 660 | flex-direction: column; |
| 661 | border-collapse: separate; |
| 662 | border-spacing: 0 0.5rem; |
| 663 | } |
| 664 | |
| 665 | .msg-kvps tr { |
| 666 | display: flex; |
| 667 | flex-direction: column; |
| 668 | margin-top: 0.3rem; |
| 669 | padding-bottom: 0; |
| 670 | } |
| 671 | |
| 672 | .msg-kvps th, |
| 673 | .msg-kvps td { |
| 674 | display: block; |
| 675 | width: 100%; |
| 676 | text-align: left; |
| 677 | border-bottom: none; |
| 678 | padding: 0.25rem 0; |
| 679 | padding-left: 0 !important; |
| 680 | } |
| 681 | |
| 682 | .msg-kvps th { |
| 683 | color: var(--color-primary); |
| 684 | margin-bottom: 0.25rem; |
| 685 | } |
| 686 | |
| 687 | .kvps-val { |
| 688 | margin: 0 0 0.4rem 0; |
| 689 | white-space: pre-wrap; |
| 690 | word-break: break-word; |
| 691 | overflow-wrap: anywhere; |
| 692 | } |
| 693 | |
| 694 | .document-file-card { |
| 695 | grid-template-columns: auto minmax(0, 1fr); |
| 696 | } |
| 697 | |
| 698 | .document-file-card-badge { |
| 699 | grid-column: 2; |
| 700 | justify-self: start; |
| 701 | } |
| 702 | |
| 703 | .step-action-buttons .document-file-action { |
| 704 | padding-inline: 2px; |
| 705 | } |
| 706 | } |
| 707 | |
| 708 | .light-mode .msg-kvps tr { |
| 709 | border-bottom: none; |
| 710 | } |
| 711 | |
| 712 | .light-mode .message-user { |
| 713 | color: #4e4e4e; |
| 714 | } |
| 715 | |
| 716 | /* Markdown in messages */ |
| 717 | .msg-content { |
| 718 | font-size: var(--font-size-small); |
| 719 | } |
| 720 | |
| 721 | .message-agent-response .msg-content { |
| 722 | font-size: var(--font-size-larger); |
| 723 | } |
| 724 | |
| 725 | .message-agent-response .msg-content img { |
| 726 | margin: var(--spacing-xs); |
| 727 | max-width: 30rem; |
| 728 | max-height: 15rem; |
| 729 | border-radius: var(--border-radius); |
| 730 | background: repeating-linear-gradient( |
| 731 | 45deg, |
| 732 | var(--color-panel) 0 10px, |
| 733 | var(--color-chat-background) 10px 20px |
| 734 | ); |
| 735 | } |
| 736 | |
| 737 | .message-agent-response .msg-content .message-markdown-image-wrap img:hover { |
| 738 | filter: brightness(1.02); |
| 739 | } |
| 740 | |
| 741 | .msg-content h1 { |
| 742 | font-size: 1.25em; |
| 743 | font-weight: 800; |
| 744 | margin-bottom: 0.2em; |
| 745 | } |
| 746 | |
| 747 | .msg-content h2 { |
| 748 | font-size: 1.2em; |
| 749 | font-weight: 700; |
| 750 | margin-bottom: 0.2em; |
| 751 | } |
| 752 | |
| 753 | .msg-content h3 { |
| 754 | font-size: 1.15em; |
| 755 | font-weight: 600; |
| 756 | margin-bottom: 0.2em; |
| 757 | } |
| 758 | |
| 759 | .msg-content h4 { |
| 760 | font-size: 1.1em; |
| 761 | font-weight: 500; |
| 762 | margin-bottom: 0.2em; |
| 763 | } |
| 764 | |
| 765 | .msg-content h5 { |
| 766 | font-size: 1.05em; |
| 767 | font-weight: 500; |
| 768 | margin-bottom: 0.2em; |
| 769 | } |
| 770 | |
| 771 | .msg-content h6 { |
| 772 | font-size: 1em; |
| 773 | font-weight: 500; |
| 774 | margin-bottom: 0.2em; |
| 775 | } |
| 776 | |
| 777 | .msg-content table { |
| 778 | width: 100%; |
| 779 | border-collapse: collapse; |
| 780 | font-size: 0.98em; |
| 781 | background: transparent; |
| 782 | border-radius: var(--border-radius-sm); |
| 783 | overflow: hidden; |
| 784 | } |
| 785 | |
| 786 | .msg-content th, |
| 787 | .msg-content td { |
| 788 | padding: 0.55em 1em; |
| 789 | border: 1px solid var(--color-border); |
| 790 | text-align: left; |
| 791 | background: transparent; |
| 792 | } |
| 793 | |
| 794 | .msg-content th { |
| 795 | font-weight: 600; |
| 796 | background: var(--color-table-row); |
| 797 | } |
| 798 | |
| 799 | .msg-content tr:nth-child(even) { |
| 800 | background: var(--color-table-row); |
| 801 | } |
| 802 | |
| 803 | .msg-content tr:nth-child(odd) { |
| 804 | background: transparent; |
| 805 | } |
| 806 | |
| 807 | .msg-content table { |
| 808 | box-shadow: none; |
| 809 | } |
| 810 | |
| 811 | /* .msg-content pre:has(code) { |
| 812 | padding: 0.5em; |
| 813 | border: 1px solid var(--color-border); |
| 814 | border-radius: var(--border-radius-sm); |
| 815 | } */ |
| 816 | |
| 817 | .msg-content hr { |
| 818 | border: 0; |
| 819 | border-top: 1px solid var(--color-border); |
| 820 | /* border-top-color: color-mix(in srgb, var(--color-text) 50%, transparent); */ |
| 821 | height: 0; |
| 822 | } |
| 823 | |
| 824 | .msg-min-max-btns { |
| 825 | opacity: 40%; |
| 826 | position: absolute; |
| 827 | top: -0.2em; |
| 828 | right: -0.2em; |
| 829 | display: flex; |
| 830 | gap: 0.3em; |
| 831 | z-index: 1; |
| 832 | } |
| 833 | |
| 834 | .message-group { |
| 835 | margin-top: 0.5em; |
| 836 | margin-bottom: 0.5em; |
| 837 | display: inline-grid; |
| 838 | grid-template-columns: minmax(0, 100%); |
| 839 | grid-auto-rows: auto; |
| 840 | max-width: 100%; |
| 841 | gap: var(--spacing-xs); |
| 842 | } |
| 843 | |
| 844 | .message-group > * { |
| 845 | grid-column: 1; |
| 846 | } /* both children sit in the same column */ |
| 847 | |
| 848 | .message-group-right { |
| 849 | width: 100%; |
| 850 | justify-content: end; |
| 851 | margin-top: 4em; |
| 852 | margin-bottom: 4em; |
| 853 | } |
| 854 | |
| 855 | .message-container { |
| 856 | animation: fadeIn 0.2s; |
| 857 | -webkit-animation: fadeIn 0.2s; |
| 858 | /* margin-bottom: var(--spacing-sm); */ |
| 859 | width: 100%; |
| 860 | max-width: 100%; |
| 861 | scroll-margin-top: 60px; /* Ensure nice spacing when scrolling into view */ |
| 862 | } |
| 863 | |
| 864 | /* User messages appear instantly */ |
| 865 | .message-container.user-container { |
| 866 | animation: none !important; |
| 867 | -webkit-animation: none !important; |
| 868 | } |
| 869 | |
| 870 | .message-container.message-window-restored { |
| 871 | animation: none !important; |
| 872 | -webkit-animation: none !important; |
| 873 | } |
| 874 | |
| 875 | .message { |
| 876 | /* background-color: var(--color-message-bg); */ |
| 877 | /* border-radius: 0; */ |
| 878 | padding: 0.9rem var(--spacing-sm) 0.7rem var(--spacing-sm); |
| 879 | overflow-x: auto; |
| 880 | width: auto; |
| 881 | max-width: 100%; |
| 882 | box-sizing: border-box; |
| 883 | /* display: block; */ |
| 884 | word-break: break-word; |
| 885 | overflow-wrap: anywhere; |
| 886 | box-shadow: none; |
| 887 | } |
| 888 | |
| 889 | /* shades */ |
| 890 | .dark-mode .message { |
| 891 | box-shadow: none; |
| 892 | } |
| 893 | |
| 894 | /* =========================================== |
| 895 | Collapsible Standalone Messages |
| 896 | Shows ~10 lines with fade-out, expand button reveals full content |
| 897 | =========================================== */ |
| 898 | |
| 899 | .message.message-collapsible .message-collapse-content { |
| 900 | position: relative; |
| 901 | max-height: 15em !important; |
| 902 | overflow: hidden; |
| 903 | transition: max-height 0.3s ease-out; |
| 904 | } |
| 905 | |
| 906 | .message.message-collapsible .message-collapse-content::after { |
| 907 | content: ""; |
| 908 | position: absolute; |
| 909 | bottom: 0; |
| 910 | left: 0; |
| 911 | right: 0; |
| 912 | height: 3em; |
| 913 | background: linear-gradient(transparent, var(--color-chat-background)); |
| 914 | pointer-events: none; |
| 915 | opacity: 1; |
| 916 | transition: opacity 0.3s ease-out; |
| 917 | } |
| 918 | |
| 919 | /* Expanded state */ |
| 920 | .message.message-collapsible.expanded .message-collapse-content { |
| 921 | max-height: none !important; |
| 922 | } |
| 923 | |
| 924 | .message.message-collapsible.expanded .message-collapse-content::after { |
| 925 | opacity: 0; |
| 926 | } |
| 927 | |
| 928 | /* No fade when content fits */ |
| 929 | .message.message-collapsible:not(.has-overflow) .message-collapse-content::after { |
| 930 | opacity: 0; |
| 931 | } |
| 932 | |
| 933 | /* ALL detail mode: force full response bodies and hide the expand control */ |
| 934 | #chat-history[data-detail-mode="expanded"] |
| 935 | .message.message-agent-response.message-collapsible |
| 936 | .message-collapse-content { |
| 937 | max-height: none !important; |
| 938 | } |
| 939 | |
| 940 | #chat-history[data-detail-mode="expanded"] |
| 941 | .message.message-agent-response.message-collapsible |
| 942 | .message-collapse-content::after { |
| 943 | opacity: 0; |
| 944 | } |
| 945 | |
| 946 | #chat-history[data-detail-mode="expanded"] |
| 947 | .message.message-agent-response.message-collapsible |
| 948 | .expand-btn { |
| 949 | display: none !important; |
| 950 | } |
| 951 | |
| 952 | /* Long history replays keep oversized bodies as previews until explicitly opened, |
| 953 | even when the global preference is ALL. */ |
| 954 | #chat-history[data-detail-mode="expanded"] |
| 955 | .message.message-collapsible.lazy-content:not(.expanded) |
| 956 | .message-collapse-content { |
| 957 | max-height: 15em !important; |
| 958 | } |
| 959 | |
| 960 | #chat-history[data-detail-mode="expanded"] |
| 961 | .message.message-collapsible.lazy-content:not(.expanded) |
| 962 | .message-collapse-content::after { |
| 963 | opacity: 1; |
| 964 | } |
| 965 | |
| 966 | #chat-history[data-detail-mode="expanded"] |
| 967 | .message.message-collapsible.lazy-content |
| 968 | .expand-btn { |
| 969 | display: inline-flex !important; |
| 970 | } |
| 971 | |
| 972 | /* Smooth Render */ |
| 973 | .smooth-render-visible, |
| 974 | .smooth-render-invisible { |
| 975 | position: absolute; |
| 976 | width:100%; |
| 977 | inset: 0; |
| 978 | opacity: 0; |
| 979 | } |
| 980 | |
| 981 | .smooth-render-visible { |
| 982 | z-index: 2; |
| 983 | animation: smoothFadeIn 200ms ease-out forwards; |
| 984 | } |
| 985 | |
| 986 | .smooth-render-invisible { |
| 987 | z-index: 1; |
| 988 | opacity: 1; |
| 989 | animation: smoothFadeOut 70ms ease-out forwards; |
| 990 | animation-delay: 100ms; |
| 991 | } |
| 992 | |
| 993 | @keyframes smoothFadeIn { |
| 994 | from { |
| 995 | opacity: 0; |
| 996 | } |
| 997 | to { |
| 998 | opacity: 1; |
| 999 | } |
| 1000 | } |
| 1001 | @keyframes smoothFadeOut { |
| 1002 | from { |
| 1003 | opacity: 1; |
| 1004 | } |
| 1005 | to { |
| 1006 | opacity: 0; |
| 1007 | } |
| 1008 | } |