feat: Discard all, claude-style image pastes, large local drops, per-account / list

- Changes panel: **Discard all** beside Commit discards every non-conflicted
  file in one `discard`, after a dialog naming how many untracked files go.
- Terminal: a `claude` pane gets dropped/pasted images as bare paths (shown as
  `[Image #n]`) and other files as `@` mentions (`claudePastes`); a local
  browser's copied `file://` paths and text-drag file lists paste by path.
- `POST /api/run/drop-file`: a loopback browser outside server mode may drop
  up to 2 GB, streamed to disk; remote stays 20 MB.
- cc-config skills/commands/plugins read the USER scope of the account the
  pane runs as (S3 member home by `cwd`), never another user's or the host's
  for a non-admin without an account; the run form passes its cwd to plugins.
This commit is contained in:
2026-10-21 14:27:36 +07:00
parent 0547488f13
commit aee4fc190e
16 changed files with 380 additions and 65 deletions
+13 -1
View File
@@ -354,7 +354,19 @@ describe("POST /api/run/drop-image", () => {
});
assert.equal(status, 413);
assert.equal(body.error.code, "ETOOBIG");
assert.equal(body.error.max_bytes, 20 * 1024 * 1024); // the UI shows the server's limit
// The UI shows the server's limit: a loopback browser's, here.
assert.equal(body.error.max_bytes, 2 * 1024 ** 3);
});
it("streams a loopback drop over the remote limit to disk", async () => {
const buf = Buffer.alloc(21 * 1024 * 1024, 7);
const r = await fetchJson("/api/run/drop-file?name=big.bin", {
method: "POST",
raw: { type: "application/octet-stream", buf },
});
assert.equal(r.status, 200);
assert.match(r.body.path, /[\\/]drops[\\/][0-9a-f]{16}-big\.bin$/);
assert.equal(fs.statSync(r.body.path).size, buf.length);
});
});