From bdb94ea604ea87707e3c983b85ba15c8407565bb Mon Sep 17 00:00:00 2001 From: w287346141 <287346141@qq.com> Date: Sun, 31 May 2026 12:25:59 +0800 Subject: [PATCH] Replace stale preset max slash copy --- docs/src/config.jsx | 2 +- docs/src/features.jsx | 4 ++-- src/i18n/EN.ts | 2 +- src/i18n/zh-CN.ts | 2 +- src/loop.ts | 4 ++-- tests/slash.test.ts | 7 +++++++ 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/src/config.jsx b/docs/src/config.jsx index a4cab3b..307b5a7 100644 --- a/docs/src/config.jsx +++ b/docs/src/config.jsx @@ -212,7 +212,7 @@ Only focus on the code touched by this diff — don't go off-topic.`, lang: 'shell', code: `# Reasoning depth + model › /pro # next turn on DeepSeek V4 Pro -› /preset max # whole session on Pro +› /preset pro # whole session on Pro › /effort high # think harder # Edit approval diff --git a/docs/src/features.jsx b/docs/src/features.jsx index a94d586..1fdbfb2 100644 --- a/docs/src/features.jsx +++ b/docs/src/features.jsx @@ -13,8 +13,8 @@ const FEATURES = [ title: { zh: 'V4 双档位', en: 'V4 two-tier' }, en: 'Flash by default · /pro on demand', desc: { - zh: '默认 DeepSeek V4 Flash 跑日常迭代控成本,/pro 单回合切到 DeepSeek V4 Pro,/preset max 整个 session 走 Pro。', - en: 'DeepSeek V4 Flash by default for cheap iteration; `/pro` lifts a single turn to DeepSeek V4 Pro; `/preset max` makes the whole session run on Pro.', + zh: '默认 DeepSeek V4 Flash 跑日常迭代控成本,/pro 单回合切到 DeepSeek V4 Pro,/preset pro 整个 session 走 Pro。', + en: 'DeepSeek V4 Flash by default for cheap iteration; `/pro` lifts a single turn to DeepSeek V4 Pro; `/preset pro` makes the whole session run on Pro.', }, }, { diff --git a/src/i18n/EN.ts b/src/i18n/EN.ts index 43085cb..38988e1 100644 --- a/src/i18n/EN.ts +++ b/src/i18n/EN.ts @@ -966,7 +966,7 @@ export const EN: TranslationSchema = { proUsage: "usage: /pro arm pro for the next turn (one-shot, auto-disarms after)\n /pro off cancel armed state before the next turn", proArmed: - "▸ /pro armed — your NEXT message runs on {model} regardless of preset. Auto-disarms after one turn. Use /preset max for a persistent switch.", + "▸ /pro armed — your NEXT message runs on {model} regardless of preset. Auto-disarms after one turn. Use /preset pro for a persistent switch.", budgetNoCap: "no session budget set — Carbon Code will keep going until you stop it. Set one with: /budget (e.g. /budget 5)", budgetStatus: diff --git a/src/i18n/zh-CN.ts b/src/i18n/zh-CN.ts index f21f538..17577fd 100644 --- a/src/i18n/zh-CN.ts +++ b/src/i18n/zh-CN.ts @@ -924,7 +924,7 @@ export const zhCN: TranslationSchema = { proUsage: "用法:/pro 为下一轮启用 pro(一次性,自动解除)\n /pro off 在下一轮前取消启用状态", proArmed: - "▸ /pro 已启用 — 您的下一条消息将在 {model} 上运行,无论预设如何。一轮后自动解除。使用 /preset max 进行持久切换。", + "▸ /pro 已启用 — 您的下一条消息将在 {model} 上运行,无论预设如何。一轮后自动解除。使用 /preset pro 进行持久切换。", budgetNoCap: "未设置会话预算 — Carbon Code 将持续运行直到您停止。使用以下方式设置:/budget (例如 /budget 5)", budgetStatus: "预算:${spent} / ${cap}({pct}%)· /budget off 清除,/budget 更改", diff --git a/src/loop.ts b/src/loop.ts index 9fe647c..91380f4 100644 --- a/src/loop.ts +++ b/src/loop.ts @@ -372,7 +372,7 @@ export class CacheFirstLoop { this._budgetWarned = false; } - /** Single-turn upgrade consumed at next step() — distinct from `/preset max` (persistent). */ + /** Single-turn upgrade consumed at next step() — distinct from `/preset pro` (persistent). */ armProForNextTurn(): void { this._proArmedForNextTurn = true; } @@ -984,7 +984,7 @@ export class CacheFirstLoop { // the counter — next attempt runs on v4-pro with the same // messages. Only triggers when the call was on a model OTHER // than the escalation model; if the user already configured - // v4-pro (via /preset max etc.), the marker is taken as a + // v4-pro (via /preset pro etc.), the marker is taken as a // no-op content and passed through verbatim, so there's no // infinite-retry loop. if ( diff --git a/tests/slash.test.ts b/tests/slash.test.ts index 5fd3c5d..7ae479a 100644 --- a/tests/slash.test.ts +++ b/tests/slash.test.ts @@ -256,6 +256,13 @@ describe("handleSlash", () => { expect(r.info).toMatch(/pro/); }); + it("/pro persistent switch hint points to the current pro preset", () => { + setLanguageRuntime("EN"); + const r = handleSlash("pro", [], makeLoop()); + expect(r.info).toContain("/preset pro"); + expect(r.info).not.toContain("/preset max"); + }); + it("/help mentions sessions", () => { const r = handleSlash("help", [], makeLoop()); expect(r.info).toMatch(/\/sessions/);