diff --git a/static/boot.js b/static/boot.js index 2b6d8347..b1c67dd6 100644 --- a/static/boot.js +++ b/static/boot.js @@ -1662,6 +1662,17 @@ function applyBotName(){ if(typeof fetchReasoningChip==='function') fetchReasoningChip(); if(typeof refreshProviderQuotaIndicator==='function') refreshProviderQuotaIndicator(); const urlSession=(typeof _sessionIdFromLocation==='function')?_sessionIdFromLocation():null; + const pwaLaunchAction=(window.HermesPWA&&typeof window.HermesPWA.launchAction==='function') + ? window.HermesPWA.launchAction() + : null; + if(pwaLaunchAction==='new-chat'){ + try{ + await newSession(true); + if(S.session) await _startBootModelDropdown(); + S._bootReady=true; + syncTopbar();syncWorkspacePanelState();await renderSessionList();if(typeof startGatewaySSE==='function')startGatewaySSE();return; + }catch(e){console.warn('[pwa] new-chat launch action failed', e);} + } const savedLocal=localStorage.getItem('hermes-webui-session'); const saved=urlSession||savedLocal; if(saved){ diff --git a/static/index.html b/static/index.html index 8b4009c0..222998e8 100644 --- a/static/index.html +++ b/static/index.html @@ -2,7 +2,7 @@
- +