feat: zcode thinking-mode 0.3.0(state历史+rollback+分写+校验收紧+34用例全绿+文档)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
description: 切换思考模式档位(low/max/high,可加 --model 只改单个模型,可加 --hot-only/--persist-only 分写)
|
||||
argument-hint: <low|max|high> [--model 模型名] [--hot-only|--persist-only]
|
||||
---
|
||||
|
||||
用 Bash(Windows 用 git-bash)运行:
|
||||
|
||||
```bash
|
||||
THINK_SCRIPT="${ZCODE_THINKING_SCRIPT:-$(find ~/.zcode/plugins -maxdepth 4 -name thinking.mjs -path '*thinking-mode*' 2>/dev/null | head -1)}"
|
||||
[ -n "$THINK_SCRIPT" ] || THINK_SCRIPT="$(find ~/.zcode -maxdepth 8 -type f -path '*thinking-mode/scripts/thinking.mjs' 2>/dev/null | head -1)"
|
||||
[ -n "$THINK_SCRIPT" ] || { echo "找不到 thinking.mjs:插件未安装或不在默认位置,可用 ZCODE_THINKING_SCRIPT 指定路径"; exit 1; }
|
||||
node "$THINK_SCRIPT" set $ARGUMENTS
|
||||
```
|
||||
|
||||
- 不带 `--model` → 改**全部**带 reasoning 的模型(或默认值文件里指定的那个)
|
||||
- 不带档位参数 → 用默认值文件里的默认档位;两处都没有会明确报错,不会瞎猜一个档位就改配置
|
||||
- 校验是整批收紧的:档位不在全部目标的 variants 并集里(如 `ultra`)直接拒绝,两边都不写;
|
||||
目标里只要有一个模型不支持该档位,**整批中止**,不做部分切换
|
||||
- `--hot-only` 只写热档位(不碰模型配置);`--persist-only` 只写模型配置(不碰热档位);两者不能同时用
|
||||
- 改写模型配置前会在同目录留备份 `config.json.bak-<yyyyMMdd-HHmmss>`;
|
||||
回滚用 `/thinking:rollback`(按切换历史把两边写回去),或把备份拷回去
|
||||
|
||||
**把脚本输出原样展示给用户**——含热档位切换结果、持久默认改动、备份路径与"当前会话补一行 `/effort <档位>` 即热切"提示,不要省略。
|
||||
失败时把报错原文带上(尤其"模型 X 不支持档位 Y(可选:…)"),它已经说明了哪个模型、支持哪些档位。
|
||||
|
||||
用户附加要求:$ARGUMENTS
|
||||
Reference in New Issue
Block a user