aws / aws/amazon-q-developer-cli

Feature Request: Add File Injection Capability (@ Command for File Reference)

Aperta
#2,961 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Feature request q 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.6.0 (24G84)

### Expected behaviour

### Requested Feature:
Add file injection capability using `@filepath` syntax to automatically inject the content of specified files into prompts. This is useful for asking questions about specific code, text, or collections of files without manual copy-pasting. This feature is already available in both Claude Code and Gemini CLI through their respective @ command implementations.
Examples:
- `Explain this text @path/to/your/file.txt `
- `Summarize the code in this directory. @src/my_project/ `
- `What is this file about? @README.md`

### Expected Behavior

Referring to [gemini-cli](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/commands.md#at-commands-), when a user enters a prompt containing @filepath patterns(e.g. `Compare the file @package.json and @src/config.ts`), the processed prompt looks like:
```
Compare the file @package.json and @src/config.ts

--- Content from referenced files ---

Content from @package.json:
{
"name": "my-project",
"version": "1.0.0"
}

Content from @src/config.ts:
export const config = {
port: 3000
};

--- End of content ---
```

### Actual behaviour

Currently, when users want to reference a file in chat, they must:
- Manually copy and paste file path into their prompts
- Wait for Q-CLI to identify their intent and extract file paths
- Wait for Q-CLI to use fs_read tool calls to retrieve file content

### Steps to reproduce

_No response_

### Environment

```yaml
[q-details]
version = "1.16.2"
variant = "full"
[system-info]
os = "macOS 15.6.0 (24G84)"
chip = "Apple M2 Pro"
total-cores = 12
memory = "32.00 GB"
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non vengono indicati file di implementazione, test o punti di ingresso. Inizia individuando il percorso di elaborazione dei prompt della CLI e la gestione esistente di fs_read, quindi confronta gli esempi @filepath richiesti con il comportamento attuale. Il lavoro è completato quando i riferimenti a file e directory vengono riconosciuti e i relativi contenuti vengono inclusi nei prompt, con una copertura degli esempi documentati.

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

Valutazione

Stack tecnologico
rust
Ambito
ai, cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 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.