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