feat: message editing with version history and AI regeneration
This commit is contained in:
+146
-7
@@ -307,10 +307,10 @@
|
||||
}
|
||||
|
||||
.message.assistant .message-content {
|
||||
background: #1a1a1a;
|
||||
background: transparent;
|
||||
color: #e5e5e5;
|
||||
border: none;
|
||||
border-bottom-left-radius: 6px;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
.message-content p {
|
||||
@@ -364,19 +364,144 @@
|
||||
margin: 0.75rem 0;
|
||||
}
|
||||
|
||||
.message-time {
|
||||
display: block;
|
||||
font-size: 0.65rem;
|
||||
color: #444;
|
||||
.message-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 0.25rem;
|
||||
padding: 0 0.4rem;
|
||||
}
|
||||
|
||||
.message-time {
|
||||
font-size: 0.65rem;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.message.user .message-time {
|
||||
text-align: right;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.message.user .message-footer {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.message-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.message:hover .message-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 0.75rem;
|
||||
cursor: pointer;
|
||||
padding: 0.25rem;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.edit-btn:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.version-switcher {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 12px;
|
||||
padding: 0.15rem 0.35rem;
|
||||
}
|
||||
|
||||
.version-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #888;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
padding: 0 0.25rem;
|
||||
line-height: 1;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.version-btn:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.version-indicator {
|
||||
font-size: 0.7rem;
|
||||
color: #666;
|
||||
min-width: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Message editing */
|
||||
.message-edit-form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.message-edit-textarea {
|
||||
width: 100%;
|
||||
min-height: 60px;
|
||||
padding: 0.75rem;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid rgba(37, 99, 235, 0.5);
|
||||
border-radius: 12px;
|
||||
color: white;
|
||||
font-size: 0.95rem;
|
||||
font-family: inherit;
|
||||
resize: vertical;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.message-edit-textarea:focus {
|
||||
outline: none;
|
||||
border-color: #2563eb;
|
||||
}
|
||||
|
||||
.message-edit-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.edit-cancel-btn,
|
||||
.edit-save-btn {
|
||||
padding: 0.4rem 0.75rem;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 0.8rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.edit-cancel-btn {
|
||||
background: #333;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.edit-cancel-btn:hover {
|
||||
background: #444;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.edit-save-btn {
|
||||
background: #2563eb;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.edit-save-btn:hover {
|
||||
background: #1d4ed8;
|
||||
}
|
||||
|
||||
.message.loading .message-content {
|
||||
padding: 1rem;
|
||||
}
|
||||
@@ -664,4 +789,18 @@
|
||||
right: 0.75rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.message-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.message-edit-textarea {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.edit-cancel-btn,
|
||||
.edit-save-btn {
|
||||
font-size: 0.75rem;
|
||||
padding: 0.35rem 0.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user