{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/public\/js\/chat.js",
"offset": 255,
"limit": 80
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/public\/js\/chat.js",
"content": " sendBtn.classList.remove('chat-send--loading');\n htmx.ajax('GET', '\/chat\/sessions?current=' + sessionUuid, '#session-list');\n });\n}\n\n\/\/ ========== CONFIG EDITOR TOGGLE ==========\nfunction initConfigEditors(csrfToken) {\n document.querySelectorAll('.config-panel__toggle').forEach(btn => {\n btn.addEventListener('click', async function() {\n const configType = this.dataset.configType;\n const editorId = this.getAttribute('aria-controls');\n const editor = document.getElementById(editorId);\n const isOpen = !editor.classList.contains('config-panel__editor--hidden');\n\n if (isOpen) {\n editor.classList.add('config-panel__editor--hidden');\n editor.setAttribute('aria-hidden', 'true');\n this.setAttribute('aria-expanded', 'false');\n } else {\n const selectId = configType === 'system_prompt' ? 'configSystemPrompt' :\n configType === 'structure' ? 'configStructure' : 'configAuthorProfile';\n const selectedId = document.getElementById(selectId).value;\n\n if (selectedId && selectedId !== '0') {\n try {\n const resp = await fetch('\/api\/v1\/config\/' + selectedId);\n const data = await resp.json();\n if (data.content) {\n const textareaId = configType === 'system_prompt' ? 'systemPromptContent' :\n configType === 'structure' ? 'structureContent' : 'authorProfileContent';\n const versionId = configType === 'system_prompt' ? 'systemPromptVersion' :\n configType === 'structure' ? 'structureVersion' : 'authorProfileVersion';\n let formatted = data.content;\n try { formatted = JSON.stringify(JSON.parse(data.content), null, 2); } catch (e) {}\n document.getElementById(textareaId).value = formatted;\n document.getElementById(versionId).textContent = 'v' + (data.version || '1.0');\n }\n } catch (e) { console.error('Config load error:', e); }\n }\n editor.classList.remove('config-panel__editor--hidden');\n editor.setAttribute('aria-hidden', 'false');\n this.setAttribute('aria-expanded', 'true');\n }\n });\n });\n\n document.querySelectorAll('.config-panel__save').forEach(btn => {\n btn.addEventListener('click', async function() {\n const configType = this.dataset.configType;\n const selectId = configType === 'system_prompt' ? 'configSystemPrompt' :\n configType === 'structure' ? 'configStructure' : 'configAuthorProfile';\n const textareaId = configType === 'system_prompt' ? 'systemPromptContent' :\n configType === 'structure' ? 'structureContent' : 'authorProfileContent';\n const versionId = configType === 'system_prompt' ? 'systemPromptVersion' :\n configType === 'structure' ? 'structureVersion' : 'authorProfileVersion';\n\n const selectedId = document.getElementById(selectId).value;\n const content = document.getElementById(textareaId).value;\n\n if (!selectedId || selectedId === '0') {\n alert('Bitte waehle zuerst eine Konfiguration aus.');\n return;\n }\n\n try {\n const formData = new FormData();\n formData.append('content', content);\n formData.append('_csrf_token', csrfToken);\n\n const resp = await fetch('\/api\/v1\/config\/' + selectedId, { method: 'POST', body: formData });\n const data = await resp.json();\n\n if (data.success) {\n document.getElementById(versionId).textContent = 'v' + data.version;\n this.textContent = 'Gespeichert!';\n setTimeout(() => { this.textContent = 'Speichern'; }, 2000);\n } else {\n alert('Fehler: ' + (data.error || 'Unbekannt'));\n }\n } catch (e) {",
"numLines": 80,
"startLine": 255,
"totalLines": 390
}
}
}