Skip to content

Commit 6a1414b

Browse files
committed
fix: remove legacy run in ChatMessage.svelte
1 parent 71eab20 commit 6a1414b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/components/chat/ChatMessage.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { run } from "svelte/legacy";
3-
42
import type { Message } from "$lib/types/Message";
53
import { createEventDispatcher, tick } from "svelte";
64
import { page } from "$app/state";
@@ -109,15 +107,17 @@
109107
update.subtype === MessageWebSearchUpdateType.Sources
110108
)?.sources
111109
);
112-
run(() => {
110+
111+
$effect(() => {
113112
if (isCopied) {
114113
setTimeout(() => {
115114
isCopied = false;
116115
}, 1000);
117116
}
118117
});
118+
119119
let editMode = $derived(editMsdgId === message.id);
120-
run(() => {
120+
$effect(() => {
121121
if (editMode) {
122122
tick();
123123
if (editContentEl) {

0 commit comments

Comments
 (0)