Promote to production: agent weak-model shortcut, size display, cloud settings persistence - #362
Merged
Conversation
…-written JS peek-data previews a data file's schema (dimensions + first rows) so the model writes a correct transform; run-on-data runs the model's JS on the full file in a locked-down Web Worker (no DOM/network, 8s timeout) with parseCSV/toCSV/JSON helpers, returning CSV/JSON that chains to spreadsheet-convert for Excel. Covers the long tail of office data ops (clean/filter/pivot/reshape/extract) as 'describe it, the model codes it'. data-sandbox.worker + data-run.lib (peekData/runDataCode).
feat(agent v3): sandboxed data interpreter (transform files with LLM JS)
Wrap mupdf.client's headless PDF ops as executors: pdf-compress (shrink), pdf-rotate (90/180/270), pdf-split (extract pages like '1-3,5' via a new pagerange.lib). 'compress this pdf' scopes only pdf-compress (no image/video collision). Rounds out office/document productivity; all chain in the harness.
Add an optional variable-count file slot (AgentExecutor.multiFile) so tools like pdf-merge can take several files. useAgentChat requestFiles/provideFiles/cancelFiles + pendingFiles UI (multi-select dropzone); runExecutor collects the list and passes fileList to execute; native-FC schema includes the slot. pdf-merge wraps mupdf mergePdfs. Committed to develop (batched for the Sep 1 deploy).
…button
- base-convert no longer matches 'base64' (polluted scope on weak models); validate
bases are 2-36 (was crashing with toString() radix error).
- Recover a single tool's content arg from the message ('format json: {a:1}' →
'{a:1}') before re-asking, so weak models that omit the arg don't re-prompt.
- Attach-file button (📎) next to Send: attached files are used by the next tool
that needs one, so you can provide the file up front instead of a dropzone.
…e-runs - expandIndonesian() bridges ID keywords to English (gambar->image, kompres, gabungkan->merge, buat->create, etc.) in scopeExecutors + routeQuery, so ID queries like 'compress gambar ini ke 100kb' hit the executor, not open-mode. - On-device prompt loop caps each tool to ONE run (ranTools): a 0.5B was re-encoding its own base64 output ~10 times; the tool+args dedup missed it because each output differed.
…lang, ganti/change, misspellings)
- New image-convert executor (png/jpg/webp/avif) backed by convertImage() in canvas.lib, mapped to the existing image-convert registry tool. - expandIndonesian now replaces ID keywords in place (not append) so format phrases like 'ganti gambar ke webp' stay adjacent for matchers.
…d settings persistence - On-device: when the keyword scope collapses to one tool, run it directly (seedArgs maps '1mb'/'100kb' onto targetMb/targetKb) instead of asking a 0.5B to emit JSON it often can't — fixes 'I didn't quite catch that' on clear tasks. - humanSize() reports sub-MB outputs in KB (no more '0 MB'); empty-blob guard on video-compress. - AskAgent persists the cloud preset/model/proxy + last-used tab to localStorage so reopening returns to the chosen provider instead of the OpenAI default. - Dev-only: pre-bundle xlsx/turndown/prettier/csso/terser in optimizeDeps so those tools stop 404-ing on first dynamic import locally (no prod effect).
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.
Batches the agent improvements tested on localhost: