wormclaude 1.0.132 → 1.0.133
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 +8 -4
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -1121,9 +1121,11 @@ export async function executeTool(name, args) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
if (name === 'Write') {
|
|
1123
1123
|
const fp = resolveWs(args.file_path);
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1124
|
+
const _existed = fs.existsSync(fp);
|
|
1125
|
+
// ESKİDEN: var olan dosya Read edilmemişse HARD-BLOCK ediliyordu. Zayıf 32B güvenilir Read
|
|
1126
|
+
// yapmadığı için bu, build'leri öldürüyordu (create-react-app dosyayı oluşturur → model
|
|
1127
|
+
// Read etmeden Write eder → bloklanır → proje yarıda kalır). ÇÖZÜM: bloklama; eski içeriği
|
|
1128
|
+
// OKU (diffStat'te ne değiştiği görünür, veri sessizce kaybolmaz), readFiles'a ekle, yaz.
|
|
1127
1129
|
const _wnew = args.content ?? '';
|
|
1128
1130
|
const _wold = (() => { try {
|
|
1129
1131
|
return fs.readFileSync(fp, 'utf8');
|
|
@@ -1131,9 +1133,11 @@ export async function executeTool(name, args) {
|
|
|
1131
1133
|
catch {
|
|
1132
1134
|
return '';
|
|
1133
1135
|
} })();
|
|
1136
|
+
fs.mkdirSync(path.dirname(path.resolve(fp)), { recursive: true });
|
|
1134
1137
|
fs.writeFileSync(fp, _wnew);
|
|
1135
1138
|
readFiles.add(norm(fp));
|
|
1136
|
-
|
|
1139
|
+
const _ovr = (_existed && _wold !== _wnew) ? ' (uzerine yazildi)' : '';
|
|
1140
|
+
return { ok: true, output: `Wrote ${fp} (${_wnew.length} chars)${_ovr}${diffStat(_wold, _wnew)}` };
|
|
1137
1141
|
}
|
|
1138
1142
|
if (name === 'Edit') {
|
|
1139
1143
|
const fp = resolveWs(args.file_path);
|