File tree Expand file tree Collapse file tree
plugin/src/main/java/io/snyk/eclipse/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,15 +86,11 @@ private String getReplaceAIFixScripts(String html) {
8686 }
8787
8888 private String getGenerateAiFixScript () {
89- // TODO this script is broken, does not trigger a generate
90- return "const issueId = generateAIFixButton.getAttribute('issue-id');\n "
91- + "const folderPath = generateAIFixButton.getAttribute('folder-path');\n "
92- + "const filePath = generateAIFixButton.getAttribute('file-path');\n " + "console.log(filePath);\n "
93- + "window.generateAIFix(folderPath + \" @|@\" + filePath + \" @|@\" + issueId);" ;
89+ return "window.ideGenerateAIFix(generateFixQueryString)\n ;" ;
9490 }
9591
9692 private String getApplyAiFixScript () {
97- return "window.applyAIFix (fixId + '|@' + filePath + '|@' + patch);\n " ;
93+ return "window.ideApplyFix (fixId + '|@' + filePath + '|@' + patch);\n " ;
9894 }
9995
10096}
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ public Object function(Object[] arguments) {
9999 }
100100 };
101101
102- new BrowserFunction (browser , "generateAIFix " ) {
102+ new BrowserFunction (browser , "ideGenerateAIFix " ) {
103103 @ Override
104104 public Object function (Object [] arguments ) {
105105 browser .execute ("debugger;" ); // Triggers a breakpoint for debugging
@@ -118,7 +118,7 @@ public Object function(Object[] arguments) {
118118 }
119119 };
120120
121- new BrowserFunction (browser , "applyAIFix " ) {
121+ new BrowserFunction (browser , "ideApplyFix " ) {
122122 @ Override
123123 public Object function (Object [] arguments ) {
124124 System .out .println ("applyAIFix" );
You can’t perform that action at this time.
0 commit comments