拉迷全屋定制「户型图→报价单」智能体技能,纯 JS ESM(浏览器/CLI 共用)。
skill/src/ 各模块:defaults.js(规则库) quote.js(计价) vision.js(GLM视觉识别) geometry.js redraw.js(SVG重绘) parse.js(PDF/图片) report.js(HTML报告) publish.js(S3) index.js(管线+CLI)node bin/fpc.js quote <图> --client X --tier standardnode test/run.js(12 项断言,必须全过)用户要求:默认展示原始户型图。修改 skill/src/report.js 的 renderReport:
imageDataUrl 存在时优先原图(.plan-img),SVG 仅在 opts.preferSVG === true 时使用skill/src/index.js:quoteFromFile 不再把 planSVG 传给 renderReport(或传 preferSVG:false)桌面浏览器正常、手机无效 → 触屏兼容问题。修改 report.js 内嵌脚本与样式:
cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparentaddEventListener('click') 改为统一事件委托且同时监听 click 与 touchend(touchend 里 preventDefault 防止幽灵 click 双触发),委托到 document 级.chip/.btn/.del/.room-h 全部走委托;input 的 change 事件用委托 change 监听#cabList 行内 input 的 data-i 索引绑定逻辑重写:委托模式下从 e.target 读 dataset:active 状态替代 :hover(触屏无 hover)node test/run.js 必须全过;再用 node bin/fpc.js 无 API key 的模式跑不了真实识别没关系,重点是语法与单测