mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-11 04:50:31 +00:00
feat: add git context to code completions
This commit is contained in:
parent
7ae66e04ca
commit
2ce05a50af
20 changed files with 494 additions and 376 deletions
|
|
@ -48,6 +48,7 @@ public class ConfigurationComponent {
|
|||
private final JBCheckBox autoFormattingCheckBox;
|
||||
private final JBCheckBox autocompletionPostProcessingCheckBox;
|
||||
private final JBCheckBox autocompletionContextAwareCheckBox;
|
||||
private final JBCheckBox autocompletionGitContextCheckBox;
|
||||
private final JTextArea commitMessagePromptTextArea;
|
||||
private final IntegerField maxTokensField;
|
||||
private final JBTextField temperatureField;
|
||||
|
|
@ -122,6 +123,10 @@ public class ConfigurationComponent {
|
|||
CodeGPTBundle.get("configurationConfigurable.autocompletionContextAwareCheckBox.label"),
|
||||
configuration.getAutocompletionContextAwareEnabled()
|
||||
);
|
||||
autocompletionGitContextCheckBox = new JBCheckBox(
|
||||
CodeGPTBundle.get("configurationConfigurable.autocompletionGitContextCheckBox.label"),
|
||||
configuration.getAutocompletionGitContextEnabled()
|
||||
);
|
||||
|
||||
mainPanel = FormBuilder.createFormBuilder()
|
||||
.addComponent(tablePanel)
|
||||
|
|
@ -133,6 +138,7 @@ public class ConfigurationComponent {
|
|||
.addComponent(autoFormattingCheckBox)
|
||||
.addComponent(autocompletionPostProcessingCheckBox)
|
||||
.addComponent(autocompletionContextAwareCheckBox)
|
||||
.addComponent(autocompletionGitContextCheckBox)
|
||||
.addVerticalGap(4)
|
||||
.addComponent(new TitledSeparator(
|
||||
CodeGPTBundle.get("configurationConfigurable.section.assistant.title")))
|
||||
|
|
@ -161,6 +167,7 @@ public class ConfigurationComponent {
|
|||
state.setAutoFormattingEnabled(autoFormattingCheckBox.isSelected());
|
||||
state.setAutocompletionPostProcessingEnabled(autocompletionPostProcessingCheckBox.isSelected());
|
||||
state.setAutocompletionContextAwareEnabled(autocompletionContextAwareCheckBox.isSelected());
|
||||
state.setAutocompletionGitContextEnabled(autocompletionGitContextCheckBox.isSelected());
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
@ -179,6 +186,9 @@ public class ConfigurationComponent {
|
|||
configuration.getAutocompletionPostProcessingEnabled());
|
||||
autocompletionContextAwareCheckBox.setSelected(
|
||||
configuration.getAutocompletionContextAwareEnabled());
|
||||
autocompletionGitContextCheckBox.setSelected(
|
||||
configuration.getAutocompletionGitContextEnabled()
|
||||
);
|
||||
}
|
||||
|
||||
private Map<String, String> getTableData() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue