CommandCodeAI / CommandCodeAI/command-code
[ Feature Request ] Richer UI options in mods (ANSI support, spinners, layout helpers)
还没有人认领这个 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:
- 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
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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