generated from obsidianmd/obsidian-sample-plugin
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 53
feat/refactor/fix: Web Search Enhancements, Settings Improvements & Bug Fixes #90
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
          
     Closed
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    Corrected the typo "chainOfThoughRemovalRegex" to "chainOfThoughtRemovalRegex"
Key changes: - Reworked coreplugin-match.ts to more reliably extract multi-line match contexts from Obsidian's core search plugin. - Simplified omnisearch-match.ts to better utilize the excerpts provided by the Omnisearch API, leading to more accurate context display. - Updated ripgrep-regex.ts to align with the new search result structure. - Improved line and context handling in search-common.ts. This includes: - A better truncateLine function that preserves the context around the match. - Performance improvements by using binary search (findLineIndexBS) for line lookups instead of linear scanning. - Updated SearchResult interface to better support multi-line matches and clarify the structure of context lines.
This commit Key Changes: - Added a migration step to addresses a regression introduced by fixing a typo in the chainOfThoughtRemovalRegex setting in commit f6f215d. - Enhanced the parseInfioSettings function to handle parsing errors more gracefully by attempting to fix invalid settings with default values instead of a full reset.
Group web search related settings under a single webSearchSettings object for better organization. Additionally, it introduces a new setting urlFetchBackend to control whether Jina or a local parser is used for fetching URL content.
…ent potential encoding errors
merge changes from `file-search-fix` branch
This commit refactors the `parseInfioSettings` function to fix issues in error handling during settings migration, addressing issues that caused test failures. The changes also prevent excessive error logging in the terminal.
This commit introduces support for various web search backends, providing users with more options within the plugin. Key Changes: - Added multiple new search backends - Modified the settings tab to include dropdown menus for selecting the preferred web search backends, along with corresponding API key input fields where necessary. Current Supported Search Backends: - SerpAPI - Scrapingdog - Serper - Jina - DuckDuckGo, - Brave
This commit introduces a major refactoring of the settings schema to improve organization, maintainability, and future extensibility. Key changes: - Renamed `filesSearchSettings` to `fileSearchSettings` - `migrateSettings` function is now moved to `migration.ts`. It can correctly handle schema migrations from older versions to the current one. - Older, unused setting fields are now explicitly marked as deprecated within the settings schema to maintain backward compatibility while facilitating cleaner code. - `DEFAULT_SETTINGS` has been updated to reflect the new structure, with some common schemas moved or reorganized. - Tests for settings parsing have been updated to validate the new schema and migration logic.
Key Changes: - Moved `SETTINGS_SCHEMA_VERSION` and `DeprecatedSettingsSchema` to `shared.ts`. This resolves a circular dependency, ensuring `SETTINGS_SCHEMA_VERSION` is correctly defined when migration objects are initialized. - Simplified conditional checks within individual migration functions. - Modified `parseInfioSettings` to first attempt strict parsing of current settings, deferring to the migration process only when an older or non-standard format is detected.
…ck-duck-scrape` This commit temporarily hide the DuckDuckGo search option from the settings. This is due to unresolved issues with `duck-duck-scrape`.
      
        
      
      
  
    7 tasks
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Description
This pull request includes a series of updates focusing on improving web search capabilities, enhancing settings management, and addressing various bug fixes and refactorings.
Key Changes:
duck-duck-scrape.Checklist before requesting a review
pnpm run test)