Plan-Modus: System-Prompt-Blöcke kontextabhängig anpassen

- SystemPromptBuilder.BuildBlocks/Build bekommt planMode-Parameter
- Im Plan-Modus: Tools-Block zeigt nur Read-only-Tools (read_file, list_files, glob, grep)
- Im Plan-Modus: KRITISCH, Verhalten, Erinnerung und Git-Blöcke werden übersprungen
- Im Plan-Modus: Skills als 'nicht ausführbar' markiert
- Plan-Modus-Block zentral im SystemPromptBuilder statt doppelt in AnthropicService + SessionEndpoint
- ChatService reicht planMode an SystemPromptBuilder durch
- SessionEndpoint reicht planMode Query-Parameter an BuildBlocks durch
- System-Prompt-Modal zeigt korrekte Blöcke je nach Plan-Modus-Status
This commit is contained in:
Meleki committed 2026-03-07 12:20:44 +01:00
1 parent 6d95f9aec2
commit 8e0ae90dc6
6 files changed
+55 -32

No files matched your search

+3 -2
View File
@@ -178,8 +178,9 @@ async function apiGetSystemPrompt(sessionId) {
return resp.text();
}
async function apiGetSystemPromptBlocks(sessionId) {
const resp = await fetch(`/api/sessions/${sessionId}/system-prompt-blocks`);
async function apiGetSystemPromptBlocks(sessionId, planMode) {
const url = `/api/sessions/${sessionId}/system-prompt-blocks` + (planMode ? '?planMode=true' : '');
const resp = await fetch(url);
if (!resp.ok) throw new Error('System-Prompt konnte nicht geladen werden');
return resp.json();
}
+1 -1
View File
@@ -1338,7 +1338,7 @@ async function showSystemPromptModal(sessionId) {
// Laden
try {
const blocks = await apiGetSystemPromptBlocks(sessionId);
const blocks = await apiGetSystemPromptBlocks(sessionId, typeof _planModeActive !== 'undefined' && _planModeActive);
body.innerHTML = '';
_renderSystemPromptBlocks(body, blocks);
} catch (e) {