Skip to content

Commit b3af74a

Browse files
committed
fix(#52): correct cascadeConversationReuse copy + weighted credits panel
The i18n hint said "默认关闭" while runtime-config.js has defaulted to true since 2.0 — superkura opened #52 ("关闭了对话还在使用 cascade") because the dashboard told him the toggle was off. Flip both locales to "默认开启" and spell out what the toggle actually controls: cascade_id reuse across requests only, not whether Cascade is used (all premium models always go through Cascade; tool-emulated requests auto-skip reuse regardless of this setting). Credits panel: add S+/S/A+/A/B+ weight badge with tooltip describing why each contributor earned their tier; append PR #51 (aict666, Opus injection-guard rewrite) and PR #45 (baily-zhang, trajectory offset) that were missing from the list; expand summaries for S+/S contributors to name the specific regression each fix eliminated.
1 parent 2557fb8 commit b3af74a

3 files changed

Lines changed: 76 additions & 36 deletions

File tree

src/dashboard/i18n/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@
222222
},
223223
"cascadeReuse": {
224224
"title": "Cascade Conversation Reuse",
225-
"desc": "Reuse the same cascade_id across multi-turn conversations, only sending the latest user message to Windsurf. Let the server maintain context cache. Significantly reduces TTFB and upload volume on cache hits; automatically falls back to new session on cache miss or account/LS change. Requires client to retain full history and append in order (e.g., new-api, OpenWebUI).",
225+
"desc": "Reuse the same cascade_id across multi-turn conversations, only sending the latest user message to Windsurf. Let the server maintain context cache. Significantly reduces TTFB and upload volume on cache hits; automatically falls back to new session on cache miss or account/LS change. Requires client to retain full history and append in order (e.g., new-api, OpenWebUI). Note: this toggle only governs cascade_id reuse across requests — it does NOT control whether Cascade is used. Tool-emulated requests (Claude Code / Cline / Cursor) auto-skip reuse because each turn's content changes, regardless of this setting.",
226226
"enable": "Enable Cascade Conversation Reuse",
227-
"hint": "Disabled by default. When enabled, takes effect immediately on current conversation pool."
227+
"hint": "Enabled by default. When disabled, Cascade is still used but a fresh session is created per turn. Takes effect immediately on current conversation pool."
228228
},
229229
"identityPrompt": {
230230
"title": "Model Identity Prompt",

src/dashboard/i18n/zh-CN.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@
218218
},
219219
"cascadeReuse": {
220220
"title": "Cascade 对话复用",
221-
"desc": "多轮对话时复用同一个 cascade_id,只把最新一条 user 消息发给 Windsurf,让服务端维持上下文缓存。命中时可显著降低 TTFB 与上传体积;未命中或账号/LS 变更会自动回退到新会话。需要客户端保留完整历史并按顺序追加(如 new-api、OpenWebUI)。",
221+
"desc": "多轮对话时复用同一个 cascade_id,只把最新一条 user 消息发给 Windsurf,让服务端维持上下文缓存。命中时可显著降低 TTFB 与上传体积;未命中或账号/LS 变更会自动回退到新会话。需要客户端保留完整历史并按顺序追加(如 new-api、OpenWebUI)。注意:此开关只控制 cascade_id 的跨请求复用,不控制是否走 Cascade 模式;工具调用请求(Claude Code / Cline / Cursor)因每轮内容变化自动跳过复用,不受此开关影响。",
222222
"enable": "启用 Cascade 对话复用",
223-
"hint": "默认关闭。开启后对当前对话池立即生效"
223+
"hint": "默认开启。关闭后每轮仍走 Cascade,只是不再复用上一轮的 session。对当前对话池立即生效"
224224
},
225225
"identityPrompt": {
226226
"title": "模型身份提示词",

src/dashboard/index.html

Lines changed: 72 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,13 @@
14051405
.contributor-card .meta-top .merged-at { font-size: 11px; color: var(--text-dim); }
14061406
.contributor-card .pr-title { font-weight: 500; margin-top: 4px; font-size: 13px; }
14071407
.contributor-card .summary { font-size: 13px; color: var(--text-muted); line-height: 1.65; margin-top: 6px; }
1408+
.contributor-card .weight-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; font-family: var(--font-mono, ui-monospace, monospace); line-height: 1.5; }
1409+
.contributor-card .weight-S-plus { background: linear-gradient(135deg, #f3c677, #d97706); color: #3a2806; box-shadow: 0 0 0 1px rgba(217,119,6,0.25); }
1410+
.contributor-card .weight-S { background: #c2410c; color: #fff7ed; }
1411+
.contributor-card .weight-A-plus { background: #d97706; color: #fffbeb; }
1412+
.contributor-card .weight-A { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
1413+
.contributor-card .weight-B-plus { background: transparent; color: var(--text-muted); border: 1px dashed var(--border); }
1414+
.contributor-card .weight-B { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
14081415
</style>
14091416
<script type="module">
14101417
import { initializeApp } from 'https://www.gstatic.com/firebasejs/11.6.0/firebase-app.js';
@@ -4700,53 +4707,85 @@ <h3 data-i18n="login.title">控制台登录</h3>
47004707
// new PR lands; the dashboard Credits panel renders straight from this.
47014708
CONTRIBUTORS: [
47024709
{
4703-
login: 'dd373156',
4704-
pr: 1,
4705-
mergedAt: '2026-04-20',
4706-
title: 'fix(models): make pro tier include dynamically merged cloud models',
4707-
summary: '发现 Pro 层级只看到硬编码的模型清单,拉自云端的动态扩展模型没合并进 tier 表,导致 Cursor / Cherry Studio 等客户端在 Pro 账号下也看不见最新上线的模型。修了 mergeCloudModels 的合并路径,让云端扩展模型进入 Pro 的可用清单。',
4710+
login: 'aict666',
4711+
pr: 51,
4712+
weight: 'S+',
4713+
weightLabel: '最高信任级别:root-cause 精准、测试齐全、诊断可追溯',
4714+
mergedAt: '2026-04-24',
4715+
title: 'fix: 重写 tool preamble 去 jailbreak 措辞,绕过 Opus 4.7 injection guard',
4716+
summary: 'Opus-class 模型走 /v1/messages 时完全不 emit <tool_call>,直接回复"The pasted content appears to be a prompt-injection attempt"。root cause 精确到 TOOL_PROTOCOL_HEADER 里三段越狱措辞(IGNORE any earlier / For THIS request only / [Tool-calling context] 栅栏)被 Opus 自己的 injection detector 反杀。重写成中性的 "The following functions are available for this turn",保留 <tool_call> 协议合同与 parser 不动,附带 3 条 banned-regex 回归测试防止未来倒退。PR body 可以直接发 Anthropic 论坛。',
47084717
},
47094718
{
4710-
login: 'colin1112a',
4711-
pr: 13,
4712-
mergedAt: '2026-04-21',
4713-
title: 'fix: 一次性审计并提交 15 个安全 / 并发 / 资源管理 bug',
4714-
summary: '系统性扫了一遍仓库,围绕 XSS 转义、shell 注入、OOM 防护、auth 路由位置、gRPC 双回调、LS pool 竞态、HTTP/2 frame 上限等方向提 PR。',
4719+
login: 'baily-zhang',
4720+
pr: 45,
4721+
weight: 'S',
4722+
weightLabel: '根因修复:上下文重放 / usage 累加',
4723+
mergedAt: '2026-04-24',
4724+
title: 'fix: 切断 Cascade 复用时的旧 step 重放(alpha→alphabeta→alphabeta…)',
4725+
summary: '复用 cascade_id 时 GetCascadeTrajectorySteps 每次都从 step 0 拉,结果旧 step 的 assistant text 被重放到新轮里,输出变成 "alpha" → "alphabeta" → "alphabetabeta";usage 也累加成整条 cascade 的总量。修法是把 stepOffset / generatorOffset 随 pool entry 持久化,每次复用时从上次的 offset 继续拉。给 PR #36 之后仍报胡言乱语的用户找回最后一块拼图。',
47154726
},
47164727
{
4717-
login: 'motto1',
4718-
pr: 20,
4719-
mergedAt: '2026-04-21',
4720-
title: 'fix(dashboard): support Auth1 login and batch import',
4721-
summary: '为 Dashboard 添加 Windsurf Auth1 登录支持和批量账号导入功能。',
4728+
login: 'aict666',
4729+
pr: 44,
4730+
weight: 'S+',
4731+
weightLabel: '账号 tier 识别的关键修复',
4732+
mergedAt: '2026-04-24',
4733+
title: 'fix(auth): 阻止 non-premium 调用把 Pro/Trial 降级为 free',
4734+
summary: 'updateCapability 在每次成功 chat 后无条件 inferTier() 覆写 account.tier。inferTier 只认 claude-opus-4.6 / sonnet-4.6 作为 Pro 证据,Pro 账号只要调用 gemini-2.5-flash 或 gpt-4o-mini 一次就被悄悄降级到 free,后续请求按 free 限制,Dashboard 显示 FREE。修法是当 GetUserStatus 已经给过权威 tier(userStatusLastFetched > 0 或 tierManual=true)时跳过 inferTier 回退。probeAccount 原本有手动 restore 工作绕过,chat handler 路径没有,每个真实 API 调用都在偷偷降级账号。',
47224735
},
47234736
{
4724-
login: 'youfak',
4725-
pr: 26,
4726-
mergedAt: '2026-04-22',
4727-
title: 'feat: Docker support + LS restart fix',
4728-
summary: 'Docker Compose 部署支持、Dockerfile 编写、LS 进程重启修复。',
4737+
login: 'smeinecke',
4738+
pr: 43,
4739+
weight: 'A',
4740+
weightLabel: '国际化基础设施贡献者',
4741+
mergedAt: '2026-04-24',
4742+
title: 'feat: Dashboard 完整 i18n 国际化',
4743+
summary: '14 个 commit 把所有硬编码中文改成 I18n.t() 调用,补齐 en.json / zh-CN.json 缺键,加 check-i18n.js 扫 JavaScript 里的 I18n.t() key 确保 locale 里都有对应翻译。让 Dashboard 真正能中英双语切换,不是翻了一半的半成品。',
47294744
},
47304745
{
47314746
login: 'baily-zhang',
47324747
pr: 36,
4748+
weight: 'S',
4749+
weightLabel: '上下文丢失根因修复者',
47334750
mergedAt: '2026-04-22',
4734-
title: 'fix: Cascade reuse stableTurns + offset tracking',
4735-
summary: 'PR #36 修复 fingerprint 0% 命中率(stableTurns 只 hash user+tool);PR #45 增量 offset 消除多轮复用时的上下文膨胀。',
4751+
title: 'fix: fingerprint 只 hash 稳定轮,消除 0% 复用命中',
4752+
summary: 'Claude Code 每次重构 assistant content(数组 ↔ 字符串 ↔ 含 tool_use blocks)而 system prompt 又含动态项目状态,老 fingerprint 把这两者 hash 进去导致永不匹配。改成只 hash user + tool_result 两类稳定轮,system prompt 通过 CASCADE_REUSE_HASH_SYSTEM=1 opt-in。外加可配置历史 budget(1m 模型更大默认)+ LS_DATA_DIR override。#24 "胡言乱语"爆发后的第一块拼图,和 PR #45 合起来算这条线上最彻底的修复。',
47364753
},
47374754
{
4738-
login: 'aict666',
4739-
pr: 44,
4740-
mergedAt: '2026-04-24',
4741-
title: 'fix(auth): don\'t demote Pro/Trial tier after each chat call',
4742-
summary: '修复 chat 调用后 inferTier 把 Pro/Trial 账号降级为 free 的 bug,保护了 GetUserStatus 设定的权威 tier。',
4755+
login: 'youfak',
4756+
pr: 26,
4757+
weight: 'A+',
4758+
weightLabel: '部署体验贡献者:Docker 零依赖适配',
4759+
mergedAt: '2026-04-22',
4760+
title: 'feat: Docker 全套部署 + DATA_DIR + LS 重启兜底',
4761+
summary: 'Dockerfile / docker-compose.yml / .dockerignore / .gitattributes 一整套,配 DATA_DIR 配置项把 accounts.json / stats.json / logs/ 等持久化文件统一收敛到可挂载的数据目录。附带修两个 LS 稳定性问题:Windows 宿主机构建时 install-ls.sh 的 CRLF 会导致容器内 set: pipefail 报错;Dashboard 点重启 LS 时若启动失败会把整个 Node 进程打崩。',
47434762
},
47444763
{
4745-
login: 'smeinecke',
4746-
pr: 43,
4747-
mergedAt: '2026-04-24',
4748-
title: 'feat: Dashboard 完整 i18n 国际化',
4749-
summary: '14 个 commit 覆盖中英文翻译 + I18n 系统 + check-i18n.js 校验工具。Dashboard 支持中英文切换。',
4764+
login: 'motto1',
4765+
pr: 20,
4766+
weight: 'A',
4767+
weightLabel: '登录取号链路还原',
4768+
mergedAt: '2026-04-21',
4769+
title: 'fix(dashboard): 补上 Windsurf 官网实际使用的 Auth1 登录链路',
4770+
summary: '官网可以登但 Dashboard 登录失败 —— 原因是旧 Firebase 路径已不是主链路。逆向补出 /_devin-auth/connections → /_devin-auth/password/login → WindsurfPostAuth → GetOneTimeAuthToken 四步流程,保留旧 Firebase 作为兜底,再顺手加了邮箱/密码批量导入 + 剪贴板读取。',
4771+
},
4772+
{
4773+
login: 'dd373156',
4774+
pr: 1,
4775+
weight: 'B+',
4776+
weightLabel: '首位外部 PR 贡献者',
4777+
mergedAt: '2026-04-20',
4778+
title: 'fix(models): 让 pro tier 识别到云端动态合并的模型',
4779+
summary: 'MODEL_TIER_ACCESS.pro 引用的是 ALL_MODEL_KEYS —— 模块加载时的 Object.keys(MODELS) 快照。mergeCloudModels 启动后加进来的五个 claude-opus-4-7-* 永远不在这个冻结数组里,每个请求都 403 model_not_entitled。一行改成 getter 让每次访问都重新枚举 live MODELS dict。三步 curl 复现写得教科书级。',
4780+
},
4781+
{
4782+
login: 'colin1112a',
4783+
pr: 13,
4784+
weight: 'B+',
4785+
weightLabel: '早期代码审查先行者(PR 未合但方向正确)',
4786+
mergedAt: '2026-04-21',
4787+
title: 'fix: 一次性审计并提交 15 个安全 / 并发 / 资源管理 bug',
4788+
summary: '系统性扫了一遍仓库提了 CRITICAL/HIGH/MEDIUM 15 条修复建议:XSS 转义、shell 注入防护、10MB body 上限、auth 路由顺序、gRPC 双回调保护、LS pool 并发竞态、HTTP/2 frame 16MB 上限、varint BigInt 支持。PR 因改动面过大未直接合并,但其中多项被后续独立重做。',
47504789
},
47514790
],
47524791
loadCredits() {
@@ -4758,6 +4797,7 @@ <h3 data-i18n="login.title">控制台登录</h3>
47584797
<div class="meta">
47594798
<div class="meta-top">
47604799
<a class="name" target="_blank" rel="noopener" href="https://github.com/${this.esc(c.login)}">@${this.esc(c.login)}</a>
4800+
${c.weight ? `<span class="weight-badge weight-${this.esc(c.weight).replace('+','-plus')}" title="${this.esc(c.weightLabel || '')}">${this.esc(c.weight)}</span>` : ''}
47614801
<a class="pr-link" target="_blank" rel="noopener" href="https://github.com/dwgx/WindsurfAPI/pull/${c.pr}">PR #${c.pr}</a>
47624802
<span class="merged-at">${this.esc(c.mergedAt)}</span>
47634803
</div>

0 commit comments

Comments
 (0)