This commit is contained in:
Timothy Jaeryang Baek 2026-08-17 00:59:13 -07:00
parent 0b27fa5e87
commit b1dc945bd6
3 changed files with 9 additions and 5 deletions

View file

@ -4,6 +4,8 @@
import { getContext } from 'svelte';
import { settings } from '$lib/stores';
const i18n = getContext('i18n');
export let token;
@ -13,7 +15,9 @@
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<code
class="codespan cursor-pointer {!done ? 'fade-in-token' : ''}"
class="codespan cursor-pointer {!done && ($settings?.chatFadeStreamingText ?? true)
? 'fade-in-token'
: ''}"
on:click={() => {
copyToClipboard(unescapeHtml(token.text));
toast.success($i18n.t('Copied to clipboard'));

View file

@ -1,11 +1,13 @@
<script lang="ts">
import { settings } from '$lib/stores';
export let token;
export let done = true;
$: raw = token?.raw ?? '';
</script>
{#if done}
{#if done || !($settings?.chatFadeStreamingText ?? true)}
{raw}
{:else}
{#each raw.split(' ') as text}

View file

@ -833,9 +833,7 @@
{compactPreview}
{editCodeBlock}
{topPadding}
done={($settings?.chatFadeStreamingText ?? true)
? (message?.done ?? false)
: true}
done={message?.done ?? false}
{model}
onTaskClick={async (e) => {
console.log(e);