@lvce-editor/chat-tool-worker 9.6.0 → 9.8.0
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.
|
@@ -1169,6 +1169,9 @@ const readFile$1 = async uri => {
|
|
|
1169
1169
|
const writeFile$1 = async (uri, content) => {
|
|
1170
1170
|
return invoke$2('FileSystem.writeFile', uri, content);
|
|
1171
1171
|
};
|
|
1172
|
+
const mkdir = async uri => {
|
|
1173
|
+
return invoke$2('FileSystem.mkdir', uri);
|
|
1174
|
+
};
|
|
1172
1175
|
const exists = async uri => {
|
|
1173
1176
|
return invoke$2('FileSystem.exists', uri);
|
|
1174
1177
|
};
|
|
@@ -1261,10 +1264,9 @@ const executeCreateDirectoryTool = async (args, _options) => {
|
|
|
1261
1264
|
return getInvalidUrlErrorPayload();
|
|
1262
1265
|
}
|
|
1263
1266
|
try {
|
|
1264
|
-
await
|
|
1267
|
+
await mkdir(uri);
|
|
1265
1268
|
return {
|
|
1266
|
-
ok: true
|
|
1267
|
-
uri
|
|
1269
|
+
ok: true
|
|
1268
1270
|
};
|
|
1269
1271
|
} catch (error) {
|
|
1270
1272
|
return {
|
|
@@ -2431,7 +2433,7 @@ const executeWriteFileTool = async (args, _options) => {
|
|
|
2431
2433
|
|
|
2432
2434
|
const parseToolArguments = rawArguments => {
|
|
2433
2435
|
if (typeof rawArguments !== 'string') {
|
|
2434
|
-
return
|
|
2436
|
+
return rawArguments;
|
|
2435
2437
|
}
|
|
2436
2438
|
try {
|
|
2437
2439
|
const parsed = JSON.parse(rawArguments);
|