fix(web): rank remaining-minute probes by split and match choice kind
Choice cards used a hardcoded domain menu and always asked existence. Rank scoring layers by remaining-minute entropy, keep finance and health volunteer-only, and ask D9/D10 style or exam quality so taps match outcomes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -77,11 +77,18 @@ def _features(built: dict[str, Any]) -> list[dict[str, Any]]:
|
||||
return rows
|
||||
|
||||
|
||||
def _sign_name(index: int | None) -> str | None:
|
||||
if isinstance(index, int) and 0 <= index <= 11:
|
||||
return SIGNS_CN[SIGNS[index]]
|
||||
return None
|
||||
|
||||
|
||||
def _sign_names(indices: set[int]) -> list[str]:
|
||||
names: list[str] = []
|
||||
for idx in sorted(indices):
|
||||
if isinstance(idx, int) and 0 <= idx <= 11:
|
||||
names.append(SIGNS_CN[SIGNS[idx]])
|
||||
name = _sign_name(idx)
|
||||
if name:
|
||||
names.append(name)
|
||||
return names
|
||||
|
||||
|
||||
@@ -207,11 +214,17 @@ def window_scan(
|
||||
before = previous[layer]
|
||||
after = current[layer]
|
||||
if isinstance(before, int) and isinstance(after, int) and before != after:
|
||||
transitions.append({
|
||||
row = {
|
||||
"layer": layer,
|
||||
"at": time,
|
||||
"user_meaning": f"{label} 在 {time} 发生变化",
|
||||
})
|
||||
}
|
||||
from_sign = _sign_name(before)
|
||||
to_sign = _sign_name(after)
|
||||
if from_sign and to_sign:
|
||||
row["from_sign"] = from_sign
|
||||
row["to_sign"] = to_sign
|
||||
transitions.append(row)
|
||||
previous = current
|
||||
payload: dict[str, Any] = {
|
||||
"scanned": True,
|
||||
|
||||
Reference in New Issue
Block a user