@klitchevo/code-council 0.2.0 → 0.2.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.
@@ -929,6 +929,7 @@ You MUST respond with valid JSON matching this schema:
929
929
  "endLine": 45
930
930
  },
931
931
  "suggestion": "How to fix or improve",
932
+ "suggestedCode": "The actual corrected code that should replace the problematic code (if applicable)",
932
933
  "rawExcerpt": "The original text from the review that describes this finding",
933
934
  "confidence": 0.95
934
935
  }
@@ -956,6 +957,7 @@ ${Object.entries(SEVERITY_DESCRIPTIONS).map(([sev, desc]) => `- **${sev}**: ${de
956
957
  5. **Set confidence**: Higher (0.8-1.0) for clear, explicit issues; lower (0.5-0.7) for inferred or ambiguous ones
957
958
  6. **Don't duplicate**: Each distinct issue should appear once
958
959
  7. **Handle empty reviews**: If no issues found, return {"findings": []}
960
+ 8. **Include code fixes**: When a fix involves specific code changes, provide the actual corrected code in the suggestedCode field (not explanation, just the code)
959
961
 
960
962
  ## Important
961
963
 
@@ -1064,6 +1066,7 @@ var ExtractionResponseSchema = z2.object({
1064
1066
  endLine: z2.number().optional()
1065
1067
  }).optional(),
1066
1068
  suggestion: z2.string().optional(),
1069
+ suggestedCode: z2.string().optional(),
1067
1070
  rawExcerpt: z2.string(),
1068
1071
  confidence: z2.number().min(0).max(1).optional()
1069
1072
  })
@@ -1176,6 +1179,7 @@ function parseExtractionResponse(responseText, sourceModel) {
1176
1179
  endLine: f.location.endLine
1177
1180
  } : void 0,
1178
1181
  suggestion: f.suggestion,
1182
+ suggestedCode: f.suggestedCode,
1179
1183
  rawExcerpt: f.rawExcerpt,
1180
1184
  extractedAt: now,
1181
1185
  confidence: f.confidence
@@ -2217,4 +2221,4 @@ export {
2217
2221
  gitReviewSchema,
2218
2222
  handleGitReview
2219
2223
  };
2220
- //# sourceMappingURL=chunk-KO6UIMSL.js.map
2224
+ //# sourceMappingURL=chunk-YWK4IFSW.js.map
@@ -5,7 +5,7 @@ import {
5
5
  formatForHostExtraction,
6
6
  handleGitReview,
7
7
  initializeConfig
8
- } from "./chunk-KO6UIMSL.js";
8
+ } from "./chunk-YWK4IFSW.js";
9
9
  import "./chunk-IVKLQD6M.js";
10
10
  import "./chunk-SYMFCPGM.js";
11
11
  import {
@@ -214,7 +214,11 @@ function formatCommentBody(cluster, showModelAgreement) {
214
214
  lines.push(firstFinding.description);
215
215
  lines.push("");
216
216
  }
217
- if (firstFinding?.suggestion) {
217
+ if (firstFinding?.suggestedCode) {
218
+ lines.push("```suggestion");
219
+ lines.push(firstFinding.suggestedCode);
220
+ lines.push("```");
221
+ } else if (firstFinding?.suggestion) {
218
222
  lines.push(`**Suggestion:** ${firstFinding.suggestion}`);
219
223
  }
220
224
  return lines.join("\n").trim();
@@ -1044,4 +1048,4 @@ export {
1044
1048
  processResult,
1045
1049
  runCli
1046
1050
  };
1047
- //# sourceMappingURL=cli-M7YIR4XR.js.map
1051
+ //# sourceMappingURL=cli-223AZHWH.js.map
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  handleGitReview,
19
19
  initializeConfig,
20
20
  logger
21
- } from "./chunk-KO6UIMSL.js";
21
+ } from "./chunk-YWK4IFSW.js";
22
22
  import "./chunk-IVKLQD6M.js";
23
23
  import "./chunk-SYMFCPGM.js";
24
24
  import {
@@ -1906,7 +1906,7 @@ ${r.review}
1906
1906
  var args = process.argv.slice(2);
1907
1907
  var command = args[0];
1908
1908
  if (command === "review" || command === "setup") {
1909
- import("./cli-M7YIR4XR.js").then(async ({ processResult, runCli }) => {
1909
+ import("./cli-223AZHWH.js").then(async ({ processResult, runCli }) => {
1910
1910
  try {
1911
1911
  const result = await runCli(process.argv);
1912
1912
  if (result) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klitchevo/code-council",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Multi-model AI code review server using OpenRouter - get diverse perspectives from multiple LLMs in parallel",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",