feat(FN-1798): merge fusion/fn-1798
This commit is contained in:
@@ -104,13 +104,11 @@ function readJsonObject(path: string): Record<string, unknown> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Read project settings from .fusion/settings.json with .pi/settings.json fallback.
|
||||
* Read project settings from .fusion/settings.json.
|
||||
*/
|
||||
function readProjectSettings(projectRootDir: string): ProjectSkillSettings {
|
||||
const fusionSettings = join(projectRootDir, ".fusion", "settings.json");
|
||||
const legacySettings = join(projectRootDir, ".pi", "settings.json");
|
||||
|
||||
// Try .fusion first, then .pi
|
||||
if (existsSync(fusionSettings)) {
|
||||
const parsed = readJsonObject(fusionSettings);
|
||||
// Only return skill-relevant fields
|
||||
@@ -120,14 +118,6 @@ function readProjectSettings(projectRootDir: string): ProjectSkillSettings {
|
||||
};
|
||||
}
|
||||
|
||||
if (existsSync(legacySettings)) {
|
||||
const parsed = readJsonObject(legacySettings);
|
||||
return {
|
||||
skills: Array.isArray(parsed.skills) ? (parsed.skills as string[]) : undefined,
|
||||
packages: Array.isArray(parsed.packages) ? (parsed.packages as Array<string | { source: string; skills?: string[] }>) : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user