@oisheek_c/codeforge 1.0.3 → 1.0.4
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/package.json
CHANGED
|
@@ -318,6 +318,52 @@ function createToolCallFingerprint(
|
|
|
318
318
|
)}`;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
function invalidateReadToolHistory(
|
|
322
|
+
toolCallHistory,
|
|
323
|
+
changedPath
|
|
324
|
+
) {
|
|
325
|
+
if (
|
|
326
|
+
!(toolCallHistory instanceof Map) ||
|
|
327
|
+
typeof changedPath !== "string"
|
|
328
|
+
) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const normalizedPath =
|
|
333
|
+
changedPath.replaceAll("\\", "/");
|
|
334
|
+
|
|
335
|
+
for (
|
|
336
|
+
const [
|
|
337
|
+
fingerprint,
|
|
338
|
+
entry,
|
|
339
|
+
] of toolCallHistory
|
|
340
|
+
) {
|
|
341
|
+
if (
|
|
342
|
+
entry?.name !== "read_file"
|
|
343
|
+
) {
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const readPath =
|
|
348
|
+
entry.arguments?.path;
|
|
349
|
+
|
|
350
|
+
if (
|
|
351
|
+
typeof readPath !== "string"
|
|
352
|
+
) {
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (
|
|
357
|
+
readPath.replaceAll("\\", "/") ===
|
|
358
|
+
normalizedPath
|
|
359
|
+
) {
|
|
360
|
+
toolCallHistory.delete(
|
|
361
|
+
fingerprint
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
321
367
|
function createDuplicateToolResult({
|
|
322
368
|
call,
|
|
323
369
|
previous,
|
|
@@ -685,20 +731,33 @@ approvedTools.add(approvalKey);
|
|
|
685
731
|
arguments: call.arguments,
|
|
686
732
|
result,
|
|
687
733
|
});
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
734
|
+
if (
|
|
735
|
+
call.name === "edit_file" ||
|
|
736
|
+
call.name === "write_file"
|
|
737
|
+
) {
|
|
738
|
+
const changedPath =
|
|
739
|
+
call.arguments?.path;
|
|
740
|
+
|
|
741
|
+
invalidateReadToolHistory(
|
|
742
|
+
toolCallHistory,
|
|
743
|
+
changedPath
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
if (
|
|
748
|
+
canDeduplicate &&
|
|
749
|
+
result.success
|
|
750
|
+
) {
|
|
751
|
+
toolCallHistory.set(
|
|
752
|
+
fingerprint,
|
|
753
|
+
{
|
|
754
|
+
id: call.id,
|
|
755
|
+
name: call.name,
|
|
756
|
+
arguments:
|
|
757
|
+
call.arguments,
|
|
701
758
|
}
|
|
759
|
+
);
|
|
760
|
+
}
|
|
702
761
|
emit({
|
|
703
762
|
type: result.success
|
|
704
763
|
? "stage:success"
|
|
@@ -1269,7 +1328,7 @@ export async function execute({
|
|
|
1269
1328
|
Array.isArray(response?.toolCalls)
|
|
1270
1329
|
? response.toolCalls
|
|
1271
1330
|
: [];
|
|
1272
|
-
|
|
1331
|
+
|
|
1273
1332
|
// Model produced a normal final response.
|
|
1274
1333
|
// Model produced a normal final response.
|
|
1275
1334
|
if (responseToolCalls.length === 0) {
|
|
@@ -10,10 +10,10 @@ export const defaultConfig = {
|
|
|
10
10
|
"nvidia/nemotron-3-super-120b-a12b:free",
|
|
11
11
|
|
|
12
12
|
coding:
|
|
13
|
-
"
|
|
13
|
+
"poolside/laguna-s-2.1:free",
|
|
14
14
|
|
|
15
15
|
heavyCoding:
|
|
16
|
-
"
|
|
16
|
+
"z-ai/glm-5.2:free",
|
|
17
17
|
|
|
18
18
|
planner:
|
|
19
19
|
"nvidia/nemotron-3-ultra-550b-a55b:free",
|
|
@@ -34,7 +34,7 @@ export const defaultConfig = {
|
|
|
34
34
|
"nvidia/llama-nemotron-rerank-vl-1b-v2:free",
|
|
35
35
|
|
|
36
36
|
fallback:
|
|
37
|
-
"
|
|
37
|
+
"nvidia/nemotron-3-ultra-550b-a55b:free",
|
|
38
38
|
|
|
39
39
|
emergency:
|
|
40
40
|
"openrouter/free",
|