@@ -20,9 +20,6 @@ def __init__(self, app: "AgentChatCLIApp") -> None:
2020 def quit (self ) -> None :
2121 self .app .exit ()
2222
23- async def query (self , user_input : str ) -> None :
24- await self .app .agent_loop .query_queue .put (user_input )
25-
2623 async def submit_user_message (self , message : str ) -> None :
2724 self .app .post_message (MessagePosted (Message .user (message )))
2825
@@ -32,7 +29,7 @@ async def submit_user_message(self, message: str) -> None:
3229 input_widget = self .app .query_one (TextArea )
3330 input_widget .cursor_blink = False
3431
35- await self .query (message )
32+ await self ._query (message )
3633
3734 def post_system_message (self , message : str ) -> None :
3835 self .app .post_message (MessagePosted (Message .system (message )))
@@ -89,6 +86,9 @@ async def respond_to_tool_permission(self, response: str) -> None:
8986 normalized = response .lower ().strip ()
9087 if normalized not in ["y" , "yes" , "allow" , "" ]:
9188 if normalized in ["n" , "no" , "deny" ]:
92- await self .query ("The user has denied the tool" )
89+ await self ._query ("The user has denied the tool" )
9390 else :
9491 await self .submit_user_message (response )
92+
93+ async def _query (self , user_input : str ) -> None :
94+ await self .app .agent_loop .query_queue .put (user_input )
0 commit comments