Make English the repository working language (#5)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-20 17:45:02 +08:00
committed by GitHub
parent e80cde0ea6
commit 0eaaa54e25
136 changed files with 1515 additions and 1352 deletions
+4 -4
View File
@@ -7,23 +7,23 @@ import { describe, expect, it } from "vitest";
import { DEFAULT_CONTEXT_WINDOW, resolveContextWindow } from "../src/lib/context";
describe("resolveContextWindow", () => {
it("正数原样返回", () => {
it("positive numbers return as-is", () => {
expect(resolveContextWindow(200000)).toBe(200000);
expect(resolveContextWindow(1)).toBe(1);
});
it("未配置(undefined / null)回退缺省 128000", () => {
it("unset (undefined / null) falls back to the default 128000", () => {
expect(resolveContextWindow(undefined)).toBe(128000);
expect(resolveContextWindow(null)).toBe(DEFAULT_CONTEXT_WINDOW);
});
it("Trace 的 model_context_window 可能是字符串:数字串解析、`unknown` 回退", () => {
it("Trace's model_context_window may be a string: numeric strings parse, `unknown` falls back", () => {
expect(resolveContextWindow("200000")).toBe(200000);
expect(resolveContextWindow("unknown")).toBe(128000);
expect(resolveContextWindow("")).toBe(128000);
});
it("非正数(0 / 负数 / NaN)回退缺省", () => {
it("non-positive (0 / negative / NaN) falls back to the default", () => {
expect(resolveContextWindow(0)).toBe(128000);
expect(resolveContextWindow(-5)).toBe(128000);
expect(resolveContextWindow(Number.NaN)).toBe(128000);