Added an analyzer which keeps line breaks LF on every system (#1193)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-11 19:30:00 +01:00
1 parent b1c1f13993
commit 65d50de033
96 files changed
+741 -393

No files matched your search

@@ -89,11 +89,11 @@ public sealed class CountMailsTool(SettingsManager settingsManager, MailboxRetri
internal static ToolFunctionDefinition DescribeMailboxes(ToolFunctionDefinition function, IReadOnlyList<DataSourceMailbox> mailboxes)
{
var description = new StringBuilder(DESCRIPTION);
description.AppendLine();
description.AppendLine();
description.AppendLine($"The mailboxes you may count, by the ID to pass in {MailToolArguments.MAILBOX_IDS_ARGUMENT}:");
description.AppendLineLF();
description.AppendLineLF();
description.AppendLineLF($"The mailboxes you may count, by the ID to pass in {MailToolArguments.MAILBOX_IDS_ARGUMENT}:");
foreach (var mailbox in mailboxes)
description.AppendLine($"- id={mailbox.Id}, name='{mailbox.Name}'");
description.AppendLineLF($"- id={mailbox.Id}, name='{mailbox.Name}'");
return function with
{
@@ -54,9 +54,9 @@ internal static class MailToolResults
if (!string.IsNullOrWhiteSpace(text))
{
builder.AppendLine();
builder.AppendLine("---");
builder.AppendLine();
builder.AppendLineLF();
builder.AppendLineLF("---");
builder.AppendLineLF();
builder.Append(text);
}
@@ -65,7 +65,7 @@ internal static class MailToolResults
void AppendField(string label, string? value)
{
if (!string.IsNullOrWhiteSpace(value))
builder.AppendLine($"- **{label}:** {value}");
builder.AppendLineLF($"- **{label}:** {value}");
}
}
@@ -135,11 +135,11 @@ public sealed class SearchMailsTool(SettingsManager settingsManager, MailboxRetr
internal static ToolFunctionDefinition DescribeMailboxes(ToolFunctionDefinition function, IReadOnlyList<DataSourceMailbox> mailboxes)
{
var description = new StringBuilder(DESCRIPTION);
description.AppendLine();
description.AppendLine();
description.AppendLine($"The mailboxes you may search, by the ID to pass in {MailToolArguments.MAILBOX_IDS_ARGUMENT}:");
description.AppendLineLF();
description.AppendLineLF();
description.AppendLineLF($"The mailboxes you may search, by the ID to pass in {MailToolArguments.MAILBOX_IDS_ARGUMENT}:");
foreach (var mailbox in mailboxes)
description.AppendLine($"- id={mailbox.Id}, name='{mailbox.Name}'");
description.AppendLineLF($"- id={mailbox.Id}, name='{mailbox.Name}'");
return function with
{
@@ -286,21 +286,21 @@ public sealed class SemanticSearchTool(SettingsManager settingsManager, DataSour
internal static ToolFunctionDefinition DescribeDataSources(ToolFunctionDefinition function, IReadOnlyList<(IDataSource DataSource, string Description)> dataSources, IReadOnlyList<IDataSource>? unreachableDataSources = null)
{
var description = new StringBuilder(DESCRIPTION);
description.AppendLine();
description.AppendLine();
description.AppendLine($"The data sources you may search, by the ID to pass in {DATA_SOURCE_IDS_ARGUMENT}:");
description.AppendLineLF();
description.AppendLineLF();
description.AppendLineLF($"The data sources you may search, by the ID to pass in {DATA_SOURCE_IDS_ARGUMENT}:");
foreach (var (dataSource, dataSourceDescription) in dataSources)
{
description.Append($"- id={dataSource.Id}, name='{dataSource.Name}', type={GetKind(dataSource)}");
if (!string.IsNullOrWhiteSpace(dataSourceDescription))
description.Append($", description='{dataSourceDescription.Trim().Shorten(MAX_DESCRIPTION_CHARACTERS)}'");
description.AppendLine();
description.AppendLineLF();
}
if (unreachableDataSources is { Count: > 0 })
{
description.AppendLine();
description.AppendLineLF();
UnreachableDataSources.AppendTo(description, unreachableDataSources);
}