clawt 2.16.4 → 2.17.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 +14 -0
- package/dist/index.js +531 -71
- package/dist/postinstall.js +26 -3
- package/docs/spec.md +108 -5
- package/package.json +2 -1
- package/src/commands/completion.ts +98 -0
- package/src/constants/index.ts +12 -2
- package/src/constants/messages/completion.ts +23 -0
- package/src/constants/messages/index.ts +2 -0
- package/src/constants/messages/run.ts +4 -4
- package/src/constants/progress.ts +36 -6
- package/src/index.ts +2 -0
- package/src/utils/completion-engine.ts +174 -0
- package/src/utils/completion-scripts.ts +58 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/progress-render.ts +77 -13
- package/src/utils/progress.ts +110 -24
- package/src/utils/stream-parser.ts +251 -0
- package/src/utils/task-executor.ts +61 -27
- package/tests/unit/commands/completion.test.ts +1116 -0
- package/tests/unit/utils/progress-render.test.ts +96 -0
- package/tests/unit/utils/progress.test.ts +391 -10
- package/tests/unit/utils/stream-parser.test.ts +375 -0
- package/.claude/agent-memory/docs-sync-updater/MEMORY.md +0 -125
package/README.md
CHANGED
|
@@ -238,6 +238,20 @@ clawt config set terminalApp iterm2
|
|
|
238
238
|
clawt config get maxConcurrency
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
+
### `clawt completion` — Shell 自动补全
|
|
242
|
+
|
|
243
|
+
为终端提供命令、子命令、选项,甚至分支名和配置项的自动补全功能。
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# 自动安装补全脚本(推荐)
|
|
247
|
+
clawt completion install
|
|
248
|
+
|
|
249
|
+
# 或手动将脚本添加到你的 shell 配置文件
|
|
250
|
+
clawt completion bash >> ~/.bashrc
|
|
251
|
+
clawt completion zsh >> ~/.zshrc
|
|
252
|
+
```
|
|
253
|
+
> **支持特性:** 所有子命令、选项、`-b` 参数自动补全本地 `worktree` 分支名、`-f` 参数自动补全文件路径,以及 `config set/get` 键名自动补全。
|
|
254
|
+
|
|
241
255
|
### `clawt alias` — 管理命令别名
|
|
242
256
|
|
|
243
257
|
```bash
|