Skip to content

Commit

Permalink
Google Chrome history search (#172)
Browse files Browse the repository at this point in the history
* Support for searching Google Chrome history

This uses the WASM compiled version of sqlite since [native modules are
not supported](#135).

The query for matching is a rudimenary `title LIKE '%query%'` where
clause. I intend to make this a bit more sophisticated to handle
multiple terms.

It is only using the native throttle support to debounce access to
the database. It's possible that this will need more tuning or better
resource management.

It also does not yet support choosing a specific profile for history.
This would be possible by setting that string in preferences. For now it
defaults to "Default".

* Fix missing type annotation

* Fix command titles

It should use the name of the app as the Subtitle

* Add title to OpenInBrowserAction

* Move bromanko to contributors

* Improve database lifecycle management

This improves the database lifecycle management. Now, the db is loaded
once when the component is mounted and disposed when the component is
unmounted.

Note that I have not been able to see the disposal logic get called. I
suspect that this is either due to the way that Raycast handles
extension component lifecycles or the dev environment operating differently.

* Change copy to clipboard shortcut

CMD+C is reserved for global use

* Share the favicon code between commands

* Always stringify the error message

* Improve search query

This commit changes the search from comparing the entire string as a
single pattern to tokenizing the words and matching each independently.
All terms must be found for it to match.

* Load the last visit date from database

Chrome stores dates as the number of microseconds since 01/01/1601.

* Group entries by date
  • Loading branch information
bromanko authored Oct 26, 2021
1 parent c2ac5c4 commit 3d0f39c
Show file tree
Hide file tree
Showing 7 changed files with 288 additions and 3,959 deletions.
Binary file added extensions/google-chrome/assets/sql-wasm.wasm
Binary file not shown.
Loading

0 comments on commit 3d0f39c

Please sign in to comment.