mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-06 09:09:40 +00:00
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
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 / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (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 }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
29 lines
1.3 KiB
C#
29 lines
1.3 KiB
C#
using AIStudio.Settings;
|
|
using AIStudio.Tools.PluginSystem;
|
|
|
|
namespace AIStudio.Tools.ToolCallingSystem.ToolCallingImplementations.Mailboxes;
|
|
|
|
/// <summary>
|
|
/// Whether the mail tools have anything to work with.
|
|
/// </summary>
|
|
internal static class MailToolConfiguration
|
|
{
|
|
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(MailToolConfiguration).Namespace, nameof(MailToolConfiguration));
|
|
|
|
/// <summary>
|
|
/// The state the selection shows for a mail tool: not set up while there is no mailbox at all.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Whether the provider of a chat may read the mailboxes is no question here. That depends on
|
|
/// the chat, so only the preparation of a request can answer it.
|
|
/// </remarks>
|
|
/// <param name="settingsManager">The settings, which hold the mailboxes.</param>
|
|
/// <returns>Null when there is a mailbox, otherwise the state with what to do about it.</returns>
|
|
public static ToolConfigurationState? GetState(SettingsManager settingsManager) => settingsManager.ConfigurationData.Mailboxes.Count > 0
|
|
? null
|
|
: new ToolConfigurationState
|
|
{
|
|
IsConfigured = false,
|
|
Message = TB("To use this tool, add a mailbox to your data sources first."),
|
|
};
|
|
} |