- Modified loadChatHistory() to check for active project before fetching all sessions - When active project exists, use project.sessions instead of fetching from API - Added detailed console logging to debug session filtering - This prevents ALL sessions from appearing in every project's sidebar Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
735 lines
13 KiB
CSS
735 lines
13 KiB
CSS
/**
|
|
* Enhanced Chat Styles - Similar to chat.z.ai
|
|
* Smooth animations, better input, modern design
|
|
*/
|
|
|
|
/* ============================================
|
|
Chat Input Enhancements
|
|
============================================ */
|
|
|
|
.chat-input-wrapper {
|
|
transition: all 0.3s ease;
|
|
border: 2px solid #333;
|
|
}
|
|
|
|
.chat-input-wrapper.input-focused {
|
|
border-color: #4a9eff;
|
|
box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
|
|
}
|
|
|
|
#chat-input {
|
|
transition: height 0.2s ease;
|
|
font-size: 15px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
#chat-input:focus {
|
|
outline: none;
|
|
}
|
|
|
|
/* ============================================
|
|
Chat History Sidebar
|
|
============================================ */
|
|
|
|
.chat-history-list {
|
|
padding: 12px;
|
|
}
|
|
|
|
.chat-history-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
margin-bottom: 8px;
|
|
background: #252525;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.chat-history-item:hover {
|
|
background: #2a2a2a;
|
|
border-color: #444;
|
|
transform: translateX(2px);
|
|
}
|
|
|
|
.chat-history-item.active {
|
|
background: #1a3a5a;
|
|
border-color: #4a9eff;
|
|
}
|
|
|
|
.chat-history-item.historical {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.chat-history-icon {
|
|
font-size: 20px;
|
|
width: 40px;
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #1a1a1a;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.chat-history-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.chat-history-title {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #e0e0e0;
|
|
margin-bottom: 4px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chat-history-meta {
|
|
display: flex;
|
|
gap: 8px;
|
|
font-size: 12px;
|
|
color: #888;
|
|
}
|
|
|
|
.chat-history-status {
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
.chat-history-status.active {
|
|
color: #51cf66;
|
|
background: rgba(81, 207, 102, 0.1);
|
|
}
|
|
|
|
.chat-history-status.historical {
|
|
color: #ffa94d;
|
|
background: rgba(255, 169, 77, 0.1);
|
|
}
|
|
|
|
.resume-badge {
|
|
font-size: 11px;
|
|
padding: 4px 8px;
|
|
background: #4a9eff;
|
|
color: white;
|
|
border-radius: 4px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.chat-history-empty {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
color: #888;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* ============================================
|
|
Archive & Merge Buttons
|
|
============================================ */
|
|
|
|
.chat-history-main {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.chat-history-archive,
|
|
.chat-history-unarchive {
|
|
flex-shrink: 0;
|
|
width: 32px;
|
|
height: 32px;
|
|
padding: 0;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 16px;
|
|
transition: all 0.2s ease;
|
|
opacity: 0;
|
|
}
|
|
|
|
.chat-history-item:hover .chat-history-archive,
|
|
.chat-history-item:hover .chat-history-unarchive {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.chat-history-archive:hover,
|
|
.chat-history-unarchive:hover {
|
|
opacity: 1 !important;
|
|
background: #2a2a2a;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
/* Merge selection state */
|
|
.chat-history-item.selected-for-merge {
|
|
background: #1a3a5a;
|
|
border-color: #4a9eff;
|
|
}
|
|
|
|
.chat-history-item.selected-for-merge::before {
|
|
content: '✓';
|
|
position: absolute;
|
|
left: 8px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: #4a9eff;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.chat-history-item {
|
|
position: relative;
|
|
}
|
|
|
|
/* Merge button */
|
|
#merge-sessions-btn {
|
|
display: none;
|
|
position: fixed;
|
|
bottom: 100px;
|
|
right: 20px;
|
|
padding: 12px 20px;
|
|
background: linear-gradient(135deg, #4a9eff 0%, #a78bfa 100%);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
|
|
z-index: 1000;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
#merge-sessions-btn:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(74, 158, 255, 0.5);
|
|
}
|
|
|
|
/* Archived sessions header button */
|
|
.sidebar-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
|
|
.sidebar-header-archives {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.btn-show-archives {
|
|
padding: 6px 12px;
|
|
background: #2a2a2a;
|
|
border: 1px solid #444;
|
|
border-radius: 6px;
|
|
color: #e0e0e0;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.btn-show-archives:hover {
|
|
background: #333;
|
|
border-color: #4a9eff;
|
|
}
|
|
|
|
/* ============================================
|
|
Enhanced Message Animations
|
|
============================================ */
|
|
|
|
.chat-message {
|
|
animation: messageSlideIn 0.3s ease;
|
|
}
|
|
|
|
@keyframes messageSlideIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.message-appear {
|
|
animation: messageAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
}
|
|
|
|
@keyframes messageAppear {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.95) translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1) translateY(0);
|
|
}
|
|
}
|
|
|
|
.message-avatar {
|
|
animation: avatarPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
}
|
|
|
|
@keyframes avatarPop {
|
|
0% {
|
|
transform: scale(0);
|
|
}
|
|
50% {
|
|
transform: scale(1.2);
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
/* ============================================
|
|
Code Operation Styling
|
|
============================================ */
|
|
|
|
.code-operation {
|
|
background: #1a1a1a;
|
|
border: 1px solid #333;
|
|
border-radius: 8px;
|
|
margin: 12px 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.operation-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 14px;
|
|
background: #252525;
|
|
border-bottom: 1px solid #333;
|
|
}
|
|
|
|
.operation-icon {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.operation-label {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
.operation-code {
|
|
margin: 0;
|
|
padding: 14px;
|
|
background: #0d0d0d;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.operation-code code {
|
|
font-family: 'Fira Code', 'Courier New', monospace;
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
/* ============================================
|
|
Quick Actions
|
|
============================================ */
|
|
|
|
.quick-actions {
|
|
padding: 20px;
|
|
background: #1a1a1a;
|
|
border-radius: 12px;
|
|
margin: 20px 0;
|
|
animation: quickActionsSlide 0.4s ease;
|
|
}
|
|
|
|
@keyframes quickActionsSlide {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.quick-actions-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #888;
|
|
margin-bottom: 16px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.quick-actions-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
gap: 12px;
|
|
}
|
|
|
|
.quick-action-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 14px 16px;
|
|
background: #252525;
|
|
border: 1px solid #333;
|
|
border-radius: 8px;
|
|
color: #e0e0e0;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.quick-action-btn:hover {
|
|
background: #2a2a2a;
|
|
border-color: #4a9eff;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
|
|
}
|
|
|
|
.quick-action-btn:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.action-icon {
|
|
font-size: 24px;
|
|
}
|
|
|
|
.action-label {
|
|
flex: 1;
|
|
text-align: left;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ============================================
|
|
Tag Placeholders
|
|
============================================ */
|
|
|
|
.tag-placeholder {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 10px;
|
|
background: #1a3a5a;
|
|
border: 1px solid #4a9eff;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
color: #4a9eff;
|
|
margin: 4px;
|
|
}
|
|
|
|
/* ============================================
|
|
Enhanced Chat Layout - CODENOMAD-INSPIRED
|
|
Single-screen layout with min-height: 0 pattern
|
|
============================================ */
|
|
|
|
.chat-layout {
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.chat-main {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
min-height: 0; /* CRITICAL: Enables proper flex growth for nested flex items */
|
|
}
|
|
|
|
.chat-messages {
|
|
flex: 1;
|
|
min-height: 0; /* CRITICAL: Allows flex item to shrink below content size */
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-track {
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-thumb {
|
|
background: #333;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-thumb:hover {
|
|
background: #444;
|
|
}
|
|
|
|
.chat-input-container {
|
|
flex-shrink: 0; /* CRITICAL: Prevent input container from shrinking */
|
|
border-top: 1px solid #333;
|
|
background: #1a1a1a;
|
|
padding: 16px 20px;
|
|
}
|
|
|
|
/* Chat Modes Bar - Fixed at bottom above input */
|
|
.chat-modes-bar {
|
|
flex-shrink: 0; /* CRITICAL: Prevent modes bar from shrinking */
|
|
display: flex;
|
|
gap: 4px;
|
|
padding: 8px 16px;
|
|
background: #161b22;
|
|
border-top: 1px solid #333;
|
|
}
|
|
|
|
.chat-modes-bar .mode-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 12px;
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
border-radius: 6px;
|
|
color: #8b949e;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.chat-modes-bar .mode-btn:hover {
|
|
background: #21262d;
|
|
color: #c9d1d9;
|
|
}
|
|
|
|
.chat-modes-bar .mode-btn.active {
|
|
background: #1f6feb;
|
|
border-color: #58a6ff;
|
|
color: white;
|
|
}
|
|
|
|
.mode-icon {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.mode-label {
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ============================================
|
|
Message Header Styling
|
|
============================================ */
|
|
|
|
.message-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.message-label {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
.message-time {
|
|
font-size: 11px;
|
|
color: #888;
|
|
}
|
|
|
|
/* ============================================
|
|
Responsive Design
|
|
============================================ */
|
|
|
|
@media (max-width: 768px) {
|
|
.quick-actions-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
|
gap: 8px;
|
|
}
|
|
|
|
.chat-history-item {
|
|
padding: 10px;
|
|
}
|
|
|
|
.quick-action-btn {
|
|
padding: 12px;
|
|
}
|
|
|
|
.action-icon {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.action-label {
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
|
|
/* ============================================
|
|
Loading States
|
|
============================================ */
|
|
|
|
.chat-history-loading {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.chat-history-loading .spinner {
|
|
width: 30px;
|
|
height: 30px;
|
|
border: 3px solid #333;
|
|
border-top-color: #4a9eff;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ============================================
|
|
Typing Indicator
|
|
============================================ */
|
|
|
|
.typing-indicator {
|
|
display: flex;
|
|
gap: 4px;
|
|
padding: 12px 16px;
|
|
background: #1a1a1a;
|
|
border-radius: 12px;
|
|
width: fit-content;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.typing-indicator .dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #888;
|
|
border-radius: 50%;
|
|
animation: typingBounce 1.4s ease-in-out infinite;
|
|
}
|
|
|
|
.typing-indicator .dot:nth-child(1) {
|
|
animation-delay: 0s;
|
|
}
|
|
|
|
.typing-indicator .dot:nth-child(2) {
|
|
animation-delay: 0.2s;
|
|
}
|
|
|
|
.typing-indicator .dot:nth-child(3) {
|
|
animation-delay: 0.4s;
|
|
}
|
|
|
|
@keyframes typingBounce {
|
|
0%, 60%, 100% {
|
|
transform: translateY(0);
|
|
}
|
|
30% {
|
|
transform: translateY(-8px);
|
|
}
|
|
}
|
|
|
|
/* ============================================
|
|
Chat Mode Buttons (Chat/Terminal)
|
|
============================================ */
|
|
|
|
.chat-modes-bar {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
background: #0d0d0d;
|
|
border-bottom: 1px solid #333;
|
|
align-items: center;
|
|
}
|
|
|
|
.mode-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 16px;
|
|
background: #1a1a1a;
|
|
border: 2px solid #333;
|
|
border-radius: 8px;
|
|
color: #888;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.mode-btn:hover {
|
|
background: #252525;
|
|
border-color: #444;
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
.mode-btn.active {
|
|
background: rgba(74, 158, 255, 0.15);
|
|
border-color: #4a9eff;
|
|
color: #4a9eff;
|
|
}
|
|
|
|
.mode-icon {
|
|
font-size: 18px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.mode-label {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Mobile Responsiveness for Mode Buttons */
|
|
@media (max-width: 768px) {
|
|
.chat-modes-bar {
|
|
padding: 10px 12px;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.mode-btn {
|
|
flex: 1;
|
|
min-width: 0;
|
|
padding: 8px 12px;
|
|
font-size: 13px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.mode-icon {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.mode-label {
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.chat-modes-bar {
|
|
padding: 8px;
|
|
gap: 4px;
|
|
}
|
|
|
|
.mode-btn {
|
|
padding: 8px 10px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.mode-btn .mode-label {
|
|
display: none;
|
|
}
|
|
|
|
.mode-btn .mode-icon {
|
|
font-size: 18px;
|
|
}
|
|
}
|