@corbat-tech/coco 2.27.2 → 2.27.3
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/cli/index.js +351 -303
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25961,7 +25961,8 @@ var SuggestImprovementsSchema = z.object({
|
|
|
25961
25961
|
context: z.string().optional().describe("Additional context about the code")
|
|
25962
25962
|
});
|
|
25963
25963
|
async function analyzeAndSuggest(filePath, _context) {
|
|
25964
|
-
const
|
|
25964
|
+
const rawContent = await fs33.readFile(filePath, "utf-8");
|
|
25965
|
+
const content = typeof rawContent === "string" ? rawContent : String(rawContent ?? "");
|
|
25965
25966
|
const lines = content.split("\n");
|
|
25966
25967
|
const suggestions = [];
|
|
25967
25968
|
for (let i = 0; i < lines.length; i++) {
|