refactor: several improvements (#132)

- js export expression
- check args regarding run-agent/run-tool
This commit is contained in:
sigoden
2024-11-30 17:14:21 +08:00
committed by GitHub
parent c4ba6ff379
commit d2a537c374
11 changed files with 52 additions and 24 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
* @property {string} code - Javascript code to execute, such as `console.log("hello world")`
* @param {Args} args
*/
exports.run = function run({ code }) {
exports.run = function ({ code }) {
let output = "";
const oldStdoutWrite = process.stdout.write.bind(process.stdout);
process.stdout.write = (chunk, _encoding, callback) => {