ai-unit-test-generator 2.0.2 → 2.0.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/CHANGELOG.md +9 -0
- package/lib/ai/client.mjs +1 -1
- package/lib/workflows/analyze.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [2.0.3] - 2025-01-11
|
9
|
+
|
10
|
+
### 🐛 Hotfix
|
11
|
+
- **Fixed**: `ai-test analyze` and `ai-test generate` - use `cursor-agent --print` instead of `cursor-agent chat`
|
12
|
+
- The `--print` flag enables non-interactive mode suitable for scripting
|
13
|
+
- Both `lib/workflows/analyze.mjs` and `lib/ai/client.mjs` updated
|
14
|
+
|
15
|
+
---
|
16
|
+
|
8
17
|
## [2.0.2] - 2025-01-11
|
9
18
|
|
10
19
|
### 🐛 Hotfix
|
package/lib/ai/client.mjs
CHANGED
@@ -30,7 +30,7 @@ export async function runOnce({ prompt, promptFile, out = 'reports/ai_response.t
|
|
30
30
|
}
|
31
31
|
|
32
32
|
return new Promise((resolve, reject) => {
|
33
|
-
const args = ['
|
33
|
+
const args = ['--print']
|
34
34
|
if (model) args.push('-m', model)
|
35
35
|
|
36
36
|
const child = spawn('cursor-agent', args, { stdio: ['pipe', 'pipe', 'inherit'] })
|
@@ -133,8 +133,8 @@ async function callCursorAgent(promptPath) {
|
|
133
133
|
return
|
134
134
|
}
|
135
135
|
|
136
|
-
// 调用 cursor-agent
|
137
|
-
const child = spawn('cursor-agent', ['
|
136
|
+
// 调用 cursor-agent --print(通过 stdin 传递 prompt)
|
137
|
+
const child = spawn('cursor-agent', ['--print'], {
|
138
138
|
stdio: ['pipe', 'pipe', 'inherit'],
|
139
139
|
shell: true,
|
140
140
|
cwd: process.cwd()
|