fix(form): smartProps 解构加 source, 修 'source is not defined' 警告
bug: src/commands/form/create.ts:279 applySmartProps 解构只取 formData/applied,
但 286 引用 source 触发 ReferenceError, smartProps 后处理静默跳过.
修复: 解构加 source → 'ai'/'none' 正确判定, AI 推理结果正常应用
(验证: 'smartProps AI 推理应用 2 项 (BS-新64=2)' 不再 warning)
vitest 17/17 PASS 无回归 (form-drift.spec.ts)
注: CI 关卡 G kb FAIL 是已知预存问题
This commit is contained in:
1 parent
8fd5d5184e
commit
1eadac250f
1 file changed
+1
-1
@@ -276,7 +276,7 @@ export function buildFormCreateCommand(): Command {
|
||||
const smartClient = await JnpfClient.fromToken()
|
||||
const ctx = await loadSmartPropsContext(smartClient)
|
||||
const parsedFormData = JSON.parse(bfdResult.formData)
|
||||
const { formData: enhancedFormData, applied } = await applySmartProps(parsedFormData, ctx, { verbose: true })
|
||||
const { formData: enhancedFormData, applied, source } = await applySmartProps(parsedFormData, ctx, { verbose: true })
|
||||
// 写回 formData string
|
||||
bfdResult.formData = JSON.stringify(enhancedFormData)
|
||||
const byBs: Record<string, number> = {}
|
||||
|
||||
Reference in new issue
Block a user