2323 get_sdk_config ,
2424)
2525from agent_chat_cli .utils .enums import AgentMessageType , ContentType , ControlCommand
26- from agent_chat_cli .system .mcp_inference import infer_mcp_servers
26+ from agent_chat_cli .core .mcp_inference import infer_mcp_servers
2727from agent_chat_cli .utils .logger import log_json
2828
2929if TYPE_CHECKING :
@@ -219,7 +219,7 @@ async def _can_use_tool(
219219 ) -> PermissionResult :
220220 """Agent SDK handler for tool use permissions"""
221221
222- # Handle permission request queue
222+ # Handle permission request queue sequentially
223223 async with self .permission_lock :
224224 await self .app .actions .handle_agent_message (
225225 AgentMessage (
@@ -235,25 +235,25 @@ async def _can_use_tool(
235235 user_response = await self .permission_response_queue .get ()
236236 response = user_response .lower ().strip ()
237237
238- CONFIRM = response in ["y" , "yes" , "allow" , "" ]
239- DENY = response in ["n" , "no" , "deny" ]
238+ accepted_tool = response in ["y" , "yes" , "allow" , "" ]
239+ rejected_tool = response in ["n" , "no" , "deny" ]
240240
241241 log_json (
242242 {
243243 "event" : "tool_permission_decision" ,
244244 "response" : response ,
245- "CONFIRM " : CONFIRM ,
246- "DENY " : DENY ,
245+ "accepted_tool " : accepted_tool ,
246+ "rejected_tool " : rejected_tool ,
247247 }
248248 )
249249
250- if CONFIRM :
250+ if accepted_tool :
251251 return PermissionResultAllow (
252252 behavior = "allow" ,
253253 updated_input = tool_input ,
254254 )
255255
256- if DENY :
256+ if rejected_tool :
257257 self .app .actions .post_system_message (
258258 f"Permission denied for { tool_name } "
259259 )
0 commit comments