tune-basic-toolset 0.1.17 → 0.1.19

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/README.md CHANGED
@@ -371,7 +371,8 @@ It is useful when you need to trigger loops and ifs or chain few tool calls toge
371
371
  ```chat
372
372
  user:
373
373
  @js_ctx @sh
374
- 1234 + 4311
374
+
375
+ what is in my current directory?
375
376
 
376
377
  tool_call: sh
377
378
  ls
@@ -396,7 +397,11 @@ __pycache__
396
397
  append.schema.json
397
398
  append.tool.js
398
399
  ....
400
+ ```
401
+
399
402
 
403
+ Now we can loop trough all the files and summarize its content
404
+ ```
400
405
  user:
401
406
  can you loop throught the .js files and summarize its content using llm?
402
407
  assistant:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tune-basic-toolset",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "Basic toolset for tune",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -17,5 +17,6 @@
17
17
  }
18
18
  },
19
19
  "required": ["url"]
20
- }
20
+ },
21
+ "$escape_output": false
21
22
  }
@@ -12,6 +12,6 @@
12
12
  "description": "save the role name to filename that keeps the current role"
13
13
  }
14
14
  },
15
- "required": ["name", "filename"]
15
+ "required": ["role", "filename"]
16
16
  }
17
17
  }
package/src/wf.tool.js CHANGED
@@ -3,5 +3,8 @@ const path = require('path');
3
3
 
4
4
  module.exports = async function writeFile({ filename, text }, ctx) {
5
5
  await ctx.write(filename, text)
6
- return `written`;
6
+ if (!text) {
7
+ return "written empty string"
8
+ }
9
+ return `written ${text.length} bytes/chars`;
7
10
  };