mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
* [AdvancedPaste] Additional actions, including Image to text * Spellcheck issue * [AdvancedPaste] Paste as file and many other improvements * Fixed typo * Fixed typo * [AdvancedPaste] Improved paste window menu layout * [AdvancedPaste] Improved settings window layout * [AdvancedPaste] Removed AudioToText for the moment * Code cleanup * Minor fixes * [AdvancedPaste] Semantic Kernel support * Changed log-line with potentially sensitive info * Spellcheck issues * Various improvements for Semantic Kernel * Spellcheck issue * Refactored Clipboard routines * Added integration tests for KernelService * Extra telemetry for AdvancedPaste * Added 'Hotkey' suffix to AdvancedPaste_Settings telemetry event * Added IsSavedQuery * Added KernelQueryCache * Refactoring * Added KernelQueryCache to BugReportTool delete list * Added opt-n for Semantic Kernel * Fixed bug with KernelQueryCache * Ability to view last AI chat message on error * Improved kernel query cache * Used System.IO.Abstractions and improved tests * Fixed under-count of token usage * Used Semantic Kernel icon * Cleanup * Add missing EndProject line * Fix dependency version conflicts * Fix NOTICE.md * Correct place of SemanticKernel in NOTICE.md * Unlinked CustomPreview toggle from AI * Added Microsoft.Bcl.AsyncInterfaces dependency to AdvancedPaste * Fixed NOTICE.md order * Moved Custom Preview to behaviour section * Made Image to Text raise error on empty output * Added AIServiceBatchIntegrationTests * Updated AIServiceBatchIntegrationTests * Added prompt moderation * [AdvancedPaste] Media Transcoding support * Spellcheck issue * Improved transcoding output profile and added tests * Moved GPO Infobar to better location * Added cancel button and minor bug fixes * Fixed crash * Minor cleanups * Improved transcoding error messages * Used software back when transcoding fails with hardware accerlation * Added Reencode to spellcheck * Spellcheck issue --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Dustin L. Howett <dustin@howett.net> Co-authored-by: Jeremy Sinclair <4016293+snickler@users.noreply.github.com>
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library;
|
|
|
|
public sealed class AdvancedPasteAdditionalActions
|
|
{
|
|
public static class PropertyNames
|
|
{
|
|
public const string ImageToText = "image-to-text";
|
|
public const string PasteAsFile = "paste-as-file";
|
|
public const string Transcode = "transcode";
|
|
}
|
|
|
|
[JsonPropertyName(PropertyNames.ImageToText)]
|
|
public AdvancedPasteAdditionalAction ImageToText { get; init; } = new();
|
|
|
|
[JsonPropertyName(PropertyNames.PasteAsFile)]
|
|
public AdvancedPastePasteAsFileAction PasteAsFile { get; init; } = new();
|
|
|
|
[JsonPropertyName(PropertyNames.Transcode)]
|
|
public AdvancedPasteTranscodeAction Transcode { get; init; } = new();
|
|
|
|
public IEnumerable<IAdvancedPasteAction> GetAllActions()
|
|
{
|
|
Queue<IAdvancedPasteAction> queue = new([ImageToText, PasteAsFile, Transcode]);
|
|
|
|
while (queue.Count != 0)
|
|
{
|
|
var action = queue.Dequeue();
|
|
yield return action;
|
|
|
|
foreach (var subAction in action.SubActions)
|
|
{
|
|
queue.Enqueue(subAction);
|
|
}
|
|
}
|
|
}
|
|
}
|