aws / aws/amazon-q-developer-cli

Prompt Configuration

Offen
#1,122 0 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
good first issue RFC
Vorherrschende Sprache
Rust
Sterne
2k
Forks
439
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

# Feature Request: Add Custom Q CLI Prompt Configuration

## Description
Add the ability for users to customize their Q CLI prompt through configuration settings. This would allow users to personalize their command-line experience and optimize their workflow by displaying relevant information in their prompt.

This would include, but not be limited to, context usage information (once context usage is exposed to end users).

## Background
Currently, the Q CLI uses a default prompt that cannot be easily customized by users. Many modern shells (bash, zsh, fish) support rich customization options that improve user experience and productivity.

## Proposed Solution
Implement a configuration system that allows users to:
- Define custom prompt formats using variables and formatting options
- Include dynamic information such as:
- Command execution time
- Exit status of previous command
- (Once available) context usage information
- (Nice to have) Set different prompts for different profiles

## User Experience
Users should be able to configure their prompt through:
1. A configuration file (e.g., `~/.amazonq/.promptrc` or other)
2. Environment variables for quick overrides
3. Optional: A simple CLI tool to help build and preview prompts

## Technical Considerations
- Ensure prompt rendering is performant (slow prompts degrade UX)
- Support for color and formatting using standard ANSI escape sequences
- Compatibility with different terminal emulators
- Extensibility to allow for future additions of new variables/information

## Acceptance Criteria
- Users can define custom prompt formats in a configuration file
- Documentation clearly explains available variables and formatting options
- Performance impact is minimal (prompt generation < 50ms)
- Works consistently across supported operating systems and terminals
- Includes at least 3 example prompt configurations for common use cases

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Beginne damit, die Implementierung der Q CLI-Eingabeaufforderung und die bestehende Konfigurationsverwaltung zu finden, und ermittle anschließend, wie die vorgeschlagene Konfiguration, Variablen, Terminalformatierung, Profile und das plattformübergreifende Verhalten zusammenpassen; als abgeschlossen gilt die Aufgabe, wenn die Akzeptanzkriterien erfüllt und anhand von drei Beispielen dokumentiert sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.