Feat/monitor (#1928)

* feat: add monitor

* feat: fix tab

* feat: work

* feat: not reliable monitor

* feat: enhance monitoring page layout with integrated filters and refresh button

* feat: add support for runner recording

* feat: add jump button & alignment

* feat: new

* fix: not show query variables in local agent

* fix: pnpm lint and python ruff check

* fix: ruff fromat

* chore: remove unnecessary migration

* style: optimize monitoring page layout and fix sticky filter issues

- Enhanced metric cards with gradient backgrounds and hover effects
- Increased traffic chart height from 200px to 300px
- Adjusted grid layout and spacing for better visual appeal
- Fixed sticky filter area to properly cover parent padding without transparent gaps
- Used negative margins and positioning to eliminate scrolling artifacts
- Matched padding/margins with other pages (pipelines, bots) for consistency
- Removed duplicate title/subtitle from page content
- Added cursor-pointer styling to tab triggers
- Removed border between tab list and tab content

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: apply prettier formatting to monitoring components

- Fixed indentation and spacing in MetricCard.tsx
- Fixed formatting in TrafficChart.tsx
- Applied prettier formatting to page.tsx

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: update HomeSidebar to trigger action on child selection and localize monitoring titles

* refactor: streamline LLM and embedding invocation methods

* feat: add embedding model monitor

* fix: database version

* chore: simplify pnpm-lock.yaml formatting

---------

Co-authored-by: Junyan Qin <rockchinq@gmail.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Guanchao Wang
2026-01-26 21:08:23 +08:00
committed by GitHub
parent b73847f1a6
commit 5d9f6ec763
37 changed files with 6706 additions and 3182 deletions
+138
View File
@@ -276,6 +276,10 @@ const enUS = {
allLevels: 'All Levels',
selectLevel: 'Select Level',
levelsSelected: 'levels selected',
viewDetailedLogs: 'View Detailed Logs',
viewDetails: 'Details',
collapse: 'Collapse',
imagesAttached: 'image(s) attached',
},
plugins: {
title: 'Extensions',
@@ -802,6 +806,140 @@ const enUS = {
spaceEmailMismatch:
'Space login email does not match the local account email',
},
monitoring: {
title: 'Monitoring',
description: 'Monitor bot activities, LLM calls, and system performance',
overview: 'Overview',
totalMessages: 'Total Messages',
llmCallsCount: 'LLM Calls',
modelCallsCount: 'Model Calls',
successRate: 'Success Rate',
activeSessions: 'Active Sessions',
last24Hours: 'Last 24 hours',
filters: {
title: 'Filters',
bot: 'Bot',
pipeline: 'Pipeline',
allBots: 'All Bots',
selectBot: 'Select Bot',
allPipelines: 'All Pipelines',
selectPipeline: 'Select Pipeline',
loading: 'Loading...',
timeRange: 'Time Range',
customRange: 'Custom Range',
from: 'From',
to: 'To',
apply: 'Apply',
reset: 'Reset Filters',
lastHour: 'Last 1 hour',
last6Hours: 'Last 6 hours',
last24Hours: 'Last 24 hours',
last7Days: 'Last 7 days',
last30Days: 'Last 30 days',
},
tabs: {
messages: 'Message Records',
llmCalls: 'LLM Calls',
embeddingCalls: 'Embedding Calls',
modelCalls: 'Model Calls',
sessions: 'Session Analysis',
errors: 'Error Logs',
},
messageList: {
timestamp: 'Timestamp',
bot: 'Bot',
pipeline: 'Pipeline',
message: 'Message',
sessionId: 'Session ID',
status: 'Status',
actions: 'Actions',
viewDetails: 'View Details',
copyId: 'Copy ID',
noMessages: 'No messages found',
noMessagesDescription: 'Try adjusting your filters or check back later',
loading: 'Loading messages...',
loadMore: 'Load More',
autoRefresh: 'Auto Refresh',
platform: 'Role',
user: 'User',
level: 'Level',
runner: 'Runner',
viewConversation: 'View Conversation',
},
llmCalls: {
title: 'LLM Calls',
model: 'Model',
tokens: 'Tokens',
duration: 'Duration',
cost: 'Cost',
noData: 'No LLM calls found',
inputTokens: 'Input Tokens',
outputTokens: 'Output Tokens',
totalTokens: 'Total Tokens',
avgDuration: 'Avg Duration',
calls: 'Calls',
},
embeddingCalls: {
title: 'Embedding Calls',
model: 'Model',
tokens: 'Tokens',
duration: 'Duration',
noData: 'No embedding calls found',
promptTokens: 'Prompt Tokens',
totalTokens: 'Total Tokens',
inputCount: 'Input Count',
knowledgeBase: 'Knowledge Base',
queryText: 'Query',
},
modelCalls: {
title: 'Model Calls',
llmModel: 'LLM',
embeddingModel: 'Embedding',
embeddingCall: 'Embedding',
retrieveCall: 'Retrieve',
noData: 'No model calls found',
},
sessions: {
sessionId: 'Session ID',
messageCount: 'Messages',
duration: 'Duration',
lastActivity: 'Last Activity',
noSessions: 'No sessions found',
startTime: 'Start Time',
messageStats: 'Message Statistics',
totalMessages: 'Total Messages',
successMessages: 'Successful',
errorMessages: 'Failed',
llmStats: 'LLM Statistics',
noData: 'Session not found',
},
errors: {
title: 'Errors',
errorType: 'Error Type',
errorMessage: 'Error Message',
occurredAt: 'Occurred At',
noErrors: 'No errors found',
stackTrace: 'Stack Trace',
},
queries: {
title: 'Queries',
},
messageDetails: {
noData: 'No LLM calls or errors for this query',
},
queryVariables: {
title: 'Query Variables',
},
trafficChart: {
title: 'Traffic Overview',
messages: 'Messages',
llmCalls: 'LLM Calls',
noData: 'No traffic data available',
},
viewMonitoring: 'View Monitoring',
refreshData: 'Refresh Data',
exportData: 'Export Data',
},
};
export default enUS;