Show current config on config screen. Load default config if config unset

- Track current (saved/loaded) config separate from the new config (to
  be written) when user clicks Start

- Fallback to using default config when no config for the specific
  content type or processor is specified in khoj.yml
  - Earlier were only loading default config on first run, not after

- Create Child CheckBox, LineEdit classes for Processor Widgets
  - Create ProcessorType, similar to SearchType
  - Track ProcessorType the widgets are associated with
  - Simplify update, save, load of config based on type
This commit is contained in:
Debanjum Singh Solanky
2022-08-11 19:11:25 +03:00
parent 23e06f483d
commit 1ff049599f
3 changed files with 98 additions and 30 deletions

View File

@@ -63,7 +63,7 @@ class FileBrowser(QtWidgets.QWidget):
def setFiles(self, paths):
self.filepaths = paths
if len(self.filepaths) == 0:
if not self.filepaths or len(self.filepaths) == 0:
return
elif len(self.filepaths) == 1:
self.lineEdit.setText(self.filepaths[0])