mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-05 00:44:35 +00:00
Moved temporary files into a folder of their own below the data directory (#1245)
This commit is contained in:
1 parent
ddfc632b63
commit
12d3e1ec6c
52 files changed
+1219
-396
No files matched your search
@@ -7,18 +7,12 @@ namespace AIStudio.Assistants.BeyondFactsLab;
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The lab keeps only the filtered text of a transcript, as the text of the material. The transcript itself lies in
|
||||
/// a folder of its own below media-staging of the data directory, which the lab deletes once it has read the
|
||||
/// transcript; whatever a crash leaves there, TranscriptStagingCleanupService removes with the next start. Backups
|
||||
/// leave that folder out.
|
||||
/// a folder of its own in the temporary folder of AI Studio, which the lab deletes once it has read the transcript;
|
||||
/// whatever a crash leaves there is gone with the next start of AI Studio, see TemporaryFiles. Backups leave that
|
||||
/// folder out.
|
||||
/// </remarks>
|
||||
/// <param name="dataDirectory">The data directory of AI Studio.</param>
|
||||
internal sealed class BflTranscriptLocation(string dataDirectory) : IMediaTranscriptLocation
|
||||
internal sealed class BflTranscriptLocation : IMediaTranscriptLocation
|
||||
{
|
||||
/// <summary>
|
||||
/// The folder of the data directory for transcripts on their way, shared with the chat; see TranscriptStagingCleanupService.
|
||||
/// </summary>
|
||||
private const string STAGING_DIRECTORY_NAME = "media-staging";
|
||||
|
||||
/// <summary>
|
||||
/// The name of the transcript in its folder.
|
||||
/// </summary>
|
||||
@@ -27,7 +21,7 @@ internal sealed class BflTranscriptLocation(string dataDirectory) : IMediaTransc
|
||||
/// <summary>
|
||||
/// Gets the folder of this transcript, which no other one shares.
|
||||
/// </summary>
|
||||
public string FolderPath { get; } = Path.Combine(dataDirectory, STAGING_DIRECTORY_NAME, $"bfl-{Guid.NewGuid():N}");
|
||||
public string FolderPath { get; } = TemporaryFiles.CreateDirectory();
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<MediaTranscriptSlot> ResolveAsync(string mediaPath, CancellationToken token)
|
||||
|
||||
Reference in new issue
Block a user