mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 05:21:15 +00:00
feat(collections): "want to revisit" status for saved places (#2567)
A fourth status after visited, for a place already seen that the user wants to go back to. It joins the one-tap cycle, the filters, the pickers, the assistant cards and the MCP status tool, and counts as visited wherever visits are counted (isVisitedCollectionStatus), so "visited everywhere" keeps it. The status pickers go two by two where four would not fit.
This commit is contained in:
@@ -61,7 +61,7 @@ export function statusArg(value: unknown): CollectionStatus | null {
|
||||
|
||||
/** The places of a whole list by status. */
|
||||
export function tally(places: readonly Row[]): NonNullable<CollectionCardList['counts']> {
|
||||
const counts = { idea: 0, want: 0, visited: 0 };
|
||||
const counts = { idea: 0, want: 0, visited: 0, revisit: 0 };
|
||||
for (const place of places) counts[statusOf(place.status)] += 1;
|
||||
return counts;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,8 @@ export class CollectionsMcp {
|
||||
|
||||
@Tool({
|
||||
name: 'set_collection_place_status',
|
||||
description: "Set a saved place's status: idea, want, or visited.",
|
||||
description:
|
||||
"Set a saved place's status: idea, want, visited, or revisit (been there and wants to go back; it counts as visited).",
|
||||
inputSchema: { placeId: idSchema, status: z.enum(COLLECTION_STATUSES) },
|
||||
annotations: TOOL_ANNOTATIONS_WRITE,
|
||||
when: collectionsAddonOn,
|
||||
|
||||
Reference in New Issue
Block a user