V13-FE-011: finalize search list layout slice
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace KBX.Shared.Experience;
|
||||
|
||||
public interface IKbxAiAssistantProvider
|
||||
{
|
||||
Task<AiAnswer> AskAsync(
|
||||
Guid tenantId,
|
||||
Guid userId,
|
||||
AiAskCommand command,
|
||||
CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public sealed class KbxNoopAiAssistantProvider : IKbxAiAssistantProvider
|
||||
{
|
||||
public Task<AiAnswer> AskAsync(Guid tenantId, Guid userId, AiAskCommand command, CancellationToken cancellationToken)
|
||||
=> Task.FromResult(new AiAnswer(
|
||||
"AI 공급자가 아직 구성되지 않았습니다. 현재 업무는 기존 조회·도움말·표준 기능으로 계속 처리할 수 있습니다."));
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace KBX.Shared.Experience;
|
||||
|
||||
public sealed record SuggestionContext(
|
||||
string ScreenId,
|
||||
string ScreenVersion,
|
||||
string Route,
|
||||
string AppVersion,
|
||||
string UserRole,
|
||||
IReadOnlyList<string>? ActiveFilters,
|
||||
string? GridLayoutVersion);
|
||||
|
||||
public sealed record SubmitSuggestionCommand(
|
||||
string Category,
|
||||
string Message,
|
||||
bool IncludeScreenContext,
|
||||
SuggestionContext Context);
|
||||
|
||||
public sealed record AiScreenContext(
|
||||
string ScreenId,
|
||||
string ScreenVersion,
|
||||
Guid? EntityId,
|
||||
IReadOnlyList<Guid>? SelectedIds,
|
||||
IReadOnlyDictionary<string, object?>? Filters,
|
||||
IReadOnlyList<string> AllowedCapabilities);
|
||||
|
||||
public sealed record AiAskCommand(string Question, AiScreenContext Context);
|
||||
public sealed record AiEvidence(string Label, string SourceType, string? Reference);
|
||||
public sealed record AiAction(string Id, string Label, string Kind);
|
||||
public sealed record AiAnswer(
|
||||
string Answer,
|
||||
IReadOnlyList<AiAction>? Actions = null,
|
||||
IReadOnlyList<AiEvidence>? Evidence = null,
|
||||
object? Proposal = null);
|
||||
@@ -0,0 +1,12 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace KBX.Shared.Experience;
|
||||
|
||||
public static class KbxExperienceRegistration
|
||||
{
|
||||
public static IServiceCollection AddKbxExperience(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IKbxAiAssistantProvider, KbxNoopAiAssistantProvider>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user