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

Aperta
#2,003 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da crates/chat-cli/src/cli/chat/mod.rs:1012 e riproduci il problema facendo leggere a q chat un file Markdown o di testo contenente caratteri speciali o dati non UTF-8. Verifica che fs_read possa leggere e visualizzare il file senza l’errore “stream did not contain valid UTF-8”.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.