mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:27:21 +00:00
Added a way to switch off tools you never need (#1115)
This commit is contained in:
1 parent
dcba62b45c
commit
04546c25ac
31 files changed
+638
-37
No files matched your search
@@ -18,7 +18,11 @@
|
||||
@this.item.Description
|
||||
</MudJustifiedText>
|
||||
|
||||
@if (!this.ToolRegistry.IsToolActive(this.item.Id))
|
||||
@if (this.IsSwitchedOffByUser)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Class="mb-4">@T("You switched off this tool. It appears in no tool selection, and the AI cannot use it. You can switch it on again in the tool settings.")</MudAlert>
|
||||
}
|
||||
else if (!this.ToolRegistry.IsToolActive(this.item.Id))
|
||||
{
|
||||
<MudAlert Severity="Severity.Warning" Class="mb-4">@T("This tool has been disabled by your organization.")</MudAlert>
|
||||
}
|
||||
|
||||
@@ -45,6 +45,15 @@ public partial class ToolSettingsDialog : SettingsDialogBase
|
||||
this.sections = loadedSections;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether the user switched this tool off, and nothing but the user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// When the organization switched it off as well, that is what the dialog says: switching it on
|
||||
/// again would not help the user.
|
||||
/// </remarks>
|
||||
private bool IsSwitchedOffByUser => this.item?.SwitchOffReason is ToolOfferBlockReason.TOOL_SWITCHED_OFF_BY_USER;
|
||||
|
||||
/// <summary>
|
||||
/// Whether each section is headed by the name of its tool.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user