feat: add support for auto resolving compilation errors (#318)

This commit is contained in:
Carl-Robert 2023-12-29 16:41:47 +02:00 committed by GitHub
parent 7031a6dc73
commit f831a1facd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 919 additions and 595 deletions

View file

@ -1,7 +1,7 @@
package ee.carlrobert.codegpt.settings.configuration;
import static ee.carlrobert.codegpt.completions.CompletionRequestProvider.COMPLETION_COMMIT_MESSAGE_PROMPT;
import static ee.carlrobert.codegpt.completions.CompletionRequestProvider.COMPLETION_SYSTEM_PROMPT;
import static ee.carlrobert.codegpt.completions.CompletionRequestProvider.GENERATE_COMMIT_MESSAGE_SYSTEM_PROMPT;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.PersistentStateComponent;
@ -19,13 +19,14 @@ import org.jetbrains.annotations.Nullable;
public class ConfigurationState implements PersistentStateComponent<ConfigurationState> {
private String systemPrompt = COMPLETION_SYSTEM_PROMPT;
private String commitMessagePrompt = COMPLETION_COMMIT_MESSAGE_PROMPT;
private String commitMessagePrompt = GENERATE_COMMIT_MESSAGE_SYSTEM_PROMPT;
private int maxTokens = 1000;
private double temperature = 0.1;
private boolean checkForPluginUpdates = true;
private boolean createNewChatOnEachAction;
private boolean ignoreGitCommitTokenLimit;
private boolean methodNameGenerationEnabled = true;
private boolean captureCompileErrors = true;
private boolean autoFormattingEnabled = true;
private Map<String, String> tableData = EditorActionsUtil.DEFAULT_ACTIONS;
@ -116,6 +117,14 @@ public class ConfigurationState implements PersistentStateComponent<Configuratio
this.methodNameGenerationEnabled = methodNameGenerationEnabled;
}
public boolean isCaptureCompileErrors() {
return captureCompileErrors;
}
public void setCaptureCompileErrors(boolean captureCompileErrors) {
this.captureCompileErrors = captureCompileErrors;
}
public boolean isAutoFormattingEnabled() {
return autoFormattingEnabled;
}