refactor(copilot): remove unused usage total helper · openclaw/openclaw@bad21fa
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,6 @@ import type { NormalizedUsage } from "openclaw/plugin-sdk/agent-harness-runtime"
|
3 | 3 | import { describe, expect, it } from "vitest"; |
4 | 4 | import { |
5 | 5 | buildCopilotAssistantUsage, |
6 | | -deriveCopilotUsageTotal, |
7 | 6 | normalizeCopilotUsage, |
8 | 7 | } from "./usage-bridge.js"; |
9 | 8 | |
@@ -251,21 +250,4 @@ describe("usage-bridge", () => {
|
251 | 250 | }); |
252 | 251 | }); |
253 | 252 | |
254 | | -describe("deriveCopilotUsageTotal", () => { |
255 | | -it("returns undefined when usage is undefined", () => { |
256 | | -expect(deriveCopilotUsageTotal(undefined)).toBeUndefined(); |
257 | | -}); |
258 | | - |
259 | | -it("sums input/output/cacheRead/cacheWrite for total", () => { |
260 | | -const usage: NormalizedUsage = { |
261 | | -cacheRead: 3, |
262 | | -cacheWrite: 4, |
263 | | -input: 1, |
264 | | -output: 2, |
265 | | -total: 999, |
266 | | -}; |
267 | | - |
268 | | -expect(deriveCopilotUsageTotal(usage)).toBe(10); |
269 | | -}); |
270 | | -}); |
271 | 253 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。