Wevir
开源 Agent Harness
本地优先、多端协同的 Agent Harness。BYOK 接入 Claude、GPT、Gemini 与本地模型;桌面、CLI、移动端共享同一会话;代码与密钥不出本机,零遥测。
- 开源
- macOS · Windows · Linux
- CLI
- 移动端
~/code/tinyshop
Claude· BYOK
结算金额偶发 0.01 偏差。定位根因,修复并补充测试。
定位根因
- 读取src/cart/total.ts
- 检索toFixed(
- 编辑src/cart/total.ts+3 −2
- 执行pnpm test cart24 通过
根因:浮点累加后调用 toFixed(2)。已改为以「分」为单位的整数运算。
接受变更
MacBook Pro iPhone
src/cart/total.ts+3−2
3 export function total(items: Item[]) {4− const sum = items.reduce((s, i) => s + i.price * i.qty, 0)5− return sum.toFixed(2)4+ const cents = items.reduce(5+ (s, i) => s + Math.round(i.price * 100) * i.qty, 0)6+ return (cents / 100).toFixed(2)7 }
pnpm test cart✓ 24 passed
界面示意