Added configuration plugin options for default chat data sources (#833)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-07-05 14:46:31 +02:00
1 parent d7c2dceb7b
commit 972ed73fe8
18 files changed
+311 -46

No files matched your search

@@ -29,7 +29,7 @@ public sealed class DataChat(Expression<Func<Data, DataChat>>? configSelection =
/// <summary>
/// Defines the data source behavior when sending assistant results to a chat.
/// </summary>
public SendToChatDataSourceBehavior SendToChatDataSourceBehavior { get; set; } = SendToChatDataSourceBehavior.NO_DATA_SOURCES;
public SendToChatDataSourceBehavior SendToChatDataSourceBehavior { get; set; } = ManagedConfiguration.Register(configSelection, n => n.SendToChatDataSourceBehavior, SendToChatDataSourceBehavior.NO_DATA_SOURCES);
/// <summary>
/// Preselect any chat options?
@@ -51,10 +51,47 @@ public sealed class DataChat(Expression<Func<Data, DataChat>>? configSelection =
/// </summary>
public string PreselectedChatTemplate { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedChatTemplate, string.Empty);
/// <summary>
/// Whether data sources are disabled by default for new chats.
/// </summary>
public bool PreselectedDataSourcesDisabled { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedDataSourcesDisabled, true);
/// <summary>
/// Whether data sources should be selected automatically by default for new chats.
/// </summary>
public bool PreselectedDataSourcesAutomaticSelection { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedDataSourcesAutomaticSelection, false);
/// <summary>
/// Whether retrieved data should be validated automatically by default for new chats.
/// </summary>
public bool PreselectedDataSourcesAutomaticValidation { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedDataSourcesAutomaticValidation, false);
/// <summary>
/// The data source IDs that should be preselected by default for new chats.
/// </summary>
public List<string> PreselectedDataSourceIds { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedDataSourceIds, []);
/// <summary>
/// Should we preselect data sources options for a created chat?
/// </summary>
public DataSourceOptions PreselectedDataSourceOptions { get; set; } = new();
// Compatibility shim: legacy settings used this nested object. See documentation/compatibility-shims/2026-07-chat-data-source-options.md; remove after 2027-01-05.
public DataSourceOptions PreselectedDataSourceOptions
{
get => new()
{
DisableDataSources = this.PreselectedDataSourcesDisabled,
AutomaticDataSourceSelection = this.PreselectedDataSourcesAutomaticSelection,
AutomaticValidation = this.PreselectedDataSourcesAutomaticValidation,
PreselectedDataSourceIds = [..this.PreselectedDataSourceIds],
};
set
{
this.PreselectedDataSourcesDisabled = value.DisableDataSources;
this.PreselectedDataSourcesAutomaticSelection = value.AutomaticDataSourceSelection;
this.PreselectedDataSourcesAutomaticValidation = value.AutomaticValidation;
this.PreselectedDataSourceIds = [..value.PreselectedDataSourceIds];
}
}
/// <summary>
/// Should we show the latest message after loading? When false, we show the first (aka oldest) message.