Added options for energy saving & send shortcuts

This commit is contained in:
Thorsten Sommer 2024-05-04 11:00:46 +02:00
parent f9c87fc72c
commit 0541e1b18e
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 39 additions and 0 deletions

View File

@ -15,4 +15,15 @@ public sealed class Data
/// List of configured providers.
/// </summary>
public List<Provider> Providers { get; init; } = new();
/// <summary>
/// Should we save energy? When true, we will update content streamed
/// from the server, i.e., AI, less frequently.
/// </summary>
public bool IsSavingEnergy { get; set; }
/// <summary>
/// Shortcuts to send the input to the AI.
/// </summary>
public SendBehavior ShortcutSendBehavior { get; set; } = SendBehavior.MODIFER_ENTER_IS_SENDING;
}

View File

@ -0,0 +1,28 @@
namespace AIStudio.Settings;
/// <summary>
/// Possible behaviors for sending the input to the AI.
/// </summary>
public enum SendBehavior
{
/// <summary>
/// There is no shortcut to send the input to the AI. The user must click
/// the send button. The enter key adds a new line.
/// </summary>
NO_KEY_IS_SENDING,
/// <summary>
/// The user can send the input to the AI by pressing any modifier key
/// together with the enter key. Alternatively, the user can click the send
/// button. The enter key alone adds a new line.
/// </summary>
MODIFER_ENTER_IS_SENDING,
/// <summary>
/// The user can send the input to the AI by pressing the enter key. In order
/// to add a new line, the user must press the shift key together with the
/// enter key. Alternatively, the user can click the send button to send the
/// input to the AI.
/// </summary>
ENTER_IS_SENDING,
}