fix(assistant): improve trip proposals and approvals

This commit is contained in:
Maurice
2026-12-02 22:03:28 +01:00
parent 01ad13623c
commit 62a3e63f3f
144 changed files with 4093 additions and 1336 deletions
@@ -141,6 +141,21 @@ describe('assistantRouteModel', () => {
expect(discarded.map((ref) => ref.toolCallId)).toEqual(['call_1', 'call_2']);
});
it('highlights a calculated alternative by default and respects a manual selection', () => {
const unplanned = { ...HIKE, routed: false, distanceM: null };
const latest = message([...read('a', unplanned), ...read('b', GENTLE)]);
const selection = (picks: Readonly<Record<string, string>>) =>
routeRefs([latest], picks, NOBODY, LOOK, AS_WAYS).map((ref) => [ref.way, ref.picked]);
expect(selection({})).toEqual([
['a', false],
['b', true],
]);
expect(selection({ 'tour:a': 'a' })).toEqual([
['a', true],
['b', false],
]);
});
it("FE-AI-ROUTE-003: lines lie in order (replaced way, others, the chosen way, the lit one) in their ways' colours", () => {
const previous = { line: flat(HIKE), distanceM: 8000, ascentM: null, minutes: null };
const messages = [