wormclaude 1.0.72 → 1.0.73
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/theme.js +1 -1
- package/dist/tools.js +9 -4
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -1237,19 +1237,24 @@ export async function executeTool(name, args) {
|
|
|
1237
1237
|
const fres = await fetch(u, { signal: AbortSignal.timeout(12000), headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36' } });
|
|
1238
1238
|
let ftxt = (await fres.text()).replace(/<script[\s\S]*?<\/script>/gi, '').replace(/<style[\s\S]*?<\/style>/gi, '').replace(/<[^>]+>/g, ' ').replace(/ /g, ' ').replace(/\s+/g, ' ').trim();
|
|
1239
1239
|
if (!ftxt)
|
|
1240
|
-
return
|
|
1240
|
+
return null;
|
|
1241
1241
|
let host = u;
|
|
1242
1242
|
try {
|
|
1243
1243
|
host = new URL(u).hostname;
|
|
1244
1244
|
}
|
|
1245
1245
|
catch { }
|
|
1246
|
-
return '\n\n--- ' + host + ' (' + u + ') ---\n' + ftxt.slice(0, 2800);
|
|
1246
|
+
return { url: u, host, block: '\n\n--- ' + host + ' (' + u + ') ---\n' + ftxt.slice(0, 2800) };
|
|
1247
1247
|
}
|
|
1248
1248
|
catch {
|
|
1249
|
-
return
|
|
1249
|
+
return null;
|
|
1250
1250
|
}
|
|
1251
1251
|
}));
|
|
1252
|
-
|
|
1252
|
+
const okFetched = fetched.filter((f) => !!f);
|
|
1253
|
+
output += okFetched.map((f) => f.block).join('');
|
|
1254
|
+
// GROUND-TRUTH KAYNAKLAR: model bu gercek URL'leri oldugu gibi kopyalar, asla uydurmaz
|
|
1255
|
+
if (okFetched.length) {
|
|
1256
|
+
output += '\n\n[KAYNAKLAR] (bu turda gercekten cekilen sayfalar — cevapta bunlari OLDUGU GIBI goster, URL uydurma):\n' + okFetched.map((f) => '- ' + f.host + ': ' + f.url).join('\n');
|
|
1257
|
+
}
|
|
1253
1258
|
return { ok: true, output };
|
|
1254
1259
|
}
|
|
1255
1260
|
if (name === 'TodoWrite') {
|