4320 Commits

Author SHA1 Message Date
kuaifan
8def4addc4 fix(chat): 修复 AI 助手(userid=-1)在多处显示异常的问题
在 UserAvatar 组件中统一处理 AI 助手虚拟用户,避免各组件重复判断;
同时修复 @提及、回复引用、转发消息等场景下的 undefined 和空白显示问题,
并过滤批量用户请求中的无效 userid。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 12:34:27 +00:00
kuaifan
0ecaf9740f feat(i18n): 添加用户编辑和生日相关翻译原文
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 09:59:54 +00:00
kuaifan
bc75680ee9 feat: 添加 /release 发布流程 skill
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 09:51:20 +00:00
kuaifan
6a71964592 feat(dialog): 重构合并转发功能
- 合并转发消息体改为存储 msg_ids + preview,不再存储完整消息列表
- 新增 mergedetail API 按需加载合并转发详情
- 详情展示从 Modal 改为 DrawerOverlay,支持完整消息渲染
- 统一不可转发消息类型过滤(tag/top/todo/notice/word-chain/vote/template)
- 合并转发标题改为前端国际化拼接
- DialogWrapper 支持 staticMsgs 静态模式用于详情渲染
- 优化多选操作栏和转发确认界面样式
2026-04-05 09:31:41 +00:00
kuaifan
00a2ea3d2f docs: 精简 CLAUDE.md 国际化规范
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 09:08:47 +00:00
kuaifan
95e97333b4 feat(translate): 支持自定义 OPENAI_BASE_URL 配置
在翻译脚本和版本发布脚本中增加 OPENAI_BASE_URL 环境变量支持,
允许用户配置自定义的 OpenAI API 地址。自动处理 /v1 路径重复问题。
2026-04-05 09:02:04 +00:00
kuaifan
9e65500748 refactor(ai): 简化AI模块逻辑 2026-04-04 23:18:21 +00:00
kuaifan
a2acd6f6e4 feat(install): 安装时检测 APP_ID 是否与其他实例冲突
防止复制项目目录到另一个位置安装时,因 APP_ID 相同导致容器名和网络冲突。
通过 docker inspect 对比容器挂载路径与当前工作目录判断。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:33:48 +00:00
kuaifan
ee96730268 feat(install): 安装和修改端口时检测端口是否被占用
通过 Docker 试绑定端口的方式检测占用,避免安装流程走到最后才因端口冲突失败。
仅在首次安装或端口变更时检测,重装且端口不变时跳过。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:23:17 +00:00
kuaifan
f925f238dd chore(appstore): 升级 appstore 镜像版本至 0.4.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:23:10 +00:00
kuaifan
39c6ca3e8c feat(env): 在设置环境变量时确保.env文件存在 2026-04-04 01:38:39 +00:00
kuaifan
c798faa8db feat(migration): 添加表存在检查以避免重复创建表 2026-04-04 00:58:45 +00:00
kuaifan
ed2f843815 feat(middleware): 优化 WebApi 中的 HTTPS 强制设置逻辑 2026-04-04 07:48:04 +08:00
kuaifan
984b98e4fc feat(task): 实现消息合并转发功能,支持批量选择和转发消息 2026-04-04 07:43:26 +08:00
kuaifan
4b32472d64 feat(task): 增加AI自动分析开关(系统级+项目级)
系统设置新增 task_ai_auto_analyze 开关控制全局AI任务分析;项目设置新增 ai_auto_analyze 开关,系统关闭时项目无法开启。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 17:51:38 +08:00
kuaifan
fc171bc71f chore: 更新子项目提交哈希 2026-04-02 14:34:06 +08:00
kuaifan
cc80fa83e0 chore: 删除 Graphiti 长期记忆集成文档 2026-03-31 16:23:52 +08:00
kuaifan
782ba4a151 docs: optimize CLAUDE.md — remove discoverable content, add critical gotchas
Remove self-description header, 38-line command listing, directory trees,
and standard Laravel patterns that Claude can infer from code.

Add 6 project-specific gotchas Claude would get wrong: non-REST routing
(InvokeController), custom response envelope (Base::retSuccess/retError),
AbstractModel::createInstance, Doo::userId auth, manual validation (no
FormRequest), and Swoole Task (not Laravel Queue).

122 lines → 46 lines.
2026-03-13 10:49:03 +00:00
kuaifan
04708cedb6 feat(task): 增加解除任务关联功能
支持用户在任务详情中解除误关联的任务,权限与修改任务一致(项目负责人、任务负责人、任务协助人)。

