fix: normalize path separators to forward slashes in agent file copying for cross-platform compatibility
This commit is contained in:
parent
039d1b2420
commit
dfae9f8285
|
|
@ -297,7 +297,7 @@ class CustomHandler {
|
|||
const agentFiles = await this.findFilesRecursively(sourceAgentsPath, ['.agent.yaml']);
|
||||
|
||||
for (const agentFile of agentFiles) {
|
||||
const relativePath = path.relative(sourceAgentsPath, agentFile);
|
||||
const relativePath = path.relative(sourceAgentsPath, agentFile).split(path.sep).join('/');
|
||||
const targetDir = path.join(targetAgentsPath, path.dirname(relativePath));
|
||||
|
||||
await fs.ensureDir(targetDir);
|
||||
|
|
|
|||
|
|
@ -871,7 +871,7 @@ class ModuleManager {
|
|||
for (const agentFile of agentFiles) {
|
||||
if (!agentFile.endsWith('.agent.yaml')) continue;
|
||||
|
||||
const relativePath = path.relative(sourceAgentsPath, agentFile);
|
||||
const relativePath = path.relative(sourceAgentsPath, agentFile).split(path.sep).join('/');
|
||||
const targetDir = path.join(targetAgentsPath, path.dirname(relativePath));
|
||||
|
||||
await fs.ensureDir(targetDir);
|
||||
|
|
|
|||
Loading…
Reference in New Issue