pilichoumao opened a new pull request, #6878: URL: https://github.com/apache/rocketmq-dashboard/pull/6878
Fixes #6874. When an enhanced prompt begins with one code example and ends with another, `clean()` removed the first opener and the last closer as if they surrounded one block. This changes the prompt handed to the agent. Only strip a wrapper when its first legal closing fence is the final line, with at least the opening marker's length. Preserve separate examples and incomplete wrappers, including CRLF input and shorter nested fences. The change extends the cleaner and the existing `PromptEnhancerTest` only. It retains #6680's complete-info-string handling; #5734's general enhancer tests and #6817's provider-result handling are separate work. Validation: - ECS / JDK 21: the complete production class and 24 targeted cases compiled and passed, including the existing nine cases, LF/CRLF, separate examples, fence lengths/indentation, invalid closing lines, empty content, and a mocked text stream through `enhance()`. - Research baseline regressions failed before the fix, including the `enhance()` return value. - ECS Maven: all production/test sources compiled, Checkstyle passed, and `mvn -B -ntp -Dtest=PromptEnhancerTest test` passed 24/24 with no skipped cases. - ECS `mvn -B -ntp package -DskipTests`: passed, including the binary license gate (278 actual components). Tests were run separately as above. - No live LLM, Broker, MySQL or full backend suite is claimed. AI assistance was used to investigate, implement and verify the change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
