From a7437eee2f3456e3b43cefa65985ef74b070f169 Mon Sep 17 00:00:00 2001
From: Wx-2025 <351320169@qq.com>
Date: Sun, 28 Sep 2025 17:28:46 +0800
Subject: [PATCH] Update index.js
---
MiZheSi/index.js | 41 ++++++++++++++++++++++++++++++++++-------
1 file changed, 34 insertions(+), 7 deletions(-)
diff --git a/MiZheSi/index.js b/MiZheSi/index.js
index 11b3744..8c4bdff 100644
--- a/MiZheSi/index.js
+++ b/MiZheSi/index.js
@@ -115,14 +115,41 @@ async function showPromptInspector(input) {
let content = message.content;
const iconsContainer = block.find('.mizhesi-injection-icons');
- if (content.includes('%%HANLINYUAN_RAG_INJECTION%%')) {
- content = content.replace('%%HANLINYUAN_RAG_INJECTION%%', '');
- iconsContainer.append('');
- }
+ // 【V11.0 升级】支持多种注入来源标记
+ const injectionMarkers = {
+ '%%HANLINYUAN_RAG_NOVEL%%': {
+ icon: 'fa-book-open',
+ title: '翰林院注入 (小说)',
+ color: '#66ccff'
+ },
+ '%%HANLINYUAN_RAG_CHAT%%': {
+ icon: 'fa-comments',
+ title: '翰林院注入 (聊天记录)',
+ color: '#66ccff'
+ },
+ '%%HANLINYUAN_RAG_LOREBOOK%%': {
+ icon: 'fa-atlas',
+ title: '翰林院注入 (世界书)',
+ color: '#66ccff'
+ },
+ '%%HANLINYUAN_RAG_MANUAL%%': {
+ icon: 'fa-pencil-alt',
+ title: '翰林院注入 (手动)',
+ color: '#66ccff'
+ },
+ '%%AMILY2_TABLE_INJECTION%%': {
+ icon: 'fa-table-cells',
+ title: '表格系统注入',
+ color: '#99cc33'
+ }
+ };
- if (content.includes('%%AMILY2_TABLE_INJECTION%%')) {
- content = content.replace('%%AMILY2_TABLE_INJECTION%%', '');
- iconsContainer.append('');
+ for (const marker in injectionMarkers) {
+ if (content.includes(marker)) {
+ content = content.replace(marker, '');
+ const details = injectionMarkers[marker];
+ iconsContainer.append(``);
+ }
}
const textarea = block.find('textarea');