From 2c6ca26743f50a4e159d5159e6b11c60727e2a6d Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Fri, 20 Feb 2026 12:34:48 +0100 Subject: [PATCH] fix samplescount --- Data/Mappings/AiPromptbausteinPrompt.hbm.xml | 1 + Server/Components/AICore/Facade/AiPromptsApiClient.cs | 6 ++++-- .../AiPromptbausteinPromptDC_AiPromptbausteinPrompt.cs | 2 ++ Shared/DataContracts/Feature/AI/AiPromptbausteinPromptDC.cs | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Data/Mappings/AiPromptbausteinPrompt.hbm.xml b/Data/Mappings/AiPromptbausteinPrompt.hbm.xml index cc88ba94d..e2369e421 100644 --- a/Data/Mappings/AiPromptbausteinPrompt.hbm.xml +++ b/Data/Mappings/AiPromptbausteinPrompt.hbm.xml @@ -25,6 +25,7 @@ + diff --git a/Server/Components/AICore/Facade/AiPromptsApiClient.cs b/Server/Components/AICore/Facade/AiPromptsApiClient.cs index 95d139ab3..249a4d537 100644 --- a/Server/Components/AICore/Facade/AiPromptsApiClient.cs +++ b/Server/Components/AICore/Facade/AiPromptsApiClient.cs @@ -39,7 +39,8 @@ namespace AICore.Facade prompt = "", description = "", helpurl = "", - aiactiontype = "" + aiactiontype = "", + samples_count = 0 } }; @@ -58,7 +59,8 @@ namespace AICore.Facade Prompt = x.prompt, OwnsoftRefLink = x.helpurl, IsOwnsoftPrompt = true, - ActionType = GetAiActionType(x.aiactiontype, aiActionType) + ActionType = GetAiActionType(x.aiactiontype, aiActionType), + SamplesCount = x.samples_count, }); return data.Where(x => x.ActionType == aiActionType); ; diff --git a/Service/DCEntityMapper/AiPromptbausteinPromptDC_AiPromptbausteinPrompt.cs b/Service/DCEntityMapper/AiPromptbausteinPromptDC_AiPromptbausteinPrompt.cs index 0a8b4eed0..205469c5e 100644 --- a/Service/DCEntityMapper/AiPromptbausteinPromptDC_AiPromptbausteinPrompt.cs +++ b/Service/DCEntityMapper/AiPromptbausteinPromptDC_AiPromptbausteinPrompt.cs @@ -31,6 +31,7 @@ namespace BeWo.Service.DCEntityMapper pDataContract.OwnsoftRefLink = pEntity.OwnsoftRefLink; pDataContract.PromptId = pEntity.PromptId; pDataContract.ActionType = pEntity.ActionType; + pDataContract.SamplesCount = pEntity.SamplesCount; pDataContract.IsFavorite = pEntity.UserFavorites.Contains(CurrentUser); if(pEntity.CreatorOid is long oid) @@ -55,6 +56,7 @@ namespace BeWo.Service.DCEntityMapper pEntity.OwnsoftRefLink = pDataContract.OwnsoftRefLink; pEntity.PromptId = pDataContract.PromptId; pEntity.ActionType = pDataContract.ActionType; + pEntity.SamplesCount = pDataContract.SamplesCount; if (pDataContract.ParentFolderOid is long oid && oid >= 0) pEntity.ParentFolderOid = pDataContract.ParentFolderOid; diff --git a/Shared/DataContracts/Feature/AI/AiPromptbausteinPromptDC.cs b/Shared/DataContracts/Feature/AI/AiPromptbausteinPromptDC.cs index 20ef1a960..5761512a7 100644 --- a/Shared/DataContracts/Feature/AI/AiPromptbausteinPromptDC.cs +++ b/Shared/DataContracts/Feature/AI/AiPromptbausteinPromptDC.cs @@ -21,6 +21,7 @@ namespace BS.Shared.DataContracts.Feature.AI [DataMember] public string OwnsoftRefLink { get; set; } [DataMember] public bool IsFavorite { get; set; } [DataMember] public string PromptId { get; set; } + [DataMember] public int SamplesCount { get; set; } [DataMember] public AiActionType ActionType { get; set; } [DataMember] public bool CanEdit { get; set; }