Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/Basic/Senparc.Ncf.XncfBase/Functions/FunctionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,20 @@ public static List<SelectionItem> LoadXncfProjects(bool mustHaveXncfModule = fal
{
//找到了 SLN 文件,开始展开地毯式搜索

//第一步:查找 XNCF

var projectFolders = Directory.GetDirectories(currentDir, "*.XNCF.*", SearchOption.AllDirectories).ToList();
//第一步:查找 XNCF(使用不区分大小写匹配,兼容 Linux 文件系统)
var enumerationOptions = new EnumerationOptions
{
MatchCasing = MatchCasing.CaseInsensitive,
RecurseSubdirectories = true,
IgnoreInaccessible = true
};
var projectFolders = Directory.GetDirectories(currentDir, "*.XNCF.*", enumerationOptions).ToList();

if (additionalProjects != null && additionalProjects.Length > 0)
{
foreach (var proj in additionalProjects)
{
var addProjectFolders = Directory.GetDirectories(currentDir, proj, SearchOption.AllDirectories);
var addProjectFolders = Directory.GetDirectories(currentDir, proj, enumerationOptions);
if (addProjectFolders.Count() > 0)
{
projectFolders.AddRange(addProjectFolders);
Expand Down
3 changes: 2 additions & 1 deletion src/Basic/Senparc.Ncf.XncfBase/Senparc.Ncf.XncfBase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<!--<TargetFrameworks>netcoreapp3.1;net8.0</TargetFrameworks>-->
<Version>0.22.17-preview.1</Version>
<Version>0.22.18-preview.1</Version>
<LangVersion>10.0</LangVersion>
<AssemblyName>Senparc.Ncf.XncfBase</AssemblyName>
<RootNamespace>Senparc.Ncf.XncfBase</RootNamespace>
Expand Down Expand Up @@ -55,6 +55,7 @@
[2025-06-27] v0.22.13-preview.1 Add dynamic XNCF Template dynamic generator
[2025-11-01] update basic libraries, including Senparc.AI
[2026-01-07] v0.22.16-preview.1 Add rootDir parameter to FunctionHelper.LoadXncfProjects() method
[2026-04-05] v0.22.18-preview.1 Fix LoadXncfProjects case-insensitive directory search for Linux filesystem compatibility
</PackageReleaseNotes>
<RepositoryUrl>https://github.com/NeuCharFramework/NcfPackageSources</RepositoryUrl>
<Configurations>Debug;Release;Test;TemplateRelease</Configurations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public ChatTaskAppService(IServiceProvider serviceProvider, ChatTaskService chat
}

[ApiBind(ApiRequestMethod = ApiRequestMethod.Get)]
public async Task<AppResponseBase<ChatTask_GetListResponse>> GetList(int chatGroupId, int agentTemplateId, int pageIndex, int pageSize, string filter = "")
public async Task<AppResponseBase<ChatTask_GetListResponse>> GetList(int chatGroupId, int agentTemplateId, int pageIndex, int pageSize, string filter = "", int statusFilter = -1, bool? isScheduled = null)
{
return await this.GetResponseAsync<ChatTask_GetListResponse>(async (response, logger) =>
{
Expand All @@ -45,8 +45,12 @@ public async Task<AppResponseBase<ChatTask_GetListResponse>> 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
seh.ValueCompare.AndAlso(isScheduled.HasValue, _ => _.IsScheduled == isScheduled!.Value);
var where = seh.BuildWhereExpression();

var list = await this._chatTaskService.GetObjectListAsync(pageIndex, pageSize, where, z => z.Id, Ncf.Core.Enums.OrderingType.Descending);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ public class ChatGroup_RunGroupRequest
/// 可选:业务关联 ID(例如 Prompt 优化的 RequestId),用于在执行上下文中关联工具调用
/// </summary>
public string CorrelationId { get; set; }

/// <summary>
/// 是否为定时(循环)任务
/// </summary>
public bool IsScheduled { get; set; } = false;

/// <summary>
/// 定时类型(仅当 IsScheduled=true 时有效)
/// </summary>
public ScheduleType ScheduleType { get; set; } = ScheduleType.Interval;

/// <summary>
/// 定时间隔值(含义随 ScheduleType 变化;仅当 IsScheduled=true 时有效)
/// </summary>
public int? ScheduleIntervalMinutes { get; set; }
}

/// <summary>
Expand Down
Loading
Loading