clay-server 2.21.0 → 2.21.1-beta.1
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/lib/public/app.js +1 -0
- package/lib/public/modules/input.js +6 -0
- package/package.json +1 -1
package/lib/public/app.js
CHANGED
|
@@ -2091,6 +2091,7 @@ import { initDebate, handleDebateStarted, handleDebateResumed, handleDebateTurn,
|
|
|
2091
2091
|
sendBtn.classList.add("stop");
|
|
2092
2092
|
sendBtn.innerHTML = '<i data-lucide="square"></i>';
|
|
2093
2093
|
} else {
|
|
2094
|
+
sendBtn.disabled = false;
|
|
2094
2095
|
sendBtn.classList.remove("stop");
|
|
2095
2096
|
sendBtn.innerHTML = '<i data-lucide="arrow-up"></i>';
|
|
2096
2097
|
}
|
|
@@ -437,11 +437,17 @@ function uploadFile(file) {
|
|
|
437
437
|
if (ctx.addSystemMessage) ctx.addSystemMessage("Upload failed: " + file.name, true);
|
|
438
438
|
}
|
|
439
439
|
renderInputPreviews();
|
|
440
|
+
if (ctx.processing && ctx.setSendBtnMode) {
|
|
441
|
+
ctx.setSendBtnMode(hasSendableContent() ? "send" : "stop");
|
|
442
|
+
}
|
|
440
443
|
};
|
|
441
444
|
xhr.onerror = function () {
|
|
442
445
|
uploadingCount--;
|
|
443
446
|
if (ctx.addSystemMessage) ctx.addSystemMessage("Upload failed: " + file.name, true);
|
|
444
447
|
renderInputPreviews();
|
|
448
|
+
if (ctx.processing && ctx.setSendBtnMode) {
|
|
449
|
+
ctx.setSendBtnMode(hasSendableContent() ? "send" : "stop");
|
|
450
|
+
}
|
|
445
451
|
};
|
|
446
452
|
xhr.send(JSON.stringify({ name: file.name, data: b64 }));
|
|
447
453
|
};
|