victor HF staff commited on
Commit
2c39af6
1 Parent(s): 3d1ee75

Implemented message deletion without scrolling and removed unnecessary scroll-to-bottom logic.

Browse files
src/lib/components/Playground/Playground.svelte CHANGED
@@ -36,6 +36,7 @@
36
 
37
  function deleteMessage(i: number) {
38
  messages = messages.filter((_, j) => j !== i);
 
39
  }
40
 
41
  function reset() {
@@ -120,11 +121,6 @@
120
  }
121
  }
122
 
123
- $: {
124
- if (messages) {
125
- scrollToBottom();
126
- }
127
- }
128
  </script>
129
 
130
  <svelte:window on:keydown={onKeydown} />
 
36
 
37
  function deleteMessage(i: number) {
38
  messages = messages.filter((_, j) => j !== i);
39
+ // Don't scroll after deleting a message
40
  }
41
 
42
  function reset() {
 
121
  }
122
  }
123
 
 
 
 
 
 
124
  </script>
125
 
126
  <svelte:window on:keydown={onKeydown} />