(
status: 'success' | 'selection_required' | 'error',
message: string,
project?: ProjectState,
extras: Record<string, unknown> = {}
)
| 573 | } |
| 574 | |
| 575 | function buildProjectSelectionPayload( |
| 576 | status: 'success' | 'selection_required' | 'error', |
| 577 | message: string, |
| 578 | project?: ProjectState, |
| 579 | extras: Record<string, unknown> = {} |
| 580 | ): Record<string, unknown> { |
| 581 | return { |
| 582 | status, |
| 583 | message, |
| 584 | activeProject: project |
| 585 | ? buildProjectDescriptor(project.rootPath) |
| 586 | : (getActiveProjectDescriptor() ?? null), |
| 587 | availableProjects: listProjectDescriptors(), |
| 588 | ...extras |
| 589 | }; |
| 590 | } |
| 591 | |
| 592 | function buildProjectSelectionError( |
| 593 | errorCode: 'selection_required' | 'unknown_project', |
no test coverage detected