feat: enhance monitoring and Gemini service functionality

- Add enhanced monitoring scripts (monitor-enhanced.sh, status-unified.sh)
- Improve Gemini relay service with better error handling and token management
- Update authentication middleware for better compatibility
- Add new package dependencies for enhanced functionality
- Update .gitignore and app configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
mouyong
2025-08-09 14:06:56 +08:00
parent 6a8a668798
commit 8bdf495ffa
7 changed files with 673 additions and 9 deletions

View File

@@ -280,13 +280,13 @@ class Application {
const health = {
status: 'healthy',
service: 'claude-relay-service',
version: version,
version,
timestamp: new Date().toISOString(),
uptime: process.uptime(),
memory: {
used: Math.round(memory.heapUsed / 1024 / 1024) + 'MB',
total: Math.round(memory.heapTotal / 1024 / 1024) + 'MB',
external: Math.round(memory.external / 1024 / 1024) + 'MB'
used: `${Math.round(memory.heapUsed / 1024 / 1024)}MB`,
total: `${Math.round(memory.heapTotal / 1024 / 1024)}MB`,
external: `${Math.round(memory.external / 1024 / 1024)}MB`
},
components: {
redis: redisHealth,
@@ -364,7 +364,7 @@ class Application {
// 存储到Redis每次启动都覆盖确保与 init.json 同步)
const adminCredentials = {
username: initData.adminUsername,
passwordHash: passwordHash,
passwordHash,
createdAt: initData.initializedAt || new Date().toISOString(),
lastLogin: null,
updatedAt: initData.updatedAt || null