Skip to content

Commit 25e1b3c

Browse files
committed
Enhance configuration and document handling with smart filtering options
- Added `EnableSmartFilter` option in docker-compose files and README for intelligent filtering. - Introduced `DocumentOptions` class to manage excluded files and folders. - Updated `DocumentsService` to utilize optimized directory structure and smart filtering logic. - Refactored `ChatService` and `WarehouseService` to improve catalogue handling. - Adjusted metadata generation in layout files for better SEO.
1 parent 6547507 commit 25e1b3c

34 files changed

+1969
-239
lines changed

KoalaWiki.Core/DataAccess/KoalaWikiContext.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
8888
builder.HasIndex(x => x.WarehouseId);
8989

9090
builder.HasIndex(x => x.DucumentId);
91+
92+
builder.Property(x => x.DependentFile)
93+
.HasConversion(
94+
v => JsonSerializer.Serialize(v, (JsonSerializerOptions)null),
95+
v => JsonSerializer.Deserialize<List<string>>(v, (JsonSerializerOptions)null));
9196
}));
9297

9398
modelBuilder.Entity<Document>((builder =>

KoalaWiki.Domains/Document.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using KoalaWiki.Domains;
1+
using KoalaWiki.Entities;
22

3-
namespace KoalaWiki.Entities;
3+
namespace KoalaWiki.Domains;
44

55
public class Document : Entity<string>
66
{
@@ -35,7 +35,6 @@ public class Document : Entity<string>
3535
/// <returns></returns>
3636
public string GitPath { get; set; } = string.Empty;
3737

38-
3938
/// <summary>
4039
/// 仓库状态
4140
/// </summary>

KoalaWiki.Domains/DocumentCatalog.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ public class DocumentCatalog : Entity<string>
4040
/// </summary>
4141
public bool IsCompleted { get; set; } = false;
4242

43-
[NotMapped]
4443
public string Prompt { get; set; } = string.Empty;
4544

46-
[NotMapped]
4745
public List<string> DependentFile { get; set; } = new();
4846
}

KoalaWiki.Domains/Warehouse.cs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,9 @@ public class Warehouse : Entity<string>
8282
/// <returns></returns>
8383
public bool IsRecommended { get; set; }
8484

85-
// /// <summary>
86-
// /// 使用模型
87-
// /// </summary>
88-
// public string Model { get; set; } = string.Empty;
89-
//
90-
// /// <summary>
91-
// /// OpenAI 密钥
92-
// /// </summary>
93-
// public string OpenAIKey { get; set; } = string.Empty;
94-
//
95-
// /// <summary>
96-
// /// OpenAI 端点
97-
// /// </summary>
98-
// public string OpenAIEndpoint { get; set; } = string.Empty;
85+
/// <summary>
86+
/// 优化过的代码目录结构
87+
/// </summary>
88+
/// <returns></returns>
89+
public string OptimizedDirectoryStructure { get; set; }
9990
}

KoalaWiki.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1212
build-image.bat = build-image.bat
1313
build-image.sh = build-image.sh
1414
.github\workflows\docker-image.yml = .github\workflows\docker-image.yml
15+
docker-compose-arm.yml = docker-compose-arm.yml
1516
EndProjectSection
1617
EndProject
1718
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KoalaWiki.Core", "KoalaWiki.Core\KoalaWiki.Core.csproj", "{8E887B45-75E2-4264-B5DE-93C9E206495E}"

0 commit comments

Comments
 (0)