(
ix: IInstantiationService,
sessionId: string,
req: { id: string; body: unknown },
reply: { send(payload: unknown): unknown },
)
| 502 | } |
| 503 | |
| 504 | async function handleOpen( |
| 505 | ix: IInstantiationService, |
| 506 | sessionId: string, |
| 507 | req: { id: string; body: unknown }, |
| 508 | reply: { send(payload: unknown): unknown }, |
| 509 | ): Promise<void> { |
| 510 | const parsed = fsOpenRequestSchema.safeParse(req.body ?? {}); |
| 511 | if (!parsed.success) { |
| 512 | reply.send(buildValidationEnvelope(parsed.error.issues, req.id)); |
| 513 | return; |
| 514 | } |
| 515 | const body: FsOpenRequest = parsed.data; |
| 516 | const resolved = await ix.invokeFunction((a) => |
| 517 | a.get(IFsService).resolvePath(sessionId, body.path), |
| 518 | ); |
| 519 | await launchDetached(openFileCommandFor(resolved.absolute, body.line)); |
| 520 | reply.send(okEnvelope({ opened: true as const }, req.id)); |
| 521 | } |
| 522 | |
| 523 | async function handleReveal( |
| 524 | ix: IInstantiationService, |
no test coverage detected