fix: 修复 bat 编码乱码、Config.html 打不开、missing scope 问题

- fix(bat): 所有 Windows .bat 文件加 UTF-8 BOM,修复中文乱码
  (portable 和 usb-release 共 7 个文件,close #3)
- fix(usb-release/Windows-Start.bat): 首次启动打开 Config.html
  时补加 file:/// 前缀,修复浏览器无法打开本地文件的问题
  (close #12)
- fix(Config.html): gateway.auth 加入 scopes: ['operator.admin'],
  修复配置模型时报 missing scope: operator.admin 错误
  (portable / usb-release / u-claw-app 三个版本同步,close #11)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hfshfg
2026-04-01 09:31:16 +08:00
parent 4647a49cea
commit 3f6f960ffc
10 changed files with 11 additions and 11 deletions

View File

@@ -428,7 +428,7 @@ function togglePw() {
function buildOpenClawConfig(provider, base, model, apiKey) {
// Base config that OpenClaw expects
const baseConfig = {
gateway: { auth: { mode: 'token', token: 'uclaw' } },
gateway: { auth: { mode: 'token', token: 'uclaw', scopes: ['operator.admin'] } },
commands: { native: 'auto', nativeSkills: 'auto', restart: true, ownerDisplay: 'raw' },
meta: { lastTouchedVersion: '2026.3.13', lastTouchedAt: new Date().toISOString() }
};