@aipanel/core 1.3.7 → 1.3.8

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.
@@ -760,8 +760,11 @@ async function runCommandCheck(check, target, phase, severity, optional = false)
760
760
  if (failure) return { text: failure, diagnostics: [] };
761
761
  const raw = rawCommandOutput(outcome);
762
762
  try {
763
- if (check.adapter) return await runAdapterModule(check, outcome, cwd, fileSet);
764
- return adaptBuiltinFormat(check.format ?? "text", check, raw, cwd, severity);
763
+ const produced2 = check.adapter ? await runAdapterModule(check, outcome, cwd, fileSet) : adaptBuiltinFormat(check.format ?? "text", check, raw, cwd, severity);
764
+ if (phase === "edit" && outcome.exitCode === 0 && produced2.diagnostics.length === 0) {
765
+ return { ...produced2, text: void 0, notes: void 0 };
766
+ }
767
+ return produced2;
765
768
  } catch (error) {
766
769
  const reason = error instanceof Error ? error.message : String(error);
767
770
  const excerpt = raw.replace(/\s+/g, " ").trim().slice(0, 200);
@@ -793,8 +793,11 @@ async function runCommandCheck(check, target, phase, severity, optional = false)
793
793
  if (failure) return { text: failure, diagnostics: [] };
794
794
  const raw = rawCommandOutput(outcome);
795
795
  try {
796
- if (check.adapter) return await runAdapterModule(check, outcome, cwd, fileSet);
797
- return adaptBuiltinFormat(check.format ?? "text", check, raw, cwd, severity);
796
+ const produced2 = check.adapter ? await runAdapterModule(check, outcome, cwd, fileSet) : adaptBuiltinFormat(check.format ?? "text", check, raw, cwd, severity);
797
+ if (phase === "edit" && outcome.exitCode === 0 && produced2.diagnostics.length === 0) {
798
+ return { ...produced2, text: void 0, notes: void 0 };
799
+ }
800
+ return produced2;
798
801
  } catch (error) {
799
802
  const reason = error instanceof Error ? error.message : String(error);
800
803
  const excerpt = raw.replace(/\s+/g, " ").trim().slice(0, 200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipanel/core",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "main": "lib/index.cjs",