From 84b69c69ef7596dd9d6e1755c7298477cae2cf7b Mon Sep 17 00:00:00 2001 From: Zhuyuan Operations Date: Tue, 4 Aug 2026 02:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E6=9D=BF=EF=BC=9AWorkBuddy=E6=AF=8F?= =?UTF-8?q?=E6=AC=A1=E8=B0=83=E7=94=A8=E9=83=BD=E6=8B=BC=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E5=AE=8C=E6=95=B4=E5=8E=86=E5=8F=B2=EF=BC=88=E5=88=87=E5=9B=9E?= =?UTF-8?q?DeepSeek=E5=86=8D=E5=88=87WB=E4=B9=9F=E4=B8=8D=E4=B8=A2?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=86=85=E5=AE=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/eed_web_opencode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/eed_web_opencode.py b/scripts/eed_web_opencode.py index fa0af7f..4757abb 100644 --- a/scripts/eed_web_opencode.py +++ b/scripts/eed_web_opencode.py @@ -2932,11 +2932,12 @@ class Handler(http.server.BaseHTTPRequestHandler): "--tools", "Read,WebSearch,Bash", "--output-format", "stream-json", "--system-prompt", EED_SYS] - if sid in WB_SESS: - return self._stream_cmd(cmd + ["--resume", sid, "-p", message], token) - # 全新会话:把之前的对话历史带过去(跨大脑共享记忆),再开 codebuddy 场 + # 每次都用前端最新的完整历史当权威上下文(DeepSeek/WB 切换后也不丢新增内容), + # codebuddy 会话文件只用来给模型"参考之前自己说过什么"。 if history: message = build_prompt(history, message) + if sid in WB_SESS: + return self._stream_cmd(cmd + ["--resume", sid, "-p", message], token) acc = self._stream_cmd(cmd + ["--session-id", sid, "-p", message], token) WB_SESS[sid] = {"ts": time.time()} _save_wb_sess()