@vincentbanana/bananacli 0.8.17 → 0.8.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/dist/config/config.js +1 -1
- package/dist/util/ui-audit.js +3 -3
- package/docs/design/README.md +1 -0
- package/docs/design/examples/README.md +2 -0
- package/docs/design/examples/good/pricing-page.png +0 -0
- package/docs/design/refs/open-source.md +32 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -36,7 +36,7 @@ A multi-provider AI agent for the terminal, with a local GUI. It can read and wr
|
|
|
36
36
|
| |_) | (_| | | | | (_| | |_) | (_| | | | |
|
|
37
37
|
|____/ \__,_|_| |_|\__,_|_.__/ \__,_|_| |_|
|
|
38
38
|
|
|
39
|
-
BananaCLI v0.8.
|
|
39
|
+
BananaCLI v0.8.19 · terminal + GUI
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
- **No frontend framework**: the CLI uses Node built-ins only; runtime dependencies are `ws` and `@lydell/node-pty` (prebuilt native module).
|
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
| |_) | (_| | | | | (_| | |_) | (_| | | | |
|
|
35
35
|
|____/ \__,_|_| |_|\__,_|_.__/ \__,_|_| |_|
|
|
36
36
|
|
|
37
|
-
BananaCLI v0.8.
|
|
37
|
+
BananaCLI v0.8.19 · 终端 + 图形界面
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
- **无前端框架依赖**:CLI 只用 Node 内置模块;运行时依赖 `ws`(GUI/终端 WebSocket)和 `@lydell/node-pty`(预编译原生模块)。
|
package/dist/config/config.js
CHANGED
|
@@ -144,7 +144,7 @@ export function defaultSystemPrompt(workspace) {
|
|
|
144
144
|
'',
|
|
145
145
|
'## 沟通',
|
|
146
146
|
'用用户提问的语言回答;先给结论,再补必要解释,不复述每一步;',
|
|
147
|
-
`做 UI 先读 ${designRoot}/principles.md
|
|
147
|
+
`做 UI 先读 ${designRoot}/principles.md、tokens.md,并参考 ${designRoot}/examples/good/ 的完整示例;需要组件或交互参考时读 ${designRoot}/refs/open-source.md;交付前调用 ui_audit。`,
|
|
148
148
|
...(process.env['BANANA_PROMPT_SUFFIX']?.trim()
|
|
149
149
|
? [`\n## 实验提示词\n${process.env['BANANA_PROMPT_SUFFIX'].trim()}`]
|
|
150
150
|
: []),
|
package/dist/util/ui-audit.js
CHANGED
|
@@ -185,8 +185,8 @@ export function auditPaths(paths, options = {}) {
|
|
|
185
185
|
}
|
|
186
186
|
export function formatViolations(violations) {
|
|
187
187
|
if (!violations.length)
|
|
188
|
-
return 'UI
|
|
189
|
-
return violations
|
|
188
|
+
return 'UI 审计通过:没有发现禁用项。';
|
|
189
|
+
return (violations
|
|
190
190
|
.map((item) => `${item.severity === 'fail' ? '✗' : '!'} ${item.file}:${item.line} [${item.rule}] ${item.message}`)
|
|
191
|
-
.join('\n');
|
|
191
|
+
.join('\n') + '\n\n参考合格示例:docs/design/examples/good/pricing-page.html(配套 .css)');
|
|
192
192
|
}
|
package/docs/design/README.md
CHANGED
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# 开源 UI 参考
|
|
2
|
+
|
|
3
|
+
只学结构、交互和可访问性,不照搬视觉。涉及 AGPL 的项目只看交互,不复制代码。
|
|
4
|
+
|
|
5
|
+
## 组件与交互
|
|
6
|
+
|
|
7
|
+
| 项目 | 许可证 | 学什么 | 不要照搬 |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| [shadcn/ui](https://github.com/shadcn-ui/ui) | MIT | 组件 API 的命名、变体组织、可组合结构 | 默认的卡片堆叠和“模板感”外观 |
|
|
10
|
+
| [Radix Primitives](https://github.com/radix-ui/primitives) | MIT | 弹层、菜单、焦点管理、键盘行为 | 它只是行为层,不要直接当视觉方案 |
|
|
11
|
+
| [Headless UI](https://github.com/tailwindlabs/headlessui) | MIT | 过渡状态、列表键盘导航、无障碍属性 | 过度依赖动画包装 |
|
|
12
|
+
| [Base UI](https://github.com/mui/base-ui) | MIT | 无样式组件的状态机式 API | 复杂组件一次引入太多 |
|
|
13
|
+
| [IBM Carbon](https://github.com/carbon-design-system/carbon) | Apache-2.0 | 企业级信息密度、表格、表单、状态语义 | 厚重的设计语言和大量图标 |
|
|
14
|
+
| [Motion](https://github.com/motiondivision/motion) | MIT | 弹簧参数、手势与布局动画的组织方式 | 为每个元素都加动画 |
|
|
15
|
+
| [Lucide](https://github.com/lucide-icons/lucide) | ISC | 统一线宽、端点、尺寸的图标体系 | 图标风格混用 |
|
|
16
|
+
| [Open Props](https://github.com/argyleink/open-props) | MIT | 用 CSS 变量组织颜色、间距、缓动 | 整套变量直接覆盖现有令牌 |
|
|
17
|
+
|
|
18
|
+
## 完整产品参考
|
|
19
|
+
|
|
20
|
+
| 项目 | 许可证 | 学什么 | 不要照搬 |
|
|
21
|
+
|---|---|---|---|
|
|
22
|
+
| [Cal.com](https://github.com/calcom/cal.com) | AGPL-3.0 | 设置页分组、表单校验、空状态 | 代码和品牌视觉(AGPL) |
|
|
23
|
+
| [Excalidraw](https://github.com/excalidraw/excalidraw) | MIT | 画布工具的手感、浮动工具栏、快捷键提示 | 手绘风格和装饰性元素 |
|
|
24
|
+
| [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend) | MIT | 表单错误、标签、无障碍 | 过于保守的排版 |
|
|
25
|
+
| [GitHub Primer](https://github.com/primer/css) | MIT | 代码块、状态色、开发者工具可读性 | 过多边框、徽章和蓝色链接 |
|
|
26
|
+
|
|
27
|
+
## 使用方式
|
|
28
|
+
|
|
29
|
+
1. 先读 `principles.md` 和 `tokens.md`,确定禁用项。
|
|
30
|
+
2. 需要具体交互时,选 1 个参考,只看对应组件,不整套引入。
|
|
31
|
+
3. 视觉仍然用本项目的 `design-tokens.json`,不复制参考项目的颜色和圆角。
|
|
32
|
+
4. 交付前跑 `ui_audit`。
|
package/package.json
CHANGED