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

[Search Router] Add config for custom bangs #17848

Open
raeperd opened this issue Mar 14, 2025 · 5 comments
Open

[Search Router] Add config for custom bangs #17848

raeperd opened this issue Mar 14, 2025 · 5 comments
Labels
extension: search-router Issues related to the search-router extension extension Issues related to one of the extensions in the Store feature request New feature or improvement

Comments

@raeperd
Copy link
Contributor

raeperd commented Mar 14, 2025

Extension

https://www.raycast.com/franzwilhelm/search-router

Description

Liked the concept of plugin a lot thanks for devs.
It could be better if user can configure custom search settings, without need to adding pr and affecting all ux.

Who will benefit from this feature?

Issue #17719 #17719 can be resolved easily with this feature.
And every other user want additional customization

Anything else?

@raeperd raeperd added extension Issues related to one of the extensions in the Store feature request New feature or improvement labels Mar 14, 2025
@raycastbot raycastbot added the extension: search-router Issues related to the search-router extension label Mar 14, 2025
@raycastbot
Copy link
Collaborator

Thank you for opening this issue!

🔔 @franzwilhelm @lacherogwu you might want to have a look.

💡 Author and Contributors commands

The author and contributors of franzwilhelm/search-router can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot close as not planned Closes the issue as not planned.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopens the issue.
  • @raycastbot assign me Assigns yourself to the issue.
  • @raycastbot good first issue Adds the "Good first issue" label to the issue.
  • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.

@franzwilhelm
Copy link
Contributor

Agreed! But I still think search engines like ChatGPT and Perplexity should be added directly like suggested, as they're relevant for a lot of people

@raeperd
Copy link
Contributor Author

raeperd commented Mar 14, 2025

@franzwilhelm

Yes, that's a great approach too!

Regarding the addition of new bangs, I'd like to suggest storing the non-DuckDuckGo bangs in a separate file.

Currently, src/data/search-engines.ts contains all bangs, including those not specific to DuckDuckGo (like t3chat). Adding engines to this large file makes it harder to reviewing the Git diffs and updating duckduck go bangs.

A possible alternative structure:

  • src/data/bangs-duckduckgo.ts (large file, infrequent updates)
  • src/data/bangs.ts (small, frequently updated)

This separation could improve the readability of the diffs.

@raeperd
Copy link
Contributor Author

raeperd commented Mar 15, 2025

@franzwilhelm,

There’s another approach to this problem. (and i think it's better way)
Instead of using DuckDuckGo’s bang, try using Kagi’s bang.

As a heavy user of Kagi’s Bang, I prefer it over DuckDuckGo’s Bang for several reasons:

  1. MIT Licensed and well-maintained: https://github.com/kagisearch/bangs
  2. Frequently updated: Perplexity and ChatGPT are already supported in Kagi Bangs.
  3. Additional bang features described in Kagi’s Docs can be implemented in this extension in the near future with consistency.
  4. There are multiple issues in duckduckgo's bang, solved in kagi's bang (ex. #170 #175 and extra updates)

This change requires some work. If you’re open to it, I’d be happy to assist.

cc @lacherogwu

@lacherogwu
Copy link
Contributor

@raeperd I liked that approach and you can also trigger a background api call and update the local cache, always fetch the most recent data when Kagi bangs are being updated (don’t forget to parse and verify the data so they don’t try to inject malicious code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: search-router Issues related to the search-router extension extension Issues related to one of the extensions in the Store feature request New feature or improvement
Projects
None yet
Development

No branches or pull requests

4 participants