mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-13 01:02:25 -06:00
refac
This commit is contained in:
@@ -11,7 +11,6 @@ from aiocache import cached
|
||||
from fastapi import HTTPException, Request, status
|
||||
from open_webui.env import BYPASS_MODEL_ACCESS_CONTROL, GLOBAL_LOG_LEVEL
|
||||
from open_webui.functions import generate_function_chat_completion
|
||||
from open_webui.models.functions import Functions
|
||||
from open_webui.models.models import Models
|
||||
from open_webui.models.users import UserModel
|
||||
from open_webui.routers.ollama import (
|
||||
|
||||
@@ -113,8 +113,7 @@
|
||||
const id = node.getAttribute('data-id') || '';
|
||||
// TipTap stores the trigger char in data-mention-suggestion-char (usually "@")
|
||||
const ch = node.getAttribute('data-mention-suggestion-char') || '@';
|
||||
// Skills are always serialized as <$id|label>, even when selected from "/".
|
||||
const mentionChar = id.includes('|') ? '$' : ch;
|
||||
const mentionChar = ch === '/' ? '$' : ch;
|
||||
return `<${mentionChar}${id}>`;
|
||||
}
|
||||
});
|
||||
@@ -284,7 +283,8 @@
|
||||
const getMentionText = ({ node, suggestion }) => {
|
||||
const id = node.attrs.id ?? '';
|
||||
const label = node.attrs.label ?? id;
|
||||
const char = id.includes('|') ? '$' : (suggestion?.char ?? '@');
|
||||
const ch = node.attrs.mentionSuggestionChar ?? suggestion?.char ?? '@';
|
||||
const char = ch === '/' ? '$' : ch;
|
||||
return `${char}${label}`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user