- What
- Add Button to Open Search Interface on Web in "Configure Screen"
- Provides GUI affordance for opening search interface to Linux users
- On Linux
- Show Configure Screen, even if not first run experience
- Do no show system tray on Linux
- Quit app on closing Configure Screen
- On Windows, Mac
- Show Configure screen only if first run experience
- Show system tray always
- Do not quit app on closing Configure Screen
- Why
- Configure screen is the only GUI element on Linux. So closing it
should close the application
- On Windows, Mac the system tray exists, so app should not be closed
on closing configure screen
- What
- On Linux
- Show Configure Screen, even if not first run experience
- Do no show system tray on Linux
- Quit app on closing Configure Screen
- On Windows, Mac
- Show Configure screen only if first run experience
- Show system tray always
- Do not quit app on closing Configure Screen
- Why
- Configure screen is the only GUI element on Linux. So closing it
should close the application
- On Windows, Mac the system tray exists, so app should not be closed
on closing configure screen
- Start evolving configure screen away from just being a configure screen
- Update Window Title to just say Khoj
- Allow Opening Web Interface to Search from Khoj configure screen
- Rename "Start" Button to more accurate "Configure"
- Disable Search button on first run and while configuring app
- Reload settings in separate thread to not freeze Config Screen
- Allow user to quit application from the terminal via SIGINT
- Update Title of Configure Screen to follow "[Screen] - App" pattern
- Increase Width of Configure Screen
- Let Input Fields Wrap. Adjust Height based on Text in Field
- Rename FileBrowser Button Text to "Select" instead of "Add"
- Reduce user confusion on how to add multiple files per content type
- Create a reusable class for the Conversation Label+Text Input Field
- Deep copy default_config when assigning to prevent it being overwritten by updates
- Issue
- In the previous form, updates to self.current_config would update
default_config as python does a shallow copy
- So self.current_config is just referencing the values of default_config
- Hence updates to current_config updates the default_config values too
- This is not what we want
- Fix
- Deep copy the default_config values. Now updates to
self.current_config wouldn't affect the default_config
- Generating embeddings takes time
- If user enables a content type and clicks start.
The app starts to generate embeddings when loading the new settings
- Run this function in a separate thread to keep config screen responsive
- But disable start button to prevent re-entrant threads
- Also show a minimal visual indication that the app is saving state
- Convert Input Fields into PlainTextEdit
- Display Each Selected File on a Separate Line in Field
- Set Height of FileBrowser Input Field based on Number of Lines/Files
- This fixes the field expanding when configure screen is expanded
- Allows for reusability of the labelled text field
- Simplifies the logic to save settings for conversation processor
- Handle situation where app config directory or file does not exist
- Set `default_config` in the `constants` module directly.
- Instead of having to load from khoj_sample.yml file. Packaging data files into pip etc is annoyingly tricky. Avoid it
- Create khoj config directory if it doesn't exist
- Load config from `constants.default_config` if khoj.yml config doesn't exist
- Resolve `config_file` path in argument to absolute at app start
Avoids conversion to absolute path across different parts of the app
- Avoid having to pass the khoj_sample.yml data file into pip, native apps
- Packaging data files into python packages is annoying.
- There's `MANIFEST.in`, `data_files` and `package_data` in setup.py
- Bdist, wheel, generated source tarball use different set of these fields
and put the data files in different locations
- Rather just code the default config into a constant. Avoid
pointless file reads as well this way
- Assume path is absolute in yaml util module while saving, loading file
- This follows same convention as jsonl. Which just operates on
passed file path, assuming it is of appropriate form.
Responsibility to put it in appropriate form is on the caller, for now
- Include khoj_sample.yml in pip package to load default config from
- Create khoj config directory if it doesn't exist
- Load config from khoj_sample.yml if khoj.yml config doesn't exist
## Purpose
Simplify Installing and Configuring Khoj
## Details
- **Create Native Desktop Interface**
- **Add System Tray** to provide background interface for user to
- Open Search Interface
- Configure App
- **Create Configure Screen**
- Simplify configuring Khoj
- Specify content type to enable Khoj for
- Automatically show configure screen on First Run
- Manually invoke configure screen from System Tray
- **Wrap Khoj into a `.app` for MacOS** using `PyInstaller`
- Create pyinstaller `.spec` file using `Pyinstaller`
- Generate `.app` for MacOS using `pyinstaller Khoj.spec`
- Hopefully can get a `.exe` for Windows, `.deb` for Debians etc soon, once can check on an actual machine
- **Modularize Khoj** further
- Extract controllers/routes into a separate `routes.py` module
- Extract global, shared app state into a separate `state.py` module
- Extract configuration into a separate `configure.py` module
- Put Desktop Interface Qt Components under `interface/desktop`
Resolves#56
Conflicts:
- src/main.py
- router functions have moved to router
- move logic to handle null query perf timer variables into
router.py
- set main.py to current branch, not master
- 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
- 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
- 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
- Decouple configuring backend from starting server.
Backend search and processors can be configured after the backend
server has started
- Set global state in main instead of in configure_server method.
This allows the app to start even if configure_server exits early in
the first run scenario, where no config available to configure server
- Now start server, even if no config, before GUI started in main
- This refactor of app startup flow will allow users to configure
backend using the configure screen after server start
- Only pass processor config arg required by configure_processor. Not
the unused full config object
- Type arguments passed to methods configure processors
- Import json for use by conversation processor to load logs