Commit Graph

865 Commits

Author SHA1 Message Date
Simon Cambier
d66aeeafef #467 - Higher tolerance for errors during indexing, show error when result is missing from search 2025-06-06 19:17:44 +02:00
Simon Cambier
9f13544bb0 1.27.0 2025-05-25 12:37:11 +02:00
Simon Cambier
92e197bd13 Merge branch 'develop' 2025-05-25 12:35:54 +02:00
Simon Cambier
3b60a8fe1b Errors counting 2025-05-25 12:35:24 +02:00
Max Niclas Wächtler
1302ca3a3e fixed typo (#460) 2025-05-05 20:19:37 +02:00
Simon Cambier
b0b9b4de08 Fixed #455 2025-04-04 19:17:44 +02:00
Simon Cambier
3c9d497b42 Fixed build 2025-04-02 12:32:32 +02:00
Simon Cambier
9c09323a11 manifest 1.27.0-beta.1 2025-04-02 12:17:42 +02:00
Simon Cambier
c8be8caba9 1.27.0-beta.1 2025-04-02 12:15:53 +02:00
Simon Cambier
f4ad7a9de1 #454 - Fixed inconsistencies in binding labels 2025-04-02 12:13:10 +02:00
Simon Cambier
40a073e2c8 #452 - Actually let's remove all that code
There is certainly a reason it was so complicated, but it has always been buggy anyway.
2025-03-26 21:55:59 +01:00
Simon Cambier
1a32b709b2 Updated verbose logging description 2025-03-26 21:34:34 +01:00
Simon Cambier
157d985a05 #452 - Fix highlighting with escaped html 2025-03-26 21:34:18 +01:00
Simon Cambier
ee55615951 Fixed mounting ModalInFile 2025-03-22 15:25:02 +01:00
Simon Cambier
8c5efcfa46 Migrated ModalVault syntax to svelte 5 2025-03-22 15:00:59 +01:00
Simon Cambier
8e4bf5ba08 Update to Svelte 5 2025-03-20 21:07:27 +01:00
Simon Cambier
8e0e9c792e Dependencies update 2025-03-20 20:12:48 +01:00
Simon Cambier
3d7932e580 Moved recency setting 2025-02-17 07:47:09 +01:00
Simon Cambier
0be76a4804 Merge branch 'master' of https://github.com/scambier/obsidian-omnisearch 2025-02-15 18:15:46 +01:00
Simon Cambier
d495f49a35 Split settings into multiple files 2025-02-15 18:15:43 +01:00
Simon Cambier
5c0d7f63e3 Update CHANGELOG.md 2025-02-15 16:00:00 +01:00
Simon Cambier
230df3f4b4 1.26.1 2025-02-15 15:55:47 +01:00
Simon Cambier
7925e63106 Yay lazy loading
At long last.
2025-02-15 15:54:43 +01:00
Simon Cambier
89786b712e 1.26.0 2025-02-01 18:56:27 +01:00
Simon Cambier
84812771ec Feature/172 recency (#439)
* Fixed ts errors

* #172 - First draft at recency boost
2025-02-01 18:47:36 +01:00
Eli W. Hunter
9d7f4183cf feat: Allow #heading as display title setting (#434)
* feat: Allow #heading as display name setting

* Add displayTitle usage to create markdown link

* Tweak description text

* Address comments
2025-01-29 09:45:14 +01:00
Simon Cambier
8d52c2023b 1.25.2 2025-01-03 18:22:56 +01:00
YuNing Chen
0ebe903bb9 perf: combine token split into 1 pass (#427) 2025-01-03 12:27:19 +01:00
YuNing Chen
c4fa419aa0 perf: move regexp outside func to avoid repeated construction (#430) 2025-01-03 12:25:49 +01:00
YuNing Chen
e272aeabef chore: better key label display for cmd and alt in macos (#428) 2025-01-03 12:24:01 +01:00
Simon Cambier
351dc30523 Fixed #418 2024-12-01 16:02:13 +01:00
Simon Cambier
07eac93d5c 1.25.1 2024-11-09 17:47:44 +01:00
Simon Cambier
ca3ca3b24b Small logging refactoring
Most logs are now console.debug
Removed "Omnisearch" prefix in (almost) all logs
Removed timestamp prefix
2024-11-09 17:46:48 +01:00
Bao
1c98d8b2d7 Fix uncaught exceptions (#414)
* Fix handling of folders on create trigger

When creating a directory in the vault, omnisearch attempts to index the directory as a document

`on('create', (file) => any, ...)` is triggered for both files and directories, so any triggers on `create` should handle the case where `file` is a `TFolder`.[^1]

[^1]: https://docs.obsidian.md/Reference/TypeScript+API/Vault/on('create')

For example, after running `mkdir foobar` in the vault directory, the
following exception is thrown:

```stacktrace
documents-repository.ts:53 Omnisearch: Error while adding "foobar" to live cache Error: Not a TFile: "foobar"
    at DocumentsRepository.getAndMapIndexedDocument (documents-repository.ts:85:41)
    at DocumentsRepository.addDocument (documents-repository.ts:43:30)
    at DocumentsRepository.getDocument (documents-repository.ts:69:16)
    at eval (search-engine.ts:82:63)
    at Array.map (<anonymous>)
    at SearchEngine.addFromPaths (search-engine.ts:81:15)
    at eval (main.ts:114:26)
    at e.tryTrigger (app.js:1:723011)
    at e.trigger (app.js:1:722944)
    at t.trigger (app.js:1:741049)
```

* Fix handling of empty canvas files

Canvas files can be empty. e.g. when the "Create new canvas" command is called:

- immediately after the command:
  - a new *empty* .canvas file will be created
  - triggering the `create` event and causing a "Unexpected end of JSON input" error
- when saving the file (<cmd/ctrl>+s or "Save current file" command):
  - `{}` will be written to the file
  - triggering a file `modify` event and causing a "canvas.nodes is not iterable" exception

Examples of the exceptions:

```stacktrace
documents-repository.ts:53 Omnisearch: Error while adding "Untitled.canvas" to live cache SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at DocumentsRepository.getAndMapIndexedDocument (documents-repository.ts:100:27)
    at async DocumentsRepository.addDocument (documents-repository.ts:43:19)
    at async DocumentsRepository.getDocument (documents-repository.ts:69:5)
    at async eval (search-engine.ts:82:25)
    at async Promise.all (index 0)
    at async SearchEngine.addFromPaths (search-engine.ts:80:7)
```

```stacktrace
documents-repository.ts:53 Omnisearch: Error while adding "Untitled.canvas" to live cache TypeError: canvas.nodes is not iterable
    at DocumentsRepository.getAndMapIndexedDocument (documents-repository.ts:103:33)
    at async DocumentsRepository.addDocument (documents-repository.ts:43:19)
    at async NotesIndexer.refreshIndex (notes-indexer.ts:29:7)
```
2024-11-05 18:40:58 +01:00
Simon Cambier
01a9e976e6 1.25.0 2024-10-26 11:15:08 +02:00
Simon Cambier
efd99b67a0 small fixes 2024-10-26 11:07:21 +02:00
Simon Cambier
ec82bd29fa Merge branch 'develop'
# Conflicts:
#	manifest-beta.json
#	versions.json
2024-10-26 11:04:33 +02:00
Simon Cambier
45693aac0d Update bug_report.md 2024-10-19 09:43:17 +02:00
Simon Cambier
be61942c84 1.25.0-beta.4 manifest 2024-10-13 19:06:04 +02:00
Simon Cambier
8e5e143d45 1.25.0-beta.4 2024-10-13 18:48:25 +02:00
Simon Cambier
7d7902ec9d Warn when too many errors in a short time 2024-10-13 18:44:22 +02:00
Simon Cambier
fc19f96dfd Renamed CacheManager to DocumentsRepository 2024-10-13 18:16:25 +02:00
Simon Cambier
4ed3b4d612 Dependencies update 2024-10-13 18:02:24 +02:00
Simon Cambier
e2962ec021 Refactored relevant methods to SearchHistory 2024-10-13 18:01:40 +02:00
Simon Cambier
75914d7a9d Changelog update 2024-10-13 17:30:28 +02:00
Simon Cambier
09455c91f2 1.25.0-beta.3 manifest 2024-10-08 20:52:10 +02:00
Simon Cambier
973b632763 1.25.0-beta.3 2024-10-08 20:51:24 +02:00
Simon Cambier
0c41d48963 escape html for external strings 2024-10-08 20:46:12 +02:00
Simon Cambier
9f0c460161 Fixed css classes names 2024-10-08 20:45:34 +02:00
Simon Cambier
af63186aa2 CONTRIBUTING update 2024-10-08 20:39:25 +02:00