@blade-hq/agent-react 2612.0.0-beta.78 → 2612.0.0-beta.79
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.
- package/dist/rich-input.js +5 -2
- package/dist/rich-input.js.map +1 -1
- package/package.json +2 -2
package/dist/rich-input.js
CHANGED
|
@@ -26851,7 +26851,7 @@ function useInputHistory(sessionId, client) {
|
|
|
26851
26851
|
}
|
|
26852
26852
|
|
|
26853
26853
|
// src/rich-input/lib/attachment-upload.ts
|
|
26854
|
-
var ATTACHMENT_SIZE_LIMIT_BYTES =
|
|
26854
|
+
var ATTACHMENT_SIZE_LIMIT_BYTES = 1024 * 1024 * 1024;
|
|
26855
26855
|
function formatFileSize(size) {
|
|
26856
26856
|
if (size < 1024) {
|
|
26857
26857
|
return `${size} B`;
|
|
@@ -26859,7 +26859,10 @@ function formatFileSize(size) {
|
|
|
26859
26859
|
if (size < 1024 * 1024) {
|
|
26860
26860
|
return `${(size / 1024).toFixed(size >= 100 * 1024 ? 0 : 1)} KB`;
|
|
26861
26861
|
}
|
|
26862
|
-
|
|
26862
|
+
if (size < 1024 * 1024 * 1024) {
|
|
26863
|
+
return `${(size / (1024 * 1024)).toFixed(size >= 10 * 1024 * 1024 ? 0 : 1)} MB`;
|
|
26864
|
+
}
|
|
26865
|
+
return `${(size / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
26863
26866
|
}
|
|
26864
26867
|
function splitFilesBySize(files, limitBytes = ATTACHMENT_SIZE_LIMIT_BYTES) {
|
|
26865
26868
|
const accepted = [];
|