aws / aws/amazon-q-developer-cli
Q CLI fs_read tool fails with "stream did not contain valid UTF-8" error when reading files with special characters
- 主要言語
- Rust
- スター
- 2k
- フォーク
- 439
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Checks
- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
### Operating system
macOS 15.5.0 (24F74)
### Expected behaviour
Amazon Q CLI should be able to read and display files containing special characters or non-UTF-8 encoding without errors.
### Actual behaviour
When attempting to read files with special characters, the CLI fails with the error: "Amazon Q is having trouble responding right now: 0: failed to print tool, `fs_read`: stream did not contain valid UTF-8"
```
[chat-transcript]
> I am running into an error using q chat reading docs (markdown, text files) with special characters, here is the error message. Let me start by examining the onboarding document () to understand the deployment requirements.
>
>
🛠️ Using tool: fs_read (trusted)>
⋮ >
● Amazon Q is having trouble responding right now: >
0: failed to print tool, `fs_read`: stream did not contain valid UTF-8>
>
Location:>
crates/chat-cli/src/cli/chat/mod.rs:1012>
>
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.>
Run with RUST_BACKTRACE=full to include source snippets. create a markdown with expected behavior, actual behavior, steps to reproduce. Read for repro steps
```
### Steps to reproduce
1. Create or obtain a file with non-UTF-8 characters
2. Run `q chat` in the terminal
3. Ask Amazon Q to read the file using fs_read
4. Observe the UTF-8 error message
コントリビューションガイド
調査の方向性
crates/chat-cli/src/cli/chat/mod.rs:1012 から始め、特殊文字または非 UTF-8 データを含む Markdown ファイルまたはテキストファイルを q chat に読み込ませて失敗を再現します。fs_read が「stream did not contain valid UTF-8」エラーなしでファイルを読み取り、表示できることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100