-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add auto apply integration (CodeGPT)
- Loading branch information
1 parent
339a1f0
commit 488583e
Showing
5 changed files
with
118 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/ee/carlrobert/llm/client/codegpt/request/AutoApplyRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package ee.carlrobert.llm.client.codegpt.request; | ||
|
||
public class AutoApplyRequest { | ||
|
||
private String suggestedChanges; | ||
private String fileContent; | ||
|
||
public String getSuggestedChanges() { | ||
return suggestedChanges; | ||
} | ||
|
||
public void setSuggestedChanges(String suggestedChanges) { | ||
this.suggestedChanges = suggestedChanges; | ||
} | ||
|
||
public String getFileContent() { | ||
return fileContent; | ||
} | ||
|
||
public void setFileContent(String fileContent) { | ||
this.fileContent = fileContent; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/ee/carlrobert/llm/client/codegpt/response/AutoApplyResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ee.carlrobert.llm.client.codegpt.response; | ||
|
||
public class AutoApplyResponse { | ||
|
||
private String modifiedFileContent; | ||
|
||
public String getModifiedFileContent() { | ||
return modifiedFileContent; | ||
} | ||
|
||
public void setModifiedFileContent(String modifiedFileContent) { | ||
this.modifiedFileContent = modifiedFileContent; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/ee/carlrobert/llm/client/codegpt/response/CodeGPTException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package ee.carlrobert.llm.client.codegpt.response; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class CodeGPTException extends RuntimeException { | ||
|
||
private String title; | ||
private int status; | ||
private String detail; | ||
private String instance; | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public int getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(int status) { | ||
this.status = status; | ||
} | ||
|
||
public String getDetail() { | ||
return detail; | ||
} | ||
|
||
public void setDetail(String detail) { | ||
this.detail = detail; | ||
} | ||
|
||
public String getInstance() { | ||
return instance; | ||
} | ||
|
||
public void setInstance(String instance) { | ||
this.instance = instance; | ||
} | ||
} |