@corbat-tech/coco 2.27.2 → 2.27.4

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
@@ -15930,23 +15930,35 @@ init_copilot();
15930
15930
  var CONTEXT_WINDOWS4 = {
15931
15931
  // Claude models — Copilot API caps these at 168 000 (not 200 000 like Anthropic direct)
15932
15932
  "claude-sonnet-4.6": 168e3,
15933
+ "claude-sonnet-4": 168e3,
15933
15934
  "claude-opus-4.6": 168e3,
15935
+ "claude-opus-4.6-fast": 168e3,
15934
15936
  "claude-sonnet-4.5": 168e3,
15935
15937
  "claude-opus-4.5": 168e3,
15936
15938
  "claude-haiku-4.5": 168e3,
15937
15939
  // OpenAI models — chat/completions
15938
15940
  "gpt-4.1": 1048576,
15941
+ "gpt-4o": 128e3,
15939
15942
  // OpenAI models — /responses API (Codex/GPT-5+)
15940
15943
  "gpt-5.4-codex": 4e5,
15944
+ "gpt-5.4": 4e5,
15945
+ "gpt-5.4-mini": 4e5,
15941
15946
  "gpt-5.3-codex": 4e5,
15942
15947
  "gpt-5.2-codex": 4e5,
15943
15948
  "gpt-5.1-codex-max": 4e5,
15949
+ "gpt-5-mini": 4e5,
15944
15950
  "gpt-5.2": 4e5,
15945
15951
  "gpt-5.1": 4e5,
15946
15952
  // Google models
15953
+ "gemini-3.1-pro": 1e6,
15947
15954
  "gemini-3.1-pro-preview": 1e6,
15955
+ "gemini-3-flash": 1e6,
15948
15956
  "gemini-3-flash-preview": 1e6,
15949
- "gemini-2.5-pro": 1048576
15957
+ "gemini-2.5-pro": 1048576,
15958
+ // Evaluation models
15959
+ "grok-code-fast-1": 4e5,
15960
+ "raptor-mini": 4e5,
15961
+ goldeneye: 4e5
15950
15962
  };
15951
15963
  var DEFAULT_MODEL4 = "claude-sonnet-4.6";
15952
15964
  function normalizeModel(model) {
@@ -25961,7 +25973,14 @@ var SuggestImprovementsSchema = z.object({
25961
25973
  context: z.string().optional().describe("Additional context about the code")
25962
25974
  });
25963
25975
  async function analyzeAndSuggest(filePath, _context) {
25964
- const content = await fs33.readFile(filePath, "utf-8");
25976
+ let rawContent = await fs33.readFile(filePath, "utf-8");
25977
+ if (typeof rawContent !== "string") {
25978
+ const defaultReadFile = fs33.default?.readFile;
25979
+ if (typeof defaultReadFile === "function") {
25980
+ rawContent = await defaultReadFile(filePath, "utf-8");
25981
+ }
25982
+ }
25983
+ const content = typeof rawContent === "string" ? rawContent : String(rawContent ?? "");
25965
25984
  const lines = content.split("\n");
25966
25985
  const suggestions = [];
25967
25986
  for (let i = 0; i < lines.length; i++) {