Spaces:
Runtime error
Runtime error
File size: 16,911 Bytes
24caae0 f044ea5 24caae0 03bd69e 204e35b fa4edd5 204e35b c1944cf 204e35b fa4edd5 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e fa4edd5 028b48d 03bd69e fa4edd5 028b48d 03bd69e fa4edd5 03bd69e 028b48d 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e 028b48d fa4edd5 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 e1fb264 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e fa4edd5 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e fa4edd5 03bd69e fa4edd5 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e 434a486 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e e1fb264 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ee61dec 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ddac6a2 03bd69e ee61dec 03bd69e ee61dec 03bd69e 5def997 03bd69e 5def997 03bd69e 5def997 03bd69e 5def997 c1944cf 028b48d c1944cf 028b48d c1944cf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 |
/* Import MCP styles */
@import './styles/mcp.css';
@import './styles/mcp-settings.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
/* Enterprise Design System */
:root {
/* Primary Brand Colors */
--primary-color: #2563eb;
--primary-hover: #1d4ed8;
--primary-light: #dbeafe;
--primary-dark: #1e3a8a;
/* Secondary Colors */
--secondary-color: #64748b;
--secondary-hover: #475569;
--secondary-light: #f1f5f9;
/* Neutral Palette */
--text-color: #0f172a;
--text-secondary: #334155;
--text-muted: #64748b;
--text-light: #94a3b8;
--text-disabled: #cbd5e1;
/* Background System */
--background-primary: #ffffff;
--background-secondary: #f8fafc;
--background-tertiary: #f1f5f9;
--background-elevated: #ffffff;
/* Border System */
--border-color: #e2e8f0;
--border-light: #f1f5f9;
--border-dark: #cbd5e1;
--border-accent: #3b82f6;
/* Status Colors */
--success-color: #059669;
--success-light: #d1fae5;
--warning-color: #d97706;
--warning-light: #fef3c7;
--error-color: #dc2626;
--error-light: #fee2e2;
--info-color: #0284c7;
--info-light: #e0f2fe;
/* Layout Variables */
--sidebar-width: 320px;
--header-height: 64px;
--border-radius: 8px;
--border-radius-lg: 12px;
--border-radius-xl: 16px;
/* Shadow System */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
/* Message Specific */
--reasoning-background: var(--background-tertiary);
--user-message-bg: var(--primary-color);
--user-message-color: #ffffff;
--assistant-message-bg: var(--background-elevated);
--assistant-message-color: var(--text-color);
--hover-color: var(--background-secondary);
--active-color: var(--primary-light);
/* Responsive sidebar width */
--mobile-sidebar-width: 100%;
--tablet-sidebar-width: 280px;
/* Animation System */
--transition-fast: 150ms ease-out;
--transition-normal: 250ms ease-out;
--transition-slow: 350ms ease-out;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
color: var(--text-color);
line-height: 1.5;
background-color: var(--background-color);
}
@layer components {
/* App container */
.app-container {
@apply flex flex-col h-screen w-full overflow-hidden;
}
/* Header styles */
.app-header {
@apply flex justify-between items-center px-5 h-header border-b border-border bg-background;
}
.left-section {
@apply flex items-center;
}
.right-section {
@apply flex items-center gap-2.5;
}
.app-title {
@apply text-xl font-semibold text-text;
}
}
@layer components {
/* Profile dropdown */
.profile-dropdown-container {
@apply relative;
}
.profile-dropdown-button {
@apply py-1.5 px-3 bg-background border border-border rounded text-sm text-text cursor-pointer flex items-center gap-1.5;
}
.profile-dropdown-menu {
@apply absolute top-full right-0 w-[200px] bg-background border border-border rounded shadow-md z-10 mt-1.5;
}
.profile-option {
@apply p-3 cursor-pointer transition-colors duration-200 text-sm;
}
.profile-option:hover {
@apply bg-hover;
}
.profile-option.active {
@apply bg-active font-medium;
}
}
@layer components {
.settings-button {
@apply py-1.5 px-3 bg-background border border-border rounded text-sm text-text cursor-pointer;
}
.settings-button:hover {
@apply bg-hover;
}
/* Main content area */
.app-content {
@apply flex flex-1 overflow-hidden;
}
}
@layer components {
/* Sidebar */
.sidebar {
@apply w-sidebar border-r border-border flex flex-col transition-[width] duration-300 ease-in-out bg-background;
}
.sidebar.collapsed {
@apply w-[50px] overflow-hidden;
}
.sidebar.collapsed .chat-list {
@apply hidden;
}
.sidebar.collapsed .sidebar-header h2 {
@apply hidden;
}
.sidebar.collapsed .sidebar-header {
@apply justify-center;
}
.sidebar-header {
@apply flex justify-between items-center py-3 px-4 border-b border-border;
}
.sidebar.collapsed .sidebar-header {
@apply py-3 px-[5px];
}
.sidebar-header h2 {
@apply text-sm font-semibold text-light-text m-0;
}
.toggle-sidebar-button {
@apply bg-transparent border-0 text-base text-lightest-text cursor-pointer flex items-center justify-center z-10 w-6 h-6;
}
.toggle-sidebar-button:hover {
@apply text-text;
}
/* Ensure the toggle button is always visible and clickable */
.sidebar.collapsed .toggle-sidebar-button {
@apply opacity-100 visible;
}
/* Floating expand button that appears when sidebar is collapsed */
.expand-sidebar-button {
@apply fixed left-[60px] top-[80px] bg-background border border-border rounded-full w-8 h-8 flex items-center justify-center cursor-pointer shadow-md z-20 opacity-0 invisible transition-all duration-300;
}
.sidebar.collapsed ~ .expand-sidebar-button {
@apply opacity-100 visible;
}
.expand-sidebar-button:hover {
@apply bg-hover text-text;
}
}
@layer components {
/* Chat list */
.chat-list {
@apply flex-1 overflow-y-auto p-2.5;
}
.new-chat {
@apply w-full py-2 px-3 bg-primary text-white border-none rounded cursor-pointer text-sm mb-4 transition-colors duration-200 flex items-center justify-center;
}
.new-chat:hover {
@apply bg-primary-hover;
}
.chat-item {
@apply flex justify-between items-center py-2 px-2.5 rounded cursor-pointer mb-0.5 transition-colors duration-200 text-sm text-light-text;
}
.chat-item:hover {
@apply bg-hover;
}
.chat-item.active {
@apply bg-active text-primary;
}
.chat-item.streaming {
@apply border-l-2 border-blue-500;
}
.streaming-dot {
@apply w-2 h-2 bg-blue-500 rounded-full;
animation: pulse 1.5s infinite;
}
.delete-btn {
@apply opacity-0 bg-transparent border-none text-lightest-text cursor-pointer text-xs transition-all duration-200 py-0.5 px-[5px];
}
.chat-item:hover .delete-btn {
@apply opacity-100;
}
.delete-btn:hover {
@apply text-red-600;
}
.empty-state {
@apply text-lightest-text text-center p-5 text-sm;
}
}
@layer components {
/* Main chat area */
.main-content {
@apply flex-1 flex flex-col overflow-hidden bg-background;
}
/* Welcome screen */
.welcome-screen {
@apply flex flex-col items-center justify-center h-full p-5 text-center;
}
.welcome-screen h2 {
@apply text-2xl font-semibold mb-2.5 text-text;
}
.welcome-screen p {
@apply text-light-text mb-5 text-sm;
}
.new-chat-button {
@apply py-2.5 px-5 bg-primary text-white border-none rounded cursor-pointer text-sm transition-colors duration-200;
}
.new-chat-button:hover {
@apply bg-primary-hover;
}
}
@layer components {
/* Chat window */
.chat-window {
@apply flex flex-col h-full overflow-hidden;
}
.chat-messages {
@apply flex-1 overflow-y-auto p-5 flex flex-col gap-6;
}
}
@layer components {
/* Message styles */
.message {
@apply flex flex-col max-w-[800px] mx-auto w-full;
}
.message.user {
@apply items-end;
}
.message.assistant {
@apply items-start;
}
.reasoning-container {
@apply w-full border border-border rounded-lg overflow-hidden mb-2.5 bg-reasoning-bg;
}
.reasoning-header {
@apply flex justify-between items-center py-2 px-3 cursor-pointer text-[0.8125rem] text-light-text bg-[#f5f5f5] border-b border-border;
}
.toggle-icon {
@apply text-[0.625rem];
}
.reasoning-content {
@apply p-3 text-[0.8125rem] whitespace-pre-wrap overflow-x-auto text-light-text max-h-[300px] overflow-y-auto;
}
.message-content {
@apply py-3 px-4 rounded-md text-[0.9375rem] leading-normal break-words max-w-[90%] relative;
}
.message.user .message-content {
@apply bg-user-message-bg text-user-message-color rounded-[6px_6px_0_6px];
}
.message.assistant .message-content {
@apply bg-assistant-message-bg text-assistant-message-color rounded-[6px_6px_6px_0];
}
}
@layer components {
.copy-button {
@apply absolute right-2 bottom-2 bg-white/80 border border-border rounded py-1 px-2 text-xs cursor-pointer opacity-0 transition-opacity duration-200;
}
.message-content:hover .copy-button {
@apply opacity-100;
}
.copy-button.copied {
@apply bg-emerald-500 text-white border-emerald-600;
}
.message.user .copy-button {
@apply bg-white/90 text-light-text;
}
.message.user .copy-button:hover {
@apply bg-white text-text;
}
.message.assistant .copy-button {
@apply bg-[rgba(249,249,249,0.9)] text-text;
}
.message.assistant .copy-button:hover {
@apply bg-background;
}
/* Add styles for markdown content */
.message-content p {
@apply mb-4;
}
.message-content p:last-child {
@apply mb-0;
}
.message-content pre {
@apply bg-black/5 p-3 rounded overflow-x-auto my-4;
}
.message-content code {
@apply bg-black/5 py-0.5 px-1 rounded font-mono;
}
.message-content pre code {
@apply bg-transparent p-0;
}
.message-content ul,
.message-content ol {
@apply my-4 pl-8;
}
.message-content li {
@apply my-2;
}
.message-content blockquote {
@apply border-l-4 border-border my-4 pl-4 text-light-text;
}
.message-content img {
@apply max-w-full h-auto my-4 rounded;
}
.message-content table {
@apply border-collapse w-full my-4;
}
.message-content th,
.message-content td {
@apply border border-border p-2 text-left;
}
.message-content th {
@apply bg-hover;
}
.message-time {
@apply text-xs text-lightest-text mt-1;
}
}
@layer components {
/* Input area */
.chat-input {
@apply flex p-4 border-t border-border gap-2.5 bg-background;
}
.message-input {
@apply flex-1 py-3 px-4 border border-border rounded-md text-[0.9375rem] resize-none min-h-[24px] max-h-[200px] text-text outline-none transition-colors duration-200;
}
.message-input:focus {
@apply border-primary;
}
.send-button {
@apply px-5 bg-primary text-white border-none rounded-md cursor-pointer text-[0.9375rem] transition-colors duration-200 flex items-center justify-center;
}
.send-button:hover:not(:disabled) {
@apply bg-primary-hover;
}
.send-button:disabled {
@apply bg-slate-400 cursor-not-allowed opacity-70;
}
/* New chat button in chat window */
.new-chat-button {
@apply flex items-center justify-center;
}
.new-chat-button:hover {
@apply bg-green-600;
}
/* Floating new chat button */
.floating-new-chat {
@apply fixed bottom-20 right-6 bg-green-500 hover:bg-green-600 text-white rounded-full w-12 h-12 flex items-center justify-center shadow-lg z-10;
}
@media (max-width: 768px) {
.floating-new-chat {
@apply bottom-24 right-4 w-10 h-10;
}
}
/* Streaming indicator */
.streaming-indicator {
@apply flex items-center justify-center py-2 px-4 my-4 bg-blue-50 rounded-md text-blue-600 w-max mx-auto;
}
.pulse-dot {
@apply w-2 h-2 bg-blue-500 rounded-full;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
}
}
/* Loading cursor */
.loading-cursor {
@apply inline-block w-0.5 h-[1.2em] bg-current ml-0.5 animate-blink align-text-bottom;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
}
@layer components {
/* Settings modal */
.settings-overlay {
@apply fixed inset-0 bg-black/50 flex items-center justify-center z-[1000];
}
.settings-modal {
@apply bg-background rounded-lg w-[600px] max-w-[90%] max-h-[90vh] overflow-y-auto relative p-6 shadow-md;
}
.settings-panel h2 {
@apply text-xl font-semibold mb-5 text-text;
}
.close-settings-button {
@apply absolute top-4 right-4 bg-transparent border-none text-xl cursor-pointer text-lightest-text w-6 h-6 flex items-center justify-center rounded;
}
.close-settings-button:hover {
@apply bg-hover text-text;
}
/* Profile management in settings */
.profiles-section {
@apply mb-6 border-b border-border pb-5;
}
.profiles-header {
@apply flex justify-between items-center mb-3;
}
.profiles-header h3 {
@apply text-base font-semibold text-text;
}
.add-profile-button {
@apply py-1 px-2 bg-transparent border border-border rounded text-sm text-text cursor-pointer transition-all duration-200;
}
.add-profile-button:hover {
@apply bg-hover;
}
.profiles-list {
@apply flex flex-wrap gap-2 mb-4;
}
.profile-item {
@apply py-2 px-3 bg-background border border-border rounded text-sm cursor-pointer transition-all duration-200 flex items-center gap-2;
}
.profile-item:hover {
@apply bg-hover;
}
.profile-item.active {
@apply bg-active border-primary;
}
.delete-profile-button {
@apply bg-transparent border-none text-lightest-text cursor-pointer text-base transition-colors duration-200 flex items-center justify-center w-5 h-5;
}
.delete-profile-button:hover {
@apply text-red-600;
}
.current-profile-section h3 {
@apply text-base font-semibold text-text mb-4;
}
.setting-item {
@apply mb-4;
}
.setting-item label {
@apply block mb-1.5 text-sm text-light-text;
}
.setting-item input {
@apply w-full py-2 px-3 border border-border rounded text-sm transition-colors duration-200;
}
.setting-item input:focus {
@apply outline-none border-primary;
}
.setting-hint {
@apply mt-1;
}
.hint-toggle {
@apply bg-transparent border-none text-primary cursor-pointer text-xs p-0 text-left;
}
.hint-content {
@apply hidden mt-2 text-xs text-light-text bg-hover p-2 rounded;
}
.hint-content.expanded {
@apply block;
}
.hint-content p {
@apply mb-1.5;
}
.hint-content ul {
@apply ml-5;
}
.hint-content li {
@apply mb-1;
}
.settings-actions {
@apply flex justify-end gap-2.5 mt-6;
}
.save-button {
@apply py-2 px-4 bg-primary text-white border-none rounded cursor-pointer text-sm transition-colors duration-200;
}
.save-button:hover {
@apply bg-primary-hover;
}
.cancel-button {
@apply py-2 px-4 bg-transparent border border-border rounded cursor-pointer text-sm transition-all duration-200;
}
.cancel-button:hover {
@apply bg-hover;
}
}
@layer components {
/* Error and notification styles */
.error-message {
@apply fixed bottom-5 left-1/2 -translate-x-1/2 bg-red-100 text-red-600 py-2.5 px-5 rounded text-sm shadow-md z-[1000];
}
.loading {
@apply fixed bottom-5 left-1/2 -translate-x-1/2 bg-blue-50 text-blue-700 py-2.5 px-5 rounded text-sm shadow-md z-[1000];
}
}
@layer utilities {
/* Custom scrollbar */
::-webkit-scrollbar {
@apply w-1.5 h-1.5;
}
::-webkit-scrollbar-track {
@apply bg-transparent;
}
::-webkit-scrollbar-thumb {
@apply bg-gray-300 rounded-sm;
}
::-webkit-scrollbar-thumb:hover {
@apply bg-gray-400;
}
}
/* Responsive styles */
@media (max-width: 768px) {
.app-header {
padding: 0 1rem;
}
.app-title {
font-size: 1rem;
}
.sidebar {
position: fixed;
z-index: 50;
height: 100%;
width: 100%;
left: -100%;
transition: all 0.3s ease-in-out;
}
.sidebar.mobile-open {
left: 0;
}
/* Make sure the collapsed sidebar is still visible on mobile */
.sidebar.collapsed {
width: 50px;
left: 0;
}
/* Hide the floating expand button on mobile as it's not needed */
.expand-sidebar-button {
display: none;
}
.message-content {
max-width: 100%;
}
.settings-modal {
width: 95%;
max-height: 80vh;
}
.profiles-list {
flex-direction: column;
gap: 0.5rem;
}
.chat-input {
padding: 0.75rem;
}
.message-input {
font-size: 0.875rem;
}
.send-button {
padding: 0 1rem;
}
}
/* Small mobile devices */
@media (max-width: 480px) {
.app-header {
height: 50px;
}
.right-section {
gap: 0.5rem;
}
.profile-dropdown-button,
.settings-button {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
}
.chat-messages {
padding: 0.75rem;
}
.message-content {
padding: 0.75rem;
font-size: 0.875rem;
}
.welcome-screen h2 {
font-size: 1.25rem;
}
}
|