From 3c573f48de582b3a493bea2d652e01aab1f33749 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 23 Jun 2026 13:03:54 +0000 Subject: [PATCH] Replace mic FAB with + and add in-chat voice button The bottom-right FAB now opens the assistant chat without starting voice. Users start voice from a new mic button beside Send. Co-authored-by: Tanops --- index.html | 16 +++++++++------- src/app/main.js | 9 +++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index 2e540b4..93222cb 100644 --- a/index.html +++ b/index.html @@ -423,15 +423,14 @@ box-shadow:0 6px 22px rgba(59,110,246,.45);display:flex;align-items:center;justify-content:center; } .micfab:active{transform:scale(.92)} - .micfab.live{background:var(--red);box-shadow:0 6px 22px rgba(226,72,61,.5);animation:pulse 1.1s infinite} .vmodal{position:fixed;inset:0;z-index:60;display:none;align-items:center;justify-content:center; padding:20px;background:rgba(20,24,35,.4)} .vmodal.show{display:flex} - /* capture window: floating, docked bottom-right ABOVE the mic; no dimming, mic stays clickable (it sits at a higher z-index) */ + /* capture window: floating, docked bottom-right ABOVE the + button; no dimming, + stays clickable (higher z-index) */ #vmodal{background:transparent;pointer-events:none} #vmodal.show{justify-content:flex-end;align-items:flex-end;padding:0 18px 102px 0} #vmodal.show .capwrap,#vmodal.show .caprestore{pointer-events:auto} - /* minimized chat: collapse the window to a small restore pill above the mic */ + /* minimized chat: collapse the window to a small restore pill above the + button */ .capmin{font-size:18px;line-height:1;font-weight:800;padding:5px 11px 8px} .caprestore{display:none;align-items:center;gap:9px;background:var(--surface);color:var(--ink); border-radius:15px;box-shadow:0 16px 50px rgba(20,24,35,.28);border:1px solid var(--line); @@ -502,7 +501,7 @@ .mini{flex:none;width:30px;height:30px;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:16px;font-weight:700; display:inline-flex;align-items:center;justify-content:center} .mini:active{transform:scale(.92)} - .cappanel.chatp .caprow{flex:none} /* keep the mic row pinned & visible */ + .cappanel.chatp .caprow{flex:none} /* keep the input row pinned & visible */ .crow.col{flex-direction:column;align-items:stretch;gap:7px} .caphead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px} .ttsbtn{font-size:12px;font-weight:700;color:var(--ink-2);background:#eef0f4;border-radius:8px;padding:7px 11px} @@ -668,7 +667,7 @@ - +
@@ -780,8 +781,9 @@

Assistant

- +
diff --git a/src/app/main.js b/src/app/main.js index 3281b36..ec55535 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -1547,11 +1547,12 @@ function pushApproved(){ if(!PROP) return; snap(); let np=0; /* ---- continuous mic: stays live, auto-sends each finished sentence as a turn until you stop it. Finished sentences are queued so a slow extract call never drops one. ---- */ let capQueue=[], speaking=false, micPaused=false; -function setMic(on){ listening=on; const f=$id("micFab"); if(f) f.classList.toggle("live",on); } -/* the bottom-right mic is the only mic: tap to open the chat (if needed) and talk; tap again to stop */ +function setMic(on){ listening=on; const v=$id("capVoice"); if(v) v.classList.toggle("live",on); } +/* bottom-right + opens chat; voice is started from the mic button beside Send */ function micFabTap(){ const m=$id("vmodal"); - if(CAP&&m&&m.classList.contains("min")){ restoreCapture(); return; } // expand instead of toggling mic - if(!CAP){ openCapture(); setTimeout(toggleListen,150); } else toggleListen(); } + if(CAP&&m&&m.classList.contains("min")){ restoreCapture(); return; } + if(!CAP) openCapture(); + else setTimeout(()=>$id("capInput")?.focus(),50); } function pushTurn(text){ capQueue.push(text); drainQueue(); } async function drainQueue(){ if(!CAP||CAP.busy) return; while(capQueue.length){ $id("capInput").value=capQueue.shift(); await sendTurn(); } }