From 679b03ca1fbb457a12ac03e22832314bc52fded9 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 25 Jan 2026 13:50:11 +0100 Subject: [PATCH] Fix rendering of policy definition section in the document analysis assistant --- .../DocumentAnalysisAssistant.razor | 95 ++++++++++--------- .../DocumentAnalysisAssistant.razor.cs | 13 ++- .../Assistants/I18N/allTexts.lua | 3 + .../plugin.lua | 3 + .../plugin.lua | 3 + .../wwwroot/changelog/v26.1.2.md | 1 + 6 files changed, 74 insertions(+), 44 deletions(-) diff --git a/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor b/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor index 64d549a9..576664bb 100644 --- a/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor +++ b/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor @@ -42,50 +42,59 @@ else - - - @T("Common settings") - - - - - - - + + @if (!this.policyDefinitionExpanded) + { + + @T("Expand this section to view and edit the policy definition.") + + } + else + { + + @T("Common settings") + + + + + + + - - @T("Analysis and output rules") - - - - @T("Use the analysis and output rules to define how the AI evaluates your documents and formats the results.") - - - - @T("The analysis rules specify what the AI should pay particular attention to while reviewing the documents you provide, and which aspects it should highlight or save. For example, if you want to extract the potential of green hydrogen for agriculture from a variety of general publications, you can explicitly define this in the analysis rules.") - - - - - - - - @T("After the AI has processed all documents, it needs your instructions on how the result should be formatted. Would you like a structured list with keywords or a continuous text? Should the output include emojis or be written in formal business language? You can specify all these preferences in the output rules. There, you can also predefine a desired structure—for example, by using Markdown formatting to define headings, paragraphs, or bullet points.") - - - - - - - - @T("Preparation for enterprise distribution") - - - - - @T("Export policy as configuration section") - - + + @T("Analysis and output rules") + + + + @T("Use the analysis and output rules to define how the AI evaluates your documents and formats the results.") + + + + @T("The analysis rules specify what the AI should pay particular attention to while reviewing the documents you provide, and which aspects it should highlight or save. For example, if you want to extract the potential of green hydrogen for agriculture from a variety of general publications, you can explicitly define this in the analysis rules.") + + + + + + + + @T("After the AI has processed all documents, it needs your instructions on how the result should be formatted. Would you like a structured list with keywords or a continuous text? Should the output include emojis or be written in formal business language? You can specify all these preferences in the output rules. There, you can also predefine a desired structure—for example, by using Markdown formatting to define headings, paragraphs, or bullet points.") + + + + + + + + @T("Preparation for enterprise distribution") + + + + + @T("Export policy as configuration section") + + + } diff --git a/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs b/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs index 9ee972ba..7604e071 100644 --- a/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs +++ b/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs @@ -203,6 +203,8 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore(Event.SEND_TO_DOCUMENT_ANALYSIS_ASSISTANT).FirstOrDefault(); if (receivedDeferredContent is not null) @@ -237,6 +239,7 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore