Skip to content

Comments

Show autocomplete suggestions for File Query Filters on Obsidian App#1128

Merged
debanjum merged 5 commits intokhoj-ai:masterfrom
samhoooo:master
Feb 22, 2026
Merged

Show autocomplete suggestions for File Query Filters on Obsidian App#1128
debanjum merged 5 commits intokhoj-ai:masterfrom
samhoooo:master

Conversation

@samhoooo
Copy link
Contributor

@samhoooo samhoooo commented Mar 4, 2025

Closes #1025

Show autocomplete suggestions for File Query Filters on Obsidian App

Changes

  • When you type in search modal, and matches the pattern file:, you should see list of all files in vault and non-vault
  • This list is filtered down as you type more letters

Technical Details

  • Added file filter mode (isFileFilterMode state) to filter search results by specific files
  • Updated getSuggestions() function to search file from vault and non-vault via khoj backend.
  • Updated the selection behavior to handle both file selection and search result selection

Testing

  • Test deleting user messages
  • Test deleting Khoj responses
  • Verify both messages in a turn are removed
  • Verify deletion persists after page refresh
  • Verify no delete button on setup hint
  • Verify no delete button on error message
  • Verify no delete button on conversation starter
  • Test error cases (network failure, etc)

Screensort

demo.mov

@debanjum debanjum force-pushed the master branch 2 times, most recently from 535f353 to 0f0cfba Compare July 9, 2025 06:27
- Unify regex between input listener and getSuggestions to both use
  /file:([^"\s]*)$/ to prevent mismatched state when file: token is
  not at end of input
- Reset isFileFilterMode when input no longer matches file filter
  pattern (previously got stuck in file filter mode on clear)
- Preserve original selectSuggestion behavior for normal search
  results instead of reimplementing close+onChoose
# Conflicts:
#	src/interface/obsidian/styles.css
@gitguardian
Copy link

gitguardian bot commented Feb 22, 2026

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
15894534 Triggered Generic High Entropy Secret 6f20320 docker-compose.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@debanjum debanjum merged commit 0ba0f3d into khoj-ai:master Feb 22, 2026
2 checks passed
@debanjum
Copy link
Member

Thanks for the PR! It took a long while but finally reviewed and merged your changes (with some improvements)

@samhoooo
Copy link
Contributor Author

Thanks for the PR! It took a long while but finally reviewed and merged your changes (with some improvements)

Thanks for the merge and review!

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.

Show autocomplete suggestions for File Query Filters in Search on Obsidian App

2 participants