From fb62f66964424b2776369a217ac9b0fd917f3044 Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Thu, 23 Jul 2026 19:05:42 +0530 Subject: [PATCH 1/2] feat(files): move workspace indexing and search to native for saf/files --- src/components/inputhints/index.js | 36 +- src/components/palette/index.js | 16 +- src/lib/acode.js | 17 +- src/lib/fileIndex.js | 256 ++++++++++++ src/lib/fileList.js | 169 ++++---- src/lib/openFolder.js | 2 +- src/palettes/findFile/index.js | 59 ++- src/plugins/sdcard/index.d.ts | 9 + src/plugins/sdcard/src/android/SDcard.java | 6 + .../sdcard/src/android/WorkspaceIndex.java | 383 ++++++++++++++---- src/plugins/sdcard/www/plugin.js | 3 + src/sidebarApps/searchInFiles/index.js | 58 +-- 12 files changed, 802 insertions(+), 212 deletions(-) create mode 100644 src/lib/fileIndex.js diff --git a/src/components/inputhints/index.js b/src/components/inputhints/index.js index 23bba3cfe..9e8f5fad6 100644 --- a/src/components/inputhints/index.js +++ b/src/components/inputhints/index.js @@ -27,9 +27,11 @@ import "./style.scss"; * @param {HTMLInputElement} $input Input field * @param {Array|HintCallback} hints Hints or a callback to generate hints * @param {(value: string) => void} onSelect Callback to call when a hint is selected + * @param {object} [options] + * @param {boolean} [options.dynamic] Regenerate hints when input changes * @returns {{getSelected: ()=>HTMLLIElement, container: HTMLUListElement}} */ -export default function inputhints($input, hints, onSelect) { +export default function inputhints($input, hints, onSelect, options = {}) { /**@type {HTMLUListElement} */ const $ul =