@curless/hotel-storefront 0.85.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/accept-terms.d.ts +4 -0
- package/dist/tools/accept-terms.d.ts.map +1 -0
- package/dist/tools/accept-terms.js +26 -0
- package/dist/tools/accept-terms.js.map +1 -0
- package/dist/tools/add-booking-addon.d.ts +4 -0
- package/dist/tools/add-booking-addon.d.ts.map +1 -0
- package/dist/tools/add-booking-addon.js +44 -0
- package/dist/tools/add-booking-addon.js.map +1 -0
- package/dist/tools/add-to-trip.d.ts +4 -0
- package/dist/tools/add-to-trip.d.ts.map +1 -0
- package/dist/tools/add-to-trip.js +49 -0
- package/dist/tools/add-to-trip.js.map +1 -0
- package/dist/tools/all-tools.d.ts +19124 -0
- package/dist/tools/all-tools.d.ts.map +1 -0
- package/dist/tools/all-tools.js +43 -0
- package/dist/tools/all-tools.js.map +1 -0
- package/dist/tools/answer.d.ts +3 -0
- package/dist/tools/answer.d.ts.map +1 -0
- package/dist/tools/answer.js +104 -0
- package/dist/tools/answer.js.map +1 -0
- package/dist/tools/args.d.ts +149 -0
- package/dist/tools/args.d.ts.map +1 -0
- package/dist/tools/args.js +176 -0
- package/dist/tools/args.js.map +1 -0
- package/dist/tools/base-output-schemas.d.ts +3 -0
- package/dist/tools/base-output-schemas.d.ts.map +1 -0
- package/dist/tools/base-output-schemas.js +396 -0
- package/dist/tools/base-output-schemas.js.map +1 -0
- package/dist/tools/book-picked.d.ts +4 -0
- package/dist/tools/book-picked.d.ts.map +1 -0
- package/dist/tools/book-picked.js +14 -0
- package/dist/tools/book-picked.js.map +1 -0
- package/dist/tools/booking-answer.d.ts +24 -0
- package/dist/tools/booking-answer.d.ts.map +1 -0
- package/dist/tools/booking-answer.js +567 -0
- package/dist/tools/booking-answer.js.map +1 -0
- package/dist/tools/buy-shop-item.d.ts +4 -0
- package/dist/tools/buy-shop-item.d.ts.map +1 -0
- package/dist/tools/buy-shop-item.js +45 -0
- package/dist/tools/buy-shop-item.js.map +1 -0
- package/dist/tools/call.d.ts +11 -0
- package/dist/tools/call.d.ts.map +1 -0
- package/dist/tools/call.js +2 -0
- package/dist/tools/call.js.map +1 -0
- package/dist/tools/cancel-facts.d.ts +281 -0
- package/dist/tools/cancel-facts.d.ts.map +1 -0
- package/dist/tools/cancel-facts.js +309 -0
- package/dist/tools/cancel-facts.js.map +1 -0
- package/dist/tools/cancel.d.ts +4 -0
- package/dist/tools/cancel.d.ts.map +1 -0
- package/dist/tools/cancel.js +415 -0
- package/dist/tools/cancel.js.map +1 -0
- package/dist/tools/capability-adjust.d.ts +31 -0
- package/dist/tools/capability-adjust.d.ts.map +1 -0
- package/dist/tools/capability-adjust.js +299 -0
- package/dist/tools/capability-adjust.js.map +1 -0
- package/dist/tools/card-addons.d.ts +4 -0
- package/dist/tools/card-addons.d.ts.map +1 -0
- package/dist/tools/card-addons.js +76 -0
- package/dist/tools/card-addons.js.map +1 -0
- package/dist/tools/change-booking.d.ts +4 -0
- package/dist/tools/change-booking.d.ts.map +1 -0
- package/dist/tools/change-booking.js +145 -0
- package/dist/tools/change-booking.js.map +1 -0
- package/dist/tools/clear-trip.d.ts +4 -0
- package/dist/tools/clear-trip.d.ts.map +1 -0
- package/dist/tools/clear-trip.js +10 -0
- package/dist/tools/clear-trip.js.map +1 -0
- package/dist/tools/compare.d.ts +4 -0
- package/dist/tools/compare.d.ts.map +1 -0
- package/dist/tools/compare.js +114 -0
- package/dist/tools/compare.js.map +1 -0
- package/dist/tools/current-trip.d.ts +70 -0
- package/dist/tools/current-trip.d.ts.map +1 -0
- package/dist/tools/current-trip.js +269 -0
- package/dist/tools/current-trip.js.map +1 -0
- package/dist/tools/deps.d.ts +229 -0
- package/dist/tools/deps.d.ts.map +1 -0
- package/dist/tools/deps.js +2 -0
- package/dist/tools/deps.js.map +1 -0
- package/dist/tools/follow-ups.d.ts +120 -0
- package/dist/tools/follow-ups.d.ts.map +1 -0
- package/dist/tools/follow-ups.js +369 -0
- package/dist/tools/follow-ups.js.map +1 -0
- package/dist/tools/forget-preferences.d.ts +4 -0
- package/dist/tools/forget-preferences.d.ts.map +1 -0
- package/dist/tools/forget-preferences.js +24 -0
- package/dist/tools/forget-preferences.js.map +1 -0
- package/dist/tools/get-hotel.d.ts +4 -0
- package/dist/tools/get-hotel.d.ts.map +1 -0
- package/dist/tools/get-hotel.js +350 -0
- package/dist/tools/get-hotel.js.map +1 -0
- package/dist/tools/hotel-choices.d.ts +132 -0
- package/dist/tools/hotel-choices.d.ts.map +1 -0
- package/dist/tools/hotel-choices.js +587 -0
- package/dist/tools/hotel-choices.js.map +1 -0
- package/dist/tools/itinerary.d.ts +4 -0
- package/dist/tools/itinerary.d.ts.map +1 -0
- package/dist/tools/itinerary.js +158 -0
- package/dist/tools/itinerary.js.map +1 -0
- package/dist/tools/list-booking-addons.d.ts +4 -0
- package/dist/tools/list-booking-addons.d.ts.map +1 -0
- package/dist/tools/list-booking-addons.js +21 -0
- package/dist/tools/list-booking-addons.js.map +1 -0
- package/dist/tools/list-bookings.d.ts +4 -0
- package/dist/tools/list-bookings.d.ts.map +1 -0
- package/dist/tools/list-bookings.js +119 -0
- package/dist/tools/list-bookings.js.map +1 -0
- package/dist/tools/list-extras.d.ts +4 -0
- package/dist/tools/list-extras.d.ts.map +1 -0
- package/dist/tools/list-extras.js +90 -0
- package/dist/tools/list-extras.js.map +1 -0
- package/dist/tools/list-hotels-ask.d.ts +133 -0
- package/dist/tools/list-hotels-ask.d.ts.map +1 -0
- package/dist/tools/list-hotels-ask.js +326 -0
- package/dist/tools/list-hotels-ask.js.map +1 -0
- package/dist/tools/list-hotels-empty.d.ts +5 -0
- package/dist/tools/list-hotels-empty.d.ts.map +1 -0
- package/dist/tools/list-hotels-empty.js +130 -0
- package/dist/tools/list-hotels-empty.js.map +1 -0
- package/dist/tools/list-hotels-home.d.ts +9 -0
- package/dist/tools/list-hotels-home.d.ts.map +1 -0
- package/dist/tools/list-hotels-home.js +181 -0
- package/dist/tools/list-hotels-home.js.map +1 -0
- package/dist/tools/list-hotels-page.d.ts +43 -0
- package/dist/tools/list-hotels-page.d.ts.map +1 -0
- package/dist/tools/list-hotels-page.js +344 -0
- package/dist/tools/list-hotels-page.js.map +1 -0
- package/dist/tools/list-hotels.d.ts +4 -0
- package/dist/tools/list-hotels.d.ts.map +1 -0
- package/dist/tools/list-hotels.js +24 -0
- package/dist/tools/list-hotels.js.map +1 -0
- package/dist/tools/list-shop-items.d.ts +4 -0
- package/dist/tools/list-shop-items.d.ts.map +1 -0
- package/dist/tools/list-shop-items.js +34 -0
- package/dist/tools/list-shop-items.js.map +1 -0
- package/dist/tools/list-shop-orders.d.ts +4 -0
- package/dist/tools/list-shop-orders.d.ts.map +1 -0
- package/dist/tools/list-shop-orders.js +22 -0
- package/dist/tools/list-shop-orders.js.map +1 -0
- package/dist/tools/look-up.d.ts +4 -0
- package/dist/tools/look-up.d.ts.map +1 -0
- package/dist/tools/look-up.js +207 -0
- package/dist/tools/look-up.js.map +1 -0
- package/dist/tools/output-schemas.d.ts +645 -0
- package/dist/tools/output-schemas.d.ts.map +1 -0
- package/dist/tools/output-schemas.js +503 -0
- package/dist/tools/output-schemas.js.map +1 -0
- package/dist/tools/paid-lines.d.ts +718 -0
- package/dist/tools/paid-lines.d.ts.map +1 -0
- package/dist/tools/paid-lines.js +359 -0
- package/dist/tools/paid-lines.js.map +1 -0
- package/dist/tools/pay-with-union-pay.d.ts +4 -0
- package/dist/tools/pay-with-union-pay.d.ts.map +1 -0
- package/dist/tools/pay-with-union-pay.js +112 -0
- package/dist/tools/pay-with-union-pay.js.map +1 -0
- package/dist/tools/payment-words.d.ts +269 -0
- package/dist/tools/payment-words.d.ts.map +1 -0
- package/dist/tools/payment-words.js +365 -0
- package/dist/tools/payment-words.js.map +1 -0
- package/dist/tools/pick-room.d.ts +4 -0
- package/dist/tools/pick-room.d.ts.map +1 -0
- package/dist/tools/pick-room.js +23 -0
- package/dist/tools/pick-room.js.map +1 -0
- package/dist/tools/policies.d.ts +4 -0
- package/dist/tools/policies.d.ts.map +1 -0
- package/dist/tools/policies.js +74 -0
- package/dist/tools/policies.js.map +1 -0
- package/dist/tools/pricing.d.ts +55 -0
- package/dist/tools/pricing.d.ts.map +1 -0
- package/dist/tools/pricing.js +260 -0
- package/dist/tools/pricing.js.map +1 -0
- package/dist/tools/put-room-line.d.ts +12 -0
- package/dist/tools/put-room-line.d.ts.map +1 -0
- package/dist/tools/put-room-line.js +347 -0
- package/dist/tools/put-room-line.js.map +1 -0
- package/dist/tools/quote-card.d.ts +234 -0
- package/dist/tools/quote-card.d.ts.map +1 -0
- package/dist/tools/quote-card.js +375 -0
- package/dist/tools/quote-card.js.map +1 -0
- package/dist/tools/refund-booking.d.ts +4 -0
- package/dist/tools/refund-booking.d.ts.map +1 -0
- package/dist/tools/refund-booking.js +112 -0
- package/dist/tools/refund-booking.js.map +1 -0
- package/dist/tools/request-booking.d.ts +4 -0
- package/dist/tools/request-booking.d.ts.map +1 -0
- package/dist/tools/request-booking.js +5 -0
- package/dist/tools/request-booking.js.map +1 -0
- package/dist/tools/request-words.d.ts +238 -0
- package/dist/tools/request-words.d.ts.map +1 -0
- package/dist/tools/request-words.js +487 -0
- package/dist/tools/request-words.js.map +1 -0
- package/dist/tools/room-choices.d.ts +64 -0
- package/dist/tools/room-choices.d.ts.map +1 -0
- package/dist/tools/room-choices.js +374 -0
- package/dist/tools/room-choices.js.map +1 -0
- package/dist/tools/session-notes.d.ts +164 -0
- package/dist/tools/session-notes.d.ts.map +1 -0
- package/dist/tools/session-notes.js +412 -0
- package/dist/tools/session-notes.js.map +1 -0
- package/dist/tools/sign-in.d.ts +4 -0
- package/dist/tools/sign-in.d.ts.map +1 -0
- package/dist/tools/sign-in.js +72 -0
- package/dist/tools/sign-in.js.map +1 -0
- package/dist/tools/sign-out.d.ts +4 -0
- package/dist/tools/sign-out.d.ts.map +1 -0
- package/dist/tools/sign-out.js +13 -0
- package/dist/tools/sign-out.js.map +1 -0
- package/dist/tools/terms-answer.d.ts +114 -0
- package/dist/tools/terms-answer.d.ts.map +1 -0
- package/dist/tools/terms-answer.js +492 -0
- package/dist/tools/terms-answer.js.map +1 -0
- package/dist/tools/tool-defs-account.d.ts +80 -0
- package/dist/tools/tool-defs-account.d.ts.map +1 -0
- package/dist/tools/tool-defs-account.js +65 -0
- package/dist/tools/tool-defs-account.js.map +1 -0
- package/dist/tools/tool-defs-addons.d.ts +251 -0
- package/dist/tools/tool-defs-addons.d.ts.map +1 -0
- package/dist/tools/tool-defs-addons.js +198 -0
- package/dist/tools/tool-defs-addons.js.map +1 -0
- package/dist/tools/tool-defs-booking.d.ts +410 -0
- package/dist/tools/tool-defs-booking.d.ts.map +1 -0
- package/dist/tools/tool-defs-booking.js +285 -0
- package/dist/tools/tool-defs-booking.js.map +1 -0
- package/dist/tools/tool-defs-browse.d.ts +444 -0
- package/dist/tools/tool-defs-browse.d.ts.map +1 -0
- package/dist/tools/tool-defs-browse.js +307 -0
- package/dist/tools/tool-defs-browse.js.map +1 -0
- package/dist/tools/tool-defs-trip.d.ts +136 -0
- package/dist/tools/tool-defs-trip.d.ts.map +1 -0
- package/dist/tools/tool-defs-trip.js +79 -0
- package/dist/tools/tool-defs-trip.js.map +1 -0
- package/dist/tools/tool-env.d.ts +64 -0
- package/dist/tools/tool-env.d.ts.map +1 -0
- package/dist/tools/tool-env.js +49 -0
- package/dist/tools/tool-env.js.map +1 -0
- package/dist/tools/tool-set.d.ts +1425 -0
- package/dist/tools/tool-set.d.ts.map +1 -0
- package/dist/tools/tool-set.js +244 -0
- package/dist/tools/tool-set.js.map +1 -0
- package/dist/tools/view-trip.d.ts +4 -0
- package/dist/tools/view-trip.d.ts.map +1 -0
- package/dist/tools/view-trip.js +7 -0
- package/dist/tools/view-trip.js.map +1 -0
- package/dist/tools.d.ts +13 -2089
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +11 -10685
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { DEFAULT_PAGE } from '../backend.js';
|
|
2
|
+
import { addDays } from '../dates.js';
|
|
3
|
+
import { regionOf } from '../regions.js';
|
|
4
|
+
import { branded } from '../vocab.js';
|
|
5
|
+
import { answerTool } from './answer.js';
|
|
6
|
+
import { place } from './args.js';
|
|
7
|
+
import { common } from './paid-lines.js';
|
|
8
|
+
import { guestsOf, sentence } from './request-words.js';
|
|
9
|
+
import { stayDefaultWords } from './room-choices.js';
|
|
10
|
+
import { degradedOf, quietIn } from './session-notes.js';
|
|
11
|
+
import { TONIGHT_PAGE_MAX } from './tool-set.js';
|
|
12
|
+
/** A list with no dates, where the home or a list is priced for tonight: that answer, with what it says first. */
|
|
13
|
+
export const pricedForTonight = async ({ deps, args, ctx, t, ask, asked, hotels, fitsOnePage, today, tonightLists, }) => {
|
|
14
|
+
if ((fitsOnePage || tonightLists) &&
|
|
15
|
+
!ask.stay &&
|
|
16
|
+
!ask.filters?.hourly &&
|
|
17
|
+
hotels.length &&
|
|
18
|
+
today?.min) {
|
|
19
|
+
const tonight = {
|
|
20
|
+
checkIn: today.min,
|
|
21
|
+
checkOut: addDays(today.min, 1),
|
|
22
|
+
guests: guestsOf(args),
|
|
23
|
+
};
|
|
24
|
+
const pageAsked = typeof args.limit === 'number' ? args.limit : DEFAULT_PAGE;
|
|
25
|
+
const tonightArgs = {
|
|
26
|
+
...args,
|
|
27
|
+
...tonight,
|
|
28
|
+
...(tonightLists ? { limit: Math.min(pageAsked, TONIGHT_PAGE_MAX) } : {}),
|
|
29
|
+
};
|
|
30
|
+
// Where the deployment is priced for tonight at any size, a list that could not be
|
|
31
|
+
// priced at all is the list as it was - never no list (a deployment of a few as before).
|
|
32
|
+
const priced = tonightLists
|
|
33
|
+
? await answerTool(deps, t.listHotels, tonightArgs, { ...ctx, pricePageOnly: true }).then((a) => (a.isError ? undefined : a), () => undefined)
|
|
34
|
+
: await answerTool(deps, t.listHotels, tonightArgs, ctx);
|
|
35
|
+
if (priced) {
|
|
36
|
+
// ⚠️ THE ROOMS ASKED FOR, not "one room" (2026-11-03 review, C12): `rooms: 2`
|
|
37
|
+
// rides along into the priced list, and every price in it is two rooms'.
|
|
38
|
+
const roomCount = ask.rooms ?? 1;
|
|
39
|
+
// In both, in the same words: the model reads the structure.
|
|
40
|
+
// ⚠️ TO A CLIENT THAT DRAWS NO CARD, THE OTHER NIGHTS ARE NAMED BY THEIR
|
|
41
|
+
// DATES (robin 11-06): the card has a date bar to change; in words it is
|
|
42
|
+
// the reply's first sentence - see `stayDefaultWords`.
|
|
43
|
+
const stayDefault = ctx.noCards
|
|
44
|
+
? stayDefaultWords(tonight.checkIn, tonight.guests, roomCount, 'hotels')
|
|
45
|
+
: `No dates were asked for, so this opens on tonight by default: ${tonight.checkIn} to ${tonight.checkOut} (one night, on the hotels' own date), ${tonight.guests} ${tonight.guests === 1 ? 'guest' : 'guests'}, ${roomCount === 1 ? 'one room' : `${roomCount} rooms`} - every price here is for that night. Say so: the prices shown are tonight's, and the guest can change the dates on the card or name others. Do not ask for dates before showing them.`;
|
|
46
|
+
// Right after what is here - "every one, and no others" stays the first thing said.
|
|
47
|
+
const inAll = String(priced.structured.inAll ?? '');
|
|
48
|
+
return {
|
|
49
|
+
...priced,
|
|
50
|
+
structured: { ...priced.structured, stayDefault },
|
|
51
|
+
text: inAll && priced.text.startsWith(inAll)
|
|
52
|
+
? `${inAll} ${stayDefault}${priced.text.slice(inAll.length)}`
|
|
53
|
+
: `${stayDefault}\n\n${priced.text}`,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
};
|
|
59
|
+
/** The whole deployment is one hotel: the home is that hotel's page. */
|
|
60
|
+
export const soleHotelAnswer = async ({ deps, ctx, t, ask, city, asked, hotels, total, stayArgs, choosing, }) => {
|
|
61
|
+
// ⚠️ ONE HOTEL IS NO CHOICE OF PLACES (robin, 2026-10-15: 「现在只有杭州一家
|
|
62
|
+
// 了,首页也要改」). Huazhu's test system has one hotel, and "where to?" over
|
|
63
|
+
// a search box, one city chip and "browse all 1 hotel" was a page of ways
|
|
64
|
+
// to the only thing there is. Where the whole deployment is one hotel -
|
|
65
|
+
// never a market, whose home is its groups - the home is that hotel's
|
|
66
|
+
// page: for the nights asked, or asking for them. `only` tells the card it
|
|
67
|
+
// is the home, so the home's own ways (my bookings, a booking by its code)
|
|
68
|
+
// stay on it.
|
|
69
|
+
const [sole] = hotels;
|
|
70
|
+
if (choosing && total === 1 && sole && !deps.backend.suppliers) {
|
|
71
|
+
const page = await answerTool(deps, t.getHotel, { hotel: sole.id, ...stayArgs }, ctx);
|
|
72
|
+
// ⚠️ NOT "THE ONLY ONE HERE": read as "in this list", it had the
|
|
73
|
+
// assistant ask which city to list the rest in (2026-10-15 smoke run).
|
|
74
|
+
// And not "tell me another city": the second run said there was one
|
|
75
|
+
// hotel, then offered to look in another city (2026-10-15).
|
|
76
|
+
const inAll = `There is one ${branded(deps.vocab, deps.vocab.noun)} here in all, ${sole.name}${sole.city ? ` in ${sole.city}` : ''}. There is no other hotel and no other city here - nothing else to search for or to offer.`;
|
|
77
|
+
return {
|
|
78
|
+
...page,
|
|
79
|
+
// In both, in the same words: a host may hand its model this rather
|
|
80
|
+
// than the text.
|
|
81
|
+
structured: { ...page.structured, only: true, inAll },
|
|
82
|
+
text: `${inAll} Its page:\n\n${page.text}`,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
};
|
|
87
|
+
/** Nothing named: the places to choose from, as regions, countries and cities. */
|
|
88
|
+
export const destinationsAnswer = ({ deps, ctx, key, ask, city, who, forPlans, answer, asked, hotels, total, cities, more, places, stayArgs, fromPricesOnly, namedCountry, choosing, today, }, facets) => {
|
|
89
|
+
const countries = facets.countries.map((c) => ({
|
|
90
|
+
name: c.name,
|
|
91
|
+
count: c.count,
|
|
92
|
+
...(c.code ? { code: c.code } : {}),
|
|
93
|
+
cities: facets.cities
|
|
94
|
+
.filter((x) => x.country === c.name)
|
|
95
|
+
.map((x) => ({ name: x.name, count: x.count, ...(x.names ? { names: x.names } : {}) })),
|
|
96
|
+
}));
|
|
97
|
+
// Every place, counted: a host with no card has only this sentence, and
|
|
98
|
+
// "the most are in" three of forty cities left the other thirty-seven
|
|
99
|
+
// for a guest to guess at.
|
|
100
|
+
const every = (xs) => xs.map((x) => `${x.name} (${x.count})`).join(', ');
|
|
101
|
+
// ⚠️ AND TO A CLIENT THAT DRAWS NO CARD, EVERY CITY (2026-11-02 audit,
|
|
102
|
+
// P3-2): told to name the places, a model had "China (54)" and nothing
|
|
103
|
+
// to name. A country of one city named like it says no more.
|
|
104
|
+
const everyWithCities = (xs) => xs
|
|
105
|
+
.map((c) => c.cities.length > 1 || (c.cities[0] && c.cities[0].name !== c.name)
|
|
106
|
+
? `${c.name} (${c.count}: ${c.cities.map((x) => `${x.name} ${x.count}`).join(', ')})`
|
|
107
|
+
: `${c.name} (${c.count})`)
|
|
108
|
+
.join(', ');
|
|
109
|
+
const n = deps.vocab.nounPlural;
|
|
110
|
+
// Places to choose from: a group that did not answer is a greyed chip, said only if asked
|
|
111
|
+
// (0.74.4) - with nothing to show, it is why, and said.
|
|
112
|
+
const degraded = degradedOf(deps, answer, undefined, ctx?.noCards, undefined, quietIn(deps, asked.filters?.supplier), total > 0);
|
|
113
|
+
if (namedCountry) {
|
|
114
|
+
const [only] = countries;
|
|
115
|
+
return {
|
|
116
|
+
structured: {
|
|
117
|
+
view: 'destinations',
|
|
118
|
+
...common(deps, key),
|
|
119
|
+
total,
|
|
120
|
+
scope: only,
|
|
121
|
+
ask: { city: asked.city, ...stayArgs },
|
|
122
|
+
...(ask.stay ? { stay: ask.stay } : {}),
|
|
123
|
+
...(today ? { today } : {}),
|
|
124
|
+
...degraded.structured,
|
|
125
|
+
},
|
|
126
|
+
text: `${total} ${branded(deps.vocab, n)} in ${only?.name}, in ${only?.cities.length} cities to choose from: ${every(only?.cities ?? [])}. A city lists its ${n}; \`all\` lists every one in ${only?.name}. ${degraded.said ? `${degraded.said} ` : ''}${forPlans}`,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
const regions = [
|
|
130
|
+
...countries
|
|
131
|
+
.reduce((acc, c) => {
|
|
132
|
+
const r = regionOf(c.name);
|
|
133
|
+
const at = acc.get(r) ?? { name: r, count: 0, countries: [] };
|
|
134
|
+
at.count += c.count;
|
|
135
|
+
at.countries.push(c);
|
|
136
|
+
return acc.set(r, at);
|
|
137
|
+
}, new Map())
|
|
138
|
+
.values(),
|
|
139
|
+
].sort((a, b) => b.count - a.count);
|
|
140
|
+
// The places page counts a group asked only with a place where it is known to have hotels (0.75.1).
|
|
141
|
+
const placesTotal = total + (answer.elsewhere ?? 0);
|
|
142
|
+
// ⚠️ ONE COUNTRY IS A CHOICE OF CITIES (robin 11-18, Huazhu's 88 in 32 cities, all in
|
|
143
|
+
// China: 「华住首页改成城市选择的吧」). "88 hotels in 32 cities across 1 country, to choose
|
|
144
|
+
// from by region, country and city - Asia: China (88)" named no city the guest could
|
|
145
|
+
// choose. Where a list is priced for tonight (`listsTonight`), every city, counted - with
|
|
146
|
+
// a card and without - and what choosing one does.
|
|
147
|
+
const cityHome = deps.backend.capabilities?.listsTonight === true &&
|
|
148
|
+
!deps.backend.suppliers &&
|
|
149
|
+
!deps.vocab.market &&
|
|
150
|
+
countries.length === 1 &&
|
|
151
|
+
facets.cities.length > 1;
|
|
152
|
+
return {
|
|
153
|
+
structured: {
|
|
154
|
+
view: 'destinations',
|
|
155
|
+
...common(deps, key),
|
|
156
|
+
total: placesTotal,
|
|
157
|
+
regions,
|
|
158
|
+
ask: { ...stayArgs },
|
|
159
|
+
...(ask.stay ? { stay: ask.stay } : {}),
|
|
160
|
+
...(today ? { today } : {}),
|
|
161
|
+
...(fromPricesOnly ? { fromPricesOnly: true } : {}),
|
|
162
|
+
// ⚠️ IN A MARKET, HOW MANY HOTELS EACH GROUP HAS HERE (11-03): the card
|
|
163
|
+
// says "from N groups" of the groups that have one - not of every group
|
|
164
|
+
// on the market's list, six of which may have none. Only the counts.
|
|
165
|
+
...(deps.backend.suppliers && answer.refine?.suppliers
|
|
166
|
+
? { refine: { suppliers: answer.refine.suppliers } }
|
|
167
|
+
: {}),
|
|
168
|
+
...degraded.structured,
|
|
169
|
+
},
|
|
170
|
+
// ⚠️ NOTHING TO SHOW IS SAID AS THAT (0.55.1), as the card says it: 「0 hotels in 0
|
|
171
|
+
// cities across 0 countries, to choose from by region, country and city - .」 was a
|
|
172
|
+
// home of places over none - Otaless on a backend with no group answering. Then the
|
|
173
|
+
// groups that did not answer, by name; no places, no plans.
|
|
174
|
+
text: total === 0
|
|
175
|
+
? `There are no ${n} to show right now.${degraded.said ? ` ${degraded.said}` : ''}`
|
|
176
|
+
: cityHome
|
|
177
|
+
? `${sentence(branded(deps.vocab, n))} in ${facets.cities.length} cities, to choose from by city: ${every(facets.cities)}. A city lists its ${n}, priced for tonight unless other nights are named; \`all\` lists every one, a page at a time - only for a guest who asked to see every one. ${degraded.said ? `${degraded.said} ` : ''}${forPlans}`
|
|
178
|
+
: `${sentence(branded(deps.vocab, n))} in ${facets.cities.length} cities across ${countries.length} ${countries.length === 1 ? 'country' : 'countries'}, to choose from by region, country and city - ${regions.map((r) => `${r.name}: ${ctx.noCards ? everyWithCities(r.countries) : every(r.countries)}`).join('; ')}. A city or a country lists its ${n}. ${degraded.said ? `${degraded.said} ` : ''}${forPlans}`,
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
//# sourceMappingURL=list-hotels-home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-hotels-home.js","sourceRoot":"","sources":["../../src/tools/list-hotels-home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa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GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,kBAAkB,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,kDAAkD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,mCAAmC,CAAC,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE;KAC3Z,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { HotelSort, Names } from '../types.js';
|
|
2
|
+
import type { ToolAnswer } from './deps.js';
|
|
3
|
+
import type { ListCx } from './list-hotels-ask.js';
|
|
4
|
+
/** The hotels listed: a card to draw, numbered lines for a client with none, and what is said of their prices. */
|
|
5
|
+
export declare const hotelsAnswer: (cx: ListCx) => Promise<ToolAnswer>;
|
|
6
|
+
/** What the prices of the list are, and what is said of them: the order, the currencies, the nights, the ceiling. */
|
|
7
|
+
export declare const priceFacts: ({ deps, ctx, ask, city, sort, ceiling, answer, asked, hotels, total, cities, more, fromPricesOnly, }: ListCx) => {
|
|
8
|
+
where: string;
|
|
9
|
+
inUsd: boolean;
|
|
10
|
+
applied: HotelSort;
|
|
11
|
+
fromOnlySaid: string;
|
|
12
|
+
unpricedSaid: string;
|
|
13
|
+
priceNotes: string[];
|
|
14
|
+
};
|
|
15
|
+
/** The unpaid and not-sold-here words, the numbered lines for a client with no card, and the dates said first. */
|
|
16
|
+
export declare const listedChoices: ({ deps, ctx, ask, asked, hotels, offset, more, today }: ListCx, priceNotes: ReturnType<typeof priceFacts>["priceNotes"]) => {
|
|
17
|
+
unpaidHere: string;
|
|
18
|
+
notSold: string;
|
|
19
|
+
notBookable: string;
|
|
20
|
+
hotelChoices: string;
|
|
21
|
+
fromPrices: string;
|
|
22
|
+
weekend: string;
|
|
23
|
+
};
|
|
24
|
+
/** The groups that did not answer, the place not recognised, the sentence for the home, and every city of the deployment. */
|
|
25
|
+
export declare const degradedAndCities: ({ deps, ctx, t, ask, city, who, answer, asked, marketCities, hotels, cities, more, unnarrowed, homeList, }: ListCx) => Promise<{
|
|
26
|
+
degraded: {
|
|
27
|
+
structured: Record<string, unknown>;
|
|
28
|
+
said: string;
|
|
29
|
+
};
|
|
30
|
+
unplaced: {
|
|
31
|
+
structured: Record<string, unknown>;
|
|
32
|
+
said: string;
|
|
33
|
+
};
|
|
34
|
+
inAll: string;
|
|
35
|
+
factsNote: string;
|
|
36
|
+
allCities: {
|
|
37
|
+
name: string;
|
|
38
|
+
country?: string;
|
|
39
|
+
count: number;
|
|
40
|
+
names?: Names;
|
|
41
|
+
}[];
|
|
42
|
+
}>;
|
|
43
|
+
//# sourceMappingURL=list-hotels-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-hotels-page.d.ts","sourceRoot":"","sources":["../../src/tools/list-hotels-page.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAuB,SAAS,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAenD,kHAAkH;AAClH,eAAO,MAAM,YAAY,GAAU,IAAI,MAAM,KAAG,OAAO,CAAC,UAAU,CAMjE,CAAC;AAiCF,qHAAqH;AACrH,eAAO,MAAM,UAAU,GAAI,sGAcxB,MAAM;;;;;;;CA6HR,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,aAAa,GACxB,wDAAwD,MAAM,EAC9D,YAAY,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,YAAY,CAAC;;;;;;;CA0ExD,CAAC;AAEF,6HAA6H;AAC7H,eAAO,MAAM,iBAAiB,GAAU,4GAerC,MAAM;;;;;;;;;;;;;;;;;EA8CR,CAAC"}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { FULL_CAPABILITIES, unpaidBookingNote } from '../backend.js';
|
|
2
|
+
import { stayDayWords, weekendOf, weekendWords } from '../dates.js';
|
|
3
|
+
import { DESCRIPTION_MAX, hotelName, hotelText } from '../fence.js';
|
|
4
|
+
import { formatMoney } from '../money.js';
|
|
5
|
+
import { branded } from '../vocab.js';
|
|
6
|
+
import { place } from './args.js';
|
|
7
|
+
import { filterWords, refineFor } from './current-trip.js';
|
|
8
|
+
import { LIST_NOT_DRAWN, ON_CARD } from './follow-ups.js';
|
|
9
|
+
import { fromPricesWords, hotelChoicesBlock } from './hotel-choices.js';
|
|
10
|
+
import { common } from './paid-lines.js';
|
|
11
|
+
import { NOT_NO_ROOM, NOT_SOLD_OUT, OWN_WHY, groupNameOf, notBookableOf, notSoldHereWords, sentence, unpaidBookingWords, } from './request-words.js';
|
|
12
|
+
import { idsByNumber, todayOfHotel } from './room-choices.js';
|
|
13
|
+
import { degradedOf, quietIn, unplacedOf } from './session-notes.js';
|
|
14
|
+
/** The hotels listed: a card to draw, numbered lines for a client with none, and what is said of their prices. */
|
|
15
|
+
export const hotelsAnswer = async (cx) => {
|
|
16
|
+
const forCard = hotelsForCard(cx.hotels);
|
|
17
|
+
const price = priceFacts(cx);
|
|
18
|
+
const listing = listedChoices(cx, price.priceNotes);
|
|
19
|
+
const tail = await degradedAndCities(cx);
|
|
20
|
+
return hotelsPage(cx, { forCard, price, listing, tail });
|
|
21
|
+
};
|
|
22
|
+
/** Each hotel as the card holds it, with the lowest price marked. */
|
|
23
|
+
const hotelsForCard = (hotels) => {
|
|
24
|
+
// ⚠️ THE CHEAPEST, SAID BY US - the card never compares two prices it was
|
|
25
|
+
// handed as text. Only on named nights, in one currency, with two or more
|
|
26
|
+
// priced to compare; every hotel that ties is marked (总线程, 2026-10-12).
|
|
27
|
+
// A room by the hour is priced for its own hours, and is not in the race.
|
|
28
|
+
const stays = hotels.filter((h) => h.forStay && !h.forStay.hours);
|
|
29
|
+
const lowest = stays.length >= 2 && new Set(stays.map((h) => h.forStay?.total.currency)).size === 1
|
|
30
|
+
? Math.min(...stays.map((h) => h.forStay?.total.minor ?? Number.POSITIVE_INFINITY))
|
|
31
|
+
: undefined;
|
|
32
|
+
const forCard = hotels.map((h) => ({
|
|
33
|
+
...h,
|
|
34
|
+
...(lowest !== undefined && h.forStay && !h.forStay.hours && h.forStay.total.minor === lowest
|
|
35
|
+
? { lowest: true }
|
|
36
|
+
: {}),
|
|
37
|
+
summary: hotelText('description', h.name, h.summary, DESCRIPTION_MAX).text,
|
|
38
|
+
fromNightly: h.fromNightly ? formatMoney(h.fromNightly) : undefined,
|
|
39
|
+
...(h.forStay
|
|
40
|
+
? {
|
|
41
|
+
forStay: {
|
|
42
|
+
...h.forStay,
|
|
43
|
+
total: formatMoney(h.forStay.total),
|
|
44
|
+
nightly: formatMoney(h.forStay.nightly),
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
: {}),
|
|
48
|
+
}));
|
|
49
|
+
return forCard;
|
|
50
|
+
};
|
|
51
|
+
/** What the prices of the list are, and what is said of them: the order, the currencies, the nights, the ceiling. */
|
|
52
|
+
export const priceFacts = ({ deps, ctx, ask, city, sort, ceiling, answer, asked, hotels, total, cities, more, fromPricesOnly, }) => {
|
|
53
|
+
// The whole shortlist, never one pick: a city is not a hotel.
|
|
54
|
+
const where = cities.length === 1 ? ` in ${cities[0]}` : '';
|
|
55
|
+
// ⚠️ A PRICE KNOB ACROSS CURRENCIES IS DROPPED, AND SAYING SO IS THE WHOLE
|
|
56
|
+
// POINT. Applied silently it would be an exchange rate we picked; dropped
|
|
57
|
+
// silently it would be a list the guest reads as ordered by price when it
|
|
58
|
+
// is not. The currencies are named, because that is what tells a guest
|
|
59
|
+
// which narrowing would make the question answerable.
|
|
60
|
+
const oneCurrency = answer.currencies.length === 1;
|
|
61
|
+
const wantedPrice = sort === 'price-low' || sort === 'price-high';
|
|
62
|
+
// …UNLESS THE BACKEND ORDERS THEM BY ONE CURRENCY THEY ARE ALL WORTH (0.68.0, robin
|
|
63
|
+
// 11-12 - Otaless, by the US dollars it settles in): then the order is applied and
|
|
64
|
+
// said as what it is by; the prices are still each hotel's own.
|
|
65
|
+
const inUsd = !oneCurrency && answer.priceOrderIn === 'USD';
|
|
66
|
+
const applied = (wantedPrice && !oneCurrency && !inUsd) || answer.ignored?.sort ? 'group' : sort;
|
|
67
|
+
// Room terms the backend could not apply are not "filtered to".
|
|
68
|
+
const filtersSaid = asked.filters && answer.ignored?.roomTerms
|
|
69
|
+
? { ...asked.filters, freeCancellation: undefined, breakfast: undefined, bed: undefined }
|
|
70
|
+
: asked.filters;
|
|
71
|
+
// ⚠️ IN BOTH (0.69.1, 总线程 11-12 on claude.ai): dated, and only from-prices back -
|
|
72
|
+
// the sentence was in the text alone, and a host that hands its model the
|
|
73
|
+
// structure (claude.ai) had `fromPricesOnly: true` and no word of what it means.
|
|
74
|
+
// `fromPricesSaid` is the same sentence.
|
|
75
|
+
// ⚠️ A HOTEL NOT PRICED FOR THE NIGHTS SAYS SO, BY NAME (0.76.1, 总线程 11-18 - Otaless prices a
|
|
76
|
+
// dated list's page; the review of 11-18, H1: a from-price beside stays' totals, the same size,
|
|
77
|
+
// read as one): what it shows is its from-price a night. In both, in the same words.
|
|
78
|
+
const stayPriced = hotels.some((h) => h.forStay);
|
|
79
|
+
const unpriced = ask.stay ? hotels.filter((h) => h.stayUnpriced) : [];
|
|
80
|
+
const unpricedSaid = unpriced.length && !fromPricesOnly
|
|
81
|
+
? `${unpriced.length === 1 ? 'One' : unpriced.length} of these could not be priced for those nights just now: ${unpriced
|
|
82
|
+
.map((h) => hotelName(h.name))
|
|
83
|
+
.join('; ')}. ${unpriced.length === 1 ? 'Its price is its' : 'Their prices are their'} from-price a night, not a total for those nights - say so, and do not quote ${unpriced.length === 1 ? 'it' : 'them'} as one; ${unpriced.length === 1 ? 'its' : "each one's"} own page prices it for the nights.`
|
|
84
|
+
: '';
|
|
85
|
+
const fromOnlySaid = ask.stay && fromPricesOnly
|
|
86
|
+
? `No price for ${ctx.noCards
|
|
87
|
+
? `${stayDayWords(ask.stay.checkIn, ask.stay.checkOut)} - ${ask.stay.checkIn} to ${ask.stay.checkOut} (open your reply with those nights in one sentence, by weekday and date) -`
|
|
88
|
+
: `${ask.stay.checkIn} to ${ask.stay.checkOut}`} is available here: each price is the ${deps.vocab.noun}'s from-price a night, not a total for the stay. Say so; do not quote a stay total.`
|
|
89
|
+
: '';
|
|
90
|
+
const priceNotes = [
|
|
91
|
+
// What the backend was asked and did not do, in its own words.
|
|
92
|
+
...(answer.unapplied ?? []),
|
|
93
|
+
wantedPrice && !oneCurrency
|
|
94
|
+
? inUsd
|
|
95
|
+
? `In price order, ${sort === 'price-low' ? 'lowest' : 'highest'} first, by each ${deps.vocab.noun}'s price in US dollars as the hotel groups give it. The prices here are each ${deps.vocab.noun}'s own, in ${answer.currencies.join(', ')}: quote them as they are, never converted.`
|
|
96
|
+
: `These are quoted in ${answer.currencies.length} currencies (${answer.currencies.join(', ')}), and no rate is applied here, so they are not in price order — one city or one country gives one currency.`
|
|
97
|
+
: // How a client with no card puts them in price order: it has no Sort to press.
|
|
98
|
+
inUsd && ctx?.noCards && hotels.length > 1
|
|
99
|
+
? `These are quoted in ${answer.currencies.join(', ')}; asked again with \`sort: "price-low"\` or \`"price-high"\` they are put in price order by each ${deps.vocab.noun}'s price in US dollars, the prices still shown in their own currencies.`
|
|
100
|
+
: '',
|
|
101
|
+
ceiling !== undefined && !oneCurrency
|
|
102
|
+
? inUsd
|
|
103
|
+
? 'The price ceiling is not applied: it is only applied within one currency.'
|
|
104
|
+
: 'The price ceiling is not applied for the same reason.'
|
|
105
|
+
: '',
|
|
106
|
+
answer.overBudget && hotels.length
|
|
107
|
+
? `${answer.overBudget} more matched and came in over the ceiling.`
|
|
108
|
+
: '',
|
|
109
|
+
filtersSaid && filterWords(filtersSaid) ? `Filtered to ${filterWords(filtersSaid)}.` : '',
|
|
110
|
+
// ⚠️ THE SAME ROOMS ON THE HOTEL OPENED FROM IT (0.55.7, 总线程 11-05): a list with
|
|
111
|
+
// free cancellation on priced each hotel at its cheapest free-to-cancel room, and
|
|
112
|
+
// the hotel asked without it opened at a cheaper one that cannot be cancelled. The
|
|
113
|
+
// card's own press carries them; the model is told to, as one line.
|
|
114
|
+
filtersSaid && (filtersSaid.freeCancellation || filtersSaid.breakfast || filtersSaid.bed)
|
|
115
|
+
? `To open one of these, pass ${[
|
|
116
|
+
filtersSaid.freeCancellation ? '`freeCancellation`' : '',
|
|
117
|
+
filtersSaid.breakfast ? '`breakfast`' : '',
|
|
118
|
+
filtersSaid.bed ? `\`bed: "${filtersSaid.bed}"\`` : '',
|
|
119
|
+
]
|
|
120
|
+
.filter(Boolean)
|
|
121
|
+
.join(' and ')} to ${deps.tools.getHotel} too, so its rooms are priced as here.`
|
|
122
|
+
: '',
|
|
123
|
+
// What the prices on a dated list are, in one line - and how many cannot
|
|
124
|
+
// be had at all, so a sold-out hotel is not described as a choice.
|
|
125
|
+
ask.filters?.hourly && hotels.some((h) => h.forStay?.hours)
|
|
126
|
+
? `By the hour, today: each price is that ${deps.vocab.noun}'s cheapest room by the hour, for its hours, taxes included.`
|
|
127
|
+
: fromOnlySaid
|
|
128
|
+
? fromOnlySaid
|
|
129
|
+
: ask.stay
|
|
130
|
+
? `${
|
|
131
|
+
// Nothing priced for the stay here is not "priced for" it (0.76.1).
|
|
132
|
+
stayPriced || !unpriced.length ? 'Priced for' : 'Asked for'} ${
|
|
133
|
+
// ⚠️ THE NIGHTS BY THEIR WEEKDAYS, SAID FIRST (总线程 11-09, Manus: a
|
|
134
|
+
// list for 「这周末」 came back and the reply never said which nights).
|
|
135
|
+
ctx.noCards
|
|
136
|
+
? `${stayDayWords(ask.stay.checkIn, ask.stay.checkOut)} - ${ask.stay.checkIn} to ${ask.stay.checkOut}, ${ask.stay.guests} ${ask.stay.guests === 1 ? 'guest' : 'guests'} (open your reply with those nights in one sentence, by weekday and date)`
|
|
137
|
+
: `${ask.stay.checkIn} to ${ask.stay.checkOut}`}${ask.rooms && ask.rooms > 1 ? `, ${ask.rooms} rooms` : ''}: ${[
|
|
138
|
+
stayPriced || !unpriced.length
|
|
139
|
+
? `each price is that ${deps.vocab.noun}'s cheapest room for the whole stay, taxes included`
|
|
140
|
+
: '',
|
|
141
|
+
hotels.some((h) => h.noRoomsForStay && !NOT_NO_ROOM.has(h.noRoomsForStayCode ?? ''))
|
|
142
|
+
? `${hotels.filter((h) => h.noRoomsForStay && !NOT_NO_ROOM.has(h.noRoomsForStayCode ?? '')).length} in this answer ${hotels.filter((h) => h.noRoomsForStay && !NOT_NO_ROOM.has(h.noRoomsForStayCode ?? '')).length === 1 ? 'has' : 'have'} no room for those nights`
|
|
143
|
+
: '',
|
|
144
|
+
// The other kind, said as its own (U11): other nights will not help.
|
|
145
|
+
hotels.some((h) => h.noRoomsForStayCode === 'none-on-sale')
|
|
146
|
+
? `${hotels.filter((h) => h.noRoomsForStayCode === 'none-on-sale').length} in this answer ${hotels.filter((h) => h.noRoomsForStayCode === 'none-on-sale').length === 1 ? 'has' : 'have'} no rooms on sale here - ${NOT_SOLD_OUT}`
|
|
147
|
+
: '',
|
|
148
|
+
// ⚠️ AND A GROUP THAT DID NOT ANSWER IS NOT "NO ROOM" (总线程 11-13): the
|
|
149
|
+
// hotel's prices could not be read this time - its own page asks again.
|
|
150
|
+
hotels.some((h) => h.noRoomsForStay && h.noRoomsForStayCode === 'unreachable')
|
|
151
|
+
? `${hotels.filter((h) => h.noRoomsForStay && h.noRoomsForStayCode === 'unreachable').length} in this answer could not be priced just now - ${hotels.filter((h) => h.noRoomsForStay && h.noRoomsForStayCode === 'unreachable').length === 1 ? 'its group did not answer, which does not mean it has' : 'their group did not answer, which does not mean they have'} no room`
|
|
152
|
+
: '',
|
|
153
|
+
// Each of the other whys by itself, never as no room (review of 0.71.0, P3 4).
|
|
154
|
+
...Object.entries(OWN_WHY).map(([code, w]) => {
|
|
155
|
+
const n = hotels.filter((h) => h.noRoomsForStay && h.noRoomsForStayCode === code).length;
|
|
156
|
+
return n ? w.many(n) : '';
|
|
157
|
+
}),
|
|
158
|
+
]
|
|
159
|
+
.filter(Boolean)
|
|
160
|
+
.join('; ')}.`
|
|
161
|
+
: '',
|
|
162
|
+
unpricedSaid,
|
|
163
|
+
].filter(Boolean);
|
|
164
|
+
return { where, inUsd, applied, fromOnlySaid, unpricedSaid, priceNotes };
|
|
165
|
+
};
|
|
166
|
+
/** The unpaid and not-sold-here words, the numbered lines for a client with no card, and the dates said first. */
|
|
167
|
+
export const listedChoices = ({ deps, ctx, ask, asked, hotels, offset, more, today }, priceNotes) => {
|
|
168
|
+
// A price on the list that is not booked here (`notSoldHere`): said as on
|
|
169
|
+
// the hotel's page, in both - see `notSoldHereWords`. ⚠️ NOT FIRST ANY MORE (0.75.1,
|
|
170
|
+
// robin 11-18): 0.58.2 had a list whose every price was one say so before the list
|
|
171
|
+
// (总线程 11-09, Manus: 「选最便宜那个」 met "it cannot be booked here" and nothing more);
|
|
172
|
+
// now it is said when the guest wants one, with the ways on - as on the hotel's page.
|
|
173
|
+
// …and a price paid in advance that IS booked here, without payment (0.77.5).
|
|
174
|
+
const unpaidOn = hotels.find((h) => h.forStay?.paymentNotConnected);
|
|
175
|
+
// …and, where the deployment books some hotels so and one of them is listed, that
|
|
176
|
+
// one sentence whether or not a priced rate is among its rows (0.77.6): the first thing
|
|
177
|
+
// a model read said "paid at the hotel" of the whole connector.
|
|
178
|
+
const unpaidListed = (deps.backend.capabilities ?? FULL_CAPABILITIES).unpaidBooking?.hotels.filter((u) => hotels.some((h) => h.id === u.id));
|
|
179
|
+
const unpaidHere = [
|
|
180
|
+
unpaidListed?.length
|
|
181
|
+
? unpaidBookingNote(groupNameOf(deps, unpaidListed[0]?.id ?? ''), unpaidListed)
|
|
182
|
+
: '',
|
|
183
|
+
unpaidOn ? unpaidBookingWords(groupNameOf(deps, unpaidOn.id)) : '',
|
|
184
|
+
]
|
|
185
|
+
.filter(Boolean)
|
|
186
|
+
.join(' ');
|
|
187
|
+
const notSoldOn = hotels.find((h) => h.forStay?.notSoldHere);
|
|
188
|
+
const notSold = notSoldOn ? notSoldHereWords(groupNameOf(deps, notSoldOn.id), !!unpaidOn) : '';
|
|
189
|
+
// To a client that draws no card, the hotels as numbered lines - numbered
|
|
190
|
+
// across pages, so "the 23rd" on the second page is still one hotel. In the
|
|
191
|
+
// text and, word for word, in the structure (`hotelChoices`).
|
|
192
|
+
const notBookable = notBookableOf(deps);
|
|
193
|
+
const listed = ctx.noCards && hotels.length
|
|
194
|
+
? hotelChoicesBlock(hotels, offset, (h) => {
|
|
195
|
+
const id = deps.backend.supplierOf?.(h.id);
|
|
196
|
+
return id ? deps.backend.suppliers?.().find((g) => g.id === id) : undefined;
|
|
197
|
+
}, groupNameOf(deps, (notSoldOn ?? hotels[0]).id), !!notBookable)
|
|
198
|
+
: undefined;
|
|
199
|
+
const hotelChoices = listed
|
|
200
|
+
? [
|
|
201
|
+
...(listed.said ? [listed.said, ''] : []),
|
|
202
|
+
listed.blocks.join('\n\n'),
|
|
203
|
+
'',
|
|
204
|
+
idsByNumber('Hotel', hotels.map((h) => h.id), offset + 1, listed.notes),
|
|
205
|
+
].join('\n')
|
|
206
|
+
: '';
|
|
207
|
+
// …and, asked without dates, what its prices are - first of the notes.
|
|
208
|
+
const fromPrices = ctx.noCards && hotels.length && !ask.stay && !ask.filters?.hourly
|
|
209
|
+
? fromPricesWords(today?.min ?? todayOfHotel(hotels[0], deps.trips.now()))
|
|
210
|
+
: '';
|
|
211
|
+
if (fromPrices)
|
|
212
|
+
priceNotes.unshift(fromPrices);
|
|
213
|
+
// ⚠️ 「这周末」 WORKED OUT AS SATURDAY NIGHT (总线程 11-09) is said first, in
|
|
214
|
+
// both - see `weekendOf`.
|
|
215
|
+
const weekendFor = ask.stay && !ask.filters?.hourly && hotels.length
|
|
216
|
+
? weekendOf(ask.stay.checkIn, ask.stay.checkOut, today?.min ?? todayOfHotel(hotels[0], deps.trips.now()))
|
|
217
|
+
: null;
|
|
218
|
+
const weekend = weekendFor ? weekendWords(weekendFor) : '';
|
|
219
|
+
if (weekend)
|
|
220
|
+
priceNotes.unshift(weekend);
|
|
221
|
+
return { unpaidHere, notSold, notBookable, hotelChoices, fromPrices, weekend };
|
|
222
|
+
};
|
|
223
|
+
/** The groups that did not answer, the place not recognised, the sentence for the home, and every city of the deployment. */
|
|
224
|
+
export const degradedAndCities = async ({ deps, ctx, t, ask, city, who, answer, asked, marketCities, hotels, cities, more, unnarrowed, homeList, }) => {
|
|
225
|
+
// Every one by name and city, and that there are no others - or, told
|
|
226
|
+
// only "2 hotels", the model asked for the list again to learn which.
|
|
227
|
+
// Hotels to show: a group that did not answer is a greyed chip, said only if asked (0.74.4).
|
|
228
|
+
const degraded = degradedOf(deps, answer, undefined, ctx?.noCards, undefined, quietIn(deps, asked.filters?.supplier), true);
|
|
229
|
+
const unplaced = unplacedOf(deps, answer, !!asked.city);
|
|
230
|
+
const inAll = homeList
|
|
231
|
+
? `This answer lists every one of the ${branded(deps.vocab, deps.vocab.nounPlural)} here: ${hotels
|
|
232
|
+
.map((h) => `${hotelName(h.name)}${h.city ? ` in ${h.city}` : ''}`)
|
|
233
|
+
.join('; ')}. There is no other ${deps.vocab.noun} and no other city here - nothing else to list, search for or offer.`
|
|
234
|
+
: '';
|
|
235
|
+
// ⚠️ EVERY LIST HAS A CITY FIELD (robin, 2026-10-30: 「亚朵上面的筛选有城市选择,
|
|
236
|
+
// 华住的没有掉了」), AND IT IS THE SAME FIELD EVERYWHERE (robin, 2026-10-30, 0.51.4:
|
|
237
|
+
// 「华住和亚朵这个all,逻辑不一样」). The card's field is a menu of the
|
|
238
|
+
// deployment's cities - a group of two as a group of ninety-six; it went to
|
|
239
|
+
// the destinations page where there were more than six. A list narrowed to
|
|
240
|
+
// one still names the others. Counted across the whole deployment: the
|
|
241
|
+
// unnarrowed answer's own, or the catalogue asked once more with nothing (no
|
|
242
|
+
// nights, so nothing is priced). Names and counts only, never a hotel - and
|
|
243
|
+
// for the card only: the server puts it beside the answer (`CITIES_META_KEY`).
|
|
244
|
+
// ⚠️ A MARKET'S TOO (0.68.0, robin 11-12): with none, its 「全部 ▾」 went to the
|
|
245
|
+
// destinations page - 「全部」 answered with the home. Asked beside the search
|
|
246
|
+
// (`marketCities`); one that fails leaves the field going to the destinations page,
|
|
247
|
+
// as before, and the list is answered all the same.
|
|
248
|
+
// ⚠️ A HOTEL'S PHONE, OPENING YEAR AND ROOM COUNT ARE NOT IN A LIST (0.77.3, Manus 11-19 went to
|
|
249
|
+
// Ctrip for them): they come with that hotel's own answer - said once, where the group has them.
|
|
250
|
+
const factsNote = deps.backend.capabilities?.hotelFacts && hotels.length
|
|
251
|
+
? `A hotel's phone number, the year it opened and its room count come with that hotel's own answer (\`${t.getHotel}\`): ask for that hotel, never the web.`
|
|
252
|
+
: '';
|
|
253
|
+
const allCities = unnarrowed
|
|
254
|
+
? (answer.facets?.cities ?? [])
|
|
255
|
+
: marketCities
|
|
256
|
+
? await marketCities
|
|
257
|
+
: ((await deps.backend.searchHotels({}, who)).facets?.cities ?? []);
|
|
258
|
+
return { degraded, unplaced, inAll, factsNote, allCities };
|
|
259
|
+
};
|
|
260
|
+
/** The answer for a list of hotels: the card's structure and the words. */
|
|
261
|
+
const hotelsPage = ({ deps, ctx, key, ask, query, city, forPlans, answer, asked, widened, hotels, offset, total, cities, more, places, fromPricesOnly, echo, homeList, }, { forCard, price: { where, inUsd, applied, fromOnlySaid, unpricedSaid, priceNotes }, listing: { unpaidHere, notSold, notBookable, hotelChoices, fromPrices, weekend }, tail: { degraded, unplaced, inAll, factsNote, allCities }, }) => {
|
|
262
|
+
return {
|
|
263
|
+
structured: {
|
|
264
|
+
view: 'hotels',
|
|
265
|
+
...common(deps, key),
|
|
266
|
+
// The home, as a list - see `homeList`. The same sentence as the text.
|
|
267
|
+
...(homeList ? { home: true, inAll } : {}),
|
|
268
|
+
...(allCities.length
|
|
269
|
+
? {
|
|
270
|
+
allCities: allCities.map((c) => ({
|
|
271
|
+
name: c.name,
|
|
272
|
+
count: c.count,
|
|
273
|
+
...(c.names ? { names: c.names } : {}),
|
|
274
|
+
})),
|
|
275
|
+
}
|
|
276
|
+
: {}),
|
|
277
|
+
hotels: forCard,
|
|
278
|
+
total,
|
|
279
|
+
shown: hotels.length,
|
|
280
|
+
offset,
|
|
281
|
+
cities,
|
|
282
|
+
query,
|
|
283
|
+
sort: applied,
|
|
284
|
+
// The search as asked, so "show more" is this search's next page and
|
|
285
|
+
// not a new one - and a place chip keeps the order the guest chose.
|
|
286
|
+
ask: echo(applied),
|
|
287
|
+
...(ask.stay ? { stay: ask.stay } : {}),
|
|
288
|
+
...(weekend ? { weekend } : {}),
|
|
289
|
+
...(fromPricesOnly ? { fromPricesOnly: true } : {}),
|
|
290
|
+
...(fromOnlySaid ? { fromPricesSaid: fromOnlySaid } : {}),
|
|
291
|
+
// The hotels not priced for the nights, by name - the same sentence as the text (0.76.1).
|
|
292
|
+
...(unpricedSaid ? { stayUnpricedSaid: unpricedSaid } : {}),
|
|
293
|
+
...(answer.refine
|
|
294
|
+
? { refine: refineFor(answer.refine, asked.filters, total, !!ask.stay) }
|
|
295
|
+
: {}),
|
|
296
|
+
...(places.length ? { places } : {}),
|
|
297
|
+
...(answer.overBudget ? { overBudget: answer.overBudget } : {}),
|
|
298
|
+
...(widened?.found ? { widened } : {}),
|
|
299
|
+
...(answer.currencies.length > 1 ? { currencies: answer.currencies } : {}),
|
|
300
|
+
// A price order across them is by US dollars here (0.68.0) - the card offers it and says so.
|
|
301
|
+
...(inUsd ? { priceOrderIn: 'USD' } : {}),
|
|
302
|
+
// A group that did not answer, in both: the card draws a line from it.
|
|
303
|
+
...degraded.structured,
|
|
304
|
+
// A place not recognised, in both: the card heads the list without it.
|
|
305
|
+
...unplaced.structured,
|
|
306
|
+
// In both, like a plan's: a host with no card may hand its model this
|
|
307
|
+
// rather than the text.
|
|
308
|
+
...(ctx.noCards ? { notDrawn: LIST_NOT_DRAWN } : {}),
|
|
309
|
+
...(hotelChoices ? { hotelChoices } : {}),
|
|
310
|
+
...(factsNote ? { hotelFactsNote: factsNote } : {}),
|
|
311
|
+
...(fromPrices ? { stayDefault: fromPrices } : {}),
|
|
312
|
+
...(ctx.drawsCards && hotels.length ? { cardShows: ON_CARD.hotels } : {}),
|
|
313
|
+
...(unpaidHere ? { bookedWithoutPayment: unpaidHere } : {}),
|
|
314
|
+
...(notSold ? { notSoldHere: notSold } : {}),
|
|
315
|
+
...(notBookable ? { notBookable } : {}),
|
|
316
|
+
},
|
|
317
|
+
text: [
|
|
318
|
+
inAll ||
|
|
319
|
+
`${total} ${branded(deps.vocab, total === 1 ? deps.vocab.noun : deps.vocab.nounPlural)}${where}.`,
|
|
320
|
+
unplaced.said,
|
|
321
|
+
// ⚠️ NO "BELOW", NO "TAP". This sentence is read out by a voice
|
|
322
|
+
// assistant as often as it is drawn next to a card, and a guest whose
|
|
323
|
+
// host has no card at all cannot tap the one it tells them to tap. The
|
|
324
|
+
// count and the name of the next step say the same thing everywhere.
|
|
325
|
+
more > 0
|
|
326
|
+
? `— ${offset ? `${offset + 1} to ${offset + hotels.length}` : hotels.length} in this answer and ${more} more. A city, a country or a filter narrows it; \`offset\` ${offset + hotels.length} is the next page.`
|
|
327
|
+
: '',
|
|
328
|
+
notBookable,
|
|
329
|
+
...priceNotes,
|
|
330
|
+
widened?.found ? `Nothing matched ${widened.from}, so this is ${widened.to}.` : '',
|
|
331
|
+
degraded.said,
|
|
332
|
+
hotelChoices ? `\n${LIST_NOT_DRAWN}\n${hotelChoices}\n` : '',
|
|
333
|
+
// After the hotels, never before them: for when the guest wants one (0.75.1).
|
|
334
|
+
unpaidHere,
|
|
335
|
+
notSold,
|
|
336
|
+
factsNote,
|
|
337
|
+
ctx.drawsCards && hotels.length ? ON_CARD.hotels : '',
|
|
338
|
+
forPlans,
|
|
339
|
+
]
|
|
340
|
+
.filter(Boolean)
|
|
341
|
+
.join(' '),
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
//# sourceMappingURL=list-hotels-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-hotels-page.js","sourceRoot":"","sources":["../../src/tools/list-hotels-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,WAAW,EACX,YAAY,EACZ,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,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