Claude Claude Opus 5.5 commited on
Commit
c0e4d2c
·
unverified ·
1 Parent(s): 1e47324

decide: ตอบเลขเมนูล้วนเพื่อเลือกแบรนด์ ไม่ต่อท้ายคำถาม

Browse files

'ทนแรงเกินห้าหมื่นนิวตัน' → '2' เดิมเป็น '… 2' แล้วถูกอ่านเป็นแรงดึง >= 2 N/m (68/68 · probe r2 T2-B1/B4)
เฉพาะข้อความที่เป็นตัวเลขล้วนและตรงกับเลขเมนูแบรนด์ · ตอบชื่อแบรนด์ยังต่อท้ายเหมือนเดิม
เส้นทาง 583 เทิร์นของชุดทดสอบเดิมทุกไฟล์ตรงกับก่อนแก้

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwsdofT99oxWbSo75QDYgs

Files changed (1) hide show
  1. core/decide.py +5 -1
core/decide.py CHANGED
@@ -200,7 +200,11 @@ class Dialogue:
200
  payload={"image_carried": True})
201
  carried = sc
202
  # ตอบ ใช่/ไม่ใช่ = คำตอบเรื่องแบรนด์ล้วน ไม่ใช่ส่วนของคำถาม
203
- effective = st.pending_question.strip() if confirmed else f"{st.pending_question} {text}".strip()
 
 
 
 
204
  pending_q_before = st.pending_question
205
  st.pending, pending_before, st.pending_question = None, st.pending, ""
206
 
 
200
  payload={"image_carried": True})
201
  carried = sc
202
  # ตอบ ใช่/ไม่ใช่ = คำตอบเรื่องแบรนด์ล้วน ไม่ใช่ส่วนของคำถาม
203
+ # ตอบเลขเมนูล้วน ("2") = เลือกแบรนด์ ไม่ใช่ส่วนของคำถาม — 30 ต.ค. (probe_tools r2 T2-B1/B4):
204
+ # "ทนแรงเกินห้าหมื่นนิวตัน 2" ถูกอ่านเป็นแรงดึง ≥ 2 N/m ค้นได้ 68/68 รุ่น
205
+ menu_digit = answered_brand is not None and re.fullmatch(r"\s*\d+\s*", text or "") is not None
206
+ effective = (st.pending_question.strip() if (confirmed or (menu_digit and st.pending_question))
207
+ else f"{st.pending_question} {text}".strip())
208
  pending_q_before = st.pending_question
209
  st.pending, pending_before, st.pending_question = None, st.pending, ""
210