fix(提示词): 补 picking.batch.production_date 缺失的 variablesSchema(服务端 tsc 归零)
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s

## 问题
`PromptDefaultDef.variablesSchema` 是必填字段,而 `picking.batch.production_date`(分拣·包装生产日期读取)
这条提示词定义漏写了它 ⇒ `tsc` 长期报:
`src/prompts/defaults.ts(465,3): error TS2741: Property 'variablesSchema' is missing …`
(是加入这条提示词时漏的,非本会话改动;影响:`tsc`/`npm run build` 退出码 2、并掩盖将来真正的新类型错误;
不影响运行 —— tsc 仍产出 JS,所以构建与线上一直正常。)

## 修法
该提示词**没有模板变量** ⇒ 补 `variablesSchema: []`(与同文件其它无变量提示词的写法一致:
`inspection.queued.photo`、`weigh.recognize.open` 等也是 `[]`)。

## 验证
- `cd server && npx tsc --noEmit` ⇒ **EXIT=0,错误数 0**(服务端归零)
- 根目录 `npx tsc --noEmit` ⇒ EXIT=0
- 设计门禁快档:8 通过 / `check-ai-cost` 既有红(不许调绿)
- 该改动**只是类型补全**,运行期语义不变(缺字段时消费方本就是可选访问),故未重新构建/部署产物。
This commit is contained in:
Ubuntu
2026-10-17 10:00:56 +08:00
parent f1ffac6392
commit 14d7afe8e2
+2
View File
@@ -474,6 +474,8 @@ damage_types 只能从:挤压、腐烂、规格不符、污染、其他 中选
- 只有年月时补日为 01("2026-10-01");看不清或图上没有该日期 ⇒ null(填 **null**,不要填字符串 "null" 以外的内容);
- **不要**把保质期、有效期截止日、条码/批号/序号里的数字当成生产日期;
- **看不清就填 null,禁止猜**(界面会让拣货员手动挑批次)。`,
// 该提示词无模板变量(2026-10-17 补:此前漏写导致 tsc TS2741)
variablesSchema: [],
},
{
featureKey: 'weigh.recognize.catalog_categories',