mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
refac
This commit is contained in:
parent
4297c02b12
commit
e90a618f45
1 changed files with 3 additions and 2 deletions
|
|
@ -13,7 +13,7 @@
|
|||
showEmbeds
|
||||
} from '$lib/stores';
|
||||
import FloatingButtons from '../ContentRenderer/FloatingButtons.svelte';
|
||||
import { createMessagesList } from '$lib/utils';
|
||||
import { createMessagesList, replaceOutsideCode } from '$lib/utils';
|
||||
|
||||
/**
|
||||
* Extracts all top-level <details>...</details> blocks from content,
|
||||
|
|
@ -229,7 +229,8 @@
|
|||
<Markdown
|
||||
{id}
|
||||
content={model?.info?.meta?.capabilities?.citations == false
|
||||
? content.replace(/\s*(\[(?:\d+(?:#[^,\]\s]+)?(?:,\s*\d+(?:#[^,\]\s]+)?)*)\])+/g, '')
|
||||
? replaceOutsideCode(content, (segment) =>
|
||||
segment.replace(/\s*(\[(?:\d+(?:#[^,\]\s]+)?(?:,\s*\d+(?:#[^,\]\s]+)?)*)\])+/g, ''))
|
||||
: content}
|
||||
{model}
|
||||
{save}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue