fix(asset-ai): answer vehicle status from authorized vehicle facts
ci/woodpecker/push/woodpecker Pipeline was canceled
ci/woodpecker/push/woodpecker Pipeline was canceled
This commit is contained in:
@@ -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(" × ")}统计`,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user