mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 05:21:15 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user