@aiready/pattern-detect 0.9.21 → 0.9.22
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/chunk-3YYN6ZXN.mjs +1038 -0
- package/dist/chunk-JTHW7EYW.mjs +1041 -0
- package/dist/cli.js +1 -3
- package/dist/cli.mjs +1 -1
- package/dist/index.js +1 -3
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -797,6 +797,7 @@ async function getSmartDefaults(directory, userOptions) {
|
|
|
797
797
|
return result;
|
|
798
798
|
}
|
|
799
799
|
function logConfiguration(config, estimatedBlocks) {
|
|
800
|
+
if (config.suppressToolConfig) return;
|
|
800
801
|
console.log("\u{1F4CB} Configuration:");
|
|
801
802
|
console.log(` Repository size: ~${estimatedBlocks} code blocks`);
|
|
802
803
|
console.log(` Similarity threshold: ${config.minSimilarity}`);
|
|
@@ -892,13 +893,10 @@ async function analyzePatterns(options) {
|
|
|
892
893
|
let clusters;
|
|
893
894
|
if (groupByFilePair) {
|
|
894
895
|
groups = groupDuplicatesByFilePair(duplicates);
|
|
895
|
-
console.log(`
|
|
896
|
-
\u2705 Grouped ${duplicates.length} duplicates into ${groups.length} file pairs`);
|
|
897
896
|
}
|
|
898
897
|
if (createClusters) {
|
|
899
898
|
const allClusters = createRefactorClusters(duplicates);
|
|
900
899
|
clusters = filterClustersByImpact(allClusters, minClusterTokenCost, minClusterFiles);
|
|
901
|
-
console.log(`\u2705 Created ${clusters.length} refactor clusters (${allClusters.length - clusters.length} filtered by impact)`);
|
|
902
900
|
}
|
|
903
901
|
return { results, duplicates, files, groups, clusters };
|
|
904
902
|
}
|
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -908,6 +908,7 @@ async function getSmartDefaults(directory, userOptions) {
|
|
|
908
908
|
return result;
|
|
909
909
|
}
|
|
910
910
|
function logConfiguration(config, estimatedBlocks) {
|
|
911
|
+
if (config.suppressToolConfig) return;
|
|
911
912
|
console.log("\u{1F4CB} Configuration:");
|
|
912
913
|
console.log(` Repository size: ~${estimatedBlocks} code blocks`);
|
|
913
914
|
console.log(` Similarity threshold: ${config.minSimilarity}`);
|
|
@@ -1003,13 +1004,10 @@ async function analyzePatterns(options) {
|
|
|
1003
1004
|
let clusters;
|
|
1004
1005
|
if (groupByFilePair) {
|
|
1005
1006
|
groups = groupDuplicatesByFilePair(duplicates);
|
|
1006
|
-
console.log(`
|
|
1007
|
-
\u2705 Grouped ${duplicates.length} duplicates into ${groups.length} file pairs`);
|
|
1008
1007
|
}
|
|
1009
1008
|
if (createClusters) {
|
|
1010
1009
|
const allClusters = createRefactorClusters(duplicates);
|
|
1011
1010
|
clusters = filterClustersByImpact(allClusters, minClusterTokenCost, minClusterFiles);
|
|
1012
|
-
console.log(`\u2705 Created ${clusters.length} refactor clusters (${allClusters.length - clusters.length} filtered by impact)`);
|
|
1013
1011
|
}
|
|
1014
1012
|
return { results, duplicates, files, groups, clusters };
|
|
1015
1013
|
}
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/pattern-detect",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.22",
|
|
4
4
|
"description": "Semantic duplicate pattern detection for AI-generated code - finds similar implementations that waste AI context tokens",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"commander": "^14.0.0",
|
|
47
47
|
"chalk": "^5.3.0",
|
|
48
|
-
"@aiready/core": "0.7.
|
|
48
|
+
"@aiready/core": "0.7.13"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"tsup": "^8.3.5",
|