cowagent
|
e4fcfa356a
|
refactor: 改用动态函数实现运行时信息更新(更健壮的方案)
改进点:
1. builder.py: _build_runtime_section() 支持 callable 动态时间函数
2. agent_initializer.py: 传入 get_current_time 函数而非静态时间值
3. agent.py: _rebuild_runtime_section() 动态调用时间函数并重建该部分
优势:
- 解耦模板:不依赖具体的提示词格式
- 健壮性:提示词模板改变不会导致功能失效
- 向后兼容:保留对静态时间的支持
- 性能优化:只在需要时才计算时间
相比之前的正则匹配方案,这个方案更加优雅和可维护。
|
2026-02-04 22:37:19 +08:00 |
|
cowagent
|
480c60c0a7
|
fix: 动态更新系统提示词中的运行时信息(时间戳)
问题:
- system_prompt 在 Agent 初始化时固定,导致模型获取的时间信息过时
- 长时间运行的会话中,模型对时间判断不准确
解决方案:
- 在 get_full_system_prompt() 中添加动态更新逻辑
- 每次获取系统提示词时,使用正则表达式替换运行时信息中的时间戳
- 保持其他运行时信息(模型、工作空间等)不变
测试:
- 创建测试脚本验证时间动态更新功能
- 等待3秒后时间正确更新(22:19:45 -> 22:19:48)
|
2026-02-04 22:27:24 +08:00 |
|
zhayujie
|
46fa07e4a9
|
feat: optimize agent configuration and memory
|
2026-02-02 11:48:53 +08:00 |
|
zhayujie
|
a8d5309c90
|
feat: add skills and upgrade feishu/dingtalk channel
|
2026-02-02 00:42:39 +08:00 |
|
zhayujie
|
0e85fcfe51
|
fix: optimize suggestion words and retries
|
2026-02-01 14:00:28 +08:00 |
|
saboteur7
|
dd6a9c26bd
|
feat: support skills creator and gemini models
|
2026-01-30 18:00:10 +08:00 |
|
saboteur7
|
49fb4034c6
|
feat: support skills
|
2026-01-30 14:27:03 +08:00 |
|
saboteur7
|
bb850bb6c5
|
feat: personal ai agent framework
|
2026-01-30 09:53:46 +08:00 |
|