Added a way to read what the AI received from your sources (#1100)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Paul KoudelkaandThorsten Sommer authored and GitHub committed 2026-10-26 10:00:01 +01:00
1 parent e0d8e18f34
commit cbc4ce5413
229 files changed
+12739 -1269

No files matched your search

+19
View File
@@ -1,4 +1,5 @@
using Markdig;
using Markdig.Extensions.Mathematics;
using Markdig.Syntax;
using System.Text;
@@ -17,6 +18,24 @@ public static class Markdown
.DisableHtml()
.Build();
/// <summary>
/// The pipeline for text AI Studio read from somewhere else, such as a document or a passage of
/// a data source: the safe pipeline without math.
/// </summary>
/// <remarks>
/// Such text uses the dollar sign for prices, and a PDF puts it among the characters it could
/// not read in a figure. Taken for math, it makes MudMarkdown typeset the whole page with
/// MathJax, which replaces elements Blazor renders, so that the next render of them fails.
/// </remarks>
public static readonly MarkdownPipeline CONTENT_MARKDOWN_PIPELINE = CreateContentPipeline();
private static MarkdownPipeline CreateContentPipeline()
{
var builder = new MarkdownPipelineBuilder().UseAdvancedExtensions().DisableHtml();
builder.Extensions.TryRemove<MathExtension>();
return builder.Build();
}
public static MudMarkdownProps DefaultConfig => new()
{
Heading =