@ai-matrx/associations 0.9.29 → 0.9.30
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/CHANGELOG.md +6 -0
- package/dist/react/index.cjs +15 -3
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +15 -3
- package/dist/react/index.js.map +1 -1
- package/package.json +5 -5
package/dist/react/index.js
CHANGED
|
@@ -3731,9 +3731,21 @@ function AssociationCaptureToolbar({
|
|
|
3731
3731
|
}
|
|
3732
3732
|
if (result.failed.length > 0) {
|
|
3733
3733
|
const first = result.failed[0];
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3734
|
+
if (result.failed.length === 1 && first) {
|
|
3735
|
+
notifier.error(`Failed to upload ${first.name}: ${first.error}`);
|
|
3736
|
+
} else {
|
|
3737
|
+
const reasonCounts = /* @__PURE__ */ new Map();
|
|
3738
|
+
for (const f of result.failed) {
|
|
3739
|
+
const reason = f.error && f.error.trim().length > 0 ? f.error : "Upload failed";
|
|
3740
|
+
reasonCounts.set(reason, (reasonCounts.get(reason) ?? 0) + 1);
|
|
3741
|
+
}
|
|
3742
|
+
const lines = Array.from(reasonCounts.entries()).map(
|
|
3743
|
+
([reason, count]) => `${count}\xD7 ${reason}`
|
|
3744
|
+
);
|
|
3745
|
+
notifier.error(`Failed to upload ${result.failed.length} files`, {
|
|
3746
|
+
description: lines.join("\n")
|
|
3747
|
+
});
|
|
3748
|
+
}
|
|
3737
3749
|
}
|
|
3738
3750
|
if (ids.length === 0 && result.failed.length === 0) {
|
|
3739
3751
|
notifier.error("Nothing was uploaded or attached");
|