Spaces:
Sleeping
Sleeping
Update static/scripts.js
Browse files- static/scripts.js +24 -0
static/scripts.js
CHANGED
|
@@ -11,6 +11,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
| 11 |
const backToLatest = document.getElementById('backToLatest');
|
| 12 |
const moreOptions = document.getElementById('moreOptions');
|
| 13 |
const advancedOptions = document.getElementById('advancedOptions');
|
|
|
|
| 14 |
|
| 15 |
let selectedFile = null;
|
| 16 |
let bubbleStyles = ['bubble-rounded', 'bubble-sharp', 'bubble-starry'];
|
|
@@ -77,6 +78,29 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
| 77 |
document.getElementById('thinkButton').addEventListener('click', () => {
|
| 78 |
alert('Activating Think mode... (Functionality to be implemented)');
|
| 79 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
function applyBubbleStyle() {
|
|
|
|
| 11 |
const backToLatest = document.getElementById('backToLatest');
|
| 12 |
const moreOptions = document.getElementById('moreOptions');
|
| 13 |
const advancedOptions = document.getElementById('advancedOptions');
|
| 14 |
+
const newChat = document.getElementById('newChat');
|
| 15 |
|
| 16 |
let selectedFile = null;
|
| 17 |
let bubbleStyles = ['bubble-rounded', 'bubble-sharp', 'bubble-starry'];
|
|
|
|
| 78 |
document.getElementById('thinkButton').addEventListener('click', () => {
|
| 79 |
alert('Activating Think mode... (Functionality to be implemented)');
|
| 80 |
});
|
| 81 |
+
|
| 82 |
+
newChat.addEventListener('click', (e) => {
|
| 83 |
+
e.preventDefault();
|
| 84 |
+
resetChat();
|
| 85 |
+
});
|
| 86 |
+
|
| 87 |
+
document.addEventListener('keydown', (e) => {
|
| 88 |
+
if (e.ctrlKey && e.key === 'j') {
|
| 89 |
+
e.preventDefault();
|
| 90 |
+
resetChat();
|
| 91 |
+
}
|
| 92 |
+
});
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
function resetChat() {
|
| 96 |
+
chatBar.innerHTML = '';
|
| 97 |
+
chatInput.value = '';
|
| 98 |
+
fileInput.value = '';
|
| 99 |
+
selectedFile = null;
|
| 100 |
+
suggests.classList.remove('hidden');
|
| 101 |
+
welcomeText.classList.remove('hidden');
|
| 102 |
+
document.querySelector('.prompt__input-wrapper').classList.remove('expanded');
|
| 103 |
+
backToLatest.classList.remove('visible');
|
| 104 |
}
|
| 105 |
|
| 106 |
function applyBubbleStyle() {
|