feat: Nachrichten als wichtig markieren (Stern-Button)
- MessageRecord: neues Property IsMarked
- DatabaseService: Migration is_marked, ToggleMessageMark(), GetMarkedMessages()
- HistoryEndpoint: PUT /api/messages/{id}/mark (Toggle)
- SystemPromptBuilder: markierte Nachrichten als Referenz im System-Prompt
- ChatEndpoint + SessionEndpoint: markierte Nachrichten laden und an Builder übergeben
- Frontend: Stern-Button (☆/★) auf jeder Nachricht, Toggle per API
- CSS: .marked-Klasse mit gelbem Seitenrand, Button-Styling
This commit is contained in:
1 parent
21ca3a451b
commit
19f32442b1
11 files changed
+124
-13
No files matched your search
@@ -35,11 +35,11 @@ function renderMessages(msgs, addToConversation) {
|
||||
switch (msg.type) {
|
||||
case 'text':
|
||||
if (msg.role === 'user') {
|
||||
addUserBubble(msg.content, false, msg.createdAt);
|
||||
addUserBubble(msg.content, false, msg.createdAt, msg.id, msg.isMarked);
|
||||
if (msg.attachmentCount > 0) addAttachmentIndicator(msg.id, msg.attachmentCount, msg.attachmentNames);
|
||||
if (addToConversation) messages.push({ role: 'user', content: msg.content });
|
||||
} else if (msg.role === 'assistant') {
|
||||
addAssistantBubble(msg.content, msg.createdAt);
|
||||
addAssistantBubble(msg.content, msg.createdAt, msg.id, msg.isMarked);
|
||||
if (addToConversation) messages.push({ role: 'assistant', content: msg.content });
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user