From 1cc4cd48bcf916228e54fa58fcab489dab22909e Mon Sep 17 00:00:00 2001 From: Will Hohyon Ryu Date: Thu, 7 Mar 2024 19:12:30 -0800 Subject: [PATCH] fix: use JSON.parse instead of jsonic to parse response in main.ts This commit fixes an issue where the jsonic library was being used to parse a response in the main.ts file. The jsonic library has been replaced with JSON.parse for more reliable JSON parsing. --- src/main.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 82dc2cb..0702897 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,6 @@ import OpenAI from "openai"; import {Octokit} from "@octokit/rest"; import parseDiff, {Chunk, File} from "parse-diff"; import minimatch from "minimatch"; -import jsonic from "jsonic"; const GITHUB_TOKEN: string = core.getInput("GITHUB_TOKEN"); const OPENAI_API_KEY: string = core.getInput("OPENAI_API_KEY"); @@ -152,7 +151,7 @@ async function getAIResponse(prompt: string): Promise