Skip to content

Conversation

@alexhancock
Copy link
Collaborator

Noticed this strange spacing issue in agent.rs when working on something else, and corrected it to make the code easier to read

@alexhancock
Copy link
Collaborator Author

This is the only actual change, and still passes the formatter

Screenshot 2025-11-25 at 1 30 10 PM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes indentation inconsistencies in the reply_internal function's async stream block and improves error message clarity. The strange spacing issue involved code that was indented with excessive spaces (~20 columns) instead of following standard Rust 4-space indentation conventions. Additionally, the PR adds "trying to compact" to an error message for consistency with similar error handlers elsewhere in the codebase.

  • Corrects indentation throughout a 350-line async stream block to use standard 4-space indentation
  • Improves error message specificity when compaction fails to match the pattern used at line 882

@DOsinga
Copy link
Collaborator

DOsinga commented Nov 25, 2025

I noticed that too, but neither my editor nor cargo fmt would budge

I think the real problem is that reply_internal is too nested and then our line length and format start to conflict. but the streaming setup makes it hard to refactor

@alexhancock
Copy link
Collaborator Author

alexhancock commented Nov 25, 2025

I noticed that too, but neither my editor nor cargo fmt would budge

I think the real problem is that reply_internal is too nested and then our line length and format start to conflict. but the streaming setup makes it hard to refactor

this whitespace change makes it I think how it should be and still passes the formatter

so we may not get automatic corrections if it gets messed up again, but seems better than current state?

@alexhancock alexhancock merged commit 9c52611 into main Nov 25, 2025
22 checks passed
@alexhancock alexhancock deleted the alexhancock/agent-spacing branch November 25, 2025 20:58
wpfleger96 added a commit that referenced this pull request Nov 26, 2025
* main:
  fix: adjust strange spacing in agent.rs (#5877)
  Move recipe actions to bottom bar icon and edit goosehints to settings (#5864)
  [docs] Add “Building a Social Media Agent” Blog Post (#5844)
  deps: upgrade rmcp to 0.9.1 (#5860)
  chore: suggest using text/markdown when fetching content (#5854)
  Revert "fix: do not load active extensions when no extensions in the recipe" (#5871)
  goose remote access (#5251)
  docs: add DataHub MCP server extension documentation (#5769)
BlairAllan pushed a commit to BlairAllan/goose that referenced this pull request Nov 29, 2025
katzdave added a commit that referenced this pull request Dec 1, 2025
…nses-streaming

* 'main' of github.com:block/goose:
  fix: adjust strange spacing in agent.rs (#5877)
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.

4 participants