Translation caching. New ai actions panel.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Enums;
|
||||
|
||||
[Flags]
|
||||
public enum AiActionType
|
||||
{
|
||||
None = 0,
|
||||
Translate = 1,
|
||||
Rewrite = 2,
|
||||
Summarize = 4,
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Models.Ai;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces;
|
||||
|
||||
public interface IAiActionOptionsService
|
||||
{
|
||||
IReadOnlyList<AiTranslateLanguageOption> GetTranslateLanguageOptions();
|
||||
IReadOnlyList<AiRewriteModeOption> GetRewriteModeOptions();
|
||||
}
|
||||
@@ -59,6 +59,16 @@ public interface IMimeFileService
|
||||
/// </summary>
|
||||
Task<bool> DeleteMimeMessageAsync(Guid accountId, Guid fileId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns cached translated html for the given mime resource if it exists.
|
||||
/// </summary>
|
||||
Task<string> GetTranslatedHtmlAsync(Guid accountId, Guid fileId, string targetLanguage, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Saves translated html for the given mime resource.
|
||||
/// </summary>
|
||||
Task SaveTranslatedHtmlAsync(Guid accountId, Guid fileId, string targetLanguage, string html, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Prepares the final model containing rendering details.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Wino.Core.Domain.Models.Ai;
|
||||
|
||||
public sealed record AiRewriteModeOption(string Mode, string Label, string Description, bool IsCustom = false);
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Wino.Core.Domain.Models.Ai;
|
||||
|
||||
public sealed record AiTranslateLanguageOption(string Code, string Label);
|
||||
@@ -1065,10 +1065,18 @@
|
||||
"Composer_AiTranslate": "Translate with AI",
|
||||
"Composer_AiActions": "AI Actions",
|
||||
"Composer_AiRewrite": "Rewrite with AI",
|
||||
"AiActions_CheckingStatus": "Checking AI access...",
|
||||
"AiActions_SignedOutTitle": "Unlock Wino AI Pack",
|
||||
"AiActions_SignedOutDescription": "Translate, rewrite, and summarize emails with AI after signing in to your Wino Account and activating the AI Pack add-on.",
|
||||
"AiActions_NoPackTitle": "AI Pack required",
|
||||
"AiActions_NoPackDescription": "You're signed in, but AI Pack is not active yet. Purchase it to use Wino's AI translation, rewrite, and summarize tools.",
|
||||
"AiActions_UsageSummary": "{0} of {1} requests used this month.",
|
||||
"Composer_AiRewritePolite": "Make it polite",
|
||||
"Composer_AiRewritePoliteDescription": "Softens the wording while keeping the same intent.",
|
||||
"Composer_AiRewriteAngry": "Make it direct",
|
||||
"Composer_AiRewriteAngryDescription": "Uses a firmer, more forceful tone.",
|
||||
"Composer_AiRewriteAngry": "Make it angry",
|
||||
"Composer_AiRewriteAngryDescription": "Uses a sharper and more confrontational tone.",
|
||||
"Composer_AiRewriteHappy": "Make it happy",
|
||||
"Composer_AiRewriteHappyDescription": "Adds a more upbeat and enthusiastic tone.",
|
||||
"Composer_AiRewriteFormal": "Make it formal",
|
||||
"Composer_AiRewriteFormalDescription": "Makes the message sound more professional and structured.",
|
||||
"Composer_AiRewriteFriendly": "Make it friendly",
|
||||
@@ -1077,6 +1085,9 @@
|
||||
"Composer_AiRewriteShorterDescription": "Tightens the text and removes unnecessary detail.",
|
||||
"Composer_AiRewriteClearer": "Make it clearer",
|
||||
"Composer_AiRewriteClearerDescription": "Improves readability and makes the message easier to follow.",
|
||||
"Composer_AiRewriteCustom": "Custom",
|
||||
"Composer_AiRewriteCustomDescription": "Describe your own rewrite intention.",
|
||||
"Composer_AiRewriteCustomPlaceholder": "Describe how you want the message rewritten",
|
||||
"Composer_AiRewriteMode": "Rewrite tone",
|
||||
"Composer_AiRewriteApply": "Apply rewrite",
|
||||
"Composer_AiTranslateDialogTitle": "Translate with AI",
|
||||
@@ -1326,6 +1337,7 @@
|
||||
"WinoAccount_Error_ExternalLoginInvalid": "The external sign-in request is invalid.",
|
||||
"WinoAccount_Error_ExternalAuthStateInvalid": "The external sign-in state is invalid or expired.",
|
||||
"WinoAccount_Error_ExternalAuthCodeInvalid": "The external sign-in code is invalid or expired.",
|
||||
"WinoAccount_Error_AiPackRequired": "An active Wino AI Pack subscription is required for this action.",
|
||||
"WinoAccount_Error_AiQuotaExceeded": "Your AI Pack usage limit has been reached for the current billing period.",
|
||||
"WinoAccount_Error_AiHtmlEmpty": "There is no email content to process.",
|
||||
"WinoAccount_Error_AiHtmlTooLarge": "This email is too large to process with Wino AI.",
|
||||
|
||||
Reference in New Issue
Block a user