浏览代码

fix: chat history styling

Timothy J. Baek 1 年之前
父节点
当前提交
7a5a803168
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 12 1
      src/routes/+page.svelte

+ 12 - 1
src/routes/+page.svelte

@@ -385,7 +385,6 @@
 			}
 
 			renderLatex();
-
 			hljs.highlightAll();
 			createCopyCodeBlockButton();
 		}
@@ -546,6 +545,12 @@
 				history.currentId = messageId;
 			}
 		}
+
+		await tick();
+
+		renderLatex();
+		hljs.highlightAll();
+		createCopyCodeBlockButton();
 	};
 
 	const showNextMessage = async (message) => {
@@ -586,6 +591,12 @@
 				history.currentId = messageId;
 			}
 		}
+
+		await tick();
+
+		renderLatex();
+		hljs.highlightAll();
+		createCopyCodeBlockButton();
 	};
 
 	//////////////////////////