feat: 移除系统提示词功能,由记忆系统替代

- 移除设置面板中的系统提示词开关和文本框
- 移除 input-area 和 agent-engine 中的系统提示词注入逻辑
- 移除 state/KEYS 中 SYSTEM_PROMPT 和 SYSTEM_PROMPT_ENABLED
- 移除 types.d.ts 中对应的 StateKey 类型
- 更新 README.md 设置表和帮助文档
- 记忆系统已完全覆盖系统提示词的功能,且更智能:自动提取、跨会话持久化、按相关性动态注入
This commit is contained in:
thzxx
2026-04-15 19:53:54 +08:00
parent 83fa4c78f1
commit 466df86fe4
8 changed files with 3 additions and 50 deletions
-17
View File
@@ -40,23 +40,6 @@ export function initSettingsModal(): void {
}, 500);
document.querySelector('#inputServerUrl')!.addEventListener('input', saveServerUrl);
document.querySelector('#toggleSystemPrompt')!.addEventListener('change', async (e) => {
const db = state.get<ChatDB | null>(KEYS.DB);
const checked = (e.target as HTMLInputElement).checked;
state.set(KEYS.SYSTEM_PROMPT_ENABLED, checked);
(document.querySelector('#inputSystemPrompt') as HTMLTextAreaElement).disabled = !checked;
if (db) await db.saveSetting('systemPromptEnabled', checked);
logSetting('系统提示词', checked ? '开启' : '关闭');
});
const saveSystemPrompt = debounce(async () => {
const db = state.get<ChatDB | null>(KEYS.DB);
const val = (document.querySelector('#inputSystemPrompt') as HTMLTextAreaElement).value.trim();
state.set(KEYS.SYSTEM_PROMPT, val);
if (db) await db.saveSetting('systemPrompt', val);
}, 500);
document.querySelector('#inputSystemPrompt')!.addEventListener('input', saveSystemPrompt);
const saveNumCtx = debounce(async () => {
const db = state.get<ChatDB | null>(KEYS.DB);
const val = (document.querySelector('#inputNumCtx') as HTMLInputElement).value.trim();