mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
fix(assistant): a journey's session no longer attaches delete_journey
isHeldInJourney took every tool of the journey's controllers from the Studio side, delete_journey among them. The Studio never offered it (its writes are the book's), so leaving it unattached changes nothing the model sees and keeps the denial in one place.
This commit is contained in:
@@ -95,8 +95,13 @@ function isOfferedInJournal(name: string, className: string | undefined): boolea
|
||||
return className !== undefined && JOURNAL_CONTROLLERS.has(className) && !isStudioController(className);
|
||||
}
|
||||
|
||||
/** Whether a journey's session attaches a registered tool: what either of its pages offers. */
|
||||
/**
|
||||
* Whether a journey's session attaches a registered tool: what either of its
|
||||
* pages offers. A tool denied in a journey's own conversation is never
|
||||
* attached, though the Studio's controllers would bring it along.
|
||||
*/
|
||||
export function isHeldInJourney(name: string, className: string | undefined): boolean {
|
||||
if (name in JOURNAL_DENIED_TOOLS) return false;
|
||||
return isOfferedInJourney(name, className) || isOfferedInJournal(name, className);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user