@diegovelasquezweb/a11y-engine 0.11.25 → 0.11.26
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
|
@@ -201,7 +201,7 @@ function buildExecution(ruleId, intelligenceRule, finding) {
|
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
function buildAiFixInput({ finding, intelligenceRule, execution, candidates }) {
|
|
204
|
+
function buildAiFixInput({ finding, intelligenceRule, execution, candidates, projectHints }) {
|
|
205
205
|
return {
|
|
206
206
|
finding: {
|
|
207
207
|
id: finding.id,
|
|
@@ -223,6 +223,7 @@ function buildAiFixInput({ finding, intelligenceRule, execution, candidates }) {
|
|
|
223
223
|
fixDifficultyNotes: intelligenceRule.fix_difficulty_notes || "",
|
|
224
224
|
},
|
|
225
225
|
execution,
|
|
226
|
+
projectContext: projectHints || "",
|
|
226
227
|
files: candidates.map((c) => ({ filePath: c.rel, content: c.content.slice(0, 12000) })),
|
|
227
228
|
};
|
|
228
229
|
}
|
|
@@ -362,6 +363,7 @@ export async function applyFindingFix(input) {
|
|
|
362
363
|
|
|
363
364
|
const findingId = typeof input.findingId === "string" ? input.findingId.trim() : "";
|
|
364
365
|
const projectDir = typeof input.projectDir === "string" ? input.projectDir.trim() : "";
|
|
366
|
+
const projectHints = typeof input.projectHints === "string" ? input.projectHints.trim() : "";
|
|
365
367
|
|
|
366
368
|
if (!findingId || !projectDir) {
|
|
367
369
|
return buildResult({
|
|
@@ -528,7 +530,7 @@ export async function applyFindingFix(input) {
|
|
|
528
530
|
});
|
|
529
531
|
}
|
|
530
532
|
|
|
531
|
-
const aiInput = buildAiFixInput({ finding, intelligenceRule, execution, candidates });
|
|
533
|
+
const aiInput = buildAiFixInput({ finding, intelligenceRule, execution, candidates, projectHints });
|
|
532
534
|
const candidateSet = new Set(candidates.map((c) => c.rel));
|
|
533
535
|
|
|
534
536
|
let patchOutput = null;
|