feat: multiple sessions per story with streaming AI responses

This commit is contained in:
Alexej Wolff
2026-02-11 01:47:24 +01:00
parent 161ecd661e
commit 8c6d6591f8
7 changed files with 573 additions and 112 deletions
+125 -3
View File
@@ -56,6 +56,122 @@
color: #fff;
}
.header-session {
position: relative;
}
.session-selector {
background: rgba(102, 126, 234, 0.2);
border: 1px solid rgba(102, 126, 234, 0.3);
border-radius: 8px;
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
color: #a0b4ff;
cursor: pointer;
transition: all 0.2s;
}
.session-selector:hover {
background: rgba(102, 126, 234, 0.3);
}
.session-menu {
position: absolute;
top: 100%;
left: 0;
margin-top: 0.5rem;
background: #1e1e2e;
border: 1px solid #333;
border-radius: 12px;
min-width: 220px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
z-index: 100;
overflow: hidden;
}
.session-menu-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 1rem;
border-bottom: 1px solid #333;
font-size: 0.85rem;
color: #888;
}
.new-session-btn {
background: rgba(80, 200, 120, 0.2);
border: none;
border-radius: 6px;
padding: 0.3rem 0.5rem;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s;
}
.new-session-btn:hover {
background: rgba(80, 200, 120, 0.4);
}
.session-list {
max-height: 250px;
overflow-y: auto;
}
.session-item {
display: flex;
align-items: center;
border-bottom: 1px solid #2a2a3a;
}
.session-item:last-child {
border-bottom: none;
}
.session-item.active {
background: rgba(102, 126, 234, 0.15);
}
.session-name {
flex: 1;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.2rem;
padding: 0.75rem 1rem;
background: none;
border: none;
color: #fff;
font-size: 0.9rem;
cursor: pointer;
text-align: left;
transition: background 0.2s;
}
.session-name:hover {
background: rgba(255, 255, 255, 0.05);
}
.session-messages {
font-size: 0.75rem;
color: #666;
}
.delete-session-btn {
background: none;
border: none;
padding: 0.5rem;
margin-right: 0.5rem;
font-size: 0.85rem;
cursor: pointer;
opacity: 0.5;
transition: opacity 0.2s;
}
.delete-session-btn:hover {
opacity: 1;
}
.header-protagonist {
font-size: 0.85rem;
color: #888;
@@ -375,14 +491,20 @@
}
.message.streaming .message-text::after {
content: '▋';
content: "▋";
animation: blink 1s infinite;
margin-left: 2px;
}
@keyframes blink {
0%, 50% { opacity: 1; }
51%, 100% { opacity: 0; }
0%,
50% {
opacity: 1;
}
51%,
100% {
opacity: 0;
}
}
/* Скроллбар */