Skip to content

Add file upload to the Run Mission dialog - #35

Open
mlund01 wants to merge 2 commits into
mainfrom
feature/file-input-upload
Open

Add file upload to the Run Mission dialog#35
mlund01 wants to merge 2 commits into
mainfrom
feature/file-input-upload

Conversation

@mlund01

@mlund01 mlund01 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Adds support for the file mission input type (squadron #112) in command center.

Summary

When a mission declares a file(...) input, the Run Mission dialog now renders a file picker instead of a text box. The chosen file is read in-browser and staged as the base64 {filename, content_base64} envelope the runner expects, posted through the existing inputs map (no backend change needed).

  • Picker UI: "Choose file" → shows filename + size with Replace / clear actions; the run button stays disabled until a file is staged (file inputs are required).
  • 10 MB client-side cap, mirroring maxFileInputBytes in the runner, so oversize files are rejected before upload.
  • accept covers text, image (PNG/JPEG/GIF/WebP), SVG, and PDF — the types an agent can read via file_read or view via file_view (squadron #114).
  • Thumbnail preview for image selections.

Notes

Pairs with squadron #114 (file_view image/SVG/PDF support) — the dialog accepts those types because the agent can now perceive them. No shadcn primitives were modified; styling is at the usage site.

mlund01 added 2 commits June 23, 2026 22:27
Support the `file` mission input type in command center: a file picker that
stages the chosen file as the base64 `{filename, content_base64}` envelope the
runner expects, with a 10 MB client-side cap mirroring the runner.

Accepts text, image (PNG/JPEG/GIF/WebP), SVG, and PDF types, and shows an
inline thumbnail preview for image selections.
Render a file mission input in the run Inputs tab as an image preview when it
is previewable (PNG/JPEG/GIF/WebP/SVG), otherwise as the filename and decoded
size, instead of dumping the raw base64 envelope JSON. Non-file inputs still
render as plain text.
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