- افزودن پروژه و pointer مربوط به xAiMcpServer به xSaherelmWorkspace.sln و root. - بهروزرسانی .vscode/launch.json و .vscode/tasks.json برای ساختار جدید. - بهروزرسانی Documents/Resources/Commands/AiApi.txtx برای تولید context مربوط به xAiMcpServer در کنار xAiApi، xAiModels و xAiService. - حذف contextهای قدیمی xDashboard-xAiApi/xAiModels/xAiService مربوط به 20261102 و ایجاد contextهای جدید 20261104 برای xAiApi، xAiMcpServer، xAiModels و xAiService.
85 lines
2.4 KiB
Plaintext
85 lines
2.4 KiB
Plaintext
|
|
### FILE: C:\Users\hkhazaeeasl\Documents\Projets\XProjects\xSaherelmWorkspace\Modules\xAiService\Constants\ConfigurationNodeNames.cs
|
|
|
|
namespace xAiService.Constants
|
|
{
|
|
public partial struct ConfigurationNodeNames
|
|
{
|
|
public const string AI_SERVICE_NODE = "AIServiceConfiguration";
|
|
}
|
|
}
|
|
|
|
### FILE: C:\Users\hkhazaeeasl\Documents\Projets\XProjects\xSaherelmWorkspace\Modules\xAiService\Constants\XAiServiceConstants.cs
|
|
|
|
namespace xAiService.Constants
|
|
{
|
|
public struct XAiServiceConstants
|
|
{
|
|
//
|
|
// Service Extensions Log Tag ...
|
|
public const string XAiServiceDILogTag = "XAiService";
|
|
|
|
//
|
|
// File Provider Identifiers ...
|
|
public const string XAiProjectFilesIdentifier = "AiPrjF";
|
|
public const string XAiMessageFilesIdentifier = "AiMsgF";
|
|
public const string XMetaDataFileIdsIdentifier = "FileIds";
|
|
public const string XAiConversationFilesIdentifier = "AiCnvrF";
|
|
}
|
|
}
|
|
|
|
### FILE: C:\Users\hkhazaeeasl\Documents\Projets\XProjects\xSaherelmWorkspace\Modules\xAiService\DI\XDIHelperExtension.cs
|
|
|
|
namespace xAiService.DI
|
|
{
|
|
public static partial class XDIHelperExtension
|
|
{ }
|
|
}
|
|
|
|
### FILE: C:\Users\hkhazaeeasl\Documents\Projets\XProjects\xSaherelmWorkspace\Modules\xAiService\Extensions\XAiServiceExtensions.cs
|
|
|
|
using xCommons.Extensions;
|
|
using xExceptions.Constants;
|
|
using xIdentityModels.Models;
|
|
|
|
namespace xAiService.Extensions
|
|
{
|
|
public static class XAiServiceExtensions
|
|
{
|
|
/// <summary>
|
|
/// Validate User Info ...
|
|
/// </summary>
|
|
/// <param name="source"></param>
|
|
/// <returns></returns>
|
|
public static bool IsValid(this XUserClaimsInfoDto source)
|
|
{
|
|
//
|
|
var result =
|
|
!source.IsNullOrDefault() &&
|
|
!source.UserId.IsNullOrEmpty() &&
|
|
!source.AccessToken.IsNullOrEmpty();
|
|
|
|
//
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Validate User Info ...
|
|
/// </summary>
|
|
/// <param name="source"></param>
|
|
/// <param name="invalidException"></param>
|
|
public static void Validate(
|
|
this XUserClaimsInfoDto source,
|
|
XException invalidException = XException.InvalidArgs
|
|
)
|
|
{
|
|
//
|
|
var isValid = source.IsValid();
|
|
if (!isValid)
|
|
{
|
|
invalidException.Throw();
|
|
}
|
|
}
|
|
}
|
|
}
|