CommandCodeAI / CommandCodeAI/command-code

[ Feature Request ] Richer UI options in mods (ANSI support, spinners, layout helpers)

Đang mở
#591 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

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:

  1. ANSI Color Support: Allow titles inside selectors to parse standard color codes (e.g. using chalk or ANSI codes) to highlight choices or display clean warnings.
  2. 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
  1. 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.