Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -452,6 +452,7 @@ def handle_chat_submit(user_message, chat_history, api_key_input, provider_selec
|
|
452 |
if error_during_stream:
|
453 |
_status = error_during_stream # Set status to the error message
|
454 |
elif full_bot_response_content and not full_bot_response_content.startswith("Error: "): # Only parse if it's not an error message
|
|
|
455 |
_status = f"Streaming complete. Processing files from {model_select} response..."
|
456 |
|
457 |
# Pass the *current state* (updated from markdown at the start)
|
@@ -466,7 +467,6 @@ def handle_chat_submit(user_message, chat_history, api_key_input, provider_selec
|
|
466 |
_detected_files_update = gr.Markdown(f"## Parsing Error\n`{escape_html_for_markdown(parsing_res['error_message'])}`")
|
467 |
else:
|
468 |
# Update the global cache with the new state returned by the parser
|
469 |
-
global parsed_code_blocks_state_cache
|
470 |
parsed_code_blocks_state_cache = parsing_res["parsed_code_blocks"]
|
471 |
|
472 |
# Regenerate UI outputs from the *updated* cache
|
|
|
452 |
if error_during_stream:
|
453 |
_status = error_during_stream # Set status to the error message
|
454 |
elif full_bot_response_content and not full_bot_response_content.startswith("Error: "): # Only parse if it's not an error message
|
455 |
+
global parsed_code_blocks_state_cache
|
456 |
_status = f"Streaming complete. Processing files from {model_select} response..."
|
457 |
|
458 |
# Pass the *current state* (updated from markdown at the start)
|
|
|
467 |
_detected_files_update = gr.Markdown(f"## Parsing Error\n`{escape_html_for_markdown(parsing_res['error_message'])}`")
|
468 |
else:
|
469 |
# Update the global cache with the new state returned by the parser
|
|
|
470 |
parsed_code_blocks_state_cache = parsing_res["parsed_code_blocks"]
|
471 |
|
472 |
# Regenerate UI outputs from the *updated* cache
|