@corbat-tech/coco 2.21.0 → 2.22.0

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/index.js CHANGED
@@ -9276,9 +9276,13 @@ var ToolRegistry = class {
9276
9276
  }
9277
9277
  } else if (isCocoError(error)) {
9278
9278
  const causeMsg = error.cause instanceof Error ? error.cause.message : "";
9279
- const combined = causeMsg && !error.message.includes(causeMsg) ? `${error.message} \u2014 ${causeMsg}` : error.message;
9279
+ const isRawEnoent = causeMsg.startsWith("ENOENT:");
9280
+ const combined = causeMsg && !isRawEnoent && !error.message.includes(causeMsg) ? `${error.message} \u2014 ${causeMsg}` : error.message;
9280
9281
  errorMessage = humanizeError(combined, name);
9281
- if (error.suggestion && !errorMessage.includes(error.suggestion)) {
9282
+ const hasRecoveryHint = /Did you mean\?|Use glob|Check that the parent directory/.test(
9283
+ errorMessage
9284
+ );
9285
+ if (error.suggestion && !hasRecoveryHint && !errorMessage.includes(error.suggestion)) {
9282
9286
  errorMessage += `
9283
9287
  Suggestion: ${error.suggestion}`;
9284
9288
  }
@@ -10034,7 +10038,10 @@ var TaskIterator = class {
10034
10038
  suggestion: issue.suggestion
10035
10039
  });
10036
10040
  }
10037
- } catch {
10041
+ } catch (evalError) {
10042
+ if (process.env["COCO_DEBUG"]) {
10043
+ console.error("[iterator] Real evaluation failed, using LLM-only scores:", evalError);
10044
+ }
10038
10045
  }
10039
10046
  }
10040
10047
  const previousIssues = lastReview ? lastReview.issues : [];
@@ -14477,8 +14484,7 @@ var CodexProvider = class {
14477
14484
  model,
14478
14485
  input,
14479
14486
  instructions: instructions ?? "You are a helpful coding assistant.",
14480
- max_output_tokens: options?.maxTokens ?? this.config.maxTokens ?? 8192,
14481
- temperature: options?.temperature ?? this.config.temperature ?? 0,
14487
+ truncation: "auto",
14482
14488
  store: false,
14483
14489
  stream: true
14484
14490
  // Codex API requires streaming
@@ -21121,9 +21127,7 @@ function renderFileBlock(file, opts) {
21121
21127
  content = wordHighlights.get(delIdx).styledAdd;
21122
21128
  } else {
21123
21129
  content = line.content;
21124
- }
21125
- if (lang) {
21126
- content = highlightLine(content, lang);
21130
+ if (lang) content = highlightLine(content, lang);
21127
21131
  }
21128
21132
  const lineStr = `${lineNo}${prefix} ${content}`;
21129
21133
  console.log(bgAddLine(lineStr));
@@ -21134,9 +21138,7 @@ function renderFileBlock(file, opts) {
21134
21138
  content = wordHighlights.get(li).styledDelete;
21135
21139
  } else {
21136
21140
  content = line.content;
21137
- }
21138
- if (lang) {
21139
- content = highlightLine(content, lang);
21141
+ if (lang) content = highlightLine(content, lang);
21140
21142
  }
21141
21143
  const lineStr = `${lineNo}${prefix} ${content}`;
21142
21144
  console.log(bgDeleteLine(lineStr));