/** * Agent页面组件 */ export default class Agent { constructor(container, route) { this.container = container; this.route = route; this.init(); } async init() { try { this.render(); this.bindEvents(); this.loadAgentStatus(); this.loadActionHistory(); } catch (error) { console.error('Agent init error:', error); this.showError(error); } } render() { this.container.innerHTML = `
AI助手自动监控和任务执行
| 时间 | 动作 | 状态 | 详情 |
|---|---|---|---|
| ${timestamp} | ${action.action_type || '未知'} | ${statusText} | ${action.details || ''} |
${error.message || '未知错误'}