feat(assistant): a chat can be about a journey and its book

Threads carry a journey scope next to the trip scope, with journey rights
(outsider 404, viewers without write tools, addon off), its own routes and a
book context, and the client keys chats by trip or journey.
This commit is contained in:
Maurice
2026-10-22 21:25:46 +00:00
parent 2c98ae8e4a
commit 51ed038374
46 changed files with 3386 additions and 326 deletions
+2
View File
@@ -97,6 +97,8 @@ let _lastTempId = 0
/**
* Mint a collision-free temporary (negative) id for an offline-created entity.
* Monotonic across the session so same-millisecond creates never collide.
* Never use it for trips: the assistant keys a journey's chat by the negated
* journey id (store/assistantChatKey.ts) and relies on trip ids being positive.
*/
export function nextTempId(): number {
const now = Date.now()