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
26
scripts/lib/cursor-agent-names.js
Normal file
26
scripts/lib/cursor-agent-names.js
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
function toCursorAgentFileName(fileName) {
|
||||
if (!fileName || fileName.startsWith('ecc-')) {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
return `ecc-${fileName}`;
|
||||
}
|
||||
|
||||
function toCursorAgentRelativePath(relativePath) {
|
||||
const segments = String(relativePath || '').split(/[\\/]+/).filter(Boolean);
|
||||
if (segments.length === 0) {
|
||||
return relativePath;
|
||||
}
|
||||
|
||||
const fileName = segments.pop();
|
||||
return path.join(...segments, toCursorAgentFileName(fileName));
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
toCursorAgentFileName,
|
||||
toCursorAgentRelativePath,
|
||||
};
|
||||
Reference in New Issue
Block a user