feat: Add AI extraction service and related view models
- Introduced `IAiExtractionService` and its implementation `AiExtractionService` for processing images and extracting text. - Created `AiResultItem` model to hold results from AI extraction. - Added `ImageProcessingCoordinator` to manage image processing tasks and provide progress updates. - Implemented view models for AI settings, path settings, processing state, race upload settings, and visual settings to support UI binding. - Updated `Program.cs` to register new services and dependencies. - Modified project file to skip MinVer execution during local builds.
This commit is contained in:
parent
bdf503c627
commit
3c722a66df
16 changed files with 1462 additions and 628 deletions
22
imagecatalog/Services/IAiExtractionService.cs
Normal file
22
imagecatalog/Services/IAiExtractionService.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ImageCatalog_2.Models;
|
||||
|
||||
namespace ImageCatalog_2.Services;
|
||||
|
||||
public sealed class AiExtractionRequest
|
||||
{
|
||||
public required string SearchRoot { get; init; }
|
||||
public required bool Recursive { get; init; }
|
||||
public string CsvOutputPath { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
public interface IAiExtractionService
|
||||
{
|
||||
Task RunAsync(
|
||||
AiExtractionRequest request,
|
||||
CancellationToken token,
|
||||
Func<AiResultItem, Task> onResult,
|
||||
Func<double, Task> onProgress);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue