feat: admin back-office system + AI assistant with action commands
- Admin analytics (recharts charts, overview stats, trend analysis, time range selector) - Admin permissions (AdminRole/AdminUser models, role CRUD, permission catalog) - Admin system config (site/AI/member category tabs, per-key save) - Admin operations (Banner CRUD, push notification send/delete) - Admin user management (table, search, create/edit, ban/delete) - Admin layout (custom top bar with branding + sidebar, admin AI assistant) - Admin login (adminToken localStorage, adminInfo display) - Admin AI assistant (purple '运营助手', context-aware prompts, action commands) - Public AI assistant Phase B (action commands: navigate, setModel, startChat, openSkill, setParameter) - Assistant context mapping + action executor - Skills API fix: tags parsing fallback (JSON.parse → split) - Sandbox crash fix: curScene fallback system prompt - JWT token expiration: access 2h→7d, refresh 7d→30d, admin 8h→7d - i18n: assistant-related translations (zh/en) - PM2 ecosystem config for process management - AI assistant login prompt fix: admin uses getAdminToken(), public uses apiFetch with token refresh
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'backend',
|
||||
cwd: '/home/wlt/ai-learning-platform/backend',
|
||||
script: 'node',
|
||||
args: 'dist/main.js',
|
||||
instances: 1,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_restarts: 10,
|
||||
env: {
|
||||
NODE_ENV: 'development'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'frontend',
|
||||
cwd: '/home/wlt/ai-learning-platform/frontend',
|
||||
script: 'npm',
|
||||
args: 'run dev',
|
||||
instances: 1,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_restarts: 10
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user