This commit is contained in:
Timothy Jaeryang Baek committed 2026-03-07 17:06:30 -06:00
1 parent e6b00a8905
commit 626fcff417
1 file changed
+5 -1
+5 -1
View File
@@ -934,7 +934,8 @@
} }
}; };
$: if (history) { const onHistoryChange = (history) => {
if (history) {
cancelAnimationFrame(contentsRAF); cancelAnimationFrame(contentsRAF);
contentsRAF = requestAnimationFrame(() => { contentsRAF = requestAnimationFrame(() => {
getContents(); getContents();
@@ -943,6 +944,9 @@
} else { } else {
artifactContents.set([]); artifactContents.set([]);
} }
};
$: onHistoryChange(history);
const getContents = () => { const getContents = () => {
const messages = history ? createMessagesList(history, history.currentId) : []; const messages = history ? createMessagesList(history, history.currentId) : [];