From 203ecee955775ad507ba331fc32e8c4dd1982f8b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Mar 2026 13:52:16 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E8=BF=9B=E6=BB=91=E5=8A=A8?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E4=BF=9D=E7=95=99=E6=9C=80=E8=BF=91=E6=B6=88?= =?UTF-8?q?=E6=81=AF=20+=20=E6=B7=BB=E5=8A=A0=E5=8C=97=E4=BA=AC=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/bridge-session-summary.yml | 4 ++-- docs/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bridge-session-summary.yml b/.github/workflows/bridge-session-summary.yml index 5ec80bdd..c559d7c9 100644 --- a/.github/workflows/bridge-session-summary.yml +++ b/.github/workflows/bridge-session-summary.yml @@ -8,8 +8,8 @@ name: Generate Session Summary for Notion on: schedule: - - cron: '50 23 * * *' - - cron: '50 14 * * *' + - cron: '50 23 * * *' # 07:50 Beijing Time + - cron: '50 14 * * *' # 22:50 Beijing Time workflow_dispatch: permissions: diff --git a/docs/index.html b/docs/index.html index ffe56efe..a33bfcfe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1579,14 +1579,14 @@ function trimMessagesForContext(sysMsgs, msgs, isGuest){ const reserve = CONTEXT_CONFIG.systemPromptReserve; const sysTokens = sysMsgs.reduce((n,m)=>n+estimateTokens(m.content),0); const budget = limit - Math.max(sysTokens, reserve); - if(budget<=0) return sysMsgs; // 从最新消息向前累加,滑动窗口裁剪最早消息 + // 预算不足时至少保留最近一条用户消息 const kept=[]; let used=0; for(let i=msgs.length-1;i>=0;i--){ const t=estimateTokens(msgs[i].content); - if(used+t>budget) break; + if(used+t>budget && kept.length>0) break; kept.unshift(msgs[i]); used+=t; }