@luban-code/luban-code 1.108.3 → 1.115.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 +3 -0
- package/README.zh.md +6 -3
- package/dist/acp.js +517 -402
- package/dist/cli-config.js +37 -0
- package/dist/cli-plugin.js +339 -199
- package/dist/cli.js +507 -391
- package/dist/extension.js +609 -494
- package/package.json +29 -2
package/README.md
CHANGED
|
@@ -36,11 +36,14 @@ This package also ships the `luban` command — a headless entry point that reus
|
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
npm i -g @luban-code/luban-code
|
|
39
|
+
luban config # interactive wizard: provider / model / API key
|
|
39
40
|
luban --plan "调研 src/ 的目录结构并给出重构建议" # read-only plan (default)
|
|
40
41
|
luban --agent --apply "新建 utils.js 并写测试" # full agent with writes
|
|
41
42
|
luban # interactive multi-turn (TTY)
|
|
42
43
|
```
|
|
43
44
|
|
|
45
|
+
After a CLI-only install, run `luban config` (`luban init` is an alias) to write `~/.luban/providers.json`. Also: `luban config show` / `path` / `validate`. The CLI does **not** read keys from the extension's SecretStorage — use `apiKeyEnv` + env vars (or a plaintext `apiKey`). See [configuration](docs/configuration.md).
|
|
46
|
+
|
|
44
47
|
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
48
|
|
|
46
49
|
Upgrade the CLI itself (reads npm `dist-tags`, then runs `npm i -g`):
|
package/README.zh.md
CHANGED
|
@@ -61,11 +61,14 @@ VSCodium / VS Code 里的**侧边栏 AI 编码助手**:说人话 → 它改文
|
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
63
|
npm i -g @luban-code/luban-code
|
|
64
|
+
luban config # 交互向导:配 provider / 模型 / API key
|
|
64
65
|
luban --plan "调研 src/ 的目录结构并给出重构建议" # 只读计划(默认)
|
|
65
66
|
luban --agent --apply "新建 utils.js 并写测试" # 完整 agent,放开写
|
|
66
67
|
luban # 交互多轮(需要 TTY)
|
|
67
68
|
```
|
|
68
69
|
|
|
70
|
+
纯 CLI 安装后先跑 `luban config`(`luban init` 同义)写 `~/.luban/providers.json`;也可用 `luban config show` / `path` / `validate`。CLI **不读**扩展面板的 SecretStorage,key 请用 `apiKeyEnv` + 环境变量(或明文 `apiKey`)。详见 [配置](docs/configuration.md)。
|
|
71
|
+
|
|
69
72
|
配合 `--apply` 时,每次落盘前会显示 unified diff 并逐次确认(`--yes` 可跳过确认)。交互模式里 `Enter` 发送、`Ctrl-J` / `Alt+Enter` 换行,输入 `/` 补全命令、`@` 补全文件,跑动中按 `Esc` 取消本轮。全量参数见 `luban --help`(`--model` / `--root` / `--json` / `--max-rounds` 等)。
|
|
70
73
|
|
|
71
74
|
CLI 自己也能升级(查 npm `dist-tags` → `npm i -g`):
|
|
@@ -150,7 +153,7 @@ npm i -g @luban-code/luban-acp # 或装一次
|
|
|
150
153
|
前置条件:
|
|
151
154
|
|
|
152
155
|
- VS Code / VSCodium **1.100+**
|
|
153
|
-
- `~/.luban/providers.json` 里至少配好一个 provider
|
|
156
|
+
- `~/.luban/providers.json` 里至少配好一个 provider(扩展面板、`luban config` 向导,或手改)
|
|
154
157
|
- 对应的 API key(环境变量或 `~/.hermes/.env`);**本机端点免 key**(`localhost` / `127.x` 的 Ollama、llama.cpp、vLLM 等直接用)
|
|
155
158
|
|
|
156
159
|
### 装成内置扩展(脚本)
|
|
@@ -172,11 +175,11 @@ cd ~/luban
|
|
|
172
175
|
|
|
173
176
|
## 快速开始
|
|
174
177
|
|
|
175
|
-
1. **配 provider**:面板底部 **⚙**(或命令面板 `Provider settings`),填 `baseUrl` / 模型 / API key
|
|
178
|
+
1. **配 provider**:面板底部 **⚙**(或命令面板 `Provider settings`),填 `baseUrl` / 模型 / API key,点「测试连接」。纯 CLI 用户跑 `luban config`
|
|
176
179
|
2. **打开面板**:活动栏 Luban 图标,或 `Cmd+Shift+L`
|
|
177
180
|
3. **提需求**:`新建 utils.js,导出 debounce(fn, ms) 和 throttle(fn, ms),然后用 node 测一下两者行为`
|
|
178
181
|
|
|
179
|
-
也可以手改 `~/.luban/providers.json`(改完跑命令 `Reload providers.json`
|
|
182
|
+
也可以手改 `~/.luban/providers.json`(改完跑命令 `Reload providers.json` 热重载;CLI 里 `/reload`):
|
|
180
183
|
|
|
181
184
|
```json
|
|
182
185
|
{
|