fix(config): isolate plugin list reads from a broken JSONC layer

Plugin listing still called readConfigFile per layer, so one unparseable
project file made GET /api/config/plugins and VS Code listPluginEntries
fail. Reuse readConfigLayer isolation and pin comment-only empty parse
in the VS Code suite.

Co-authored-by: serkraser <serkraser@gmail.com>
This commit is contained in:
Cursor Agent
2026-08-15 06:30:36 +00:00
co-authored by serkraser
parent 8b086343fd
commit 6751c7dc7a
7 changed files with 60 additions and 8 deletions
+3 -3
View File
@@ -926,10 +926,10 @@ const getPluginConfigSources = (workingDirectory?: string | null): Array<{ scope
const projectPath = getProjectConfigPath(workingDirectory || undefined);
return [
customPath
? { scope: 'user', path: customPath, config: readConfigFile(customPath) }
: { scope: 'user', path: userPath, config: readConfigFile(userPath) },
? { scope: 'user', path: customPath, config: readConfigLayer(customPath).config }
: { scope: 'user', path: userPath, config: readConfigLayer(userPath).config },
...(projectPath
? [{ scope: 'project' as const, path: projectPath, config: readConfigFile(projectPath) }]
? [{ scope: 'project' as const, path: projectPath, config: readConfigLayer(projectPath).config }]
: []),
];
};