mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Hot swap backend config via config screen start button click
- Update configuration to use by the backend, while app is running - Trigger after user hits start button with their config. The config gets written to khoj.yml file first, then the updated config is loaded onto memory
This commit is contained in:
@@ -3,7 +3,9 @@ from PyQt6 import QtWidgets
|
||||
from PyQt6.QtCore import Qt
|
||||
|
||||
# Internal Packages
|
||||
from src.utils import constants, yaml as yaml_utils
|
||||
from src.configure import configure_server
|
||||
from src.utils import constants, state, yaml as yaml_utils
|
||||
from src.utils.cli import cli
|
||||
from src.utils.config import SearchType
|
||||
from src.interface.desktop.file_browser import FileBrowser
|
||||
|
||||
@@ -80,6 +82,12 @@ class ConfigureScreen(QtWidgets.QDialog):
|
||||
del config['processor']['conversation']
|
||||
yaml_utils.save_config_to_file(config, self.config_file)
|
||||
|
||||
# Load config from app config file
|
||||
args = cli(state.cli_args)
|
||||
|
||||
# Configure server with loaded config
|
||||
configure_server(args, required=True)
|
||||
|
||||
self.hide()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user