aws / aws/amazon-q-developer-cli

Support CRLF detection in WSL

Open
#1,751 2 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

Files on Windows use `\r\n` as the line ending whereas POSIX systems use `\n`.

This poses a problem when editing Windows files from WSL - in the `fs_read` tool, we only send the content joined by `\n`. This causes context-mismatch issues with the model whenever it attempts to make changes, since it is not expecting line endings to contain a `\r` prefix.

Instead, we should detect what line endings to use (`\r\n` vs `\n`) when editing a file since it is possible to edit Windows based files that use `\r\n` while in WSL.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.