Versions 4 to 5
new file, 171 lines
4+
16+
21+const seen: { method: string; url: string; headers: Record<string, string | string[] | undefined>; body: Buffer }[] =
24+
33+ const json = (o: unknown) => res.writeHead(200, { "content-type": "application/json" }).end(JSON.stringify(o));
54+
61+
62+async function avcs(cwd: string, argv: string[]): Promise<{ exit: number; out: string; json?: unknown }> {
70+
75+ const r = await avcs(dir, ["init", "--server", fake.url, "--project", `attach${++n}`, "--agent", "ann"]);
81+
86+ const r = await avcs(dir, ["issue", "new", "The page after the fix", "--attach", "shot.png,after.png"]);
96+ const opened = JSON.parse(calls[2]!.body.toString()) as { title: string; attachments: string[] };
101+
107+ const comment = JSON.parse(seen.at(-1)!.body.toString()) as { text: string; attachments: string[] };
115+
124+
154+ attachments: [{ id: "a00000000000f", name: "mine.png", type: "image/png", size: 3 * 1024 * 1024 }],
167+ /attached a0123456789ab: "shot.png", 2 KB, https:\/\/issues.example\/p\/x\/attachments\/a0123456789ab/,
- MCP
- compare on this site's /mcp
- CLI
- abso diff 4 5 client/test/attach.test.ts --json
- JSON
- /christopher/abso-core/compare/4..5?file=client%2Ftest%2Fattach.test.ts&format=json