|
1 | | -import path from 'node:path'; |
2 | 1 | import { dispatchCommand, resolveTargetDevice } from '../../core/dispatch.ts'; |
3 | 2 | import { |
4 | 3 | abortAuthoringOnSecondOpen, |
@@ -557,18 +556,18 @@ async function acquireLocalDeviceClaim(params: { |
557 | 556 | req: DaemonRequest; |
558 | 557 | device: DeviceInfo; |
559 | 558 | sessionName: string; |
560 | | - logPath: string; |
| 559 | + sessionStore: SessionStore; |
561 | 560 | reconcileOrphanedDeviceClaim: DeviceClaimReconciler; |
562 | 561 | }): Promise<DeviceClaimAcquireResult | { status: 'not-required' }> { |
563 | | - const { req, device, sessionName, logPath, reconcileOrphanedDeviceClaim } = params; |
| 562 | + const { req, device, sessionName, sessionStore, reconcileOrphanedDeviceClaim } = params; |
564 | 563 | if (!isLocalDeviceClaimTarget(req.meta, isActiveProviderDevice(device))) { |
565 | 564 | return { status: 'not-required' }; |
566 | 565 | } |
567 | 566 | return await acquireDeviceClaim({ |
568 | 567 | device, |
569 | 568 | session: sessionName, |
570 | 569 | workspace: req.meta?.cwd ?? process.cwd(), |
571 | | - stateDir: path.dirname(logPath), |
| 570 | + stateDir: sessionStore.resolveDaemonStateDir(), |
572 | 571 | reconcileOrphanedDeviceClaim, |
573 | 572 | }); |
574 | 573 | } |
@@ -600,7 +599,7 @@ async function openNewSessionWithDeviceClaim(params: { |
600 | 599 | req, |
601 | 600 | device, |
602 | 601 | sessionName, |
603 | | - logPath, |
| 602 | + sessionStore, |
604 | 603 | reconcileOrphanedDeviceClaim, |
605 | 604 | }); |
606 | 605 | if (localClaim.status === 'conflict') { |
|
0 commit comments