Add AI Catalog Price Check feature
Claude reviews every active catalog item against the shop's own operating costs and returns a per-item verdict (below-cost / thin-margin / high / ok) with a suggested price range, cost floor, and assumptions. - New entity: CatalogPriceCheckReport (JSON blob, archived per company) - New service: IAiCatalogPriceCheckService / AiCatalogPriceCheckService batches items 25 at a time to stay within model context limits - Two new controller actions: GET AiPriceCheck (view report) + POST RunAiPriceCheck - AiPriceCheck view: summary cards (counts by verdict), color-coded item cards with Edit Price link, assumptions detail, and loading spinner on submit - AI Price Check button added to catalog Index header - Migration AddCatalogPriceCheckReport applied Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using PowderCoating.Application.DTOs.AI;
|
||||
|
||||
namespace PowderCoating.Application.Interfaces;
|
||||
|
||||
public interface IAiCatalogPriceCheckService
|
||||
{
|
||||
/// <summary>
|
||||
/// Analyzes the provided catalog items against the shop's operating costs and returns
|
||||
/// a verdict for each item. Items are batched into groups of 25 to stay within Claude's
|
||||
/// context limits. Returns null results for any item that could not be analyzed.
|
||||
/// </summary>
|
||||
Task<List<CatalogItemPriceVerdict>> AnalyzeAsync(
|
||||
List<CatalogItemForPriceCheck> items,
|
||||
ShopOperatingCostSummary costs,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user