IDAgents Developer commited on
Commit
695e8d4
·
1 Parent(s): b86775b

Fix: Chat with Agent button now properly enables chat controls - Use per-user agent storage in enable_chat_controls_with_agent

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -505,9 +505,9 @@ def build_ui():
505
  [] # active_children
506
  )
507
 
508
- def enable_chat_controls_with_agent(agent_name):
509
- """Enable chat controls and show proper agent greeting when agent is selected"""
510
- agent_json = agents_config.get(agent_name, "")
511
  if agent_json:
512
  # Get agent data for greeting
513
  agent_data = json.loads(agent_json)
 
505
  [] # active_children
506
  )
507
 
508
+ def enable_chat_controls_with_agent(agent_name, request: gr.Request):
509
+ """Enable chat controls and show proper agent greeting when agent is selected - per-user isolation."""
510
+ agent_json = get_user_agent(request, agent_name)
511
  if agent_json:
512
  # Get agent data for greeting
513
  agent_data = json.loads(agent_json)