CodePilot icon indicating copy to clipboard operation
CodePilot copied to clipboard

对话的前端页面为什么会加载失败

Open AlexYoung-093 opened this issue 8 months ago • 1 comments

聊天页面无法加载,点击重试或者重新加载均无效,卸载装旧版本也没用 报错代码: Cannot read properties of undefined (reading 'supportsEffort')

TypeError: Cannot read properties of undefined (reading 'supportsEffort') at _ (http://127.0.0.1:64597/_next/static/chunks/839bbb66bfcd8545.js:596:27610) at av (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:63258) at oY (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:83531) at io (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:94963) at sc (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:137984) at http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:137829 at ss (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:137837) at u9 (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:133762) at sV (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:159357) at MessagePort.O (http://127.0.0.1:64597/_next/static/chunks/03e033fbe7651128.js:1:8316)

AlexYoung-093 avatar Mar 16 '26 10:03 AlexYoung-093

已在 v0.38.1 修复

这个问题的根因是 v0.38 新增了从 localStorage 恢复上次使用的 provider/model 的功能,但没有校验旧版本遗留的无效值。Windows 卸载不会清除应用数据,所以升级后旧的 model ID 被新代码直接使用,导致 supportsEffort 崩溃。

v0.38.1 的修复:

  1. 升级迁移:从 <0.38 升级时自动清除 stale localStorage 值
  2. 启动校验:每次打开聊天页会验证 provider/model 是否仍然有效,无效自动回退
  3. 渲染层防御:MessageInput 的 supportsEffort 访问添加了 optional chaining 守卫

请更新到 v0.38.1 试试: https://github.com/op7418/CodePilot/releases

如果更新后仍有问题,请:

  1. 打开 设置 → 服务商 → 运行诊断
  2. 点击「导出日志」
  3. 将日志文件附在此 issue 回复中

op7418 avatar Mar 16 '26 12:03 op7418