opencode-agents 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -19
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- package/src/core/installer.ts +5 -18
package/package.json
CHANGED
package/src/core/installer.ts
CHANGED
|
@@ -47,26 +47,13 @@ export async function installAgent(options: InstallOptions): Promise<void> {
|
|
|
47
47
|
continue;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
copyDirectory(sourcePath, join(targetPath, name));
|
|
54
|
-
} else {
|
|
55
|
-
copyFileSync(sourcePath, finalPath);
|
|
56
|
-
}
|
|
57
|
-
logger.success(`Copied agent "${name}" to ${finalPath}`);
|
|
50
|
+
const sourcePath = agentFile.path;
|
|
51
|
+
if (isDirectory(sourcePath)) {
|
|
52
|
+
copyDirectory(sourcePath, join(targetPath, name));
|
|
58
53
|
} else {
|
|
59
|
-
|
|
60
|
-
const linkType = isDirectory(sourcePath) ? 'dir' : 'file';
|
|
61
|
-
try {
|
|
62
|
-
symlinkSync(sourcePath, finalPath, linkType);
|
|
63
|
-
logger.success(`Symlinked agent "${name}" to ${finalPath}`);
|
|
64
|
-
} catch (err) {
|
|
65
|
-
logger.warn(`Failed to create symlink, copying instead: ${err}`);
|
|
66
|
-
copyFileSync(sourcePath, finalPath);
|
|
67
|
-
logger.success(`Copied agent "${name}" to ${finalPath}`);
|
|
68
|
-
}
|
|
54
|
+
copyFileSync(sourcePath, finalPath);
|
|
69
55
|
}
|
|
56
|
+
logger.success(`Copied agent "${name}" to ${finalPath}`);
|
|
70
57
|
}
|
|
71
58
|
}
|
|
72
59
|
}
|