From ff8cac3d9c317adf5e2c9003211eeb5d138042f6 Mon Sep 17 00:00:00 2001 From: YuanShiJiLoong <2450829984@qq.com> Date: Sun, 22 Feb 2026 16:48:28 +0900 Subject: [PATCH] fix: show empty setting groups in context panel (revert filter) --- app/components/Editor.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/components/Editor.js b/app/components/Editor.js index 8af59e3..74ae0bf 100644 --- a/app/components/Editor.js +++ b/app/components/Editor.js @@ -747,9 +747,9 @@ function InlineAI({ editor, onAiRequest, onArchiveGeneration, contextItems, cont function InlineContextPanel({ contextItems, contextSelection, setContextSelection, onJumpToNode }) { const [expanded, setExpanded] = useState(false); - // 只显示设定集条目,不显示对话历史和空条目 + // 只显示设定集条目,不显示对话历史 const settingsItems = useMemo(() => - (contextItems || []).filter(it => !it._empty && it.category !== 'dialogue'), + (contextItems || []).filter(it => it.category !== 'dialogue'), [contextItems]); // 按分组归类,过滤掉空分组 @@ -803,7 +803,6 @@ function InlineContextPanel({ contextItems, contextSelection, setContextSelectio {expanded && (
{Object.entries(grouped).map(([groupName, items]) => { - if (items.length === 0) return null; const checkedCount = items.filter(it => contextSelection?.has(it.id)).length; const allChecked = checkedCount === items.length; return (