Skip to content

fix(output_parser): support multiline output in action parsing#14

Merged
gwynbleidd003 merged 1 commit intoagiopen-org:mainfrom
aoshen524:fix/multiline-output-parser
Feb 12, 2026
Merged

fix(output_parser): support multiline output in action parsing#14
gwynbleidd003 merged 1 commit intoagiopen-org:mainfrom
aoshen524:fix/multiline-output-parser

Conversation

@aoshen524
Copy link
Contributor

Summary

  • _split_actions: support newline (\n) as action separator at paren_level 0, while preserving newlines inside parentheses (e.g., type(line1\nline2))
  • _parse_action: add re.DOTALL flag so multiline type() content is correctly captured by the regex
  • Add 10 test cases covering newline-separated actions, multiline type content, mixed &/\n separators, and blank-line tolerance

Test plan

  • 52/52 tests/utils/test_output_parser.py pass
  • ruff check + ruff format --check clean
  • Verify multiline output from real OAGI model is parsed correctly end-to-end

🤖 Generated with Claude Code

Add re.DOTALL flag to _parse_action regex so multiline content inside
type() parentheses (e.g., type(line1\nline2)) is correctly captured
instead of being truncated at the first newline.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@aoshen524 aoshen524 force-pushed the fix/multiline-output-parser branch from 9c25c12 to a321ab6 Compare February 12, 2026 12:29
@gwynbleidd003 gwynbleidd003 merged commit 2b6ea7b into agiopen-org:main Feb 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants