Fix Windows permission mode issue with newline characters in system p…#8
Open
fuzi1996 wants to merge 2 commits intospring-ai-community:mainfrom
Open
Fix Windows permission mode issue with newline characters in system p…#8fuzi1996 wants to merge 2 commits intospring-ai-community:mainfrom
fuzi1996 wants to merge 2 commits intospring-ai-community:mainfrom
Conversation
…rompts When systemPrompt or appendSystemPrompt contains newline characters on Windows, the PermissionMode was not being applied correctly. The issue was that command line arguments with newlines were not properly normalized for the Windows CLI. Changes: - Add normalizeNewline() method to convert newlines to platform-appropriate line continuation characters (Windows uses ^, Unix uses \) - Add platform detection static initialization for Windows - Apply normalization to both systemPrompt and appendSystemPrompt arguments - Add comprehensive integration tests for various newline scenarios This resolves Issue spring-ai-community#7 where PermissionMode defaulted to 'default' instead of the configured 'bypassPermissions' when systemPrompt contained newlines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Simplify normalizeWindowsCommand to directly replace newlines with spaces on Windows - Add test case for systemPrompt with text blocks containing newlines - Remove complex multi-line command processing logic in favor of simpler approach 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When systemPrompt or appendSystemPrompt contains newline characters on Windows, the PermissionMode was not being applied correctly. The issue was that command line arguments with newlines were not properly normalized for the Windows CLI.
Changes:
This resolves Issue #7 where PermissionMode defaulted to 'default' instead of the configured 'bypassPermissions' when systemPrompt contained newlines.
🤖 Generated with Claude Code