aws / aws/amazon-q-developer-cli

bug: Multiple issues with Amazon Q CLI: fs_write errors and inefficient file search operations

オープン
#2,011 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
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

Linux (Ubuntu/Debian-based distribution)

### Expected behaviour

Describe the bug
I'm encountering two issues when using Amazon Q CLI:

Frequent errors when trying to use the fs_write tool:
Amazon Q is having trouble responding right now:
0: failed to print tool, fs_write: No such file or directory (os error 2)
Location:
crates/chat-cli/src/cli/chat/mod.rs:1012

Inefficient file search: Amazon Q uses file enumeration instead of system search commands, which significantly slows down
operations.
Regression Issue

Select this option if this issue appears to be a regression.
Expected Behavior
The fs_write tool should work reliably without "No such file or directory" errors
When searching for files, Amazon Q should use system commands (find, grep, locate, etc.) for fast searching rather than
sequential file enumeration.

### Actual behaviour

Current Behavior
When trying to modify files, fs_write errors frequently occur, forcing me to use a workaround: creating a new file and renaming
it instead of direct editing.

When searching for files, Amazon Q "thinks" for a long time, going through files one by one instead of using system search
commands. When explicitly asked to use OS commands for searching, it starts using them and finds the necessary files almost
instantly.

### Steps to reproduce

Reproduction Steps
For fs_write error:
• Ask Amazon Q to modify the contents of an existing file
• Observe the "No such file or directory" error
• Suggest a workaround (create a new file and rename it)

For search issue:
• Ask to find a file in the system without specifying to use OS commands
• Observe long waiting time
• Ask to use find/grep/locate
• Observe instant results

Possible Solution
Fix path handling in the fs_write tool for correct operation with the file system
Optimize file search algorithms, using system search commands (find, grep, locate) by default instead of sequential enumeration
Additional Information/Context
These issues significantly reduce the efficiency of working with Amazon Q CLI. Workarounds exist, but they shouldn't be necessary
for basic functionality.

CLI version used
Amazon Q CLI (latest version)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず fs_write の失敗を再現し、crates/chat-cli/src/cli/chat/mod.rs の 1012 行付近を調べます。次に、OS の検索コマンドが要求されていない場合に使用されるファイル検索の経路を追跡します。既存ファイルの編集で報告されたエラーが発生しなくなり、ファイル検索で報告された低速な逐次動作が回避されれば完了です。Ubuntu/Debian で両方の再現ケースを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
cli, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。