Skip to content

fix(skills,agents): preserve skill updated_at on download and show hourly sync interval - #99

Merged
liuxy0551 merged 3 commits into
masterfrom
fix_agents_skills
Oct 28, 2026
Merged

liuxy0551 merged 3 commits into
masterfrom
fix_agents_skills

Conversation

@liuxy0551

Copy link
Copy Markdown
Collaborator

提交的变更类型是

  • 添加新功能
  • 修复 bug
  • 增加单元测试

相关链接

  • Issue: UED-93 (01a18063-2ad0-7e8c-b868-513e8e54f29a)
  • Issue: UED-92 (Agent Market 详情页自动更新时机与间隔提示)

需求描述和解决方案

描述

  1. UED-93【Doraemon】Skills 详情页面点击下载 .zip 会更新 Skill 的最近更新时间:
    • 期望点击下载只进行下载数量的更新即可,不应触发“最近更新”的时间变化。
  2. UED-92【Doraemon】Agent Market 详情页自动更新时机:
    • Agent 定时同步任务明确为每小时整点触发(cron: '0 0 * * * *')。
    • 详情页“最近刷新时间”与“最近同步代码时间”的 hover 提示补充“,定时间隔:1小时”。

解决方案

  1. 下载 Skill 保持最近更新时间不变 (UED-93):
    • 在 app/service/skills.js 的 incrementDownloads 中显式指定 attributes: { updated_at: this.app.Sequelize.col('updated_at') },在 SQL 更新时显式赋值原本的 updated_at,阻止 MySQL 触发 ON UPDATE CURRENT_TIMESTAMP。
    • 前端详情页通过 onDownload 回调只对本地 downloads 计数进行自增,界面上保持 updatedAt 不变。
    • 新增 test/skills-increment-downloads.test.js 单元测试。
  2. Agent Market 定时调度与提示更新 (UED-92):
    • app/schedule/syncGitAgents.js 定时任务配置为标准整点 Cron(0 0 * * * *),以单 Worker 调度执行。
    • AgentDetailContent.tsx 中更新 Tooltip 提示包含定时间隔信息。
    • 清理 config/config.default.js 中废弃的配置项,并补充更新相关测试。

自查清单

  • 代码遵循这个项目的风格指南
  • 对代码进行了自我审查
  • 已经在难以理解的代码处做了相关注释
  • 更改不会产生新的警告
  • 任何依赖更改都已合并并发布在下游模块中

@liuxy0551

Copy link
Copy Markdown
Collaborator Author

@TreeTreeDi PTAL

@TreeTreeDi

Copy link
Copy Markdown
Contributor

+1

@liuxy0551
liuxy0551 merged commit 83796c2 into master Oct 28, 2026
1 check passed
@liuxy0551
liuxy0551 deleted the fix_agents_skills branch October 28, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants