File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tests/BotSharp.Plugin.PizzaBot/Hooks Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,18 +32,20 @@ public override Task OnTaskCompleted(RoleDialogModel message)
3232 return base . OnTaskCompleted ( message ) ;
3333 }
3434
35+ #if USE_BOTSHARP
3536 public override async Task OnResponseGenerated ( RoleDialogModel message )
3637 {
3738 var agentService = _services . GetRequiredService < IAgentService > ( ) ;
3839 var state = _services . GetRequiredService < IConversationStateService > ( ) ;
3940 var agent = await agentService . LoadAgent ( message . CurrentAgentId ) ;
40- #if USE_BOTSHARP
41+
4142 if ( agent . McpTools . Any ( item => item . Functions . Any ( x => x . Name == message . FunctionName ) ) )
4243 {
4344 var data = JsonDocument . Parse ( JsonSerializer . Serialize ( message . Data ) ) ;
4445 state . SaveStateByArgs ( data ) ;
4546 }
46- #endif
47+
4748 await base . OnResponseGenerated ( message ) ;
4849 }
50+ #endif
4951}
You can’t perform that action at this time.
0 commit comments