From 9f7cd3d70767affb8097098e514584f9df19e5bd Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 14 Sep 2026 12:41:08 +0200 Subject: [PATCH] List the preselected data sources that cannot be used right now --- .../Components/DataSourceSelection.razor | 22 ++++++++++++------- .../Components/DataSourceSelection.razor.cs | 16 +++++++------- .../Components/DataSourceSelection.razor.css | 18 +++++++++++++++ .../plugin.lua | 6 ++--- .../plugin.lua | 6 ++--- 5 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 app/MindWork AI Studio/Components/DataSourceSelection.razor.css diff --git a/app/MindWork AI Studio/Components/DataSourceSelection.razor b/app/MindWork AI Studio/Components/DataSourceSelection.razor index 3d56bdb7..314bf2b7 100644 --- a/app/MindWork AI Studio/Components/DataSourceSelection.razor +++ b/app/MindWork AI Studio/Components/DataSourceSelection.razor @@ -67,13 +67,6 @@ } - @if (!this.aiBasedSourceSelection && this.GetUnavailablePreselectedDataSourceNames().Length > 0) - { - - @T("These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable:") @this.GetUnavailablePreselectedDataSourceNames() - - } - @switch (this.aiBasedSourceSelection) { case true when this.availableDataSources.Count == 0: @@ -172,11 +165,24 @@ break; } + + @if (!this.aiBasedSourceSelection && this.GetUnavailablePreselectedDataSources().Count > 0) + { + + @T("These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable:") + + + } } } - + @T("Close") diff --git a/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs b/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs index 6f42d9c0..714a433c 100644 --- a/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs +++ b/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs @@ -183,19 +183,19 @@ public partial class DataSourceSelection : MSGComponentBase } /// - /// Names the preselected data sources which the filters removed. + /// Collects the preselected data sources which the filters removed. /// /// - /// This list shows what survived the filters, while the preselection keeps what the user asked - /// for. Without this, a preselected source which cannot be used right now is simply missing - /// from the list, and nothing says so. Preselected ids without a configured source are left - /// out: that source is gone, not unavailable. + /// The list of available sources shows what survived the filters, while the preselection keeps + /// what the user asked for. Without this, a preselected source which cannot be used right now + /// is simply missing from that list, and nothing says so. Preselected ids without a configured + /// source are left out: that source is gone, not unavailable. /// - /// The names of the unusable preselected data sources, or an empty string when there are none. - private string GetUnavailablePreselectedDataSourceNames() + /// The unusable preselected data sources, or an empty list when there are none. + private IReadOnlyList GetUnavailablePreselectedDataSources() { var availableDataSourceIds = this.availableDataSources.Select(ds => ds.Id).ToHashSet(StringComparer.Ordinal); - return string.Join(", ", this.GetDataSourcesFromConfiguredIds().Where(ds => !availableDataSourceIds.Contains(ds.Id)).Select(ds => ds.Name)); + return this.GetDataSourcesFromConfiguredIds().Where(ds => !availableDataSourceIds.Contains(ds.Id)).ToList(); } private async Task LoadAndApplyFilters() diff --git a/app/MindWork AI Studio/Components/DataSourceSelection.razor.css b/app/MindWork AI Studio/Components/DataSourceSelection.razor.css new file mode 100644 index 00000000..73c446c8 --- /dev/null +++ b/app/MindWork AI Studio/Components/DataSourceSelection.razor.css @@ -0,0 +1,18 @@ +/* + * A plain list renders without markers and without indentation here: something in the global + * styles takes both off. This is an enumeration of names and wants to read as one, so it states + * marker, indentation and spacing itself. MudBlazor's Markdown styles fight the same fight for + * their own lists, and need an !important on the display to win it -- hence the one below. + */ +.unavailable-data-sources { + max-height: 10em; + overflow-y: auto; + overflow-wrap: anywhere; + margin-top: 0; + padding-left: 1.5em; + list-style: disc outside; +} + +.unavailable-data-sources li { + display: list-item !important; +} diff --git a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua index c974e135..b75ab565 100644 --- a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua @@ -3903,6 +3903,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T168406579"] = "KI-a -- AI-based data validation UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1744745490"] = "KI-gestützte Datenvalidierung" +-- These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable: +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1852534051"] = "Diese Datenquellen sind vorausgewählt, können derzeit jedoch nicht verwendet werden – entweder aufgrund von Datenschutz- oder Vertrauensanforderungen oder weil sie nicht verfügbar sind:" + -- Yes, I want to use data sources. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1975014927"] = "Ja, ich möchte Datenquellen verwenden." @@ -11589,9 +11592,6 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::DATASOURCESELECTIONPROCESSES::AGENTICSRCS -- Automatically selects the appropriate data sources based on the last prompt. Applies a heuristic reduction at the end to reduce the number of data sources. UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::DATASOURCESELECTIONPROCESSES::AGENTICSRCSELWITHDYNHEUR::T648937779"] = "Wählt automatisch die passenden Datenquellen basierend auf der letzten Eingabe aus. Wendet am Ende eine heuristische Reduzierung an, um die Anzahl der Datenquellen zu verringern." --- None of your selected data sources could be used. This answer was created without them. -UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::RAGPROCESSES::AISRCSELWITHRETCTXVAL::T2995829558"] = "Keine Ihrer ausgewählten Datenquellen konnte verwendet werden. Diese Antwort wurde ohne sie erstellt." - -- This RAG process filters data sources, automatically selects appropriate sources, optionally allows manual source selection, retrieves data, and automatically validates the retrieval context. UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::RAGPROCESSES::AISRCSELWITHRETCTXVAL::T3047786484"] = "Dieser RAG-Prozess filtert Datenquellen, wählt automatisch passende Quellen aus, ermöglicht optional die manuelle Auswahl von Quellen, ruft Daten ab und überprüft den Abrufkontext automatisch." diff --git a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua index 490d3f64..7f89f73b 100644 --- a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua @@ -3903,6 +3903,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T168406579"] = "AI-S -- AI-based data validation UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1744745490"] = "AI-based data validation" +-- These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable: +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1852534051"] = "These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable:" + -- Yes, I want to use data sources. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1975014927"] = "Yes, I want to use data sources." @@ -11589,9 +11592,6 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::DATASOURCESELECTIONPROCESSES::AGENTICSRCS -- Automatically selects the appropriate data sources based on the last prompt. Applies a heuristic reduction at the end to reduce the number of data sources. UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::DATASOURCESELECTIONPROCESSES::AGENTICSRCSELWITHDYNHEUR::T648937779"] = "Automatically selects the appropriate data sources based on the last prompt. Applies a heuristic reduction at the end to reduce the number of data sources." --- None of your selected data sources could be used. This answer was created without them. -UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::RAGPROCESSES::AISRCSELWITHRETCTXVAL::T2995829558"] = "None of your selected data sources could be used. This answer was created without them." - -- This RAG process filters data sources, automatically selects appropriate sources, optionally allows manual source selection, retrieves data, and automatically validates the retrieval context. UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::RAGPROCESSES::AISRCSELWITHRETCTXVAL::T3047786484"] = "This RAG process filters data sources, automatically selects appropriate sources, optionally allows manual source selection, retrieves data, and automatically validates the retrieval context."