- 新增 ProjectTaskRelation::deleteRelation() 删除双向关联并推送 WebSocket
- 新增 API POST /api/project/task/related/delete 接口
- 前端关联任务列表 hover 显示删除按钮,点击确认后解除关联

Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-09 06:38:13 +00:00
kuaifan
4068966700 feat(auth): token/expire 接口支持 refresh 参数刷新 token
- token/expire 接口新增可选参数 refresh=1,当 token 剩余有效期不足总有效期
  的 1/3 时返回新 token
- 将 users/info 移动端的硬编码 7 天刷新阈值统一改为总有效期的 1/3

Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-04 14:49:41 +00:00
kuaifan
3ce8cf381a chore: 更新子项目提交哈希 2026-03-04 11:40:00 +00:00
kuaifan
f78d3f3aff feat(dialog): add send_ai_assistant endpoint for AI assistant identity messaging
New endpoint POST api/dialog/msg/send_ai_assistant sends messages
as the AI assistant identity (userid=-1). Supports both dialog_id
(direct) and task_id (with auto-creation) parameters.

Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-22 09:05:56 +00:00
kuaifan
c60dff0950 feat(api): add with_extend param to task/lists endpoint
Supports optional `with_extend` query parameter (comma-separated).
When `project_name` or `column_name` is included, the API returns
these fields inline with each task via eager loading.

Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-22 02:44:05 +00:00
kuaifan
f2d49ee104 feat(task): 支持根据项目所有者筛选任务 2026-02-22 01:45:14 +00:00
kuaifan
a248d81230 build v1.6.89 2026-01-26 08:13:38 +08:00
kuaifan
1ac6bad2bb fix(task): 修复工作流切换时完成状态处理逻辑
- 恢复工作流切换时通过 $data['complete_at'] 设置完成状态,确保走统一处理入口
- 修复工作流切换时主任务完成状态校验被跳过的问题
- 修复工作流切换时 $updateMarking['is_update_project'] 未设置的问题
- checkAndAutoSetFlowItem 仅在用户单独提交 complete_at 时调用

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-22 07:34:09 +00:00
kuaifan
37de721df9 feat(task): 前端支持多工作流状态选择
- 处理 -4005/-4006 错误码,弹出工作流状态选择菜单
- 新增 showFlowItemSelector 方法展示可选状态列表
- 选择状态后自动更新任务的 flow_item_id 和 complete_at

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 05:32:27 +00:00
kuaifan
773eead827 feat(ai): AI 任务建议支持多语言输出
- 新增 getUserLanguageInfo 方法获取用户语言偏好
- 新增 getLocalizedTitles 方法,支持 9 种语言的标题和提示文案
- 调整 AI Prompt,根据用户语言输出对应语言的建议内容
- 相似任务检测阈值从 0.7 调整为 0.5
- 完善方法注释文档

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 05:32:20 +00:00
kuaifan
c4dd04ccb6 fix(task): 修复任务完成/取消完成时工作流状态自动切换逻辑
- 重构 flow_item_id 变更时的完成状态处理,使用 completeTask 方法替代直接赋值
- 新增 checkAndAutoSetFlowItem 方法,支持自动设置唯一的开始/结束状态
- 存在多个开始/结束状态时抛出带状态列表的错误(-4005/-4006),由前端引导用户选择
- 修复 complete_at 与 flow_item_id 同时存在时的重复处理问题

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 05:30:32 +00:00
kuaifan
2cdde37069 fix(observer): 修复 UserObserver 调用 private 方法 authInfo() 的错误
将 User::authInfo() 改为 User::userid(),因为 authInfo() 是 private 方法,
Observer 无法访问。userid() 是 public 方法,内部会正确调用 authInfo()。

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 16:58:11 +00:00
kuaifan
f68f759418 fix(ai): 更新提示信息为本地化文本 2026-01-21 15:56:03 +00:00
kuaifan
801d0b24ab perf(ai): 缩短 AI 任务分析延迟时间至 10 秒
将 AiTaskLoopTask 的 DELAY_SECONDS 从 60 秒减少到 10 秒,
使新建任务更快获得 AI 建议。

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:07 +00:00
kuaifan
29be29b9cf feat(ai): 优化 AI 提示词并完善建议交互功能
- 优化后端提示词:描述生成、子任务拆分、负责人推荐,新增栏目信息,去掉无效的 similar_count
- 优化前端提示词:去掉硬性字数限制,即时消息改为简短输出
- 新增 :::ai-action{...}::: 语法处理,支持单独采纳/忽略 assignee 和 similar
- 采纳/忽略后更新消息状态显示
- 负责人改为追加模式,保留现有负责人
- 新增任务关联功能,similar 采纳时自动创建双向关联
- 相似度阈值从 0.7 调整为 0.5,搜索结果增加到 200

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:07 +00:00
kuaifan
c253044f61 fix(ai): 更新 AI 助手头像显示逻辑和样式 2026-01-21 15:30:07 +00:00
kuaifan
9acf7d2046 fix(ai): 调整 AI 建议执行条件
1. subtasks: 标题长度阈值从 10 改为 5
2. similar: 启用向量搜索查找相似任务

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:07 +00:00
kuaifan
3911af7b51 fix(ai): 修复描述格式和负责人重复问题
1. 描述建议:AI 返回 Markdown,前端用 MarkdownConver 转 HTML
2. 负责人推荐:排除已分配的任务成员
3. 解析负责人推荐时去重,防止 AI 返回重复用户

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:07 +00:00
kuaifan
6b722b7ed7 fix(ai): 修正 AiTaskLoopTask 中 Apps 类的命名空间
App\Models\Apps -> App\Module\Apps

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:07 +00:00
kuaifan
6a00b87f72 fix(ai): 修正 API 路由地址格式
将 ai-apply/ai-dismiss 改为 ai_apply/ai_dismiss,
匹配 Laravel 路由方法命名转换规则(task__ai_apply -> ai_apply)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:07 +00:00
kuaifan
0a97039d75 refactor(ai): 重构 AI 建议功能并完善向量搜索
1. 重构 task__ai_apply 接口:移除业务逻辑,仅负责状态更新和日志记录,
   返回建议数据由前端调用现有接口处理(taskUpdate/taskAddSub)

