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 开始,通过让 q chat 读取包含特殊字符或非 UTF-8 数据的 Markdown 或文本文件来复现该故障。确认 fs_read 可以读取并显示该文件,而不会出现“stream did not contain valid UTF-8”错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100