MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / buildProjectSelectionPayload

Function buildProjectSelectionPayload

src/index.ts:575–590  ·  view source on GitHub ↗
(
  status: 'success' | 'selection_required' | 'error',
  message: string,
  project?: ProjectState,
  extras: Record<string, unknown> = {}
)

Source from the content-addressed store, hash-verified

573}
574
575function 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
592function buildProjectSelectionError(
593 errorCode: 'selection_required' | 'unknown_project',

Callers 1

Calls 3

buildProjectDescriptorFunction · 0.85
listProjectDescriptorsFunction · 0.85

Tested by

no test coverage detected