feat: add plugin marketplace renderer

This commit is contained in:
2026-08-28 18:41:23 +08:00
parent 8b6824a8ba
commit 97c9ad1aad
27 changed files with 1585 additions and 23 deletions

View File

@@ -286,14 +286,14 @@ export class ProjectPluginService {
);
}
const knownIds = knownPluginIdSet(this.options.knownPluginIds);
if (!knownIds.has(id)) {
const current = await this.readSelection(normalizedProjectPath);
const wasEnabled = current.enabledPluginIds.includes(id);
if (!knownIds.has(id) && (enabled || !wasEnabled)) {
throw new ProjectPluginServiceError(
'CODING_PLUGIN_UNKNOWN',
`Unknown coding plugin: ${id}`,
);
}
const current = await this.readSelection(normalizedProjectPath);
const wasEnabled = current.enabledPluginIds.includes(id);
// A missing read is intentionally side-effect free. A real state
// change (or the legacy projection) is the user mutation that creates
// the selection file.