@luban-code/luban-code 1.101.0 → 1.103.0
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.md +13 -1
- package/README.zh.md +13 -1
- package/dist/acp.js +276 -276
- package/dist/cli-plugin.js +114 -114
- package/dist/cli-upgrade.js +8 -0
- package/dist/cli.js +296 -296
- package/dist/extension.js +324 -324
- package/package.json +10 -6
- package/registry/registry.json +647 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
- **Optional real-browser view** — `browser` drives a local headless Chrome/Edge over CDP (open, accessibility snapshot, screenshot, console, failed requests; plus `click` / `type` / `scroll` to drive the page in Agent mode — not available in Plan mode, first use asks for confirmation). Off by default via `luban.browser.enabled`; screenshots are only visible to models with `vision` enabled.
|
|
28
28
|
- **Optional desktop control (macOS and Windows)** — `computer` screenshots the real screen, reads on-screen text via OCR (macOS; on Windows it falls back to viewing the screenshot), lists windows, and can click / double-click / drag / scroll / type / send key combos. Off by default via `luban.computer.enabled`; the first action that touches mouse or keyboard asks for confirmation; unavailable in Plan mode; models without `vision` automatically fall back to OCR text.
|
|
29
29
|
- **Optional tab completion** — DeepSeek FIM completion, off by default.
|
|
30
|
-
- **A Markdown preview you can live with** — the built-in VSCodium preview is awkward, so Luban ships its own: **Luban: Markdown preview** (or the
|
|
30
|
+
- **A Markdown preview you can live with** — the built-in VSCodium preview is awkward, so Luban ships its own: **Luban: Markdown preview** (or the M↓ markdown icon in the editor title bar — icons only there, the title bar has no room for words) opens a side-by-side panel with syntax-highlighted code blocks, local images resolved relative to the file, and one-way scroll sync from the editor. It reuses the same renderer as the chat panel and the same highlighter as the CLI terminal — one set of rules, three surfaces.
|
|
31
31
|
- **Status-bar light** — one line in the status bar: `(o.o) run_command npm test`. The little carpenter's ASCII face plus what the agent is doing right now (thinking / writing / running a tool / waiting / done / error) — the same face you see in the terminal. Hover for the full picture of this turn, click to open the panel, and it falls asleep (`-_-`) when idle for a while. Turn it off with `luban.statusBar.enabled`.
|
|
32
32
|
|
|
33
33
|
## CLI
|
|
@@ -43,6 +43,18 @@ luban # interactive multi-turn (TTY
|
|
|
43
43
|
|
|
44
44
|
With `--apply`, every write shows a unified diff and asks before touching disk (`--yes` skips the prompt). In interactive mode, `Enter` sends, `Ctrl-J` / `Alt+Enter` inserts a newline, `/` completes commands, `@` completes workspace paths, and `Esc` cancels the running turn. Run `luban --help` for all flags (`--model`, `--root`, `--json`, `--max-rounds`, …).
|
|
45
45
|
|
|
46
|
+
Upgrade the CLI itself (reads npm `dist-tags`, then runs `npm i -g`):
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
luban upgrade --check # report only: exit 1 when an update exists (0 up to date, 2 error)
|
|
50
|
+
luban upgrade # show the new version, ask once, then npm i -g
|
|
51
|
+
luban upgrade --yes # no prompt (scripts / CI)
|
|
52
|
+
luban upgrade --tag next # pick a dist-tag (default latest)
|
|
53
|
+
luban upgrade --version 1.100.0 # pin / roll back to a specific version
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`luban update` is an alias. npx runs and source checkouts are left alone by default (re-running `npx …@latest` is already the newest; a checkout upgrades with `git pull && npm i && npm run build`) — add `--npm` to force a global install. Mirrors are honoured via `--registry <url>` or `npm_config_registry`, and `--json` prints one structured object for scripts.
|
|
57
|
+
|
|
46
58
|
Plugins install from the registry (`registry/registry.json`; sources live in [eppen/luban-plugins](https://github.com/eppen/luban-plugins)):
|
|
47
59
|
|
|
48
60
|
```bash
|
package/README.zh.md
CHANGED
|
@@ -24,7 +24,7 @@ VSCodium / VS Code 里的**侧边栏 AI 编码助手**:说人话 → 它改文
|
|
|
24
24
|
- **为省 token 而设计**:消息排布对齐前缀缓存(第 2 轮起通常 95%+ 命中),每轮显示输入 / 输出 / 缓存 / 上下文占用,另有本地账本与用量看板
|
|
25
25
|
- **不挑模型**:任何 OpenAI 兼容端点(DeepSeek / Ollama / llama.cpp / vLLM…),API key 存 SecretStorage 不落盘
|
|
26
26
|
- **状态栏状态灯**:右下角一行 `(o.o) run_command npm test` —— 小木匠「班班」的脸加当前在干嘛(思考中 / 输出中 / 执行工具 / 等待确认 / 完成 / 出错),和终端里是同一张脸,鼠标悬停看这一轮的全景,点击打开面板;挂机久了它自己睡(`-_-`)。不需要可关(`luban.statusBar.enabled`)
|
|
27
|
-
- **顺手的 Markdown 预览**:VSCodium 自带的预览太难用,Luban 自己做一个 —— 命令面板执行「Luban: Markdown 预览」(或编辑器标题栏的
|
|
27
|
+
- **顺手的 Markdown 预览**:VSCodium 自带的预览太难用,Luban 自己做一个 —— 命令面板执行「Luban: Markdown 预览」(或编辑器标题栏的 M↓(Markdown)图标,标题栏放不下文字,所以只挂图标)在旁边开一个预览面板:代码块带语法高亮、本地图片按相对路径显示、编辑器滚动时预览跟着走。渲染器与聊天面板共用,高亮规则与终端 CLI 共用 —— 一套规则,三处使用。
|
|
28
28
|
|
|
29
29
|
**能做的事**
|
|
30
30
|
|
|
@@ -68,6 +68,18 @@ luban # 交互多轮(需要 TTY
|
|
|
68
68
|
|
|
69
69
|
配合 `--apply` 时,每次落盘前会显示 unified diff 并逐次确认(`--yes` 可跳过确认)。交互模式里 `Enter` 发送、`Ctrl-J` / `Alt+Enter` 换行,输入 `/` 补全命令、`@` 补全文件,跑动中按 `Esc` 取消本轮。全量参数见 `luban --help`(`--model` / `--root` / `--json` / `--max-rounds` 等)。
|
|
70
70
|
|
|
71
|
+
CLI 自己也能升级(查 npm `dist-tags` → `npm i -g`):
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
luban upgrade --check # 只检查:有更新退 1(无更新退 0,出错退 2)
|
|
75
|
+
luban upgrade # 显示新版本 → 问一次 → npm i -g
|
|
76
|
+
luban upgrade --yes # 不问(脚本 / CI)
|
|
77
|
+
luban upgrade --tag next # 换 dist-tag(默认 latest)
|
|
78
|
+
luban upgrade --version 1.100.0 # 指定版本 / 回退
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`luban update` 同义。npx 临时运行与源码仓库默认不动你的环境(前者重新 `npx …@latest` 就是最新,后者用 `git pull && npm i && npm run build`)—— 要强制装成全局加 `--npm`。国内镜像用 `--registry <url>` 或 `npm_config_registry`;`--json` 输出单个结构化对象,便于脚本 / CI 消费。
|
|
82
|
+
|
|
71
83
|
插件从索引装(索引是 `registry/registry.json`,插件源码在 [eppen/luban-plugins](https://github.com/eppen/luban-plugins)):
|
|
72
84
|
|
|
73
85
|
```bash
|