aws / aws/amazon-q-developer-cli
Suggested command in translate invalid for macOS, but correct in chat
- 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
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again
### Operating system
macOS 15.3.2 (24D81)
### Expected behaviour
When Q generates a command-line suggestion in `q translate`, it should be targeted towards my OS (macOS), not Linux. `q chat` seems to take the OS into account as it returns a correctly defined command line for macOS.
### Actual behaviour
Using `q translate` suggests a `du` command with `--max-depth` that is incorrect for macOS. It should use `-d`. It appears translate is not taking my OS into account when generating the command, but `q chat` does as it returned the correct command.
### Steps to reproduce
On a Mac:
1. `q translate`
2. Enter: What are the top 10 larget directories by bytes on my hard disk?
3. Q should respond: `du -h --max-depth=1 | sort -hr | head -n 10`
4. `q chat`
5. Enter: What are the top 10 larget directories by bytes on my hard disk?
6. Q should respond: `sudo du -h -d 1 / 2>/dev/null | sort -hr | head -n 10`
The `sudo` from `q chat` is another miss by `q translate`
### Environment
```yaml
[q-details]
version = "1.7.2"
hash = "b6bf5f1675dd7395009e8bc65c1145820671f211"
date = "2025-03-21T01:36:16.66764Z (11d ago)"
variant = "full"
[system-info]
os = "macOS 15.3.2 (24D81)"
chip = "Apple M1 Pro"
total-cores = 10
memory = "32.00 GB"
[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "brew"
[env-vars]
PATH = "/opt/homebrew/bin:/opt/homebrew/sbin:/Users/USER/.nvm/versions/node/v20.14.0/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/USER/bin:/Users/USER/.toolbox/bin:/Users/USER/.cargo/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin:/Users/USER/Library/Application Support/JetBrains/Toolbox/scripts"
QTERM_SESSION_ID = "9ea6a3d3faee49df8029e4b0bf3a71a7"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.7.2"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Reproduce the q translate and q chat examples on macOS, then trace the separate command-generation entry points for each command. The fix is complete when q translate accounts for macOS command syntax and does not omit or add inappropriate sudo, with regression coverage for the reported prompt.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- macos, rust, zsh
- Ambito
- cli, operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100