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>
This commit is contained in:
kuaifan
2026-01-21 12:09:45 +00:00
parent c253044f61
commit 29be29b9cf
9 changed files with 428 additions and 235 deletions

View File

@@ -37,11 +37,6 @@ class AiTaskLoopTask extends AbstractTask
return;
}
// 检查功能开关
if (Base::settingFind('aiAssistant', 'taskSuggestion') !== 'open') {
return;
}
// 查询待处理的任务
$tasks = $this->findPendingTasks();
@@ -72,7 +67,6 @@ class AiTaskLoopTask extends AbstractTask
->whereNull('archived_at')
->where('created_at', '<=', $delayTime) // 创建超过延迟时间
->where('created_at', '>=', Carbon::now()->subDays(1)) // 只处理1天内的
->whereNotNull('dialog_id') // 有对话ID
->whereNotIn('id', $processedTaskIds)
->orderBy('created_at', 'asc')
->take(self::BATCH_SIZE)