mirror of
https://github.com/open-webui/open-webui
synced 2024-11-17 14:02:51 +00:00
enh: model desc md support
This commit is contained in:
parent
dfa2cf9e6d
commit
fe9685867e
@ -28,6 +28,10 @@ math {
|
||||
@apply rounded-lg;
|
||||
}
|
||||
|
||||
.markdown a {
|
||||
@apply underline;
|
||||
}
|
||||
|
||||
ol > li {
|
||||
counter-increment: list-number;
|
||||
display: block;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { WEBUI_BASE_URL } from '$lib/constants';
|
||||
import { marked } from 'marked';
|
||||
|
||||
import { config, user, models as _models } from '$lib/stores';
|
||||
import { onMount, getContext } from 'svelte';
|
||||
|
||||
@ -65,8 +67,10 @@
|
||||
|
||||
<div in:fade={{ duration: 200, delay: 200 }}>
|
||||
{#if models[selectedModelIdx]?.info?.meta?.description ?? null}
|
||||
<div class="mt-0.5 text-base font-normal text-gray-500 dark:text-gray-400 line-clamp-3">
|
||||
{models[selectedModelIdx]?.info?.meta?.description}
|
||||
<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)}
|
||||
</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,7 @@
|
||||
<script lang="ts">
|
||||
import { onDestroy } from 'svelte';
|
||||
import { marked } from 'marked';
|
||||
|
||||
import tippy from 'tippy.js';
|
||||
|
||||
export let placement = 'top';
|
||||
@ -15,7 +17,7 @@
|
||||
tooltipInstance.setContent(content);
|
||||
} else {
|
||||
tooltipInstance = tippy(tooltipElement, {
|
||||
content: content,
|
||||
content: marked.parse(content),
|
||||
placement: placement,
|
||||
allowHTML: true,
|
||||
touch: touch
|
||||
|
Loading…
Reference in New Issue
Block a user