blade-code 0.0.14 → 0.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blade-code",
3
- "version": "0.0.14",
3
+ "version": "0.0.17",
4
4
  "private": false,
5
5
  "description": "🗡️ Blade Code - 智能代码助手命令行工具",
6
6
  "type": "module",
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "bin",
13
+ "vendor/ripgrep/**",
13
14
  "config.env.example",
14
15
  "README.md"
15
16
  ],
@@ -44,6 +45,8 @@
44
45
  "check:full": "npm run type-check && npm run lint && npm run format:check && npm run test:ci",
45
46
  "security:audit": "pnpm audit",
46
47
  "security:test": "bash scripts/run-security-tests.sh",
48
+ "vendor:ripgrep": "node scripts/download-ripgrep.js",
49
+ "vendor:ripgrep:clean": "rm -rf vendor/ripgrep/darwin-* vendor/ripgrep/linux-* vendor/ripgrep/win32-*",
47
50
  "release": "node scripts/release.js",
48
51
  "release:dry": "node scripts/release.js --dry-run",
49
52
  "release:major": "node scripts/release.js --major",
@@ -94,6 +97,7 @@
94
97
  "@types/react": "^19.1.12",
95
98
  "@types/react-dom": "^19.1.9",
96
99
  "@types/uuid": "^10.0.0",
100
+ "@types/write-file-atomic": "^4.0.3",
97
101
  "@types/ws": "^8.5.12",
98
102
  "@types/yargs": "^17.0.33",
99
103
  "@vitest/coverage-v8": "^3.0.0",
@@ -103,18 +107,23 @@
103
107
  "typescript": "^5.9.2",
104
108
  "vitest": "^3.0.0"
105
109
  },
110
+ "optionalDependencies": {
111
+ "@vscode/ripgrep": "^1.17.0"
112
+ },
106
113
  "dependencies": {
114
+ "@inkjs/ui": "^2.0.0",
107
115
  "@modelcontextprotocol/sdk": "^1.17.4",
108
116
  "ahooks": "^3.9.5",
117
+ "async-mutex": "^0.5.0",
109
118
  "axios": "^1.12.2",
110
119
  "chalk": "^5.4.1",
111
120
  "diff": "^8.0.2",
121
+ "fast-glob": "^3.3.3",
112
122
  "fuse.js": "^7.1.0",
113
123
  "glob": "^11.0.3",
114
- "ink": "^6.2.3",
124
+ "ink": "^6.4.0",
115
125
  "ink-big-text": "^2.0.0",
116
126
  "ink-gradient": "^3.0.0",
117
- "ink-multi-select": "^2.0.0",
118
127
  "ink-progress-bar": "^3.0.0",
119
128
  "ink-select-input": "^6.2.0",
120
129
  "ink-spinner": "^5.0.0",
@@ -123,15 +132,21 @@
123
132
  "js-tiktoken": "^1.0.21",
124
133
  "lodash-es": "^4.17.21",
125
134
  "lowlight": "^3.3.0",
135
+ "lru-cache": "^11.2.4",
126
136
  "nanoid": "^5.1.6",
127
137
  "openai": "^6.2.0",
128
138
  "picomatch": "^4.0.3",
139
+ "pino": "^10.1.0",
140
+ "pino-pretty": "^13.1.3",
129
141
  "react": "^19.1.1",
130
142
  "react-dom": "^19.1.1",
131
143
  "string-width": "^8.1.0",
144
+ "write-file-atomic": "^7.0.0",
132
145
  "ws": "^8.18.0",
146
+ "yaml": "^2.8.1",
133
147
  "yargs": "^18.0.0",
134
148
  "zod": "^3.24.2",
135
- "zod-to-json-schema": "^3.24.6"
149
+ "zod-to-json-schema": "^3.24.6",
150
+ "zustand": "^5.0.9"
136
151
  }
137
152
  }
@@ -0,0 +1,12 @@
1
+ # 忽略所有平台的二进制文件(这些文件很大,不应该提交到 git)
2
+ # 用户可以通过运行 npm run vendor:ripgrep 来下载它们
3
+
4
+ darwin-arm64/
5
+ darwin-x64/
6
+ linux-arm64/
7
+ linux-x64/
8
+ win32-x64/
9
+
10
+ # 但保留 README.md
11
+ !README.md
12
+ !.gitignore
@@ -0,0 +1,50 @@
1
+ # Ripgrep Vendor Directory
2
+
3
+ 此目录用于存放各平台的 ripgrep 二进制文件。
4
+
5
+ ## 目录结构
6
+
7
+ ```text
8
+ vendor/ripgrep/
9
+ ├── darwin-arm64/rg # macOS Apple Silicon
10
+ ├── darwin-x64/rg # macOS Intel
11
+ ├── linux-arm64/rg # Linux ARM64
12
+ ├── linux-x64/rg # Linux x64
13
+ └── win32-x64/rg.exe # Windows x64
14
+ ```
15
+
16
+ ## 快速开始
17
+
18
+ ### 自动下载(推荐)
19
+
20
+ ```bash
21
+ npm run vendor:ripgrep
22
+ ```
23
+
24
+ ### 手动下载
25
+
26
+ 1. 访问 [ripgrep releases](https://github.com/BurntSushi/ripgrep/releases)
27
+ 2. 下载对应平台的二进制文件(推荐 v14.1.0+)
28
+ 3. 解压并放入对应目录
29
+ 4. 设置执行权限(Unix 系统):
30
+
31
+ ```bash
32
+ chmod +x vendor/ripgrep/*/rg
33
+ ```
34
+
35
+ ### 清理
36
+
37
+ ```bash
38
+ npm run vendor:ripgrep:clean
39
+ ```
40
+
41
+ ## 注意事项
42
+
43
+ - 这些文件是**可选的**
44
+ - Grep 工具会自动降级到其他搜索方案
45
+ - 包含这些文件会增加 npm 包体积 ~40-50 MB
46
+ - 这些文件已添加到 `.gitignore`
47
+
48
+ ## 更多信息
49
+
50
+ 详细文档请参考: [docs/development/implementation/grep-tool.md](../../docs/development/implementation/grep-tool.md)