kuaifan
3ec8aa502d
style(chat): 统一斜杠菜单显示格式为命令在前描述在后
...
@ 提及、# 任务、~ 文件、% 工作报告 均调整为命令符号在前
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-25 15:13:12 +00:00
kuaifan
42ca8f291c
style(ai): 调整 AI 命令菜单显示顺序为命令在前描述在后
...
/analyze 分析 -> /analyze | 分析
/summarize 总结 -> /summarize | 总结
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-25 15:11:57 +00:00
kuaifan
28beb7fe5e
fix(ai): AI 命令更新消息时不显示"已编辑"标记
...
使用 change- 替代 update- 动作,避免消息显示编辑标记
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-25 12:43:47 +00:00
kuaifan
77ebdd2ccb
fix(ai): 前端仅在任务/项目对话中显示 /analyze 命令
...
- /analyze 命令仅在 group_type 为 task 或 project 时显示
- /summarize 命令保持在所有对话类型中可用
- 统一变量名 notifyMsgId -> pendingMsgId
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-25 12:32:38 +00:00
kuaifan
28504e4a4e
refactor(ai): 简化 AI 命令消息处理为单条 text 消息更新
...
- 将"正在处理"消息从 notice 类型改为 text 类型
- 命令完成后直接更新原消息内容,而非发送额外消息
- 移除 sendMessage 方法,统一使用 updatePendingMessage
- 重命名 notifyMsgId 为 pendingMsgId 以更准确表达用途
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-25 10:52:38 +00:00
kuaifan
5ee5f253ec
feat(ai): 添加 /analyze 和 /summarize 对话命令
...
- 新增 AiDialogCommand 模块处理 AI 命令业务逻辑
- 新增 AiDialogCommandTask 异步任务
- /analyze: 任务对话分析任务状态,项目对话分析项目健康度
- /summarize: 总结对话中的讨论内容
- 前端 ChatInput 添加斜杠命令菜单项
- 支持并发控制,同一对话同时只能执行一个 AI 命令
- 执行状态通过 notice 消息实时反馈
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-25 02:07:39 +00: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
kuaifan
22a653bb0f
feat(ai): add project_task_ai_events migration
2026-01-21 15:30:06 +00:00
kuaifan
3482e4b1a8
fix(file): 修复日期格式文件名被误转换导致创建失败的问题
...
newDateString 函数在处理请求参数时会将所有符合日期格式的字符串
(如 "2026-01-15")转换为完整日期时间格式("2026-01-15 00:00:00"),
导致文件名中出现冒号,触发后端文件名校验错误。
修复方案:
- 直接调用时(key=null),保持原有行为用于显示格式化
- 递归处理对象属性时,仅对白名单字段(times、*_at)进行转换
- 其他字段(如 name)保持原值不转换
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:33:45 +00:00
kuaifan
9097369b0c
fix(ai-assistant): 修复图片预览调用不存在方法的错误
...
将 $A.previewFile 替换为 this.$store.dispatch("previewImage"),
解决 TypeError: $A.previewFile is not a function 错误。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:58:37 +00:00
kuaifan
95c6b53f10
fix(ai-assistant): 优化图片压缩逻辑避免重复质量压缩
...
- 新增 forceCompress 参数控制是否强制质量压缩
- compressImageForAI: 始终进行质量压缩(发送给 AI)
- saveImageToCache: 仅在需要缩小尺寸时才压缩(避免已压缩图片被重复压缩)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:52:57 +00:00
kuaifan
f7d5040b02
feat(ai-assistant): 支持拖放和粘贴上传图片
...
- 新增拖放上传:可将图片拖放到对话窗口任意位置
- 新增粘贴上传:在输入框中可直接粘贴剪贴板图片
- 提取 handleImageFiles 通用方法供多种上传方式复用
- 添加拖放时的视觉反馈(虚线边框 + 提示遮罩)
- 使用计数器方式正确处理嵌套元素和拖出窗口的情况
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:45:38 +00:00
kuaifan
26b7f83d35
no message
2026-01-20 14:45:02 +00:00
kuaifan
07b99c6e75
fix(ai-assistant): 修复 SSE 连接失败时状态未正确更新的问题
...
当 SSE 连接一开始就失败时,响应状态保持 'waiting' 而非 'streaming',
导致 onFailed 回调不会更新状态,UI 一直显示 loading。
现在同时处理 'streaming' 和 'waiting' 状态,并标记为错误状态显示失败提示。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:20:50 +00:00
kuaifan
cb5e7e2cc7
refactor(ai): 优化 AI 提示词构建逻辑
...
- withLanguagePreferencePrompt: 修复无语言标签时占位符未添加的问题
- handleBeforeSend: 简化操作会话提示词,移除冗余的工具名称说明
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 13:47:25 +00:00
kuaifan
2180998e81
feat(ai-assistant): 添加图片发送功能支持多模态对话
...
- 支持上传图片并压缩(当前消息 1024px,历史 512px)
- 图片独立缓存存储,使用占位符 [IMG:xxx] 替代 base64
- 新增 prompt-image.vue 组件展示历史图片缩略图
- 后端 AI.php 支持多模态消息格式处理
- 添加图片缓存清理机制(删除会话时同步清理)
- 优化 parsePromptContent 避免重复调用
- 会话标题自动过滤图片占位符
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 09:31:34 +00:00
kuaifan
478876ddc1
feat(workflow): 在工作流配置中添加规则摘要展示
...
在工作流展开后的配置表格上方添加规则摘要区块,根据实际配置动态展示:
- 状态负责人规则:区分添加模式、流转模式、剔除模式的不同描述
- 限制负责人规则:显示仅限任务负责人和项目管理员修改状态
- 关联列表规则:显示流转时自动移动至指定列表
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 01:55:00 +00:00
kuaifan
ae021fd148
fix(push): 修复友盟延迟推送已读检查失效的问题
...
消息ID取值路径错误,导致延迟推送时无法正确判断消息已读状态,
用户在PC端阅读消息后APP仍会收到重复推送。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:44:45 +00:00
kuaifan
f36317b081
fix(operation-client): 修正 WebSocket 路径格式并优化连接 URL 生成
v1.6.51
2026-01-19 10:52:22 +08:00
kuaifan
066a5a619c
build
2026-01-19 09:43:37 +08:00
kuaifan
654793156d
feat(micro-app): 添加额外的事件发射器方法以支持动态事件处理
2026-01-19 09:19:27 +08:00
kuaifan
ba65378c6b
fix(package): 更新 view-design-hi 依赖版本至 4.7.0-80
2026-01-19 01:14:05 +00:00
kuaifan
cb6c50b071
fix(ai-assistant): 修复弹窗和下拉菜单被其他弹窗遮挡的问题
...
- 使用 window.modalTransferIndex + 1000 作为动态 z-index
- 添加定时刷新机制:弹窗可见时 5 秒刷新,不可见时 20 秒刷新
- modal.vue 通过 zIndex prop 接收并应用 z-index
- float-button.vue 通过 $parent.topZIndex 获取 z-index
- Dropdown 和 Select 使用 ViewUI 新增的 z-index prop
2026-01-19 01:13:18 +00:00
kuaifan
2cb67fafe7
feat(ai-assistant): 支持任务弹窗和对话弹窗的场景检测
...
- 在 page-context.js 的 getPageContext 和 getSceneKey 函数中优先检测弹窗状态
- 当 taskId > 0 时使用 single-task 上下文
- 当 dialogModalShow && dialogId > 0 时使用 single-dialog 上下文
- 在 welcome-prompts.js 中添加弹窗场景检测逻辑
- 提取 formatPrompts 辅助函数减少代码重复
- 在 index.vue 的 welcomePromptsKey 中监听 taskId 和 dialogModalShow 变化
2026-01-18 23:52:26 +00:00
kuaifan
8eaba6f364
fix(ai-assistant): 优化流式响应期间的 loading 状态显示
...
- 修改 loading 显示条件,streaming 状态时继续显示 loading icon
- SSEClient 添加可选的 onFailed 回调,处理连接失败情况
- 修复 done 事件处理,确保状态正确转为 completed
- 解决工具调用期间 loading 动画过早消失的问题
2026-01-18 14:44:03 +00:00
kuaifan
c4f0fb5a3d
feat(ai-assistant): 合并连续工具使用的显示
...
在 Markdown 渲染前预处理文本,将连续的 tool-use 标签合并为一行显示:
- 连续相同工具显示计数(如 get_page_context x 2)
- 不同工具用逗号分隔
- 工具间的空行不会打断合并
2026-01-18 13:36:53 +00:00