ucode-agent 1.45.0 → 1.47.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.
- package/README.md +6 -5
- package/package.json +4 -3
- package/src/core/history.js +6 -1
- package/src/core/loop.js +3005 -2885
- package/src/core/provider.js +931 -924
- package/src/core/relink.js +2 -1
- package/src/tools/blocks.js +2 -2
- package/src/tools/files.js +750 -743
- package/src/tools/rename.js +2 -2
- package/src/tools/scaffold.js +502 -502
- package/src/tools/shared.js +469 -389
- package/src/tools/shell.js +844 -818
- package/ucode.js +1 -1
package/src/tools/rename.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { promises as fs } from 'node:fs';
|
|
19
19
|
import path from 'node:path';
|
|
20
20
|
import { ToolFailure } from '../core/failure.js';
|
|
21
|
-
import { resolveIn, guard, result, walk } from './shared.js';
|
|
21
|
+
import { resolveIn, guard, result, walk, writeTracked } from './shared.js';
|
|
22
22
|
|
|
23
23
|
const SOURCE = /\.(?:[cm]?[jt]sx?|py)$/i;
|
|
24
24
|
const IDENT = /^[A-Za-z_$][\w$]*$/;
|
|
@@ -133,7 +133,7 @@ export async function renameSymbol({ name, to, path: p = '.' }) {
|
|
|
133
133
|
if (before === null || !before.includes(from)) continue;
|
|
134
134
|
const { text, lines } = renameIn(before, from, into);
|
|
135
135
|
if (!lines.length || text === before) continue;
|
|
136
|
-
await
|
|
136
|
+
await writeTracked(abs, text);
|
|
137
137
|
changed.push({ rel: rel || target.show, lines });
|
|
138
138
|
total += lines.length;
|
|
139
139
|
}
|