MCPcopy
hub / github.com/OpenCoworkAI/open-codesign / score

Function score

packages/core/src/agent.ts:827–834  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

825 return candidates
826 .sort((a, b) => {
827 const score = (file: string): number => {
828 const lower = file.toLowerCase();
829 if (lower === DEFAULT_SOURCE_ENTRY.toLowerCase()) return 0;
830 if (lower === LEGACY_SOURCE_ENTRY.toLowerCase()) return 1;
831 if (lower.endsWith('/app.jsx') || lower.endsWith('/app.tsx')) return 2;
832 if (lower.endsWith('/index.html')) return 3;
833 return 10;
834 };
835 return score(a) - score(b) || a.localeCompare(b);
836 })
837 .slice(0, 8);

Callers 1

sourceCandidatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected