CommandCodeAI / CommandCodeAI/command-code
[ Feature Request ] Richer UI options in mods (ANSI support, spinners, layout helpers)
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 4k
- Fork
- 350
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách lần theo các API Mod Harness cmd.ui.select() và cmd.ui.notify(), sau đó xem xét các ràng buộc của sandbox ngăn ora và @clack/prompts điều khiển TTY. Công việc được xem là hoàn tất khi có một phương pháp được xác định và kiểm thử cho tiêu đề ANSI, spinner native và các helper divider hoặc panel được cung cấp qua cmd.ui.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- bun, node.js, typescript
- Lĩnh vực
- cli, developer-experience
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100