Repository navigation
Add Kagi (App) provider and rename existing Kagi provider to Kagi (Web) - #1
benjaminkitt wants to merge 45 commits into
Conversation
There was a problem hiding this comment.
Hello @benjaminkitt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello! Gemini here, providing a summary of this pull request to help everyone quickly understand the changes.
This PR, authored by benjaminkitt, aims to enhance the search provider options within Lawnchair by adding support for the Kagi Android application. To achieve this, the existing Kagi search provider, which previously defaulted to web searches, has been renamed to "Kagi (Web)" for clarity. A new provider, "Kagi (App)", has been introduced specifically to launch searches via the installed Kagi application (com.kagi.search). This provides users with the flexibility to choose their preferred method for Kagi searches directly from the Quick Search Bar (QSB).
Highlights
- New Kagi App Provider: A new search provider,
KagiApp, is added to allow users to perform searches using the installed Kagi Android application (com.kagi.search). This provider is configured with the appropriate package name and marked as anAPPtype provider. - Rename Kagi Web Provider: The existing
Kagisearch provider, which handled web searches, is renamed toKagiWeb. Its internal ID is updated from "kagi" to "kagi_web", and its display name is changed to "Kagi (Web)" using a new string resource. - String Resource Updates: New string resources (
search_provider_kagi_webandsearch_provider_kagi_app) are added instrings.xmlto provide clear display names for the two Kagi search options in the UI. - Provider List Update: The list of available QSB search providers in
QsbSearchProvider.ktis updated to include bothKagiWebandKagiApp, replacing the singleKagientry.
Changelog
Click here to see the changelog
- lawnchair/res/values/strings.xml
- Added new string resource
search_provider_kagi_webwith value "Kagi (Web)" on line 650. - Added new string resource
search_provider_kagi_appwith value "Kagi (App)" on line 651.
- Added new string resource
- lawnchair/src/app/lawnchair/qsb/providers/Kagi.kt
- Renamed the
Kagidata object toKagiWebon line 6. - Updated the
idofKagiWebfrom "kagi" to "kagi_web" on line 7. - Updated the
nameofKagiWebto use the newR.string.search_provider_kagi_webresource on line 8. - Added a new
data object KagiAppdefinition starting on line 18, configuring it with ID "kagi_app", nameR.string.search_provider_kagi_app, package name "com.kagi.search", website "https://kagi.com", and typeQsbSearchProviderType.APP.
- Renamed the
- lawnchair/src/app/lawnchair/qsb/providers/QsbSearchProvider.kt
- Updated the
values()list to includeKagiWebandKagiAppon lines 140 and 141, replacing the oldKagientry.
- Updated the
- lawnchair/src/app/lawnchair/search/algorithms/data/Web.kt
- Updated the
labelproperty of theKagidata object (which represents the web search logic) to use the newR.string.search_provider_kagi_webresource on line 367.
- Updated the
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Search bar on the screen,
Web or app, a choice is keen,
Kagi finds the way.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request effectively introduces a new Kagi (App) search provider and renames the existing Kagi provider to Kagi (Web), enhancing clarity for users. The changes are well-structured and follow existing patterns in the codebase. The updates to string resources, provider definitions, and lists are all logical and correctly implemented.
I have one suggestion regarding the type of the KagiWeb provider for better semantic accuracy, detailed below. Overall, great work on this feature!
Summary of Findings
- Semantic Type for KagiWeb Provider: The
KagiWebsearch provider is currently usingQsbSearchProviderType.LOCAL. It's recommended to change this toQsbSearchProviderType.WEBSITEfor better semantic accuracy, asKagiWebprimarily directs to a website and doesn't perform local device searches.
Merge Readiness
The pull request is well-implemented and addresses the stated goals effectively. There is one medium-severity suggestion regarding the semantic type of the KagiWeb provider. Addressing this would improve code clarity and maintainability. Once this point is considered, the PR should be in excellent shape for merging. As an AI, I am not authorized to approve pull requests; please ensure further review and approval by a repository maintainer.
| @@ -14,3 +14,15 @@ data object Kagi : QsbSearchProvider( | |||
| type = QsbSearchProviderType.LOCAL, | |||
There was a problem hiding this comment.
The KagiWeb provider is currently typed as QsbSearchProviderType.LOCAL. Given that KagiWeb is intended to launch the Kagi website (as indicated by website = "https://kagi.com" and an empty packageName), would QsbSearchProviderType.WEBSITE be a more semantically accurate type here?
QsbSearchProviderType.LOCAL typically implies on-device search capabilities (like AppSearch), whereas QsbSearchProviderType.WEBSITE is designed for providers that primarily open a web URL.
While the current implementation likely falls back to createWebsiteIntent() due to the empty packageName, explicitly setting the type to WEBSITE would better reflect its intended behavior and improve code clarity and maintainability.
| type = QsbSearchProviderType.LOCAL, | |
| type = QsbSearchProviderType.WEBSITE, |
….01 (LawnchairLauncher#5482) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…airLauncher#5483) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
…Launcher#5501) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…Launcher#5502) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Remove redundant amperstands (fix LawnchairLauncher#5491) * Update "Recents" to use "Recents screen" (fix LawnchairLauncher#5492)
… to v1.1.7 (LawnchairLauncher#5461) https://developer.android.com/jetpack/androidx/releases/datastore#1.1.7 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Fix nightly Obtainium URL * Typo --------- Co-authored-by: SuperDragonXD <70206496+SuperDragonXD@users.noreply.github.com> Co-authored-by: Zongle Wang <wangzongler@gmail.com>
…o v2.9.0 (LawnchairLauncher#5067) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
….00 (LawnchairLauncher#5524) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
…5.0 (LawnchairLauncher#5527) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…5.1 (LawnchairLauncher#5530) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
…her#5538) * Fix: Adapt to missing Flags in android 16 qpr1 beta 2 * fix: revert jvm memory flag I accidentally committed it, oops Co-authored-by: Pun Butrach <pun.butrach@gmail.com> --------- Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
* Backport Bubble Tea changes Signed-off-by: Pun Butrach <pun.butrach@gmail.com> * Remove Android Baklava or A16 reference Signed-off-by: Pun Butrach <pun.butrach@gmail.com> --------- Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
…nchairLauncher#5548) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
….01 (LawnchairLauncher#5554) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR migrates the string-based navigation to type-safe navigation (as seen in `PreferenceRoutes.kt`). This should help in the eventual migration to Navigation 3. Around 6 hours of work. Fixes LawnchairLauncher#4875 (updated PreferenceActivity to handle new type-safe navigation) Fixes LawnchairLauncher#5555
* Clarification + How to build specific module Signed-off-by: Pun Butrach <pun.butrach@gmail.com> * Merge suggestion from GitHub Copilot Code Review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Pun Butrach <pun.butrach@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
```diff OLD: Lawnchair.15.Dev.(30b260c).github.release-before.apk (signature: V2) NEW: Lawnchair.15.Dev.(a0f65f7).github.release-after.apk (signature: V2) │ compressed │ uncompressed ├───────────┬───────────┬──────────┼──────────┬──────────┬─────── APK │ old │ new │ diff │ old │ new │ diff ──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼─────── dex │ 6.5 MiB │ 6.5 MiB │ -713 B │ 16 MiB │ 16 MiB │ +84 B arsc │ 5.4 MiB │ 5.4 MiB │ 0 B │ 5.4 MiB │ 5.4 MiB │ 0 B manifest │ 6.5 KiB │ 6.5 KiB │ +2 B │ 29.6 KiB │ 29.6 KiB │ 0 B res │ 2.7 MiB │ 2.7 MiB │ +5 B │ 7.7 MiB │ 7.7 MiB │ 0 B native │ 7 MiB │ 7 MiB │ +1.4 KiB │ 6.5 MiB │ 6.5 MiB │ 0 B asset │ 295.3 KiB │ 295.3 KiB │ -5 B │ 1.8 MiB │ 1.8 MiB │ -3 B other │ 27.7 KiB │ 27.7 KiB │ 0 B │ 71.5 KiB │ 71.5 KiB │ 0 B ──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼─────── total │ 21.9 MiB │ 21.9 MiB │ +723 B │ 37.6 MiB │ 37.6 MiB │ +81 B │ raw │ unique ├────────┬────────┬──────┼────────┬────────┬──────────── DEX │ old │ new │ diff │ old │ new │ diff ─────────┼────────┼────────┼──────┼────────┼────────┼──────────── files │ 4 │ 4 │ 0 │ │ │ strings │ 98905 │ 98906 │ +1 │ 89167 │ 89167 │ 0 (+6 -6) types │ 27237 │ 27238 │ +1 │ 24439 │ 24439 │ 0 (+0 -0) classes │ 22067 │ 22067 │ 0 │ 22067 │ 22067 │ 0 (+0 -0) methods │ 147147 │ 147149 │ +2 │ 140321 │ 140322 │ +1 (+1 -0) fields │ 71909 │ 71909 │ 0 │ 70724 │ 70724 │ 0 (+0 -0) ARSC │ old │ new │ diff ─────────┼──────┼──────┼────── configs │ 405 │ 405 │ 0 entries │ 9730 │ 9730 │ 0 ================= ==== APK ==== ================= compressed │ uncompressed │ ──────────┬──────────┼──────────┬───────┤ size │ diff │ size │ diff │ path ──────────┼──────────┼──────────┼───────┼───────────────────────────────── 1.2 MiB │ +1.4 KiB │ 1.2 MiB │ 0 B │ ∆ lib/arm64-v8a/libRSSupport.so 3 MiB │ -714 B │ 7.7 MiB │ +84 B │ ∆ classes3.dex 460 B │ +4 B │ 358 B │ 0 B │ ∆ res/-9.png 11.8 KiB │ -3 B │ 11.7 KiB │ -3 B │ ∆ assets/dexopt/baseline.prof 1.2 KiB │ -2 B │ 1.1 KiB │ 0 B │ ∆ assets/dexopt/baseline.profm 6.5 KiB │ +2 B │ 29.6 KiB │ 0 B │ ∆ AndroidManifest.xml 330 B │ +2 B │ 228 B │ 0 B │ ∆ res/iO.png 2.8 MiB │ +1 B │ 6.6 MiB │ 0 B │ ∆ classes.dex 869 B │ -1 B │ 1.8 KiB │ 0 B │ ∆ res/iC.xml ──────────┼──────────┼──────────┼───────┼───────────────────────────────── 7 MiB │ +723 B │ 15.5 MiB │ +81 B │ (total) ====================== ==== MANIFEST ==== ====================== │ old │ new ──────────────┼──────────────────┼────────────────── package │ app.lawnchair │ app.lawnchair version code │ 15000201 │ 15000201 version name │ 15.Dev.(30b260c) │ 15.Dev.(a0f65f7) @@ -1,9 +1,9 @@ <manifest - android:compileSdkVersion="35" - android:compileSdkVersionCodename="15" + android:compileSdkVersion="36" + android:compileSdkVersionCodename="16" android:versionCode="15000201" - android:versionName="15.Dev.(30b260c)" + android:versionName="15.Dev.(a0f65f7)" package="app.lawnchair" - platformBuildVersionCode="35" - platformBuildVersionName="15" + platformBuildVersionCode="36" + platformBuildVersionName="16" xmlns:android="http://schemas.android.com/apk/res/android" ================= ==== DEX ==== ================= STRINGS: old │ new │ diff ───────┼───────┼─────────── 89167 │ 89167 │ 0 (+6 -6) + commit: a0f65f7 + version: 15.Dev.(a0f65f7) (15000201) + ~~R8{"backend":"dex","compilation-mode":"release","desugared-library-identifiers":["com.tools.android:desugar_jdk_libs_configuration:2.1.5"],"has-checksums":false,"min-api":26,"pg-map-id":"783046a","r8-mode":"full","version":"8.10.24"} + 15.Dev.(a0f65f7) + a0f65f7 + LawnchairLauncher@a0f65f7 - commit: 30b260c - version: 15.Dev.(30b260c) (15000201) - ~~R8{"backend":"dex","compilation-mode":"release","desugared-library-identifiers":["com.tools.android:desugar_jdk_libs_configuration:2.1.5"],"has-checksums":false,"min-api":26,"pg-map-id":"983a6ba","r8-mode":"full","version":"8.10.24"} - 15.Dev.(30b260c) - 30b260c - LawnchairLauncher@30b260c METHODS: old │ new │ diff ────────┼────────┼──────────── 140321 │ 140322 │ +1 (+1 -0) + com.android.launcher3.util.LooperExecutor close() ```
…awnchairLauncher#5567) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…tions to v2.39.0 (LawnchairLauncher#5570) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit unifies the Kagi search provider into a single entry. The provider now attempts to launch the Kagi mobile app first, and falls back to opening the Kagi website if the app is not installed. This change simplifies the user experience by removing the need to choose between separate "Kagi (Web)" and "Kagi (App)" options.
9cf4e6e to
dfce002
Compare
This PR adds a new Kagi (App) provider that uses the Kagi app (com.kagi.search) for searching, and renames the existing Kagi provider to Kagi (Web) for clarity.
Changes
These changes allow users to choose between using the Kagi website or the Kagi app for searches.
Pull Request opened by Augment Code with guidance from the PR author