Spaces:
Runtime error
Runtime error
Update index.html
Browse files- index.html +6 -2
index.html
CHANGED
|
@@ -279,7 +279,11 @@
|
|
| 279 |
<div class="flex-grow overflow-y-auto px-4 sidebar-content">
|
| 280 |
<h3 class="text-sm font-semibold text-gray-400 mb-2">Saved Chats</h3>
|
| 281 |
<div id="chatsList" class="space-y-2">
|
| 282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
</div>
|
|
@@ -689,7 +693,7 @@
|
|
| 689 |
});
|
| 690 |
|
| 691 |
document.getElementById('chatsList').addEventListener('click', (e) => {
|
| 692 |
-
const sessionId = e.target.dataset.
|
| 693 |
if (sessionId) {
|
| 694 |
loadChat(sessionId);
|
| 695 |
}
|
|
|
|
| 279 |
<div class="flex-grow overflow-y-auto px-4 sidebar-content">
|
| 280 |
<h3 class="text-sm font-semibold text-gray-400 mb-2">Saved Chats</h3>
|
| 281 |
<div id="chatsList" class="space-y-2">
|
| 282 |
+
{% for chat in chat_files %}
|
| 283 |
+
<div class="chat-file hover:bg-gray-700 p-2 rounded-lg cursor-pointer transition" data-file="{{ chat }}">
|
| 284 |
+
<i class="fas fa-comment-alt mr-2"></i>{{ chat }}
|
| 285 |
+
</div>
|
| 286 |
+
{% endfor %}
|
| 287 |
</div>
|
| 288 |
</div>
|
| 289 |
</div>
|
|
|
|
| 693 |
});
|
| 694 |
|
| 695 |
document.getElementById('chatsList').addEventListener('click', (e) => {
|
| 696 |
+
const sessionId = e.target.dataset.file;
|
| 697 |
if (sessionId) {
|
| 698 |
loadChat(sessionId);
|
| 699 |
}
|