mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-04 23:55:22 +00:00
refac
This commit is contained in:
parent
42636347e2
commit
5119cc47fc
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ export const replaceTokens = (content, sourceIds, char, user) => {
|
|||
|
||||
if (Array.isArray(sourceIds)) {
|
||||
sourceIds.forEach((sourceId, idx) => {
|
||||
const regex = new RegExp(`\\[${idx}\\]`, 'g');
|
||||
const regex = new RegExp(`\\[${idx + 1}\\]`, 'g');
|
||||
segment = segment.replace(regex, `<source_id data="${idx + 1}" title="${sourceId}" />`);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue