Skip to content

Promote to production: agent weak-model shortcut, size display, cloud settings persistence - #362

Merged
slaveofcode merged 12 commits into
mainfrom
develop
Aug 29, 2026
Merged

Promote to production: agent weak-model shortcut, size display, cloud settings persistence#362
slaveofcode merged 12 commits into
mainfrom
develop

Conversation

@slaveofcode

@slaveofcode slaveofcode commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Batches the agent improvements tested on localhost:

  • On-device single-candidate shortcut (fixes '0.5B didn't catch that' on clear tasks) + seedArgs
  • humanSize KB display + empty-blob guard (fixes '0 MB')
  • image-format-convert executor + Bahasa phrase routing
  • Cloud settings persistence (preset/model/proxy/tab)
  • Dev-only optimizeDeps pre-bundle (xlsx/turndown/prettier/csso/terser)

…-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.
- 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).
@slaveofcode
slaveofcode merged commit aa2e2d0 into main Aug 29, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant