From 1ea9944f724413e2dd8a05c115f866d45210b4c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 09:25:44 +0000 Subject: [PATCH] fix: Address code review feedback - deprecated substr, chatQuick timing Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/6138ad64-32ec-4191-9730-de0bf24e87a8 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- docs/index.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/index.html b/docs/index.html index c5554995..e66684a1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2389,7 +2389,7 @@ function saveConversations(){ if(activeConvId)try{localStorage.setItem(HL_ACTIVE_CONV,activeConvId)}catch(e){} } function newConversation(){ - var id='conv-'+Date.now()+'-'+Math.random().toString(36).substr(2,4); + var id='conv-'+Date.now()+'-'+Math.random().toString(36).slice(2,6); var conv={id:id,title:'新对话',messages:[],created:new Date().toISOString(),updated:new Date().toISOString()}; conversations.unshift(conv); activeConvId=id; @@ -3400,8 +3400,12 @@ function renderWorkspace(){ window.chatQuick = function(cmd){ chatIn.value = cmd; // Navigate to home to show chat if on another page - if(currentPage!=='home'){go('home')} - send(); + if(currentPage!=='home'){ + go('home'); + setTimeout(function(){send()},600); + }else{ + send(); + } }; /* ════════════════════════════════════════