| 265 | tools: payload?.data?.tools || payload?.tools || [] |
| 266 | }; |
| 267 | } catch (error) { |
| 268 | console.error('获取技能列表失败:', error); |
| 269 | // Return default skills if API is unavailable |
| 270 | return { |
| 271 | tools: [ |
| 272 | { name: 'search_memory', category: 'memory', description: '搜索历史记忆和对话' }, |
| 273 | { name: 'get_emotion_log', category: 'emotion', description: '查看情绪变化趋势' }, |
| 274 | { name: 'recommend_meditation', category: 'resource', description: '推荐冥想和放松资源' }, |
| 275 | { name: 'psychological_assessment', category: 'assessment', description: '心理状态快速评估' }, |
| 276 | { name: 'set_reminder', category: 'scheduler', description: '设置提醒和日程' }, |
| 277 | { name: 'get_user_mood_trend', category: 'emotion', description: '分析近期情绪模式' }, |
| 278 | ] |
| 279 | }; |
| 280 | } |
| 281 | } |
| 282 | |