2. 实现 searchSimilarByEmbedding 向量搜索:
   - 使用 ManticoreBase::taskVectorSearch 进行向量搜索
   - 按 project_id 过滤同项目任务
   - 排除当前任务及其子任务
   - 设置 0.7 相似度阈值,最多返回 5 个结果

3. 更新 AI 助手头像:将文字 "AI" 替换为 SVG 图标

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:06 +00:00
kuaifan
cb56a01622 fix(ai): fix URL parsing for ai-apply/ai-dismiss links
The regex pattern (\w+) didn't match 'ai-apply' or 'ai-dismiss' because
\w doesn't include hyphens, causing all AI suggestion buttons to fail.

Fix by handling AI links before the regex match using startsWith().
Remove dead switch cases that were never reached.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:06 +00:00
kuaifan
452af4bd2f fix(ai): address issues from second code review
- Add STATUS_APPLIED and STATUS_DISMISSED constants to model
- Add markApplied() and markDismissed() methods
- Update event status after apply/dismiss actions (prevent duplicate ops)
- Validate related_task_id exists and user has permission
- Filter empty or overly long subtask names before creation

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:06 +00:00
kuaifan
75073d4320 fix(ai): address security and robustness issues from code review
Security fixes:
- Add escapeUserInput() to prevent Prompt injection via user input
- Validate msgId belongs to dialogId in updateMessageStatus()
- Add type parameter whitelist validation in ai-apply/ai-dismiss
- Add event record validation in task__ai_dismiss

Robustness fixes:
- Use atomic update for markProcessing to prevent concurrent processing
- Add subtask count limit check before creation (max 50)
- Disable similar task feature until vector search is implemented
- Fix Promise anti-pattern in frontend actions

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 15:30:06 +00:00
kuaifan
d4d7a0d69f feat(ai): add AI::invoke() method for task suggestions
- Add generic invoke() static method to AI module for custom chat completion
- Fix AiTaskSuggestion::callAi() to properly handle AI::invoke() response
- Fix findSimilarTasks() to properly handle AI::getEmbedding() response

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:30:06 +00:00
kuaifan
165ad03024 feat(ai): add ai-apply/ai-dismiss protocol handlers 2026-01-21 15:30:06 +00:00
kuaifan
3603cf9889 feat(ai): display AI assistant avatar for userid=-1
When a message has userid=-1 (AI assistant), display a special AI avatar
with gradient styling instead of the regular UserAvatar component.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:30:06 +00:00
kuaifan
027662ebab feat(ai): add ai-apply and ai-dismiss API endpoints 2026-01-21 15:30:06 +00:00
kuaifan
106465b932 feat(ai): add AiTaskLoopTask timer and register to crontab 2026-01-21 15:30:06 +00:00
kuaifan
eef4c6fbe5 feat(ai): add AiTaskAnalyzeTask async task 2026-01-21 15:30:06 +00:00
kuaifan
916ae97ca7 feat(ai): add AiTaskSuggestion module with prompt templates
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:30:06 +00:00
kuaifan
841405505d feat(ai): add ProjectTaskAiEvent model 2026-01-21 15:30:06 +00:00