ai_co_discuss 0.3.62 → 0.3.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/web/app.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai_co_discuss",
3
- "version": "0.3.62",
3
+ "version": "0.3.63",
4
4
  "bin": {
5
5
  "codiscuss": "runner/codiscuss.mjs"
6
6
  },
package/web/app.js CHANGED
@@ -59,8 +59,9 @@ const RELAY_CIPHER_INFO = "codiscuss-relay-v1";
59
59
  const RELAY_PROTOCOL = "codiscuss-relay";
60
60
  const RELAY_PING_MS = 25000;
61
61
  const ROOM_RELAY_PATH = /^\/api\/(rooms|folders|revisions)(\/|\?|$)/;
62
- // One part of a file sent to the computer stays well inside the relay's 1 MiB frame once encoded and encrypted.
63
- const RELAY_UPLOAD_PART_BYTES = 384 * 1024;
62
+ // One part is base64-encoded, encrypted and base64-encoded again (about 16/9 of its size), and the sealed request
63
+ // must stay inside the hosted site's 512 KiB request limit (backend/worker.mjs MAX_BODY_BYTES).
64
+ const RELAY_UPLOAD_PART_BYTES = 256 * 1024;
64
65
  const COMPUTER_UNREACHABLE = "电脑未连接:请先与电脑配对,并确认电脑开机且运行 codiscuss";
65
66
  let local_connection = null;
66
67
  let computer_connecting = false;