From 44c4c3c499e49301d155b5e3c40662f1ff657b22 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 14 Aug 2025 04:36:44 +0000 Subject: [PATCH] Action Commit --- docs/index.html | 60 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/docs/index.html b/docs/index.html index d0d599d..1e0d616 100644 --- a/docs/index.html +++ b/docs/index.html @@ -18,33 +18,29 @@
-
+ +
-
 
- - -
-
-
-
-
-
šŸ¤–
-
-
Hello!
- I’m wired to OpenRouter. Click the key badge to set an API key. Click any šŸ¤– avatar to tune model & sampling. -
-
+ + + + +
+ + + +
+
@@ -152,6 +148,7 @@
+ @@ -172,6 +169,7 @@ newChatBtn: document.getElementById('newChatBtn'), apiBadge: document.getElementById('apiBadge'), statusText: document.getElementById('statusText'), + settingsBtnTop: document.getElementById('settingsBtnTop'), // settings modal settingsModal: document.getElementById('settingsModal'), @@ -304,20 +302,15 @@ return bubble; } - function clearChat(intro = true) { + // Make chat start blank and keep Clear/New blank + function clearChat(intro = false) { state.messages = []; el.messages.innerHTML = ''; - if (intro) { - const introRow = document.createElement('div'); - introRow.className = 'flex gap-3'; - introRow.innerHTML = `
šŸ¤–
New chat
You're in a fresh conversation. Click šŸ¤– to configure.
`; - el.messages.appendChild(introRow); - } } function updateStatus() { const online = !!store.apiKey; - el.apiBadge.className = 'h-8 min-w-8 px-3 rounded-full border text-xs font-medium inline-flex items-center justify-center gap-1 transition ' + (online + el.apiBadge.className = 'justify-self-end h-8 min-w-8 px-3 rounded-full border text-xs font-medium inline-flex items-center justify-center gap-1 transition ' + (online ? 'bg-black text-white border-black hover:bg-black/90' : 'bg-gray-100 text-gray-700 border-gray-200 hover:bg-gray-200'); el.statusText.textContent = online ? 'online' : 'offline'; @@ -545,6 +538,9 @@ if (target) openSettings(); }); + // Top bar assistant icon opens settings + el.settingsBtnTop.addEventListener('click', openSettings); + // Auto-resize textarea el.input.addEventListener('input', () => { el.input.style.height = 'auto'; @@ -552,9 +548,9 @@ el.input.style.height = h + 'px'; }); - // Clear / New + // Clear / New — keep chat blank (no intro bubble) el.clearBtn.addEventListener('click', () => clearChat(false)); - el.newChatBtn.addEventListener('click', () => clearChat(true)); + el.newChatBtn.addEventListener('click', () => clearChat(false)); // API badge click el.apiBadge.addEventListener('click', () => { @@ -577,6 +573,8 @@ function init() { initFromQuery(); updateStatus(); + // Start with an empty chat (no welcome bubble) + clearChat(false); } init();