recursive-llm-ts 2.0.10 → 2.0.11
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/bunpy-bridge.js +18 -1
- package/package.json +1 -1
package/dist/bunpy-bridge.js
CHANGED
|
@@ -77,7 +77,24 @@ class BunpyBridge {
|
|
|
77
77
|
}
|
|
78
78
|
// Import sys module to add path
|
|
79
79
|
const sys = this.python.import('sys');
|
|
80
|
-
const pythonExecutable =
|
|
80
|
+
const pythonExecutable = (() => {
|
|
81
|
+
try {
|
|
82
|
+
const sysExecutable = sys.executable;
|
|
83
|
+
if (sysExecutable && typeof sysExecutable.valueOf === 'function') {
|
|
84
|
+
const value = sysExecutable.valueOf();
|
|
85
|
+
if (typeof value === 'string' && value.trim()) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (typeof sysExecutable === 'string' && sysExecutable.trim()) {
|
|
90
|
+
return sysExecutable;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (_a) {
|
|
94
|
+
// Fall back if bunpy can't coerce sys.executable
|
|
95
|
+
}
|
|
96
|
+
return 'python';
|
|
97
|
+
})();
|
|
81
98
|
const pythonCmd = pythonExecutable.includes(' ') ? `"${pythonExecutable}"` : pythonExecutable;
|
|
82
99
|
const pythonPackagePath = path.join(__dirname, '..', 'recursive-llm');
|
|
83
100
|
const pythonSrcPath = path.join(pythonPackagePath, 'src');
|
package/package.json
CHANGED