refac/fix: tag attribute handling

This commit is contained in:
Timothy Jaeryang Baek 2025-08-14 04:04:34 +04:00
parent 3e8d3b08fa
commit b43acc2b3d

View file

@ -1619,9 +1619,13 @@ async def process_chat_response(
match = re.search(start_tag_pattern, content)
if match:
try:
attr_content = (
match.group(1) if match.group(1) else ""
) # Ensure it's not None
except:
attr_content = ""
attributes = extract_attributes(
attr_content
) # Extract attributes safely