@raolin2025/claude-code-node 2.2.2 → 2.2.3

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": "@raolin2025/claude-code-node",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Node.js AI Code Agent CLI - Zero dependencies, pure JavaScript, security hardened, multi-channel notifications",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/core/cli.js CHANGED
@@ -172,6 +172,10 @@ function parseArgs(argv) {
172
172
  case '--resume': case '-r': args.resume = argv[++i]; break
173
173
  case '--verbose': case '-v': args.verbose = true; break
174
174
  case '--no-stream': args.noStream = true; break
175
+ case '--version':
176
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'))
177
+ console.log(pkg.version)
178
+ process.exit(0)
175
179
  case '--help': case '-h':
176
180
  console.log(`Usage: cc-node [options] [prompt]
177
181
 
@@ -183,6 +187,7 @@ Options:
183
187
  --api-base URL API base URL
184
188
  --api-key *** API key (or set LLM_API_KEY env)
185
189
  -r, --resume ID Resume a session
190
+ --version Show version
186
191
  -v, --verbose Verbose mode
187
192
  --no-stream Disable streaming
188
193
  -h, --help Show this help
@@ -407,7 +407,7 @@ export class QueryEngine {
407
407
  * 处理流式响应 — 逐 token 输出
408
408
  */
409
409
  async _handleStreamResponse(response) {
410
- const result = { content: '', toolCalls: [], usage: {} }
410
+ const result = { content: '', reasoningContent: '', toolCalls: [], usage: {} }
411
411
  let currentText = ''
412
412
 
413
413
  try {