-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: ensure trailing newline in files created by text_editor tool
#5336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ensure trailing newline in files created by text_editor tool
#5336
Conversation
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
|
Still working on this! Will update the PR description with more info once it's ready for review. |
|
Working on those failing tests now! |
|
Looks like no API key is set for this test, so it fails (not related to my code changes): |
Signed-off-by: The-Best-Codes <[email protected]>
|
All tests passing except this one: |
|
Rerunning the test for you! @blackgirlbytes explained to me before to rerun the test in my own open PR for a docs site update, so hopefully it works here too :) |
|
@taniandjerry thanks! The test was failing because some API keys were missing, do you know if that got fixed? Otherwise it will fail again! |
|
This one is ready for review! @DOsinga @alexhancock @michaelneale @zanesq @jamadeo @angelahning (for the team's reference - I tag you all so that one of you can choose to work on this! We need a group tag for you maybe 💯 ) |
|
Verified working locally and including newlines |
* main: (30 commits) feat: add goose powered ai culinary innovation studio prompt to library (#5423) removing golang/temporal building testing tetrate with sonnet (#5428) Add Recipes Test Script (#5420) Don't die on strange chars (#5415) fix: allow subagent to run in parent --no-session mode (#5384) docs: analyze tool (#5418) fix: gracefully close goosed listening port (#5321) move history txt to state dir (#5410) Dont exit silently when storing api key fails (#5260) Make reply use the API (#5389) Fix/icon ii (#5413) Enable runtime access to provider name (#5399) fix: ensure trailing newline in files created by `text_editor` tool (#5336) docs: September 2025 Community All-Stars (#5411) make supports_cache_control async to avoid block in place (#5362) Send all the logs we output (#5363) Recipe variables (#5365) Feat/add mermaid chart rendering (#5377) Set up Datadog metrics for prompt injection detection (#5385) ...
* 'main' of github.com:block/goose: (132 commits) Fix/icon ii (#5413) Enable runtime access to provider name (#5399) fix: ensure trailing newline in files created by `text_editor` tool (#5336) docs: September 2025 Community All-Stars (#5411) make supports_cache_control async to avoid block in place (#5362) Send all the logs we output (#5363) Recipe variables (#5365) Feat/add mermaid chart rendering (#5377) Set up Datadog metrics for prompt injection detection (#5385) fix: restore --resume functionality for most recent session (#5401) Gemini again (#5390) docs(prompt-library): add github-issue-labeler intermediate prompt (#5374) docs: add Linux and Windows paths to uninstall section (#5371) fix: --session-id shouldn't work without --resume, but --name should (#5360) Auto-compact Threshold UI improvements (#5354) Filter preserved user messages to be text only. (#5391) include sessionId in tool request (#5394) feat: add PR Impact Analyzer prompt (#5375) docs: add blog post on configuring goose for team environments (#5380) migrating back with new chatrecall non underscore name (#5223) ...
…lock#5336) Signed-off-by: The-Best-Codes <[email protected]> Signed-off-by: Blair Allan <[email protected]>

Summary
Ensures all files created or modified by the text_editor tool end with a trailing newline character. This resolves compatibility issues with POSIX-compliant tools that expect newline-terminated files and eliminates "No newline at end of file" warnings in diffs.
Resolves #2825.
Type of Change
Testing
These changes were tested manually and with additional unit tests.
Related Issues
Relates to #2825