feat(app): scope sdk/sync hooks per-route so /new-session targets its draft server (#32290)
This commit is contained in:
parent
c81cd3202c
commit
010b456dfd
53 changed files with 524 additions and 458 deletions
|
|
@ -291,7 +291,7 @@ export function Titlebar(props: { update?: TitlebarUpdate }) {
|
|||
item.type === "session" && item.server === route.server && item.sessionId === route.sessionId,
|
||||
)
|
||||
if (main) return main
|
||||
const sync = serverSync.createDirSyncContext(route.dir)
|
||||
const sync = serverSync().createDirSyncContext(route.dir)
|
||||
const session = sync.session.get(route.sessionId)
|
||||
if (session?.parentID) {
|
||||
const parentID = session.parentID
|
||||
|
|
@ -312,7 +312,7 @@ export function Titlebar(props: { update?: TitlebarUpdate }) {
|
|||
if (tab) return
|
||||
|
||||
if (route.type === "session") {
|
||||
const sync = serverSync.createDirSyncContext(route.dir)
|
||||
const sync = serverSync().createDirSyncContext(route.dir)
|
||||
const session = sync.session.get(route.sessionId)
|
||||
if (!session) return
|
||||
const sessionId = session.parentID ?? session.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue