Remove generated artifacts and machine-specific paths

This commit is contained in:
2026-07-18 03:37:11 +08:00
parent 99c0f54998
commit cc3fb97be7
5713 changed files with 97 additions and 11438401 deletions
+17 -4
View File
@@ -566,14 +566,27 @@ sealed class AppPaths
public string MechanicalDiagnosticContractDoc => Path.Combine(Agent4Root, "tools", "model-diagnostics", "MECHANICAL_DIAGNOSTIC_CONTRACT.md");
public string MechanicalDiagnosticUsageDoc => Path.Combine(Agent4Root, "tools", "model-diagnostics", "MECHANICAL_DIAGNOSTIC_USAGE.md");
public string MechanicalKnowledgeIndexRoot => Path.Combine(Agent4Root, "机械设计禁忌1000例_知识库提取", "diagnostic_index");
public string ProjectPathsFile => Path.Combine(Agent4Root, "project_paths.json");
public string ReducerModelDir => @"D:\Desktop\减速器\三维";
public string SolidWorksExe => ReadProjectPathValue("solidworks_exe");
public string ProjectPathsFile => System.Environment.GetEnvironmentVariable("AGENT4_PROJECT_PATHS_FILE")
?? Path.Combine(Agent4Root, "project_paths.json");
public string ReducerModelDir => System.Environment.GetEnvironmentVariable("AGENT4_REDUCER_MODEL_DIR")
?? ReadProjectPathValue("reducer_model_dir");
public string SolidWorksExe => System.Environment.GetEnvironmentVariable("AGENT4_SOLIDWORKS_EXE")
?? ReadProjectPathValue("solidworks_exe");
public AppPaths()
{
var configuredRoot = System.Environment.GetEnvironmentVariable("AGENT4_ROOT");
if (!string.IsNullOrWhiteSpace(configuredRoot) && Directory.Exists(configuredRoot))
{
Agent4Root = Path.GetFullPath(configuredRoot);
WorkspaceRoot = Directory.GetParent(Agent4Root)?.FullName ?? Agent4Root;
return;
}
var dir = new DirectoryInfo(AppContext.BaseDirectory);
while (dir != null && !File.Exists(Path.Combine(dir.FullName, "project_paths.json")))
while (dir != null &&
(!File.Exists(Path.Combine(dir.FullName, "README.md")) ||
!Directory.Exists(Path.Combine(dir.FullName, "data"))))
dir = dir.Parent;
Agent4Root = dir?.FullName ?? Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", ".."));