mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Get Files from File input line to match user expectation
- If a user manually edits the input file lines, clicking start should use that. Currently it just looks at the files selected last via file browser - We want to allow users to manually enter file paths in field. Which is why the field hasn't been set to read-only
This commit is contained in:
@@ -157,7 +157,7 @@ class ConfigureScreen(QtWidgets.QDialog):
|
|||||||
default_search_config = self.get_default_config(search_type = child.search_type)
|
default_search_config = self.get_default_config(search_type = child.search_type)
|
||||||
self.new_config['content-type'][child.search_type.value] = merge_dicts(current_search_config, default_search_config)
|
self.new_config['content-type'][child.search_type.value] = merge_dicts(current_search_config, default_search_config)
|
||||||
elif isinstance(child, FileBrowser) and child.search_type in self.new_config['content-type']:
|
elif isinstance(child, FileBrowser) and child.search_type in self.new_config['content-type']:
|
||||||
self.new_config['content-type'][child.search_type.value]['input-files'] = child.getPaths()
|
self.new_config['content-type'][child.search_type.value]['input-files'] = child.getPaths() if child.getPaths() != [] else None
|
||||||
|
|
||||||
def update_processor_settings(self):
|
def update_processor_settings(self):
|
||||||
"Update config with conversation settings from UI"
|
"Update config with conversation settings from UI"
|
||||||
|
|||||||
@@ -65,4 +65,7 @@ class FileBrowser(QtWidgets.QWidget):
|
|||||||
self.lineEdit.setText(",".join(self.filepaths))
|
self.lineEdit.setText(",".join(self.filepaths))
|
||||||
|
|
||||||
def getPaths(self):
|
def getPaths(self):
|
||||||
return self.filepaths
|
if self.lineEdit.text() == '':
|
||||||
|
return []
|
||||||
|
else:
|
||||||
|
return self.lineEdit.text().split(',')
|
||||||
|
|||||||
Reference in New Issue
Block a user