diff --git a/config/overrides/mcp.json b/config/overrides/mcp.json index 89b5ba6..710c3b6 100644 --- a/config/overrides/mcp.json +++ b/config/overrides/mcp.json @@ -41,6 +41,16 @@ "author": "Chat UI Team", "short_description": "File transfer test tool", "help_email": "support@chatui.example.com" + }, + "prompts": { + "command": ["python", "mcp/prompts/main.py"], + "cwd": "backend", + "groups": ["users"], + "is_exclusive": false, + "description": "Specialized system prompts for AI behavior modification", + "author": "Chat UI Team", + "short_description": "AI behavior prompts", + "help_email": "support@chatui.example.com" } } diff --git a/frontend/src/components/LogViewer.jsx b/frontend/src/components/LogViewer.jsx index a8ab7ac..46df86c 100644 --- a/frontend/src/components/LogViewer.jsx +++ b/frontend/src/components/LogViewer.jsx @@ -41,7 +41,12 @@ export default function LogViewer() { return r.json(); }) .then(data => { - setEntries(data.entries || []); + const newEntries = data.entries || []; + // Reset to page 0 if auto-scroll is enabled and new entries were added + if (autoScrollEnabled && newEntries.length > entries.length) { + setPage(0); + } + setEntries(newEntries); setError(null); // After updating entries, scroll to bottom if auto-scroll is enabled and user hasn't scrolled up requestAnimationFrame(() => { @@ -52,7 +57,7 @@ export default function LogViewer() { }) .catch(err => setError(err)) .finally(() => setLoading(false)); - }, [levelFilter, moduleFilter, autoScrollEnabled]); // Dependencies for fetchLogs + }, [levelFilter, moduleFilter, autoScrollEnabled, entries.length]); // Dependencies for fetchLogs // Function to clear all logs const clearLogs = useCallback(() => {