From 9acf7d204675fe5a7b8cd34be4ac5276b7ac8ba8 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 21 Jan 2026 07:34:09 +0000 Subject: [PATCH] =?UTF-8?q?fix(ai):=20=E8=B0=83=E6=95=B4=20AI=20=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E6=89=A7=E8=A1=8C=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. subtasks: 标题长度阈值从 10 改为 5 2. similar: 启用向量搜索查找相似任务 Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- app/Module/AiTaskSuggestion.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Module/AiTaskSuggestion.php b/app/Module/AiTaskSuggestion.php index c15ecf310..f6f3154df 100644 --- a/app/Module/AiTaskSuggestion.php +++ b/app/Module/AiTaskSuggestion.php @@ -8,6 +8,7 @@ use App\Models\ProjectTaskUser; use App\Models\ProjectUser; use App\Models\User; use App\Models\WebSocketDialogMsg; +use App\Module\Apps; use App\Module\Manticore\ManticoreBase; use Cache; use Carbon\Carbon; @@ -36,9 +37,9 @@ class AiTaskSuggestion return empty($content) || mb_strlen($content) < 20; case ProjectTaskAiEvent::EVENT_SUBTASKS: - // 无子任务且标题长度 > 10 + // 无子任务且标题长度 > 5 $hasSubtasks = ProjectTask::where('parent_id', $task->id)->exists(); - return !$hasSubtasks && mb_strlen($task->name) > 10; + return !$hasSubtasks && mb_strlen($task->name) > 5; case ProjectTaskAiEvent::EVENT_ASSIGNEE: // 未指定负责人 @@ -48,8 +49,8 @@ class AiTaskSuggestion return !$hasOwner; case ProjectTaskAiEvent::EVENT_SIMILAR: - // 向量搜索暂未实现,跳过 - return false; + // 需要安装 search 插件才能使用向量搜索 + return Apps::isInstalled('search'); default: return false;