victor HF staff commited on
Commit
19027cc
·
1 Parent(s): fb2b35f

add messageContainer

Browse files
src/lib/components/Playground/Playground.svelte CHANGED
@@ -22,6 +22,7 @@
22
  let temperature = 0.5;
23
  let maxTokens = 2048;
24
  let streaming = true;
 
25
 
26
  let loading = false;
27
  let streamingMessage: Message | null = null;
@@ -128,7 +129,10 @@
128
  ></textarea>
129
  </div>
130
  <div class="relative divide-y divide-gray-200">
131
- <div class="flex max-h-[calc(100dvh-5rem)] flex-col divide-y divide-gray-200 overflow-y-auto">
 
 
 
132
  {#each messages as message, i}
133
  <PlaygroundMessage {message} on:delete={() => deleteMessage(i)} />
134
  {/each}
 
22
  let temperature = 0.5;
23
  let maxTokens = 2048;
24
  let streaming = true;
25
+ let messageContainer: HTMLDivElement | null = null;
26
 
27
  let loading = false;
28
  let streamingMessage: Message | null = null;
 
129
  ></textarea>
130
  </div>
131
  <div class="relative divide-y divide-gray-200">
132
+ <div
133
+ class="flex max-h-[calc(100dvh-5rem)] flex-col divide-y divide-gray-200 overflow-y-auto"
134
+ bind:this={messageContainer}
135
+ >
136
  {#each messages as message, i}
137
  <PlaygroundMessage {message} on:delete={() => deleteMessage(i)} />
138
  {/each}