@@ -39,39 +39,39 @@ internal static class AgentDocumentMapper
3939 Description = agent . Description ,
4040 Behaviours = agent . Behaviours ,
4141 CurrentBehaviour = agent . CurrentBehaviour ,
42- Config = agent . Config ? . ToDomain ( ) ?? throw new AgentContextNotFoundException ( agent . Id )
42+ Config = agent . Config ? . ToDomain ( ) ?? throw new AgentConfigNotFoundException ( agent . Id )
4343 } ;
4444
45- internal static AgentConfigDocument ToDocument ( this AgentConfig context ) => new ( )
45+ internal static AgentConfigDocument ToDocument ( this AgentConfig config ) => new ( )
4646 {
47- Instruction = context . Instruction ,
48- Relations = context . Relations ? . ToList ( ) ,
49- Steps = context . Steps ? . ToList ( ) ,
50- McpConfig = context . McpConfig ,
51- Source = context . Source is not null
47+ Instruction = config . Instruction ,
48+ Relations = config . Relations ? . ToList ( ) ,
49+ Steps = config . Steps ? . ToList ( ) ,
50+ McpConfig = config . McpConfig ,
51+ Source = config . Source is not null
5252 ? new AgentSourceDocument
5353 {
54- DetailsSerialized = JsonSerializer . Serialize ( context . Source . Details ) ,
55- AdditionalMessage = context . Source . AdditionalMessage ,
56- Type = Enum . Parse < AgentSourceTypeDocument > ( context . Source . Type . ToString ( ) )
54+ DetailsSerialized = JsonSerializer . Serialize ( config . Source . Details ) ,
55+ AdditionalMessage = config . Source . AdditionalMessage ,
56+ Type = Enum . Parse < AgentSourceTypeDocument > ( config . Source . Type . ToString ( ) )
5757 }
5858 : null
5959 } ;
6060
61- internal static AgentConfig ToDomain ( this AgentConfigDocument agentContextDocument ) => new ( )
61+ internal static AgentConfig ToDomain ( this AgentConfigDocument agentConfigDocument ) => new ( )
6262 {
63- Instruction = agentContextDocument . Instruction ,
64- Relations = agentContextDocument . Relations ,
65- McpConfig = agentContextDocument . McpConfig ,
66- Source = agentContextDocument . Source is not null
63+ Instruction = agentConfigDocument . Instruction ,
64+ Relations = agentConfigDocument . Relations ,
65+ McpConfig = agentConfigDocument . McpConfig ,
66+ Source = agentConfigDocument . Source is not null
6767 ? new AgentSource
6868 {
69- AdditionalMessage = agentContextDocument . Source . AdditionalMessage ,
70- Details = agentContextDocument . Source . DetailsSerialized ,
71- Type = Enum . Parse < AgentSourceType > ( agentContextDocument . Source . Type . ToString ( ) )
69+ AdditionalMessage = agentConfigDocument . Source . AdditionalMessage ,
70+ Details = agentConfigDocument . Source . DetailsSerialized ,
71+ Type = Enum . Parse < AgentSourceType > ( agentConfigDocument . Source . Type . ToString ( ) )
7272 }
7373 : null ,
74- Steps = agentContextDocument . Steps
74+ Steps = agentConfigDocument . Steps
7575 } ;
7676
7777 internal static AgentFlowDocument ToDocument ( this AgentFlow agentFlow ) => new ( )
0 commit comments