Skip to content

fix(core): keep trailing parenthesis in auto-glm finish message - #3190

Open
kwy404 wants to merge 1 commit into
web-infra-dev:mainfrom
kwy404:fix-auto-glm-finish-paren
Open

kwy404 wants to merge 1 commit into
web-infra-dev:mainfrom
kwy404:fix-auto-glm-finish-paren

Conversation

@kwy404

@kwy404 kwy404 commented Sep 24, 2026

Copy link
Copy Markdown

Summary

When parsing an auto-glm finish(...) action, extractValueAfter already strips the closing "), but the parser then removed one more trailing ) unconditionally. A message that ends with a parenthesis, such as finish(message="Deleted 3 items (all done)"), was returned as Deleted 3 items (all done. The extra ) is now only stripped when the response did not end with "), and a test covers this case.

Validation

  • npx rstest run tests/unit-test/model-adapter/auto-glm/planning-action-parser.test.ts in packages/core (new test fails before the change, passes after)
  • npx rstest run tests/unit-test/model-adapter/auto-glm in packages/core (the 4 prompt.test.ts snapshot mismatches are date/timezone related and also fail on main locally)
  • npx nx build @midscene/core
  • pnpm run type-check:tests (packages/core passes)
  • pnpm run lint

quanru
quanru previously approved these changes Oct 7, 2026
@quanru
quanru dismissed their stale review October 7, 2026 01:53

Withdrawn at the repository owner's request.

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