mikeboone Claude Sonnet 4.6 commited on
Commit
55f2a28
·
1 Parent(s): 22d941d

fix: define hide_welcome before Custom vertical validation check

Browse files

NameError caused Gradio Error badge when GO pressed with Custom
vertical and empty Context field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. chat_interface.py +1 -1
chat_interface.py CHANGED
@@ -5204,6 +5204,7 @@ def create_chat_tab(chat_controller_state, settings, current_stage, current_mode
5204
  raw_company = f"{vertical} Demo"
5205
 
5206
  is_custom = (vertical == "Custom")
 
5207
 
5208
  if is_custom:
5209
  # Custom vertical: context IS the use case; function dropdown is ignored
@@ -5240,7 +5241,6 @@ def create_chat_tab(chat_controller_state, settings, current_stage, current_mode
5240
 
5241
  # Drive straight to awaiting_context → 'proceed' to skip confirmation dialog
5242
  history = history or []
5243
- hide_welcome = gr.update(visible=False)
5244
  try:
5245
  for result in controller.process_chat_message(
5246
  "proceed", history, 'awaiting_context', model,
 
5204
  raw_company = f"{vertical} Demo"
5205
 
5206
  is_custom = (vertical == "Custom")
5207
+ hide_welcome = gr.update(visible=False)
5208
 
5209
  if is_custom:
5210
  # Custom vertical: context IS the use case; function dropdown is ignored
 
5241
 
5242
  # Drive straight to awaiting_context → 'proceed' to skip confirmation dialog
5243
  history = history or []
 
5244
  try:
5245
  for result in controller.process_chat_message(
5246
  "proceed", history, 'awaiting_context', model,