Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Khoj plugin with improved search, synchronization and folder management #1018

Merged
merged 5 commits into from
Jan 11, 2025

Conversation

hjamet
Copy link
Contributor

@hjamet hjamet commented Dec 29, 2024

This PR delivers comprehensive improvements to the Khoj plugin across multiple key areas:

🔍 Search Enhancements:

  • Added visual loading indicators during search operations
  • Implemented color-coded results to distinguish between vault and external files
  • Added abort logic for previous requests to improve performance
  • Enhanced search feedback with clear status indicators
  • Improved empty state handling

🔄 Synchronization Improvements:

  • Added configurable sync interval setting in minutes
  • Implemented manual "Sync new changes" command
  • Enhanced sync timer management with automatic restart
  • Improved notification system for sync operations

📁 Folder Management:

  • Added granular folder selection for sync
  • Implemented intuitive folder suggestion modal
  • Enhanced folder list visualization

💅 UI/UX Improvements:

  • Added loading animations and spinners
  • Enhanced search results visualization with color coding
  • Refined chat interface styling
  • Improved overall settings panel organization

🔧 Technical Improvements:

  • Refactored search and synchronization logic
  • Implemented proper request cancellation
  • Enhanced error handling and user feedback
  • Improved code organization and maintainability

- Introduced a new command 'Sync new changes' to allow users to manually synchronize new modifications.
- The command updates the content index without regenerating it, ensuring only new changes are synced.
- User-triggered notifications are displayed upon successful sync.
- Added a new setting to manage sync folders, allowing users to specify which folders to sync or to sync the entire vault.
- Implemented a modal for folder suggestions to facilitate folder selection.
- Updated the folder list display to show currently selected folders with options to remove them.
- Improved CSS styles for chat interface and folder list for better user experience.
- Refactored code for consistency and readability across multiple files.
…Khoj plugin

- Added a new setting for users to configure the sync interval in minutes, allowing for more flexible automatic synchronization.
- Introduced methods to start and restart the synchronization timer based on the configured interval.
- Updated the synchronization logic to use the user-defined interval instead of a fixed 60 minutes.
- Improved code readability and organization by refactoring the sync timer logic.
- Added visual loading indicators to the search modal for improved user experience during search operations.
- Implemented logic to check if search results correspond to files in the vault, with color-coded results for better clarity.
- Refactored the getSuggestions method to handle loading states and abort previous requests if necessary.
- Updated CSS styles to support new loading animations and result file status indicators.
- Improved the renderSuggestion method to display file status and provide feedback for files not in the vault.
@hjamet hjamet changed the title Enhance Khoj Obsidian plugin synchronization system and folder management Enhance Khoj plugin with improved search, synchronization and folder management Dec 29, 2024
Copy link
Member

@sabaimran sabaimran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, @hjamet ! Just a few comments.

src/interface/obsidian/src/search_modal.ts Outdated Show resolved Hide resolved
src/interface/obsidian/src/settings.ts Show resolved Hide resolved
- Translated comments from French to English for better accessibility and understanding.
- Updated CSS comment for loading animation to reflect the change in language.
- Enhanced code readability by ensuring consistent language usage across multiple files.
- Improved user experience by clarifying the purpose of various functions and settings in the codebase.
@sabaimran sabaimran merged commit 85c34a5 into khoj-ai:master Jan 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants