mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 16:33:16 +00:00
fix(assistant): load the from-photos journey tools with the journey group
JourneyEntriesFromPhotosMcp was in no tool group, so the assistant offered both tools as core on every step of every chat, and its write was not held to the journey like the other journal writes.
This commit is contained in:
@@ -30,7 +30,10 @@ export interface JourneyOffer {
|
||||
surface: AssistantJourneySurface;
|
||||
}
|
||||
|
||||
/** The controllers of the journal: the journey and its entries, its map and tracks, its recorded days and imports. */
|
||||
/**
|
||||
* The controllers of the journal: the journey and its entries, its map and
|
||||
* tracks, its recorded days and imports, and the drafts made from its photos.
|
||||
*/
|
||||
const JOURNAL_CONTROLLERS: ReadonlySet<string> = new Set([
|
||||
'JourneyMcp',
|
||||
'JourneyPhotoLinksMcp',
|
||||
@@ -38,6 +41,7 @@ const JOURNAL_CONTROLLERS: ReadonlySet<string> = new Set([
|
||||
'JourneyTracksMcp',
|
||||
'JourneyRecordingsMcp',
|
||||
'JourneyDayImportMcp',
|
||||
'JourneyEntriesFromPhotosMcp',
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
@@ -246,6 +246,7 @@ const JOURNEY_WRITE_CONTROLLERS: ReadonlySet<string> = new Set([
|
||||
'JourneyRecordingsMcp',
|
||||
'JourneyDayImportMcp',
|
||||
'JourneySocialMcp',
|
||||
'JourneyEntriesFromPhotosMcp',
|
||||
'TripJournalLinkMcp',
|
||||
]);
|
||||
|
||||
@@ -396,6 +397,7 @@ const CORE_TOOL_GROUPS: ToolGroups = {
|
||||
'JourneyRecordingsMcp',
|
||||
'JourneyDayImportMcp',
|
||||
'JourneySocialMcp',
|
||||
'JourneyEntriesFromPhotosMcp',
|
||||
'TripJournalLinkMcp',
|
||||
'MemoriesMcp',
|
||||
'DawarichMcp',
|
||||
|
||||
@@ -261,7 +261,8 @@ describe('the tools the home chat keeps', () => {
|
||||
|
||||
it("ASTHOME-031: a journey's writes stay with the journey, also those that name only an entry", () => {
|
||||
expect(keptAtHome('read', ['entryId'], 'JourneyMcp')).toBe(true);
|
||||
for (const className of ['JourneyMcp', 'JourneyRecordingsMcp', 'JourneyDayImportMcp']) {
|
||||
const journeyWriters = ['JourneyMcp', 'JourneyRecordingsMcp', 'JourneyDayImportMcp', 'JourneyEntriesFromPhotosMcp'];
|
||||
for (const className of journeyWriters) {
|
||||
expect(keptAtHome('write', ['entryId'], className), className).toBe(false);
|
||||
}
|
||||
// A Dawarich stay taken into a journal names the journey as `journalId`; one marked on the bucket list stays.
|
||||
|
||||
@@ -197,6 +197,8 @@ describe('the assistant tool catalog', () => {
|
||||
'save_journey_recorded_day',
|
||||
'review_journey_day_stays',
|
||||
'take_over_journey_day_stays',
|
||||
'preview_journey_entries_from_photos',
|
||||
'create_journey_entries_from_photos',
|
||||
];
|
||||
expect(journey.map(groupOfTool)).toEqual(journey.map(() => 'journey'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user