Skip to content

Conversation

bhouston
Copy link
Member

Description

This PR addresses issue #223 by modifying the textEditor tool to display relative paths instead of full absolute paths in log messages.

Changes

  • Modified the logParameters function in the textEditor tool to convert absolute paths to relative paths when the path is within the working directory
  • Added comprehensive tests to verify the path conversion logic
  • Ensured backward compatibility by preserving absolute paths for locations outside the working directory

Example

Before:

view operation on "/Users/benhouston/Coding/Business/drivecore/mycoder2/packages/agent/src/core/llm/provider.ts", Viewing provider.ts merge conflict

After:

view operation on "./packages/agent/src/core/llm/provider.ts", Viewing provider.ts merge conflict

Testing

Added unit tests that verify:

  • Absolute paths within the working directory are converted to relative paths
  • Absolute paths outside the working directory remain unchanged
  • Relative paths remain unchanged

All existing tests continue to pass.

Closes #223

@bhouston bhouston merged commit 12a5b7f into main Mar 12, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove full paths from the log output of the textEditor tool

1 participant