fix(grokbuild): complete proxy and deep-link integrations (#5677)

* fix(grokbuild): complete proxy integration

* fix(deeplink): preview GrokBuild configs safely

* test(app): stabilize provider integration suite

* fix(grokbuild): address review feedback

* fix(grokbuild): resolve remaining review findings

* fix(grokbuild): use native sessions and harden previews
This commit is contained in:
Thefool
2026-07-31 14:56:42 +08:00
committed by GitHub
parent b884595a23
commit c49cf96a16
16 changed files with 566 additions and 111 deletions
+10 -3
View File
@@ -194,12 +194,19 @@ describe("decodeDeeplinkPayload", () => {
describe("maskValue", () => {
it("masks credential-shaped keys but keeps ordinary values readable", () => {
expect(maskValue("ANTHROPIC_AUTH_TOKEN", "sk-ant-1234567890abcdef")).toBe(
"sk-ant-1************",
"sk-a************",
);
expect(maskValue("ANTHROPIC_BASE_URL", "https://example.com")).toBe(
"https://example.com",
);
// 短值不脱敏,否则连"是不是空的"都看不出来
expect(maskValue("API_KEY", "short")).toBe("short");
expect(maskValue("API_KEY", "short")).toBe("****");
expect(maskValue("Authorization", "Basic abcd")).not.toContain("abcd");
expect(maskValue("Cookie", "sid=1234")).toBe("****");
expect(maskValue("Credential", "credential-value")).not.toContain(
"credential-value",
);
expect(maskValue("auth", "short")).toBe("****");
expect(maskValue("bearer", "short")).toBe("****");
expect(maskValue("API_KEY", "")).toBe("");
});
});