mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
fix: md model desc
This commit is contained in:
parent
f56da1a39f
commit
1275371e10
@ -8,6 +8,7 @@
|
||||
import { blur, fade } from 'svelte/transition';
|
||||
|
||||
import Suggestions from '../MessageInput/Suggestions.svelte';
|
||||
import { sanitizeResponseContent } from '$lib/utils';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@ -70,7 +71,9 @@
|
||||
<div
|
||||
class="mt-0.5 text-base font-normal text-gray-500 dark:text-gray-400 line-clamp-3 markdown"
|
||||
>
|
||||
{@html marked.parse(models[selectedModelIdx]?.info?.meta?.description)}
|
||||
{@html marked.parse(
|
||||
sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description)
|
||||
)}
|
||||
</div>
|
||||
{#if models[selectedModelIdx]?.info?.meta?.user}
|
||||
<div class="mt-0.5 text-sm font-normal text-gray-400 dark:text-gray-500">
|
||||
|
@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { DropdownMenu } from 'bits-ui';
|
||||
import { marked } from 'marked';
|
||||
|
||||
import { flyAndScale } from '$lib/utils/transitions';
|
||||
import { createEventDispatcher, onMount, getContext, tick } from 'svelte';
|
||||
@ -333,9 +334,12 @@
|
||||
|
||||
{#if item.model?.info?.meta?.description}
|
||||
<Tooltip
|
||||
content={`${sanitizeResponseContent(
|
||||
item.model?.info?.meta?.description
|
||||
).replaceAll('\n', '<br>')}`}
|
||||
content={`${marked.parse(
|
||||
sanitizeResponseContent(item.model?.info?.meta?.description).replaceAll(
|
||||
'\n',
|
||||
'<br>'
|
||||
)
|
||||
)}`}
|
||||
>
|
||||
<div class="">
|
||||
<svg
|
||||
|
@ -17,7 +17,7 @@
|
||||
tooltipInstance.setContent(content);
|
||||
} else {
|
||||
tooltipInstance = tippy(tooltipElement, {
|
||||
content: marked.parse(content),
|
||||
content: content,
|
||||
placement: placement,
|
||||
allowHTML: true,
|
||||
touch: touch
|
||||
|
Loading…
Reference in New Issue
Block a user