mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
Fixes code formatting after merge
This commit is contained in:
parent
808e71d9c9
commit
0a924825d7
@ -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,15 +22,15 @@ 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;
|
||||||
}
|
}
|
||||||
@ -20,4 +20,4 @@
|
|||||||
</MudStack>
|
</MudStack>
|
||||||
</MudSelectItem>
|
</MudSelectItem>
|
||||||
}
|
}
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
@ -129,4 +129,4 @@ public partial class ProviderSelection : MSGComponentBase
|
|||||||
private readonly record struct CapabilityIcon(string Icon, string Tooltip);
|
private readonly record struct CapabilityIcon(string Icon, string Tooltip);
|
||||||
|
|
||||||
private readonly record struct ProviderSelectionItem(AIStudio.Settings.Provider Provider, IReadOnlyList<CapabilityIcon> CapabilityIcons);
|
private readonly record struct ProviderSelectionItem(AIStudio.Settings.Provider Provider, IReadOnlyList<CapabilityIcon> CapabilityIcons);
|
||||||
}
|
}
|
||||||
@ -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),
|
||||||
};
|
};
|
||||||
@ -513,4 +513,4 @@ public static partial class ProviderExtensions
|
|||||||
value = parameters[foundKey];
|
value = parameters[foundKey];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -44,4 +44,4 @@ public static partial class ProviderExtensions
|
|||||||
|
|
||||||
_ => []
|
_ => []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -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>
|
||||||
@ -108,4 +108,4 @@ public sealed class AssistantSessionStateReader(IReadOnlyDictionary<string, IAss
|
|||||||
field.ValueType.FullName);
|
field.ValueType.FullName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7,4 +7,4 @@
|
|||||||
- Improved the activity indicators for running chats and assistants so they use a consistent blue highlight.
|
- Improved the activity indicators for running chats and assistants so they use a consistent blue highlight.
|
||||||
- Improved the chat experience by automatically focusing the message composer again when it becomes available. Thanks, Dominic Neuburg (`donework`), for the contribution.
|
- Improved the chat experience by automatically focusing the message composer again when it becomes available. 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.
|
- 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.
|
||||||
- Upgraded Rust to v1.96.1
|
- Upgraded Rust to v1.96.1
|
||||||
Loading…
Reference in New Issue
Block a user