refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries
This commit is contained in:
1 parent
3f1c6d02f6
commit
27c0f27434
268 files changed
+7468
-7852
No files matched your search
@@ -150,14 +150,14 @@ describe("按上游装配", () => {
|
||||
it("测试补全带 sessionId:OpenCode Go 请求头有 x-opencode-session", async () => {
|
||||
const seen: { url: string; headers: Headers }[] = [];
|
||||
const orig = globalThis.fetch;
|
||||
globalThis.fetch = (async (input: RequestInfo | URL, init?: RequestInit) => {
|
||||
const req = new Request(input, init);
|
||||
globalThis.fetch = (async (input: string | Request | URL, init?: RequestInit) => {
|
||||
const req = new Request(input instanceof Request ? input : String(input), init);
|
||||
seen.push({ url: req.url, headers: req.headers });
|
||||
return new Response(JSON.stringify({ error: { message: "stubbed" } }), {
|
||||
status: 500,
|
||||
headers: { "content-type": "application/json" },
|
||||
});
|
||||
}) as typeof fetch;
|
||||
}) as typeof globalThis.fetch;
|
||||
try {
|
||||
const c = new PiUpstreamClient(
|
||||
spec({ provider: "opencode-go", authKind: "api_key" }),
|
||||
|
||||
Reference in new issue
Block a user