吉鑫升 and Claude Opus 4.7
a258122e22
定时任务:修复智能体执行 422、新增描述字段、公开页删除按钮等
...
- 定时任务执行时按 agent.id 解析智能体,老数据中存的中文显示名会回退按 name 查找,避免 422
- scheduled_tasks 表新增 description 字段(迁移 20260522_01),创建/编辑表单支持,公开页标题下显示
- 公开页(/public/scheduled-tasks/{id})新增删除单次执行记录入口,使用样式化 Dialog 确认
- 公开页左侧标题区精简:去掉 schedule/timezone/最近状态两行;执行列表标题剥离尾部时间戳,"计划"改为"执行时间"
- 工作区定时任务列表:超长标题改为按字符换行不再截断;按 created_at 倒序(新建任务在前)
- 启动 Alembic 升级加超时与单独线程,MySQL 缺库时自动 CREATE DATABASE
- vite build 增加 8GB 内存上限
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-22 10:55:59 +08:00
吉鑫升
643f9b2c76
Merge remote-tracking branch 'origin/master' into ji
...
# Conflicts:
# frontend-web/src/pages/AgentChatPage.tsx
2026-05-21 17:44:09 +08:00
董宏凯
bfd75da308
功能迁移,页面整体样式修改
2026-05-21 16:30:11 +08:00
吉鑫升 and Claude Opus 4.7
53bbb9b15b
feat: 公开定时任务页支持正文/MD 切换与内联编辑
...
- 公开查看器右侧改为 Tabs:MD 附件优先、然后是「正文」;标签使用文件名(去后缀)
- 新增内联编辑:正文与 MD 文件均可编辑保存,每个 Tab 支持 Word 下载
- 后端新增公开 PUT 端点(/runs/{run_id}/files/{i}、/runs/{run_id}/body),服务层提取 _apply_run_file_edit 并新增 admin_update_run_file / admin_update_run_body
- 列表过滤:仅展示 succeeded 且有正文或可用 MD 的执行记录;后端在响应中标记每个文件 available,前端隐藏磁盘已缺失的 MD Tab
- 左侧任务名与右侧执行记录标题均改为可换行 + Tooltip 显示完整内容
- .gitignore 增加 frontend-web/dist
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-21 15:53:43 +08:00
吉鑫升 and Claude Opus 4.7
777c3b0079
fix: 定时任务执行过程实时刷新——RunJournal 增加按时间 flush
...
RunJournal 原本只在缓冲满 20 条或运行结束时才把事件落库,短运行会在结束前一直查不到消息,导致定时任务执行详情页的「执行过程」一直显示「暂无执行消息」。
新增 _FLUSH_INTERVAL_SECONDS=3s 的按时间 flush(由 _put 驱动);flush 失败时退回缓冲并重新抛出以便区分成败;flush 成功后若缓冲仍有残留则补一次 flush,失败则不重试避免空转。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-19 18:18:14 +08:00
吉鑫升 and Claude Opus 4.7
e3cde9be25
feat: 定时任务运行详情执行过程视图 + 管理员下载删除 + MySQL 迁移修复
...
定时任务:
- 运行详情页新增「执行过程」标签页,按 agent_run_id 拉取该次运行的
agent 消息(GET /scheduled-tasks/runs/{id}/messages),运行中每 4s
自动刷新,可观察卡住的任务停在哪一步
- 详情页「返回」按钮回到来源列表(普通/管理员)并重新选中原任务
- 管理员可下载、删除任意用户的执行记录(DELETE /runs/{id} 加管理员兜底)
MySQL 兼容修复:
- 合并迁移 20260518_06 汇合 ai-writing 与 thread-shares 两个 head
- 20260517_02 改用 SQLAlchemy Core 构造,规避保留字 key 的 1064 报错
- list_messages_by_run 各事件存储补 user_id 形参以保持接口一致
测试: 新增 test_scheduled_task_admin_run_delete.py
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-18 21:13:58 +08:00
吉鑫升 and Claude Opus 4.7
358d5c72a6
feat: 业务库切换 MySQL + 修复定时任务运行详情递归与重名 500
...
- 业务 ORM 数据支持 MySQL 后端(asyncmy),新增 PortableJSON/
BeijingDateTime 可移植列类型、迁移脚本与切库脚本
- 修复 GET /api/scheduled-tasks/runs/{id} 的 _load_run 无限递归
(误调用自身,应委托 service.get_run)导致的 RecursionError 500
- 定时任务名按用户唯一:create/update/admin_update 主动校验,
冲突抛 DuplicateTaskNameError,路由转 409 而非裸 IntegrityError 500
- 补充回归测试 test_scheduled_task_run_lookup / _name_uniqueness
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-18 19:34:14 +08:00
吉鑫升 and Claude Opus 4.7
e0c1cb6581
feat: 定时任务管理 + 会话只读分享
...
定时任务:
- 管理员可查看/编辑/删除/触发全部用户的定时任务(新增 /api/scheduled-tasks/admin/* 接口与管理页)
- 卡死任务恢复:单次执行超 30 分钟超时重试(最多 3 次),耗尽后标记 failed;看门狗回收服务重启遗留的「执行中」任务
会话分享:
- 新增「只读链接」分享模式,生成公开免登录的只读对话快照页(/share/:code)
- 公开接口 /api/public/shares/* 提供对话快照与图片附件
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-18 15:39:40 +08:00
吉鑫升
3ea33e1dee
大模型速度增加提示
2026-05-14 19:12:14 +08:00
吉鑫升 and Claude Opus 4.7
29f74afbf6
fix(scheduler): give every scheduled run its own throwaway thread
...
All scheduled tasks for a user shared one scheduler thread, so each run
appended its messages to the same LangGraph checkpoint. Over time the
history blew past the model's input window and every task on that
account started failing with context-too-long.
_execute_task now mints a fresh thread_id per run and threads it through
ensure_thread_meta / snapshot / start_run / extract_*. The per-task
scheduler_thread_id column is left in place for backwards compatibility
but no longer drives the LLM call.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-13 20:58:23 +08:00
吉鑫升
a27206c543
Update local frontend and backend changes
2026-05-13 17:17:42 +08:00
吉鑫升
faca2c9a2d
Merge branch 'likun' into master
2026-05-13 17:02:22 +08:00
吉鑫升
aa034f8669
定时任务订阅模式
2026-05-13 14:59:27 +08:00
likun
b8926f00d7
新增用户意图确认功能
2026-05-13 14:36:44 +08:00
吉鑫升
e7a455f22e
Initial commit: deerflow-server (frontend-web + offline-backend-20260512)
2026-05-13 09:36:15 +08:00