This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-15 15:36:23 -04:00
1 parent 355703f8a8
commit 7158fb0d76
3 files changed
+8 -6

No files matched your search

@@ -1,6 +1,7 @@
<script lang="ts">
import { tick } from 'svelte';
import Icon from '../Icon.svelte';
import MarkdownRenderer from '$lib/components/markdown/MarkdownRenderer.svelte';
import MessageTimestamp from './MessageTimestamp.svelte';
import { fileIconName } from '$lib/utils/fileIcon';
import { openFileTab, setFileBrowserCwd, setActiveTab } from '$lib/stores';
@@ -245,11 +246,10 @@
{/if}
<div class="flex justify-end">
<div class="max-w-[90%] px-4 py-2 rounded-3xl app-interactive-active">
<div
class="text-[0.8125rem] leading-relaxed text-gray-900 dark:text-gray-200 whitespace-pre-wrap break-words"
>
{#each parsedContent as segment}{#if segment.type === 'text'}{segment.value}{:else}{@const isDir =
segment.path.endsWith('/')}{@const cleanPath = isDir
<div class="text-[0.8125rem] leading-relaxed text-gray-900 dark:text-gray-200 break-words">
{#each parsedContent as segment}{#if segment.type === 'text'}<MarkdownRenderer
content={segment.value}
/>{:else}{@const isDir = segment.path.endsWith('/')}{@const cleanPath = isDir
? segment.path.slice(0, -1)
: segment.path}<button
class="inline-flex items-center gap-0.5 bg-blue-500/10 text-blue-400 rounded px-1.5 py-px mx-0.5 text-xs font-mono align-baseline border-none cursor-pointer hover:bg-blue-500/20 transition-colors"
@@ -153,7 +153,7 @@
{token.raw}
{/if}
{:else if token.type === 'html'}
<!-- Skip raw HTML for safety -->
{(token as Tokens.HTML).text || token.raw}
{:else if token.type === 'def'}
<!-- Link reference definition, no visual output -->
{:else if token.type === 'space'}
@@ -141,6 +141,8 @@
class="text-blue-500 dark:text-blue-400 bg-blue-500/8 dark:bg-blue-400/10 rounded px-1 cursor-pointer hover:underline transition-colors"
title={$t('markdown.linkTo', { target: wl.target })}>{wl.label}</span
>
{:else}
{item.raw}
{/if}
{/if}
{/each}