This commit is contained in:
2026-10-31 17:18:23 +03:30
parent 31a0d097c0
commit 146137c908
2 changed files with 17 additions and 16 deletions
+7 -16
View File
@@ -1070,20 +1070,19 @@ namespace xAiModels.Providers
}
//
// Detect Conversation Resource ...
// Check Default Owner Exists or not ...
var resource = await stringProvider.FindOne(
cancellationToken: cancellationToken,
predicate: x =>
x.ResourceTitle
.ToNormalString()
.Contains(ownerId.ToNormalString()) &&
.Contains(ownerId.ToString().ToNormalString()) &&
x.ResourceTitle
.ToNormalString()
.Contains(XAiModelsConstants.XAiProjectTitleIdentifier
.ToNormalString()) &&
.Contains(XAiModelsConstants.XAiConversationTitleIdentifier.ToNormalString()) &&
x.TranslatedValue
.ToNormalString()
.Contains(XAiDataProviderConstants.XDefaultAiProjectSuffix)
.Contains(XAiDataProviderConstants.XDefaultAiConversationSuffix.ToNormalString())
);
if (resource.IsNullOrDefault())
{
@@ -1091,20 +1090,12 @@ namespace xAiModels.Providers
}
//
// Find Default Conversation ...
var result = await conversationRepositoryService.FindOneAsync(
cancellationToken: cancellationToken,
predicate: x => x.Title
.Equals(
resource.ResourceTitle,
StringComparison.InvariantCultureIgnoreCase
) &&
x.ProjectId == project.Id
predicate: x =>
x.ProjectId == projectId &&
x.Title == resource.ResourceTitle
);
if (result.IsNullOrDefault())
{
XException.NotFound.Throw();
}
//
return result;