pref:优化webui界面,增加prompt模板元信息

This commit is contained in:
SengokuCola
2026-05-05 17:57:19 +08:00
parent 0d43d3ec05
commit a5e4ac8531
42 changed files with 826 additions and 410 deletions

View File

@@ -178,7 +178,6 @@ def _install_stub_modules(monkeypatch):
class _EmojiConfig:
max_reg_num = 20
content_filtration = False
filtration_prompt = ""
steal_emoji = False
do_replace = False
check_interval = 1
@@ -1956,7 +1955,6 @@ async def test_build_emoji_description_content_filtration_reject(monkeypatch):
logger = emoji_manager_new.logger
emoji_manager_new.global_config.emoji.content_filtration = True
emoji_manager_new.global_config.emoji.filtration_prompt = "rule"
def _read_bytes(_path):
return b""
@@ -1994,13 +1992,15 @@ async def test_build_emoji_description_content_filtration_pass(monkeypatch):
logger = emoji_manager_new.logger
emoji_manager_new.global_config.emoji.content_filtration = True
emoji_manager_new.global_config.emoji.filtration_prompt = "rule"
def _read_bytes(_path):
return b""
async def _vlm_response(prompt, *_args, **_kwargs):
if "rule" in str(prompt):
call_count = {"n": 0}
async def _vlm_response(*_args, **_kwargs):
call_count["n"] += 1
if call_count["n"] == 2:
return "", None
return "desc", None