clawfix 0.6.0 → 0.6.1
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/bin/clawfix.js +8 -1
- package/package.json +1 -1
package/bin/clawfix.js
CHANGED
|
@@ -655,10 +655,12 @@ async function runInteractiveMode() {
|
|
|
655
655
|
|
|
656
656
|
// --- Send diagnostic to server for AI context ---
|
|
657
657
|
try {
|
|
658
|
+
// Include locally-detected issues so server can match them to known fixes
|
|
659
|
+
const payload = { ...diagnostic, _localIssues: issues.map(i => ({ severity: i.severity, text: i.text })) };
|
|
658
660
|
const resp = await fetch(`${API_URL}/api/diagnose`, {
|
|
659
661
|
method: 'POST',
|
|
660
662
|
headers: { 'Content-Type': 'application/json' },
|
|
661
|
-
body: JSON.stringify(
|
|
663
|
+
body: JSON.stringify(payload),
|
|
662
664
|
});
|
|
663
665
|
if (resp.ok) {
|
|
664
666
|
const data = await resp.json();
|
|
@@ -774,6 +776,11 @@ async function runInteractiveMode() {
|
|
|
774
776
|
console.log(c.dim(' ─────────────────────────────'));
|
|
775
777
|
console.log('');
|
|
776
778
|
console.log(` Run ${c.cyan(`apply ${idx + 1}`)} to apply this fix.`);
|
|
779
|
+
} else {
|
|
780
|
+
// No fix script available — suggest asking AI
|
|
781
|
+
console.log('');
|
|
782
|
+
console.log(c.yellow(' No automatic fix script available for this issue.'));
|
|
783
|
+
console.log(` Try asking: ${c.cyan(`"how do I fix ${issue.title || issue.text}?"`)}`);
|
|
777
784
|
}
|
|
778
785
|
console.log('');
|
|
779
786
|
}
|