mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
Whitespace fixing after merge
This commit is contained in:
parent
be2f2be453
commit
e886dfee20
@ -121,9 +121,9 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
protected virtual IReadOnlyList<IButtonData> FooterButtons => [];
|
protected virtual IReadOnlyList<IButtonData> FooterButtons => [];
|
||||||
|
|
||||||
protected virtual bool HasSettingsPanel => typeof(TSettings) != typeof(NoSettingsPanel);
|
protected virtual bool HasSettingsPanel => typeof(TSettings) != typeof(NoSettingsPanel);
|
||||||
|
|
||||||
private readonly Timer formChangeTimer = new(TimeSpan.FromSeconds(1.6));
|
private readonly Timer formChangeTimer = new(TimeSpan.FromSeconds(1.6));
|
||||||
|
|
||||||
protected MudForm? Form;
|
protected MudForm? Form;
|
||||||
protected CancellationTokenSource? CancellationTokenSource;
|
protected CancellationTokenSource? CancellationTokenSource;
|
||||||
private bool isDisposed;
|
private bool isDisposed;
|
||||||
@ -856,4 +856,4 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
protected virtual void RestoreCustomAssistantSessionState(AssistantSessionStateReader state) { }
|
protected virtual void RestoreCustomAssistantSessionState(AssistantSessionStateReader state) { }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@ -8,11 +8,11 @@ namespace AIStudio.Assistants;
|
|||||||
public abstract class AssistantLowerBase : MSGComponentBase
|
public abstract class AssistantLowerBase : MSGComponentBase
|
||||||
{
|
{
|
||||||
protected static readonly Dictionary<string, object?> USER_INPUT_ATTRIBUTES = new();
|
protected static readonly Dictionary<string, object?> USER_INPUT_ATTRIBUTES = new();
|
||||||
|
|
||||||
internal const string RESULT_DIV_ID = "assistantResult";
|
internal const string RESULT_DIV_ID = "assistantResult";
|
||||||
internal const string BEFORE_RESULT_DIV_ID = "beforeAssistantResult";
|
internal const string BEFORE_RESULT_DIV_ID = "beforeAssistantResult";
|
||||||
internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
|
internal const string AFTER_RESULT_DIV_ID = "afterAssistantResult";
|
||||||
|
|
||||||
protected static readonly AssistantSessionStateKey<AIStudio.Settings.Provider> PROVIDER_SETTINGS_STATE_KEY = new(nameof(ProviderSettings));
|
protected static readonly AssistantSessionStateKey<AIStudio.Settings.Provider> PROVIDER_SETTINGS_STATE_KEY = new(nameof(ProviderSettings));
|
||||||
protected static readonly AssistantSessionStateKey<bool> INPUT_IS_VALID_STATE_KEY = new(nameof(InputIsValid));
|
protected static readonly AssistantSessionStateKey<bool> INPUT_IS_VALID_STATE_KEY = new(nameof(InputIsValid));
|
||||||
protected static readonly AssistantSessionStateKey<Profile> CURRENT_PROFILE_STATE_KEY = new(nameof(CurrentProfile));
|
protected static readonly AssistantSessionStateKey<Profile> CURRENT_PROFILE_STATE_KEY = new(nameof(CurrentProfile));
|
||||||
@ -22,14 +22,14 @@ public abstract class AssistantLowerBase : MSGComponentBase
|
|||||||
protected static readonly AssistantSessionStateKey<ContentBlock?> RESULTING_CONTENT_BLOCK_STATE_KEY = new(nameof(ResultingContentBlock));
|
protected static readonly AssistantSessionStateKey<ContentBlock?> RESULTING_CONTENT_BLOCK_STATE_KEY = new(nameof(ResultingContentBlock));
|
||||||
protected static readonly AssistantSessionStateKey<string[]> INPUT_ISSUES_STATE_KEY = new(nameof(InputIssues));
|
protected static readonly AssistantSessionStateKey<string[]> INPUT_ISSUES_STATE_KEY = new(nameof(InputIssues));
|
||||||
protected static readonly AssistantSessionStateKey<bool> IS_PROCESSING_STATE_KEY = new(nameof(IsProcessing));
|
protected static readonly AssistantSessionStateKey<bool> IS_PROCESSING_STATE_KEY = new(nameof(IsProcessing));
|
||||||
|
|
||||||
protected AIStudio.Settings.Provider ProviderSettings = Settings.Provider.NONE;
|
protected AIStudio.Settings.Provider ProviderSettings = Settings.Provider.NONE;
|
||||||
protected bool InputIsValid;
|
protected bool InputIsValid;
|
||||||
protected Profile CurrentProfile = Profile.NO_PROFILE;
|
protected Profile CurrentProfile = Profile.NO_PROFILE;
|
||||||
protected ChatTemplate CurrentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
protected ChatTemplate CurrentChatTemplate = ChatTemplate.NO_CHAT_TEMPLATE;
|
||||||
protected ChatThread? ChatThread;
|
protected ChatThread? ChatThread;
|
||||||
protected IContent? LastUserPrompt;
|
protected IContent? LastUserPrompt;
|
||||||
|
|
||||||
protected ContentBlock? ResultingContentBlock;
|
protected ContentBlock? ResultingContentBlock;
|
||||||
protected string[] InputIssues = [];
|
protected string[] InputIssues = [];
|
||||||
protected bool IsProcessing;
|
protected bool IsProcessing;
|
||||||
|
|||||||
@ -119,4 +119,4 @@ public partial class AssistantBlock<TSettings> : MSGComponentBase where TSetting
|
|||||||
|
|
||||||
return base.ProcessIncomingMessage(sendingComponent, triggeredEvent, data);
|
return base.ProcessIncomingMessage(sendingComponent, triggeredEvent, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
|||||||
Capability.SPEECH_INPUT,
|
Capability.SPEECH_INPUT,
|
||||||
Capability.VIDEO_INPUT
|
Capability.VIDEO_INPUT
|
||||||
];
|
];
|
||||||
|
|
||||||
private static readonly IReadOnlyList<ReasoningOverrideMode> REASONING_OVERRIDE_MODES =
|
private static readonly IReadOnlyList<ReasoningOverrideMode> REASONING_OVERRIDE_MODES =
|
||||||
[
|
[
|
||||||
ReasoningOverrideMode.AUTOMATIC,
|
ReasoningOverrideMode.AUTOMATIC,
|
||||||
@ -724,10 +724,10 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetExpertStyles => this.showExpertSettings ? "border-2 border-dashed rounded pa-2" : string.Empty;
|
private string GetExpertStyles => this.showExpertSettings ? "border-2 border-dashed rounded pa-2" : string.Empty;
|
||||||
|
|
||||||
private static string GetPlaceholderExpertSettings =>
|
private static string GetPlaceholderExpertSettings =>
|
||||||
"""
|
"""
|
||||||
"temperature": 0.5,
|
"temperature": 0.5,
|
||||||
"top_p": 0.9,
|
"top_p": 0.9,
|
||||||
|
|||||||
@ -153,27 +153,27 @@ public static partial class ProviderExtensions
|
|||||||
[
|
[
|
||||||
Capability.TEXT_INPUT, Capability.MULTIPLE_IMAGE_INPUT,
|
Capability.TEXT_INPUT, Capability.MULTIPLE_IMAGE_INPUT,
|
||||||
Capability.TEXT_OUTPUT,
|
Capability.TEXT_OUTPUT,
|
||||||
|
|
||||||
Capability.FUNCTION_CALLING,
|
Capability.FUNCTION_CALLING,
|
||||||
Capability.CHAT_COMPLETION_API,
|
Capability.CHAT_COMPLETION_API,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
// Mistral medium 3.5:
|
// Mistral medium 3.5:
|
||||||
if (modelName.IndexOf("mistral-medium-3.5") is not -1)
|
if (modelName.IndexOf("mistral-medium-3.5") is not -1)
|
||||||
return
|
return
|
||||||
[
|
[
|
||||||
Capability.TEXT_INPUT,
|
Capability.TEXT_INPUT,
|
||||||
Capability.MULTIPLE_IMAGE_INPUT,
|
Capability.MULTIPLE_IMAGE_INPUT,
|
||||||
Capability.TEXT_OUTPUT,
|
Capability.TEXT_OUTPUT,
|
||||||
|
|
||||||
Capability.OPTIONAL_REASONING,
|
Capability.OPTIONAL_REASONING,
|
||||||
|
|
||||||
Capability.FUNCTION_CALLING,
|
Capability.FUNCTION_CALLING,
|
||||||
Capability.CHAT_COMPLETION_API,
|
Capability.CHAT_COMPLETION_API,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
if (modelName.IndexOf("mistral-3") is not -1 ||
|
if (modelName.IndexOf("mistral-3") is not -1 ||
|
||||||
modelName.IndexOf("mistral-large-3") is not -1)
|
modelName.IndexOf("mistral-large-3") is not -1)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -42,7 +42,7 @@ public static partial class ProviderExtensions
|
|||||||
var capabilities = provider.GetModelCapabilities();
|
var capabilities = provider.GetModelCapabilities();
|
||||||
if (capabilities.Contains(Capability.ALWAYS_REASONING))
|
if (capabilities.Contains(Capability.ALWAYS_REASONING))
|
||||||
return ReasoningIndicatorState.ALWAYS_ON;
|
return ReasoningIndicatorState.ALWAYS_ON;
|
||||||
|
|
||||||
var reasoningConfigurationState = GetReasoningConfigurationState(provider);
|
var reasoningConfigurationState = GetReasoningConfigurationState(provider);
|
||||||
if (capabilities.Contains(Capability.REASONING_BY_DEFAULT))
|
if (capabilities.Contains(Capability.REASONING_BY_DEFAULT))
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ public static partial class ProviderExtensions
|
|||||||
text.Equals("on", StringComparison.OrdinalIgnoreCase) ||
|
text.Equals("on", StringComparison.OrdinalIgnoreCase) ||
|
||||||
text.Equals("summarized", StringComparison.OrdinalIgnoreCase)
|
text.Equals("summarized", StringComparison.OrdinalIgnoreCase)
|
||||||
=> ReasoningConfigurationState.EXPLICITLY_ENABLED,
|
=> ReasoningConfigurationState.EXPLICITLY_ENABLED,
|
||||||
|
|
||||||
true => ReasoningConfigurationState.EXPLICITLY_ENABLED,
|
true => ReasoningConfigurationState.EXPLICITLY_ENABLED,
|
||||||
_ => ReasoningConfigurationState.NOT_CONFIGURED,
|
_ => ReasoningConfigurationState.NOT_CONFIGURED,
|
||||||
};
|
};
|
||||||
@ -369,7 +369,7 @@ public static partial class ProviderExtensions
|
|||||||
string text when text.Equals("enabled", StringComparison.OrdinalIgnoreCase) ||
|
string text when text.Equals("enabled", StringComparison.OrdinalIgnoreCase) ||
|
||||||
text.Equals("adaptive", StringComparison.OrdinalIgnoreCase)
|
text.Equals("adaptive", StringComparison.OrdinalIgnoreCase)
|
||||||
=> ReasoningConfigurationState.EXPLICITLY_ENABLED,
|
=> ReasoningConfigurationState.EXPLICITLY_ENABLED,
|
||||||
|
|
||||||
string text when IsDisabledText(text) => ReasoningConfigurationState.EXPLICITLY_DISABLED,
|
string text when IsDisabledText(text) => ReasoningConfigurationState.EXPLICITLY_DISABLED,
|
||||||
_ => GetLevelState(value),
|
_ => GetLevelState(value),
|
||||||
};
|
};
|
||||||
|
|||||||
@ -10,7 +10,7 @@ namespace AIStudio.Tools.AssistantSessions;
|
|||||||
public sealed class AssistantSessionStateReader(IReadOnlyDictionary<string, IAssistantSessionSnapshotField> fields, string assistantTitle)
|
public sealed class AssistantSessionStateReader(IReadOnlyDictionary<string, IAssistantSessionSnapshotField> fields, string assistantTitle)
|
||||||
{
|
{
|
||||||
private static readonly ILogger<AssistantSessionStateReader> LOG = Program.LOGGER_FACTORY.CreateLogger<AssistantSessionStateReader>();
|
private static readonly ILogger<AssistantSessionStateReader> LOG = Program.LOGGER_FACTORY.CreateLogger<AssistantSessionStateReader>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Restores a typed value when it exists in the snapshot.
|
/// Restores a typed value when it exists in the snapshot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -929,4 +929,4 @@ public static class WorkspaceBehaviour
|
|||||||
public static async Task EnsureBiasWorkspace() => await EnsureWorkspace(KnownWorkspaces.BIAS_WORKSPACE_ID, "Bias of the Day");
|
public static async Task EnsureBiasWorkspace() => await EnsureWorkspace(KnownWorkspaces.BIAS_WORKSPACE_ID, "Bias of the Day");
|
||||||
|
|
||||||
public static async Task EnsureERIServerWorkspace() => await EnsureWorkspace(KnownWorkspaces.ERI_SERVER_WORKSPACE_ID, "ERI Servers");
|
public static async Task EnsureERIServerWorkspace() => await EnsureWorkspace(KnownWorkspaces.ERI_SERVER_WORKSPACE_ID, "ERI Servers");
|
||||||
}
|
}
|
||||||
@ -12,4 +12,4 @@
|
|||||||
- Improved the chat message formatting so line breaks in responses are preserved more closely, making structured text easier to read. Thanks, Dominic Neuburg (`donework`), for the contribution.
|
- Improved the chat message formatting so line breaks in responses are preserved more closely, making structured text easier to read. Thanks, Dominic Neuburg (`donework`), for the contribution.
|
||||||
- Fixed configuration plugins so they can configure assistant plugin audit settings, including required audit levels, audit provider selection, and automatic background audits.
|
- Fixed configuration plugins so they can configure assistant plugin audit settings, including required audit levels, audit provider selection, and automatic background audits.
|
||||||
- Fixed default data source selection so sources that require local or trusted providers are selected again after switching from a cloud provider to a suitable provider.
|
- Fixed default data source selection so sources that require local or trusted providers are selected again after switching from a cloud provider to a suitable provider.
|
||||||
- Upgraded Rust to v1.96.1
|
- Upgraded Rust to v1.96.1
|
||||||
Loading…
Reference in New Issue
Block a user