sillyspec 3.7.18 → 3.7.19
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 +1 -1
- package/src/run.js +15 -1
package/package.json
CHANGED
package/src/run.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* CLI 成为流程引擎,AI 变成步骤执行器。
|
|
5
5
|
*/
|
|
6
6
|
import { basename, join } from 'path'
|
|
7
|
-
import { existsSync, readdirSync, mkdirSync, writeFileSync } from 'fs'
|
|
7
|
+
import { existsSync, readdirSync, mkdirSync, writeFileSync, appendFileSync } from 'fs'
|
|
8
8
|
import { ProgressManager } from './progress.js'
|
|
9
9
|
import { stageRegistry, getNextStage, auxiliaryStages } from './stages/index.js'
|
|
10
10
|
import { buildExecuteSteps } from './stages/execute.js'
|
|
@@ -237,6 +237,13 @@ function completeStep(pm, progress, stageName, cwd, outputText) {
|
|
|
237
237
|
progress.lastActive = new Date().toISOString()
|
|
238
238
|
pm._write(cwd, progress)
|
|
239
239
|
|
|
240
|
+
// Append to user-inputs.md
|
|
241
|
+
if (outputText) {
|
|
242
|
+
const inputsPath = join(cwd, '.sillyspec', '.runtime', 'user-inputs.md')
|
|
243
|
+
const entry = `\n## ${new Date().toISOString()} | ${stageName}: ${steps[currentIdx].name}\n- 输出:${outputText}\n`
|
|
244
|
+
appendFileSync(inputsPath, entry)
|
|
245
|
+
}
|
|
246
|
+
|
|
240
247
|
const total = steps.length
|
|
241
248
|
console.log(`✅ ${stageName} 阶段已完成(${total}/${total} 步)`)
|
|
242
249
|
if (next) {
|
|
@@ -249,6 +256,13 @@ function completeStep(pm, progress, stageName, cwd, outputText) {
|
|
|
249
256
|
progress.lastActive = new Date().toISOString()
|
|
250
257
|
pm._write(cwd, progress)
|
|
251
258
|
|
|
259
|
+
// Append to user-inputs.md
|
|
260
|
+
if (outputText) {
|
|
261
|
+
const inputsPath = join(cwd, '.sillyspec', '.runtime', 'user-inputs.md')
|
|
262
|
+
const entry = `\n## ${new Date().toISOString()} | ${stageName}: ${steps[currentIdx].name}\n- 输出:${outputText}\n`
|
|
263
|
+
appendFileSync(inputsPath, entry)
|
|
264
|
+
}
|
|
265
|
+
|
|
252
266
|
const defSteps = getStageSteps(stageName, cwd)
|
|
253
267
|
console.log(`✅ Step ${currentIdx + 1}/${steps.length} 完成:${steps[currentIdx].name}\n`)
|
|
254
268
|
outputStep(stageName, nextPendingIdx, defSteps, cwd)
|