CommandCodeAI / CommandCodeAI/command-code
[ Feature Request ] Richer UI options in mods (ANSI support, spinners, layout helpers)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 4k
- Forks
- 350
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Summary
When building interactive mods, we are limited to displaying raw text strings inside "cmd.ui.select()" and "cmd.ui.notify()". Creating structured layouts or showing background progress currently requires custom ASCII drawing or raw terminal printing, which is complex to keep aligned and does not support native-looking animations like spinners.
Expected Behavior
We would love to see the Mod Harness UI (cmd.ui) enriched with standard CLI primitives:
- ANSI Color Support: Allow titles inside selectors to parse standard color codes (e.g. using
chalkor ANSI codes) to highlight choices or display clean warnings. - Native Spinners: A simple loading indicator API for long-running processes (e.g., repository checks, configuration setups):
const spinner = cmd.ui.spinner("Loading configuration..."); await task(); spinner.success("Done!");
3.Layout Primitives: Simple helper functions to display dividers or panels without having to manually calculate character lengths and borders in strings.
Providing these primitives natively would allow developers to build premium, consistent community mods that look and feel like built-in features of Command Code.
Actual Behavior
Installing standard Node/Bun packages like ora or @clack/prompts, but they require direct TTY controls which the harness sandbox does not permit.
Steps to reproduce the issue
- create a mod
Command Code Version
1.4.2
Operating System
macOS
Terminal/IDE
ghostty
Shell
command
Additional context
No response
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Mod Harness APIs cmd.ui.select() und cmd.ui.notify() nachzuverfolgen, und prüfe anschließend die Sandbox-Einschränkungen, die ora und @clack/prompts daran hindern, das TTY zu steuern. Als abgeschlossen gilt die Definition und Erprobung eines Ansatzes für ANSI-Titel, native Spinner sowie über cmd.ui bereitgestellte Teiler- oder Panel-Helfer.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- bun, node.js, typescript
- Bereich
- cli, developer-experience
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100