mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 13:47:21 +00:00
Added an analyzer which keeps line breaks LF on every system (#1193)
This commit is contained in:
1 parent
b1c1f13993
commit
65d50de033
96 files changed
+741
-393
No files matched your search
@@ -190,7 +190,7 @@ public sealed class AgentDataSourceSelection (ILogger<AgentDataSourceSelection>
|
||||
logger.LogInformation("Preparing the list of allowed data sources for the agent to choose from.");
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("The following data sources are available for selection:");
|
||||
sb.AppendLineLF("The following data sources are available for selection:");
|
||||
foreach (var ds in dataSources.AllowedDataSources)
|
||||
{
|
||||
var description = await descriptionService.GetDescriptionAsync(ds, token);
|
||||
@@ -198,15 +198,15 @@ public sealed class AgentDataSourceSelection (ILogger<AgentDataSourceSelection>
|
||||
switch (ds)
|
||||
{
|
||||
case DataSourceLocalDirectory localDirectory:
|
||||
sb.AppendLine($"- Id={ds.Id}, name='{localDirectory.Name}', type=local directory, path='{localDirectory.Path}'{descriptionPart}");
|
||||
sb.AppendLineLF($"- Id={ds.Id}, name='{localDirectory.Name}', type=local directory, path='{localDirectory.Path}'{descriptionPart}");
|
||||
break;
|
||||
|
||||
case DataSourceLocalFile localFile:
|
||||
sb.AppendLine($"- Id={ds.Id}, name='{localFile.Name}', type=local file, path='{localFile.FilePath}'{descriptionPart}");
|
||||
sb.AppendLineLF($"- Id={ds.Id}, name='{localFile.Name}', type=local file, path='{localFile.FilePath}'{descriptionPart}");
|
||||
break;
|
||||
|
||||
case IERIDataSource eriDataSource:
|
||||
sb.AppendLine($"- Id={ds.Id}, name='{eriDataSource.Name}', type=external data source{descriptionPart}");
|
||||
sb.AppendLineLF($"- Id={ds.Id}, name='{eriDataSource.Name}', type=external data source{descriptionPart}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public sealed class AssistantAuditAgent(ILogger<AssistantAuditAgent> logger, ILo
|
||||
|
||||
protected override string SystemPrompt(string additionalData) => string.IsNullOrWhiteSpace(additionalData)
|
||||
? this.JobDescription
|
||||
: $"{this.JobDescription}{Environment.NewLine}{Environment.NewLine}{additionalData}";
|
||||
: $"{this.JobDescription}\n\n{additionalData}";
|
||||
|
||||
public override AIStudio.Settings.Provider ProviderSettings { get; set; } = AIStudio.Settings.Provider.NONE;
|
||||
|
||||
@@ -343,11 +343,11 @@ public sealed class AssistantAuditAgent(ILogger<AssistantAuditAgent> logger, ILo
|
||||
var definition = toolRegistry.GetDefinition(toolId);
|
||||
if (definition is null)
|
||||
{
|
||||
builder.AppendLine($"- {toolId}: unknown to this installation");
|
||||
builder.AppendLineLF($"- {toolId}: unknown to this installation");
|
||||
continue;
|
||||
}
|
||||
|
||||
builder.AppendLine($"- {toolId}: {definition.Function.DescriptionForLLM}");
|
||||
builder.AppendLineLF($"- {toolId}: {definition.Function.DescriptionForLLM}");
|
||||
}
|
||||
|
||||
return builder.ToString().TrimEnd();
|
||||
@@ -368,11 +368,11 @@ public sealed class AssistantAuditAgent(ILogger<AssistantAuditAgent> logger, ILo
|
||||
foreach (var luaFile in luaFiles.OrderBy(file => file.Key, StringComparer.Ordinal))
|
||||
{
|
||||
if (builder.Length > 0)
|
||||
builder.AppendLine().AppendLine();
|
||||
builder.AppendLineLF().AppendLineLF();
|
||||
|
||||
builder.Append("-- File: ");
|
||||
builder.AppendLine(luaFile.Key);
|
||||
builder.AppendLine(luaFile.Value);
|
||||
builder.AppendLineLF(luaFile.Key);
|
||||
builder.AppendLineLF(luaFile.Value);
|
||||
}
|
||||
|
||||
return builder.ToString().TrimEnd();
|
||||
|
||||
Reference in new issue
Block a user