CommandCodeAI / CommandCodeAI/command-code

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

未關閉
#591 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
沒有語言資料
星號
4k
分支
350
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先追蹤 Mod Harness API cmd.ui.select() 和 cmd.ui.notify(),接著檢視阻止 ora 與 @clack/prompts 控制 TTY 的 sandbox 限制。完成的標準是針對 ANSI 標題、原生 spinner,以及透過 cmd.ui 公開的 divider 或 panel helper,定義並測試出一套方法。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
bun, node.js, typescript
領域
cli, developer-experience
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。