Fixed sharing plugins when the share dialog of the operating system does not respond (#1088)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-19 14:39:12 +02:00
1 parent 7d35536c87
commit f26d132d56
16 files changed
+543 -76

No files matched your search

@@ -0,0 +1,9 @@
namespace AIStudio.Tools.Rust;
/// <summary>
/// The answer of the runtime to a request to share a file through the share sheet of the
/// operating system.
/// </summary>
/// <param name="Outcome">What became of the request.</param>
/// <param name="Issue">Why the share sheet did not open; empty when it opened.</param>
public sealed record ShareFileResponse(ShareSheetOutcome Outcome, string Issue);
@@ -0,0 +1,30 @@
namespace AIStudio.Tools.Rust;
/// <summary>
/// What became of a request to open the share sheet of the operating system. Keep in sync with
/// ShareOutcome in runtime/src/share_sheet.rs.
/// </summary>
public enum ShareSheetOutcome
{
/// <summary>
/// The runtime sent an outcome the app does not know, or none at all. The app reads this as a
/// failure, never as an opened share sheet.
/// </summary>
UNKNOWN,
/// <summary>
/// The operating system opened its share sheet for the file.
/// </summary>
OPENED,
/// <summary>
/// The share sheet could not be opened, or the request was invalid.
/// </summary>
FAILED,
/// <summary>
/// Windows accepted the share request, but its share sheet never asked for the file. Windows
/// reports no error then, and the share sheet simply does not appear.
/// </summary>
UNRESPONSIVE,
}