ai_co_discuss 0.6.13 → 0.6.14
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/package.json +1 -1
- package/web/app.js +8 -2
- package/web/modern.css +1 -1
- package/web/modern.js +5 -5
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -8457,7 +8457,10 @@ async function load_relay_media(media) {
|
|
|
8457
8457
|
if (media.tagName !== "IMG") show_attachment_media_error(media, t("媒体加载失败,请重试或下载。"));
|
|
8458
8458
|
}
|
|
8459
8459
|
};
|
|
8460
|
-
|
|
8460
|
+
// A Markdown file's images all queue when it opens, so time spent waiting behind the others would count against
|
|
8461
|
+
// the later ones; they are not timed (#26089).
|
|
8462
|
+
const deadline = media.closest("[data-markdown-image]") ? 0
|
|
8463
|
+
: setTimeout(() => { mark_failed(); release_relay_media(media); }, RELAY_MEDIA_TIMEOUT_MS);
|
|
8461
8464
|
const release = () => {
|
|
8462
8465
|
clearTimeout(deadline);
|
|
8463
8466
|
if (relay_media_reads.get(media) === release) relay_media_reads.delete(media);
|
|
@@ -8507,7 +8510,10 @@ function show_relay_images(records) {
|
|
|
8507
8510
|
for (const node of record.addedNodes) {
|
|
8508
8511
|
if (node.nodeType !== Node.ELEMENT_NODE || !node.isConnected) continue;
|
|
8509
8512
|
for (const image of node.matches(selector) ? [node] : node.querySelectorAll(selector)) {
|
|
8510
|
-
|
|
8513
|
+
// A project Markdown file's images are read as soon as it opens, in document order through the shared queue
|
|
8514
|
+
// (user 2026-12-04, #26089): its preview scrolls inside its own box, which clips the observer's margin to
|
|
8515
|
+
// nothing, so each image only started reading once it was already on screen.
|
|
8516
|
+
if (relay_media_observer && !image.closest("[data-markdown-image]")) watch_relay_media(image);
|
|
8511
8517
|
else load_relay_media(image);
|
|
8512
8518
|
}
|
|
8513
8519
|
}
|