fix samplescount

This commit is contained in:
2026-02-20 12:34:48 +01:00
parent bf41810966
commit 2c6ca26743
4 changed files with 8 additions and 2 deletions

View File

@@ -25,6 +25,7 @@
<property name="IsOwnsoftPrompt"/>
<property name="OwnsoftRefLink"/>
<property name="PromptId"/>
<property name="SamplesCount"/>
<property name="ActionType" type="BS.Shared.AiActionType, BS.Shared"/>
<bag name="UserFavorites" table="aipromptbausteinprompt2empfavorite" generic="true" cascade="none" batch-size="250">

View File

@@ -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); ;

View File

@@ -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;

View File

@@ -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; }