Restore Android Multifile and Folder uploads and fix Markdown uploads on all targets#32
Merged
Merged
Conversation
…ploads. not .json
…ort .md file uploads - Added `nativePickFiles` function to handle file and folder picking via AndroidBridge. - Introduced `isNativeFilePickerAvailable` to check for picker availability. - Enhanced `WebViewBridge` to handle file picking requests and deliver results to JavaScript. - Updated `AttachMenu.svelte` and `ProjectsManager.svelte` to utilize the new native picker. - Implemented folder upload functionality with workspace file generation. - Added tests for the new file picker functionality and folder file building.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request restores the support for native Android file and folder picking in the app (reverted by accident), enabling users to select multiple files or entire folders (with subfolders) using the Android system picker. The integration includes backend support in the Android code, a JavaScript bridge to communicate results to the web UI, and updates to the Svelte UI to leverage the new capabilities.
It also improves file validation and error handling, and updates the persona and skill upload to restrict to
.mdfiles, not to.jsonlike it originally did (fix relevant for all targets).Android native file/folder picker integration:
Added support for launching the Android system file and folder pickers from the app, handling both multiple file selection and folder tree traversal, with results delivered asynchronously to the web UI via a custom event. Only text-based files with whitelisted extensions are accepted, and large files or certain directories (e.g.,
node_modules,.git) are skipped.Exposed methods in the
WebViewBridgeto allow JavaScript to request file/folder picking, receive results, and sanitize/validate requests. Added tests for request validation and handler invocation.Web UI and Svelte integration:
AttachMenu.svelte) to use the new Android native file/folder picker when available, including error handling and proper injection of selected files or folders. The UI now checks for picker availability and displays appropriate messages if the feature is unsupported.