mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-30 22:13:28 +08:00
fix: namespace cursor agent installs
This commit is contained in:
committed by
Affaan Mustafa
parent
5881554a1c
commit
e1d6d853f7
@@ -3,6 +3,7 @@ const os = require('os');
|
||||
const path = require('path');
|
||||
const { execFileSync } = require('child_process');
|
||||
|
||||
const { toCursorAgentRelativePath } = require('./cursor-agent-names');
|
||||
const { LEGACY_INSTALL_TARGETS, parseInstallArgs } = require('./install/request');
|
||||
const {
|
||||
SUPPORTED_INSTALL_TARGETS,
|
||||
@@ -154,7 +155,13 @@ function addRecursiveCopyOperations(operations, options) {
|
||||
for (const relativeFile of relativeFiles) {
|
||||
const sourceRelativePath = path.join(options.sourceRelativeDir, relativeFile);
|
||||
const sourcePath = path.join(options.sourceRoot, sourceRelativePath);
|
||||
const destinationPath = path.join(options.destinationDir, relativeFile);
|
||||
const destinationRelativePath = typeof options.destinationRelativePathTransform === 'function'
|
||||
? options.destinationRelativePathTransform(relativeFile, sourceRelativePath)
|
||||
: relativeFile;
|
||||
if (!destinationRelativePath) {
|
||||
continue;
|
||||
}
|
||||
const destinationPath = path.join(options.destinationDir, destinationRelativePath);
|
||||
operations.push(buildCopyFileOperation({
|
||||
moduleId: options.moduleId,
|
||||
sourcePath,
|
||||
@@ -351,6 +358,7 @@ function planCursorLegacyInstall(context) {
|
||||
sourceRoot: context.sourceRoot,
|
||||
sourceRelativeDir: path.join('.cursor', 'agents'),
|
||||
destinationDir: path.join(targetRoot, 'agents'),
|
||||
destinationRelativePathTransform: toCursorAgentRelativePath,
|
||||
});
|
||||
addRecursiveCopyOperations(operations, {
|
||||
moduleId: 'legacy-cursor-install',
|
||||
|
||||
Reference in New Issue
Block a user