From 51aab9b80028a8324ad55e1d71ed64a64cd6cf94 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 02:53:22 +0000 Subject: [PATCH 1/7] Initial plan From 26ca9fa9be2d148e575814fc8bc921eb93c624ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 03:06:29 +0000 Subject: [PATCH 2/7] feat(Task3): Add task list filtering by status and characteristics with scheduled task support - Add IsScheduled, ScheduleIntervalMinutes, ScheduleType fields to ChatTask entity - Update ChatTaskDto with new schedule fields - Add migrations for all 6 database types (SQLite, SqlServer, MySql, PostgreSQL, Oracle, Dm) - Update all model snapshots with new fields - Update GetList API to support statusFilter and isScheduled filter parameters - Fix frontend filter criteria to match actual ChatTask_Status enum values (0-4) - Add characteristic filter (All/Scheduled/One-time) to filter popover - Fix handleFilterCriteria to actually call API after filter changes - Add active filter tags row showing active filters - Add visual status icons and scheduled badge in sidebar task list - Add Status and Type columns in task table with colored tags - Add scheduled task indicator (clock icon) in task detail view - Update getInterfaceQueryStr to support boolean values in query strings Agent-Logs-Url: https://github.com/NeuCharFramework/NcfPackageSources/sessions/2a87521f-02ff-47a8-a19b-400eb9c4b8e0 Co-authored-by: JeffreySu <2281927+JeffreySu@users.noreply.github.com> --- .../AppService/ChatTaskAppService.cs | 9 +- .../Admin/Pages/AgentsManager/Index.cshtml | 104 +++++++++++---- ...60405000001_Add_ChatTask_ScheduleFields.cs | 50 +++++++ ...sManagerSenparcEntities_DmModelSnapshot.cs | 9 ++ ...60405000001_Add_ChatTask_ScheduleFields.cs | 50 +++++++ ...nagerSenparcEntities_MySqlModelSnapshot.cs | 9 ++ ...60405000001_Add_ChatTask_ScheduleFields.cs | 50 +++++++ ...agerSenparcEntities_OracleModelSnapshot.cs | 9 ++ ...60405000001_Add_ChatTask_ScheduleFields.cs | 50 +++++++ ...SenparcEntities_PostgreSQLModelSnapshot.cs | 9 ++ ...60405000001_Add_ChatTask_ScheduleFields.cs | 50 +++++++ ...rSenparcEntities_SqlServerModelSnapshot.cs | 9 ++ ...60405000001_Add_ChatTask_ScheduleFields.cs | 50 +++++++ ...agerSenparcEntities_SqliteModelSnapshot.cs | 9 ++ .../Domain/Models/DatabaseModel/ChatTask.cs | 49 ++++++- .../Models/DatabaseModel/Dto/ChatTaskDto.cs | 23 +++- .../wwwroot/js/AgentsManager/index.js | 124 +++++++++++++----- 17 files changed, 603 insertions(+), 60 deletions(-) create mode 100644 src/Extensions/Senparc.Xncf.AgentsManager/Domain/Migrations/Dm/20260405000001_Add_ChatTask_ScheduleFields.cs create mode 100644 src/Extensions/Senparc.Xncf.AgentsManager/Domain/Migrations/MySql/20260405000001_Add_ChatTask_ScheduleFields.cs create mode 100644 src/Extensions/Senparc.Xncf.AgentsManager/Domain/Migrations/Oracle/20260405000001_Add_ChatTask_ScheduleFields.cs create mode 100644 src/Extensions/Senparc.Xncf.AgentsManager/Domain/Migrations/PostgreSQL/20260405000001_Add_ChatTask_ScheduleFields.cs create mode 100644 src/Extensions/Senparc.Xncf.AgentsManager/Domain/Migrations/SqlServer/20260405000001_Add_ChatTask_ScheduleFields.cs create mode 100644 src/Extensions/Senparc.Xncf.AgentsManager/Domain/Migrations/Sqlite/20260405000001_Add_ChatTask_ScheduleFields.cs diff --git a/src/Extensions/Senparc.Xncf.AgentsManager/Application/AppService/ChatTaskAppService.cs b/src/Extensions/Senparc.Xncf.AgentsManager/Application/AppService/ChatTaskAppService.cs index a8bf1ef31..fede3966e 100644 --- a/src/Extensions/Senparc.Xncf.AgentsManager/Application/AppService/ChatTaskAppService.cs +++ b/src/Extensions/Senparc.Xncf.AgentsManager/Application/AppService/ChatTaskAppService.cs @@ -26,7 +26,7 @@ public ChatTaskAppService(IServiceProvider serviceProvider, ChatTaskService chat } [ApiBind(ApiRequestMethod = ApiRequestMethod.Get)] - public async Task> GetList(int chatGroupId, int agentTemplateId, int pageIndex, int pageSize, string filter = "") + public async Task> GetList(int chatGroupId, int agentTemplateId, int pageIndex, int pageSize, string filter = "", int statusFilter = -1, bool? isScheduled = null) { return await this.GetResponseAsync(async (response, logger) => { @@ -45,8 +45,13 @@ public async Task> GetList(int chatGro seh.ValueCompare .AndAlso(chatGroupId > 0, z => z.ChatGroupId == chatGroupId) .AndAlso(agentTemplateId > 0, z => chatGroupIdList.Contains(z.ChatGroupId)); - //增加模糊搜索任务 + // Text search filter seh.ValueCompare.AndAlso(!string.IsNullOrEmpty(filter), _ => _.Name.Contains(filter)); + // Status filter (-1 means all) + seh.ValueCompare.AndAlso(statusFilter >= 0, _ => (int)_.Status == statusFilter); + // Scheduled task filter + var scheduledValue = isScheduled ?? false; + seh.ValueCompare.AndAlso(isScheduled.HasValue, _ => _.IsScheduled == scheduledValue); var where = seh.BuildWhereExpression(); var list = await this._chatTaskService.GetObjectListAsync(pageIndex, pageSize, where, z => z.Id, Ncf.Core.Enums.OrderingType.Descending); diff --git a/src/Extensions/Senparc.Xncf.AgentsManager/Areas/Admin/Pages/AgentsManager/Index.cshtml b/src/Extensions/Senparc.Xncf.AgentsManager/Areas/Admin/Pages/AgentsManager/Index.cshtml index 4abec97c9..d2f5dbefd 100644 --- a/src/Extensions/Senparc.Xncf.AgentsManager/Areas/Admin/Pages/AgentsManager/Index.cshtml +++ b/src/Extensions/Senparc.Xncf.AgentsManager/Areas/Admin/Pages/AgentsManager/Index.cshtml @@ -943,15 +943,15 @@ @* 主体内容 *@ @@ -994,7 +1025,7 @@