fix: Code-Quality und Security-Verbesserungen
Security Fixes: - Fix XSS vulnerability in orchestrator.html (escapeHtml für user input) - Verbesserte Error-Handling: 4 bare except clauses mit spezifischen Exception-Typen Code Quality: - Logging für alle Exception-Handler hinzugefügt - Timeout für Agent-Tasks von 300s auf 600s erhöht (10 Min) - Bessere Kommentare für Exception-Handling Performance: - Wissensdatenbank aus Systemprompt entfernt - Agents nutzen @READ_KNOWLEDGE für on-demand Zugriff - Reduziert Prompt-Größe um ~15KB pro Task UI Improvements (aus vorherigem Work): - Tasks: Auto-Refresh Info statt Toggle - Tasks: Status-Anzeigen statt manuelle Buttons - Konsistentes Auto-Refresh (15s) wenn Tasks aktiv
This commit is contained in:
parent
93eb8c6d47
commit
ca820d20db
3 changed files with 290 additions and 41 deletions
|
|
@ -130,7 +130,7 @@ function sendPromptWithStream() {
|
|||
msgDiv.className = 'chat-message';
|
||||
msgDiv.innerHTML = `
|
||||
<div class="chat-timestamp">${new Date().toLocaleTimeString()} · <span class="badge bg-primary" style="font-size:.65rem;" id="agentBadge">wird ausgewählt…</span></div>
|
||||
<div class="chat-prompt mt-1"><strong>Sie:</strong> ${prompt}</div>
|
||||
<div class="chat-prompt mt-1"><strong>Sie:</strong> ${escapeHtml(prompt)}</div>
|
||||
<div class="chat-response mt-1" id="responseDiv"><strong>Orchestrator:</strong> <span id="responseText">⏳ Agent arbeitet…</span></div>
|
||||
`;
|
||||
chatContainer.insertBefore(msgDiv, chatContainer.firstChild);
|
||||
|
|
@ -220,5 +220,11 @@ function distributeTodos() {
|
|||
status.className = 'form-text mt-2 text-danger';
|
||||
});
|
||||
}
|
||||
|
||||
function escapeHtml(text) {
|
||||
const div = document.createElement('div');
|
||||
div.textContent = text;
|
||||
return div.innerHTML;
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue