fix(asset-ai): answer vehicle status from authorized vehicle facts
ci/woodpecker/push/woodpecker Pipeline was canceled

This commit is contained in:
shishengliang
2026-09-23 18:05:10 +08:00
parent d3a56b2cc1
commit d3fcec7dce
12 changed files with 317 additions and 5 deletions
@@ -217,3 +217,9 @@ test("analysis path collapses display-only steps and preserves the latest node o
);
assert.equal(path.at(-2)?.label, "库存 · 华东");
});
test("vehicle status navigation identifies a vehicle answer instead of a total", () => {
const path = queryPath({ kind: "assets", category: "all", groupBy: "none", view: "list", filters: {}, vehicleIds: ["v1"], responseMode: "vehicle-status" });
assert.ok(path.includes("车辆状态"));
assert.ok(!path.includes("总量"));
});
@@ -39,7 +39,7 @@ export function queryPath(plan: QueryPlan): string[] {
]
: []),
plan.groupBy === "none" && !plan.secondaryGroupBy
? "总量"
? plan.responseMode === "vehicle-status" ? "车辆状态" : "总量"
: `按${[GROUP_LABELS[plan.groupBy], plan.secondaryGroupBy && GROUP_LABELS[plan.secondaryGroupBy]].filter(Boolean).join(" × ")}统计`,
];
}