fix: skip code extraction regex without delimiters#6002
Conversation
|
Response from ADK Triaging Agent Hello @he-yufeng, thank you for creating this PR! This is a great fix for the regex code extraction issue. We noticed that you've included a nice Testing section with the commands you ran, which is awesome. To help the reviewers fully verify and understand the fix:
This information will help our reviewers approve your PR more efficiently. Thanks! |
|
I will view the The detailed analysis across all dimensions—objectives, value, and architectural/style alignment—has been compiled into a premium analysis report. 📝 Analysis ReportPlease review the complete, structured analysis here: Key Decision Points & Highlights
Summary of Work Done
|
Summary
Fixes #5992.
extract_code_and_truncate_content()runs the full code-block regex over joined model text. When the response has no opening code delimiter, that regex can only returnNone, but it still scans through the expensive prefix/suffix pattern.This adds a cheap opening-delimiter check before compiling/searching the full regex. The normal extraction path is unchanged when a delimiter is present.
Testing