agentgui 1.0.499 → 1.0.500
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/lib/tool-manager.js +8 -5
- package/package.json +1 -1
package/lib/tool-manager.js
CHANGED
|
@@ -25,11 +25,14 @@ const getNodeModulesPath = () => {
|
|
|
25
25
|
|
|
26
26
|
const getInstalledVersion = (pkg) => {
|
|
27
27
|
try {
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
const homeDir = os.homedir();
|
|
29
|
+
const pluginPath = path.join(homeDir, '.claude', 'plugins', pkg);
|
|
30
|
+
const pluginJsonPath = path.join(pluginPath, 'plugin.json');
|
|
31
|
+
if (fs.existsSync(pluginJsonPath)) {
|
|
32
|
+
const pluginJson = JSON.parse(fs.readFileSync(pluginJsonPath, 'utf-8'));
|
|
33
|
+
if (pluginJson.version) {
|
|
34
|
+
return pluginJson.version;
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
} catch (_) {}
|
|
35
38
|
return null;
|